locusrobotics / robot_navigation

Spiritual successor to ros-planning/navigation.
444 stars 149 forks source link

Acceleration limit for backward driving #71

Closed Thazz closed 2 years ago

Thazz commented 3 years ago

When applying acceleration/deceleration limits in velocity iterator, one should be looking for difference in velocity magnitude (absolute value).

https://github.com/locusrobotics/robot_navigation/blob/a17dd62fed2fac6a011fe1220308933712e5491d/dwb_plugins/include/dwb_plugins/one_d_velocity_iterator.h#L56-L69

Currently, If the robot is driving backwards and its velocity changes from e.g v0 = -1 m/s to target = -1.5 m/s, deceleration limit is used (as v0 > target), although robot is actually accelerating. The same goes for deceleration.

I can provide PR if needed.

DLu commented 3 years ago

Makes sense! Please make a PR.