-
Notifications
You must be signed in to change notification settings - Fork 490
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
[MSA] ros2_control Integration #1299
Conversation
Codecov Report
@@ Coverage Diff @@
## feature/msa #1299 +/- ##
===============================================
- Coverage 61.58% 61.56% -0.01%
===============================================
Files 274 274
Lines 24966 24966
===============================================
- Hits 15373 15369 -4
- Misses 9593 9597 +4
Continue to review full report at Codecov.
|
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 tested this locally and the result looks OK. I left couple questions about small things here and there.
One another thing I noticed while testing this is the following error:
I get that error after clicking the Auto Add FollowJointsTrajectory Controllers For Each Planning Group
button. I get that error even when I do have planning groups defined (like in that screenshot). If the list of controllers is empty, no error, but clicking on the auto add button again shows that error popup. I didn't check if it is related to this particular PR but it might be fixable within this PR.
...tant/moveit_setup_controllers/include/moveit_setup_controllers/moveit_controllers_config.hpp
Show resolved
Hide resolved
/** | ||
* \brief Adds a controller to ros_controllers_config_ vector | ||
* \brief Adds a controller to controllers_config_ vector |
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 would be a nice improvement if every function followed this documentation style with brief, then parameters (input or output, hopefully never output or mixed) and return, when applicable.
moveit_setup_assistant/moveit_setup_controllers/src/moveit_controllers_config.cpp
Show resolved
Hide resolved
// TODO: Output possible trajectory_execution parameters including... | ||
// * allowed_execution_duration_scaling: 1.2 | ||
// * allowed_goal_duration_margin: 0.5 | ||
// * allowed_start_tolerance: 0.01 |
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.
Consider adding these in this PR. 🙏
c653b3c
to
d64892e
Compare
b34262f
to
e371b31
Compare
...p_assistant/moveit_setup_controllers/include/moveit_setup_controllers/moveit_controllers.hpp
Outdated
Show resolved
Hide resolved
...p_assistant/moveit_setup_controllers/include/moveit_setup_controllers/moveit_controllers.hpp
Show resolved
Hide resolved
...tup_assistant/moveit_setup_controllers/include/moveit_setup_controllers/ros2_controllers.hpp
Outdated
Show resolved
Hide resolved
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 tested this and was able to generate ros2_control files without any problems. The launch files at least launch normally know. I'm still getting the following error when I'm launching demo.launch.py:
[spawner-5] [INFO] [1654786906.095245390] [spawner_panda_arm_hand_controller]: Waiting for '/controller_manager' services to be available
[spawner-6] [INFO] [1654786906.095696045] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-6] [INFO] [1654786908.102498881] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-5] [INFO] [1654786908.102495244] [spawner_panda_arm_hand_controller]: Waiting for '/controller_manager' services to be available
[spawner-5] [INFO] [1654786910.110568133] [spawner_panda_arm_hand_controller]: Waiting for '/controller_manager' services to be available
[spawner-6] [INFO] [1654786910.110702876] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-6] [INFO] [1654786912.118679627] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-5] [INFO] [1654786912.119128218] [spawner_panda_arm_hand_controller]: Waiting for '/controller_manager' services to be available
[spawner-6] [ERROR] [1654786914.127482870] [spawner_joint_state_broadcaster]: Controller manager not available
[spawner-5] [ERROR] [1654786914.128252414] [spawner_panda_arm_hand_controller]: Controller manager not available
which might be out of scope of this PR. Another TODO would be to fix the rviz configs as well., which is also out of scope of this PR. Thus, I'm happy to approve as is.
@vatanaksoytezer Was this with a clean panda config, or building off of the existing one?
@vatanaksoytezer Open a ticket? I'm not sure what you're talking about |
A fresh panda config I generated with this branch from scratch.
When we launch rviz, the motion planning, robot model, fixed frame etc. on rviz. |
This should be fixed with the latest commit.
I resolved this with #1316, but its on |
...tant/moveit_setup_controllers/include/moveit_setup_controllers/urdf_modifications_widget.hpp
Outdated
Show resolved
Hide resolved
emitter << YAML::Key << "action_ns" << YAML::Value << "follow_joint_trajectory"; | ||
emitter << YAML::Key << "default" << YAML::Value << "true"; | ||
} | ||
else |
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 believe you could safely drop this, or make it an error. All of the MoveIt ControllerManager stuff only works with FollowJointTrajectory, so there would be no reason to configure anything else.
@JafarAbdi @schornakj do you agree?
else | |
else | |
{ | |
// Throw error or something | |
RCLCPP_WARN_STREAM((*logger_), | |
"MoveIt controllers only work with FollowJointTrajectory-type controllers."); | |
return false; | |
} |
moveit_setup_assistant/moveit_setup_controllers/src/ros2_controllers_config.cpp
Outdated
Show resolved
Hide resolved
if (controller.joints_.empty()) | ||
{ |
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.
Is this basically creating one default joint, if none are defined? Prob should print a warning in this case.
if (controller.joints_.empty()) | |
{ | |
if (controller.joints_.empty()) | |
{ | |
RCLCPP_WARN_STREAM_ONCE((*logger_), "Did not find even one valid joint in the ros2_control yaml `joints` list. Creating a dummy default."); |
...p_assistant/moveit_setup_controllers/include/moveit_setup_controllers/moveit_controllers.hpp
Outdated
Show resolved
Hide resolved
...p_assistant/moveit_setup_controllers/include/moveit_setup_controllers/moveit_controllers.hpp
Show resolved
Hide resolved
moveit_setup_assistant/moveit_setup_controllers/templates/config/ros2_control.xacro
Show resolved
Hide resolved
...tup_assistant/moveit_setup_controllers/include/moveit_setup_controllers/ros2_controllers.hpp
Outdated
Show resolved
Hide resolved
91e6f17
to
5fabe99
Compare
…/config/setup_step)
Co-authored-by: AndyZe <andyz@utexas.edu>
2b4d321
to
25551c3
Compare
I'll keep an eye on this and merge when it passes CI |
🎉 |
* Modified URDF Infrastructure * Control Xacro Config * URDF Modifications Widget * Use same base class for ROS2Controllers and MoveItControllers (widget/config/setup_step) * Further cleanup * Fix ModifiedURDF Generation * Apply suggestions from code review Co-authored-by: AndyZe <andyz@utexas.edu> * Rename button variable * Clang line length fix Co-authored-by: AndyZe <andyz@utexas.edu>
Description
Modifies the existing ControllersWidget to generatemoveit_controllers.yaml
(Generatingros_controllers.yaml
will be a different PR). The main functional difference is in the formatting of the yaml.Edit: I realized I could reuse a lot of the existing functionality for both
moveit_controllers.yaml
andros2_controllers.yaml
.Here is the full
ros2_control
flow:URDF Modifications
ROS2 Controllers
MoveIt Controllers
Checklist