Navigation stack dwa local planner crashes into dynamic obstacles
Hello,
I have been struggling with dwa local planner and navigation stack mote than 3 months and still can't get it to work. I achieved static navigation without obstacle layer, however, dynamic obstacle avoiding still doesn't work. I have tried almost all parameters with dynamic reconfigure in rqt but the robot still moves very bad. I have attached several videos recorded of my robot motion, please check.
If someone has the suggestion, what can I do to fix it, could you help. Thank you in advance!
Video
https://youtu.be/Res6o5SKb2Y --- Test 1
https://youtu.be/jmpQeBW1zyc --- Test 2
EDIT 1
This is my dwa yaml file:
DWAPlannerROS:
max_vel_x: 0.8
min_vel_x: 0.2
max_vel_y: 0.0
min_vel_y: 0.0
max_trans_vel: 0.8
min_trans_vel: 0.2
trans_stopped_vel: 0.1
max_rot_vel: 1.0
min_rot_vel: 0.4
rot_stopped_vel: 0.4
acc_lim_x: 1.5
acc_lim_theta: 3.5
acc_lim_y: 0.0
# Goal Tolerance Parameters
yaw_goal_tolerance: 0.15
xy_goal_tolerance: 0.15
latch_xy_goal_tolerance: true
# Forward Simulation Parameters
sim_time: 4.0
vx_samples: 8
vy_samples: 1
vtheta_samples: 30
# Trajectory Scoring Parameters
path_distance_bias: 24.0
goal_distance_bias: 24.0
occdist_scale: 12.0
forward_point_distance: 0.325
stop_time_buffer: 0.2
scaling_speed: 0.25
max_scaling_factor: 0.2
# Oscillation Prevention Parameters
oscillation_reset_dist: 0.1
# Debugging
publish_traj_pc : true
publish_cost_grid_pc: true
global_frame_id: odom
holonomic_robot: false
EDIT 2
https://www.youtube.com/watch?v=4K-w7... -- Test 3
https://www.youtube.com/watch?v=cKKh0... -- Test 4
I have changed sim_time to 1 sec.
Test2: What kind of robotbase are you using? diff drive? It seems the base is actually not following the path much of the time?! What is represented by the arrow with the magenta tip? Is this a real robot? If yes, do you maybe have an issue with getting the motorcontroller mcu's updating?
@Dragonslayer I am using my custom diff drive robot. The arrow with the magenta tip it is just for 2d Nav Goal Button in rviz.
It is my custom real robot. What is motorcontroller mcu's updating?
@Dragonslayer Actually yes, sometimes the robot does not follow the local plan. Could it be because of the low acceleration limits for the driver?
Yes the big magenta arrow is nav goal, but there is another arrow with a magenta tip, originating from base_link frame.
The PID thing is complex and if you didnt tune and program it yourself it shouldnt be the issue. But you might want to check if the documentation says anything regarding max frequency and then have a look if you maybe publish to fast.
Maybe you could post your dwa param .yaml ... I dont think its the acceleration limits alone, it seems to stop updating/reacting to the commands, and then after a stop NULL command is received, it seems to start working again for some time. Either move_base isnt updating cmd_vel, which is unlikely, or the hardware interface stops sending commands, or finally the microcontrollers (used as MCU motor control unit) hang somehow.
However the local plan trajectories seem now to do what you want. Seems my suggestion ...(more)
@Dragonslayer I understood, this arrow is from tf. (tf relation)
What exactly publish too fast ?? Max frequency of odometry?
I will post the dwa .yaml file.
Yes, it starts to look better trajectories when I change occdist to 12.0 with path and goal dist to 24.0
Whats your hardware setup? I assume some sbc or pc for ros and some micrcontroller for motor control. The hardware interface is the software that takes the ros data and "somehow" sends it out the main computer to the microcontrollers, those then do something with the data (often PID) and make the actual motors move. The frequency of the communication between main computer and microcontroller (hardware interface) is what Iam talking about, it can be very limited.
@Dragonslayer I have added dwa parameters, could you please check them
I dont see anything obviously bad about the parameters. But as mentioned in an earlier post, it now seems there is a communication problem downstream of move_base/cmd_vel. What packages are the hardware interface etc. based on, any documentation?