-
Notifications
You must be signed in to change notification settings - Fork 938
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
Fix group states #1781
Fix group states #1781
Conversation
@@ -349,6 +354,8 @@ void RobotModel::buildGroupStates(const srdf::Model& srdf_model) | |||
"but that joint is not part of group '%s'", | |||
group_state.name_.c_str(), jt->first.c_str(), jmg->getName().c_str()); | |||
} | |||
if (!remaining_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.
Additionally to throwing a warning, default values should be 0 or the state might be invalid. Alternatively, we could also make this an error and don't add the state at all. Or do you think we should allow incomplete states in order to support values for unspecified "subgroups"?
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 group state is essentially a map: joint name -> value. Hence, it is fine to leave some values "undefined" (not listed in the map) as long as setToDefaultState
starts from a fully-defined state.
This should be the case anyway as the there might be joints outside the JMG, which will definitely not be modified by setToDefaultState
. The fake controller manager takes care of this (now).
@henningkayser, @JafarAbdi: This fix doesn't resolve the failing unit test. Same for #1780. |
@rhaschke @henningkayser I debugged this exception
I think the reason is a dangling reference, the exception happens in this line In the MoveItCpp constructor, we pass This's the stack call for a reference |
Just fix the order of resetting variables in the custom destructor:
|
03c723f
to
53d6135
Compare
Codecov Report
@@ Coverage Diff @@
## master #1781 +/- ##
=========================================
+ Coverage 47.58% 48.3% +0.72%
=========================================
Files 290 294 +4
Lines 22950 23232 +282
=========================================
+ Hits 10920 11223 +303
+ Misses 12030 12009 -21
Continue to review full report at Codecov.
|
- issue a warning when building the robot model - use a RobotState initialized to joint defaults for fake controllers
- update robot state before planning - release tf_listener_ and tf_buffer_ in correct order - publish virtual joint
923ebe8
to
601f550
Compare
As pointed out in #1780 (comment),
Both issues are fixed with this PR. This should fix the flaky moveit-cpp unit test.