move_base: how to move robot smoothly
I have turtlebot3 waffle with some additions and I am running move_base.
The problem is that when I send goal to move_base, robot jerks very sharply on all the way to the goal. And therefore odometry become wrong because of imu and slam becomes errorful.
I use default turtlebot3_navigation params.
Except for min_vel_x
from dwa_local_planner, I set it to 0, because I dont want my robot moving backward.
I tried to set acc_lim_x
from dwa_local_planner_params.yaml file lower. but if I set it under 1.0 robot does not move, only rotating sometimes, and I see this messages:
[ INFO] [1575348683.509810130]: Got new plan
[ WARN] [1575348683.512755937]: DWA planner failed to produce path.
[ INFO] [1575348683.609767088]: Got new plan
[ WARN] [1575348683.612340738]: DWA planner failed to produce path.
[ INFO] [1575348683.709804687]: Got new plan
[ WARN] [1575348683.711776387]: DWA planner failed to produce path.
[ INFO] [1575348683.809823309]: Got new plan
[ WARN] [1575348683.812453374]: DWA planner failed to produce path.
[ INFO] [1575348683.910172970]: Got new plan
[ WARN] [1575348683.914018388]: DWA planner failed to produce path.
[ INFO] [1575348684.009715755]: Got new plan
[ WARN] [1575348684.011387298]: DWA planner failed to produce path.
[ INFO] [1575348684.109762026]: Got new plan
[ WARN] [1575348684.111786078]: DWA planner failed to produce path.
[ WARN] [1575348684.209823304]: Clearing costmap to unstuck robot (3.000000m).
[ INFO] [1575348684.309795496]: Got new plan
[ WARN] [1575348684.312751095]: DWA planner failed to produce path.
[ WARN] [1575348684.409828166]: Rotate recovery behavior started.
[ INFO] [1575348686.451325417]: Resizing costmap to 96 X 100 at 0.050000 m/pix
[ INFO] [1575348687.329028744]: Resizing costmap to 115 X 108 at 0.050000 m/pix
[ INFO] [1575348688.381409724]: Resizing costmap to 122 X 108 at 0.050000 m/pix
[ERROR] [1575348691.160860747]: Rotate recovery can't rotate in place because there is a potential collision. Cost: -1.00
[ INFO] [1575348691.161513895]: Got new plan
[ INFO] [1575348691.261657512]: Got new plan
[ WARN] [1575348691.263953147]: DWA planner failed to produce path.
[ WARN] [1575348691.361652746]: Clearing costmap to unstuck robot (1.840000m).
[ INFO] [1575348691.461687595]: Got new plan
[ WARN] [1575348691.463722655]: DWA planner failed to produce path.
[ WARN] [1575348691.561647469]: Rotate recovery behavior started.
[ERROR] [1575348691.562730823]: Rotate recovery can't rotate in place because there is a potential collision. Cost: -1.00
[ INFO] [1575348691.661660142]: Got new plan
[ WARN] [1575348691.663620899]: DWA planner failed to produce path.
[ERROR] [1575348691.761684944]: Aborting because a valid control could not be found. Even after executing all recovery behaviors
So, I cant just change those parameters. I also have read that Max/min velocity and acceleration is recommended by mobile base's manual. How can I set acc_lim_x
lower then?
I want my robot moving smoothly to the goal, without jerks. Which move_base parameters should I change?
EDIT:
cmd_vel
average rate is from 2.8 to 10.
for goal 1:
average rate: 10.013
min: 0.000s max: 0.329s std dev: 0.08723s window: 11
average rate: 9.838
min: 0.000s max: 0.329s std dev: 0.06238s window: 21
average rate: 9.926
min: 0 ...
Getting a smooth trajectory for your robot is mostly about tweaking the parameters. I would suggest you take a look here. And try different local planners and see which one suits best your needs and then try to tweak it's params further.
are you mapping while moving? I'd not expect to see the costmap resizing if you are purely navigating
You can fine tune the parameters, check the publication rate of cmd_vel too, if it's too slow that would induce those jerky movements or you can use a velocity smoother.
@Choco93, I tried all of them, they have exactly the same problem: robot jerks, or does not move if I set acceleration too low.
@Procópio, yes, I am mapping with rtabmap
Saying that doesn't tell us exactly what you tried. You have to give more informations you didn't show the move_base configuration. Also what is the publication rate of
cmd_vel
? Have you also checked ifcmd_vel
topic has consistent data ?@Delb, Sorry for delay,
I have updated question with
cmd_vel
rates.move_base configuration is default by turtlebot3_navigation
It seems that you are publishing at 10 Hz which should be fine but can you try to change the param
controller_frequency
to something higher (maybe100 Hz
to check if there are differences but20Hz
as the default value should be fine) ?