-
Notifications
You must be signed in to change notification settings - Fork 609
Adds multi (joint) state validation service #3426
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
base: main
Are you sure you want to change the base?
Adds multi (joint) state validation service #3426
Conversation
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.
Looks great!
One question here: I assume a good bit of this code is copy pasted from the single state validation service, but done in a loop to prevent calling multiple services. Is there an opportunity to factor out the common code into a reusable utility function?
moveit::core::RobotState rs = ls->getCurrentState(); | ||
moveit::core::robotStateMsgToRobotState(robot_state, rs); | ||
|
||
for(int i=0; i<req->joint_states.size(); i++){ |
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.
Use ++i
as in other loops
} | ||
} | ||
|
||
// No need to check any more joint states after the first invalid one |
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.
Not necessarily, depends on whether users want speed or a complete list of the states that were invalid.
You could consider adding an "early stop" boolean in the service request?
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3426 +/- ##
==========================================
- Coverage 45.85% 0.00% -45.84%
==========================================
Files 717 415 -302
Lines 62630 38645 -23985
Branches 7580 5352 -2228
==========================================
- Hits 28715 0 -28715
- Misses 33749 38645 +4896
+ Partials 166 0 -166 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
The normal state validation service is not very fast if you want to check a lot of joint states. This is significantly faster.
Requires moveit/moveit_msgs#186
Please could this be backported to humble
Checklist