-
Notifications
You must be signed in to change notification settings - Fork 569
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
Don't assume gripper controller for single joint control in MoveIt Setup Assistant #2555
Conversation
We'd also like this backported to Humble |
moveit_setup_assistant/moveit_setup_controllers/src/ros2_controllers_config.cpp
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2555 +/- ##
==========================================
+ Coverage 50.52% 50.52% +0.01%
==========================================
Files 387 387
Lines 32099 32099
==========================================
+ Hits 16215 16216 +1
+ Misses 15884 15883 -1 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Sebastian Jahr <sebastian.jahr@tuta.io>
@@ -192,7 +192,7 @@ bool ROS2ControllersConfig::GeneratedControllersConfig::writeYaml(YAML::Emitter& | |||
emitter << YAML::Value; | |||
emitter << YAML::BeginMap; | |||
{ | |||
if (ci.joints_.size() != 1) | |||
if (ci.type_ != "position_controllers/GripperActionController") |
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.
While the diff will be slightly larger - maybe swap these statements so that we aren't working in negatives?
if (ci.type_ == "position_controllers/GripperActionController")
{
emitter << YAML::Key << "joint" << YAML::Value << ci.joints_[0];
}
else
{
emitter << YAML::Key << "joints" << YAML::Value << ci.joints_;
}
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.
The default behavior is to use the "joints" parameter as only the gripper controller uses the singular "joint". Either putting the "default" or "positive" clause first would work, but I think I'll leave it as is for now.
…tup Assistant (#2555) * For single joint controllers which are not gripper controllers, still output joints list * Use OR * Only check for GripperActionController Co-authored-by: Sebastian Jahr <sebastian.jahr@picknik.ai> --------- Co-authored-by: Sebastian Jahr <sebastian.jahr@picknik.ai> (cherry picked from commit 81094a6)
…tup Assistant (#2555) * For single joint controllers which are not gripper controllers, still output joints list * Use OR * Only check for GripperActionController Co-authored-by: Sebastian Jahr <sebastian.jahr@picknik.ai> --------- Co-authored-by: Sebastian Jahr <sebastian.jahr@picknik.ai> (cherry picked from commit 81094a6)
…tup Assistant (backport #2555) (#2560) * For single joint controllers which are not gripper controllers, still output joints list * Use OR * Only check for GripperActionController Co-authored-by: Sebastian Jahr <sebastian.jahr@picknik.ai> --------- Co-authored-by: Sebastian Jahr <sebastian.jahr@picknik.ai> (cherry picked from commit 81094a6) Co-authored-by: Forrest Rogers-Marcovitz <39061824+forrest-rm@users.noreply.github.com>
…tup Assistant (backport #2555) (#2559) * For single joint controllers which are not gripper controllers, still output joints list * Use OR * Only check for GripperActionController Co-authored-by: Sebastian Jahr <sebastian.jahr@picknik.ai> --------- Co-authored-by: Sebastian Jahr <sebastian.jahr@picknik.ai> (cherry picked from commit 81094a6) Co-authored-by: Forrest Rogers-Marcovitz <39061824+forrest-rm@users.noreply.github.com>
Description
The MoveIt Setup Assistant assumed any controller with a single joint was a gripper controller. This created a bug in the generated ros2_controllers yaml with parameter
joint
instead ofjoints
.