-
Notifications
You must be signed in to change notification settings - Fork 943
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
Added missing robot state update to iterative spline parameterization #1298
Added missing robot state update to iterative spline parameterization #1298
Conversation
… to prevent warnings
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 question is, why the time parameterization changes the joint positions in first place. I think, it shouldn't.
Fixup approved.
For some reason, the trajectory is first written to an internal data structure before doing the time parameterization. In this final step, the result is written back to the |
Yes, I have seen this. The question is why? The joint positions shouldn't be modified, as this might invalidate the trajectory. |
Without looking further into it, I have only two guesses:
|
Updating all states can be quite a bit of unnecessary computation here and I would prefer to avoid it where possible. Looking at the code, it conditionally includes two new waypoints if So how about we skip the |
Thanks for looking deeper into this, @v4hn. I would agree to your proposal. |
I agree as well and will update my PR accordingly (or should I open a new one?). |
Updating should be fine. You can also squash commits to cleanup history ;-) |
I implemented the requested changes. |
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 good. Thanks a lot.
moveit_core/trajectory_processing/src/iterative_spline_parameterization.cpp
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.
Please fix formatting.
Co-Authored-By: Martin-Oehler <martin.sven.oehler@gmail.com>
I added your comment change and formatted with clang. |
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.
Works and looks good. I personally would remove the braces in the for loop but that's up to you.
Congrats on getting your first MoveIt! pull request merged and improving open source robotics! |
…#1298) ... to prevent warnings. The two new additional waypoints added in the beginning and end of the trajectory (which are then updated by the time parameterization to have a smooth start / stop), missed a RobotState::update().
…moveit#1298) ... to prevent warnings. The two new additional waypoints added in the beginning and end of the trajectory (which are then updated by the time parameterization to have a smooth start / stop), missed a RobotState::update().
Description
The iterative spline parameterization is missing an update to the robot states of the trajectory after iterating over each point. These leads to lots of warnings of the following kind:
This PR adds the missing
update()
call (just one line).I did not auto-format with clang as this changed lines unrelated to my PR.
Checklist