-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Low-Level Controllers Topic #810
Conversation
Thanks for helping in improving MoveIt and open source robotics! |
dc1f2f5
to
4f9fbe9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this thorough rework of the controller tutorial. There are many nice contributions. However, for some parts I liked the previous text more. Thus in my additional commit, I tried to merge the old and new stuff getting the best from both worlds.
I didn't yet worked through the new code sections. (Sorry, time is limited).
doc/controller_configuration/controller_configuration_tutorial.rst
Outdated
Show resolved
Hide resolved
doc/controller_configuration/controller_configuration_tutorial.rst
Outdated
Show resolved
Hide resolved
I checked ROS Control 1 documentation - it's just one page and links to presentation & paper. The presentation mentions "resources" but does not say that resources are joints. No specific mention of controllers claiming joints. Also checked ROS Control 2 documentation - it's smoother but still has large gaps. I recommend leaving this in, otherwise I will have to copy-and-paste it into 100 different answers on Robotics Stack Exchange - it's a lot easier to link to relevant documentation. Other than that, things looking good. Last remaining issue is we need to use an example project that has ROS Control configuration, and Panda does not. I see you replaced all the examples with Panda config. The MSA-generated project must have the following to be a valid example here:
Panda only has RViz configuration to launch with fake controllers. Would you like me to setup |
No, please don't do that. If you want to augment a robot config with such a config, consider using the Panda robot or Fanuc robot in Before merging this, I need to work through the code example sections. I didn't find time for this yet. |
Sorry, I didn't realize I was not being clear. By "setup panda with moveit config" I meant augmenting panda_moveit_config by re-running the wizard to make sure all the files normally generated by MSA exist, are filled out, and work. |
I think I understood you correctly. And I suggest not to update the standard |
My first few attempts to re-gen panda_moveit_config in moveit_resources (using panda_description) failed. EDIT 1Apparently MSA does not add Continuing to troubleshoot. If this takes too long I'm fine with giving up on this aspect, and getting it patched up later in another PR. No reason to over-extend and keep PRs open for a long time when there's always another PR. EDIT 2If you are looking to test the code, see third_draft branch in trajectory_controller_example repo. If you clone that into a ROS1 workspace and install packages with |
Regarding the issues you observed with Gazebo:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see so much value in the two code sections. The mainly explain pluginlib usage, which is documented elsewhere.
doc/controller_configuration/controller_configuration_tutorial.rst
Outdated
Show resolved
Hide resolved
doc/controller_configuration/controller_configuration_tutorial.rst
Outdated
Show resolved
Hide resolved
doc/controller_configuration/controller_configuration_tutorial.rst
Outdated
Show resolved
Hide resolved
doc/controller_configuration/controller_configuration_tutorial.rst
Outdated
Show resolved
Hide resolved
doc/controller_configuration/controller_configuration_tutorial.rst
Outdated
Show resolved
Hide resolved
doc/controller_configuration/controller_configuration_tutorial.rst
Outdated
Show resolved
Hide resolved
doc/controller_configuration/controller_configuration_tutorial.rst
Outdated
Show resolved
Hide resolved
….rst Co-authored-by: Robert Haschke <[email protected]>
I think we found a happy middle here: the topic starts with a survey of controller managers and their settings (split by type), then goes into integrating controllers (again split by type) |
…controllers by type
Remapping /joint_states topic | ||
----------------------------- | ||
<param name="moveit_controller_manager" value="moveit_ros_control_interface::MoveItMultiControllerManager" /> | ||
|
||
When you run a `move group node <../move_group_interface/move_group_interface_tutorial.html>`_, you may need to remap the topic /joint_states to /robot/joint_states, otherwise MoveIt won't have feedback from the joints. To do this remapping you could make a simple launch file for your node as follows: :: | ||
.. note:: | ||
The `Simple Controller Manager` is generic as it can interface controllers from multiple ROS controller managers by specifying different prefix names in the bridging configuration file. | ||
|
||
<node pkg="moveit_ros_move_group" type="move_group" name="any_name" output="screen"> | ||
<remap from="joint_states" to="robot/joint_states"/> | ||
</node> | ||
Controller Switching and Namespaces | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Or you can make a subscriber with the correct topic name and then ensure that the starting robot state for your move group corresponds to a correct joints angle by using the call back of this subscriber. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I explicitly moved that section to the end as it is not strongly related to the current sections.
Congrats on getting your first MoveIt pull request merged and improving open source robotics! |
Thanks for the merge! Sorry the PR had to bounce as both of us were busy at different times. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being late to the party but I still find this very confusing and would love to see more clarity
<!-- load controller_list --> | ||
<rosparam file="$(find robot_moveit_config)/config/controllers.yaml"/> | ||
</launch> | ||
Alternatively to the simple controller manager described above, MoveIt also provides a controller manager that directly interfaces the `ROS Controller Manager <http://wiki.ros.org/controller_manager>`_. Instead of using a bridging configuration file like ``simple_moveit_controllers.yaml``, this controller manager directly queries the ROS Controller Manager for available controllers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently trying to use ros_control for the first time and it is not clear to me when I would use which controller manager. It says "Alternatively" here but not why I would choose this alternative.
Also the actual name of the plugin is not spelled out.
Debugging Information | ||
--------------------- | ||
The ``FollowJointTrajectory`` or ``GripperCommand`` interfaces on your robot must be communicating in the namespace: ``/name/action_ns``. In the above example, you should be able to see the following topics (using *rostopic list*) on your robot: | ||
The *MoveIt ROS Control Controller Manager* can only interface controllers from the single ROS controller manager found in the ROS namespace defined by the ROS parameter ``~ros_control_namespace`` (defaults to ``/``). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was not clear to me where to put this parameter and it belongs to the previous section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that this part assumes you are very comfortable with ROS configuration.
The "~" means root or top level (you could say "global") ROS configuration namespace. There is a number of ways to set global parameters, such as specifying them as command line arguments, putting them in launch files, loading them from YAML, or setting them via command line CLI commands.
This parameter is being read by controller_manager_plugin.cpp
:
/**
* \brief The default constructor. Reads the namespace from ~ros_control_namespace param and defaults to /
*/
MoveItControllerManager()
: ns_(ros::NodeHandle("~").param("ros_control_namespace", std::string("/")))
, loader_("moveit_ros_control_interface", "moveit_ros_control_interface::ControllerHandleAllocator")
{
ROS_INFO_STREAM("Started moveit_ros_control_interface::MoveItControllerManager for namespace " << ns_);
}
The easiest way to set it would probably be in ros_controllers.launch
launch file by using param
tag, but you could also pick any other launch file where you think it makes the most sense.
<param name="ros_control_namespace" value="/myrobotcontrol" />
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
* ``name``: The name of the controller. (See debugging information below for important notes). | ||
* ``action_ns``: The action namespace for the controller. (See debugging information below for important notes). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the "debugging info" is now above
?
Also it would be super helpful to add more debugging tips. Currently my robot is not moving and I have no idea why. Is there a way to make ros_control
acknowledge that it received a trajectory? Print the content? This kind of thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this was moved too many times. We can get this fixed.
@simonschmeisser we can setup Zoom if you like, to make it a bit more interactive. First question I have, is the current documentation after this pull request better than the previous version?
The "Low-Level Controllers" topic follows the following macro-structure:
Here's a high-level summary, let me know if this makes sense.
|
Description
There is a lot of confusion around different controller managers supported by MoveIt and their configuration settings, integrating controllers with MoveIt by linking them with existing controller handle allocator plugins, and writing controller handles and allocators. Issues reported on GitHub, posts on Robotics Stack Exchange, ROS Answers, Google Groups attest that this part of documentation is both critical to integrating new robots with MoveIt and lacks sufficient depth and clarity.
This pull request addresses issues created in MoveIt 1 repository:
Questions for reviewers:
ros_controllers.yaml
is blank for unknown reason, and there is nogazebo_demo.launch
file in its moveit config package. Both features are needed for examples in this article.https://docs.ros.org/en/noetic/*
planning_with_approximated_constraint_manifolds_tutorial.rst
so I assume it's fine.https://github.com/ros-controls/ros_controllers/blob/noetic-devel/*
https://github.com/ros-planning/moveit/blob/master/*
Checklist