-
Notifications
You must be signed in to change notification settings - Fork 494
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
Revert central differencing calculation in servo #2203
Conversation
@ibrahiminfinite FYI |
d79f325
to
8d360ee
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2203 +/- ##
==========================================
- Coverage 50.52% 50.51% -0.01%
==========================================
Files 386 386
Lines 31736 31735 -1
==========================================
- Hits 16032 16028 -4
- Misses 15704 15707 +3
☔ View full report in Codecov by Sentry. |
Do we still need to remove the central difference ? |
Yes, I think so. I filled in more details in the issue description. |
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.
Tested with Moveit Studio and Gazebo, reverting the central difference does allow for proper velocity scaling.
I don't have a convenient way to test this at the moment, but I'm concerned about a joint jump if Servo is stopped, the robot moves, then Servo starts again. So could you try:
And look carefully for a joint jump |
We fixed this with #2186. It wasn't related to the velocity differencing calculation, but rather to the low-pass filters retaining old state from before the servo calcs were stopped. |
Please test regardless. |
Yes, we have been testing this exact thing with MoveIt Studio and the PR I mentioned before got rid of the issue. @bgill92 and @chancecardona have also tested. EDIT: Here's a video :) 2023-06-01.11-39-41.mp4 |
This is effectively a revert of #2080, just that flat out reverting the commit had a lot of merge conflicts due to newer PRs that landed.
We found this was affecting us in MoveIt Studio in that the velocity scaling was not kicking in correctly. For example, going from
override_velocity_scaling_factor
value of0.1
to1.0
did not actually increase the target velocity 10x; it was being damped out by the central difference.After a bunch of debugging and thinking, I've convinced myself that central differencing is not what we need here -- it's useful for state estimation, but not when we're trying to calculate a command given a known current state and a desired next state. We know exactly what our target velocity should be.
To test:
ros2 param set /servo_node moveit_servo.override_velocity_scale_factor 0.1
main