-
Notifications
You must be signed in to change notification settings - Fork 16
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
Nonholonomic slotcar turning fixes, add turning multiplier offset parameter, rename compute_ds variables #41
Conversation
Signed-off-by: ddengster <ed.fan@osrfoundation.org>
redo min_turning_radius computation and add compute_turning_multiplier remove unneeded variables, renamed variables in compute_ds function Signed-off-by: ddengster <ed.fan@osrfoundation.org>
add adjustment for right angled turns remove unneeded param Signed-off-by: ddengster <ed.fan@osrfoundation.org>
switch to right angle mul offset variable Signed-off-by: ddengster <ed.fan@osrfoundation.org>
Signed-off-by: ddengster <ed.fan@osrfoundation.org>
@@ -60,7 +60,8 @@ double compute_ds( | |||
const double v_max, | |||
const double accel_nom, | |||
const double accel_max, | |||
const double dt); | |||
const double dt, | |||
const double v_target = 0.0); |
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.
Nit, there was some discussion here about the compute_ds
and compute_desired_rate_of_change
being basically the same function, can we take the chance to remove one of the two?
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.
There's a line that differs between functions by double the divisor at https://github.com/open-rmf/rmf_simulation/pull/41/files/d55cfacfe9310deef0b6012e1a81ab2c7bb51394#diff-3bd4615902d61050ebeb9f584b212fc5d5ef07c1eed12cb5fa7814dbed7d59a4R41
but you're right let me remove it and test it with the other robots
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.
change delayed, will have to tweak the turning_right_angle_mul_offset
values again #42
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 great! Just a minor comment.
I guess for the future we might want to have a different parameter for the velocity in bends to be different (smaller) from the velocity in a straight path, but we can address that in the future.
Bug fix
Fixed bugs
The nonholonomic slotcar plugin had a problem with it's turning due to the computation of the turn delta, this PR fixes it via using the arcosine of the dot product.
Another problem is the decceleration applied to velocities in
compute_ds
, making our slotcar enter turns from0
velocity and in turn making the turn look weird. To fix this we addedtarget_velocity
as a targeted final velocity astarget_s
reaches0
.Added
_turning_right_angle_mul_offset
as an added multiplier applied to the turning radius for right-angled turns within 20 degrees. Eg. A value of0.5
for_turning_right_angle_mul_offset
makes for a multiplier1.5
when is applied to a90 degree
turning radius, and linearly downscales to1.0
for a70 degree
turning radius. This compensates for turning acc/deccelerations making turns 'overshoot'.Corrects up some variables named
velocities
when they were in factdisplacements
.Removes unneeded variables in various spots
In conjunction with open-rmf/rmf_demos#82