I get zero-speed messages when using 2D-Nav-Goal in Rviz
I have built a physical robot that I can drive with the joystick and while doing so, I see the robot move in the Rviz screen accordingly.
However, when I chose a destination with the 2D-Nav-Goal arrow, my robot doesn't move and the navigation stack sends zero-speed messages on the cmd_vel topic. To be sure, I have omitted the joystick launch, to avoid conflicting cmd_vel messages, but the navigator keeps sending zero-velocity messages, no matter where I drop the 2D-Nav_Goal arrow in the RVIZ screen.
Details:
Rviz correctly shows the calculated path on its screen
In the terminal, I see /move_base_simple/goal and
/move_base/goal both send messages
with the goal coordinates.- In the terminal, I see the cmd_vel messages coming up, but they are all zero velocity.
- In teb_local_planner_params.yaml,
dwa_local_planner_params.yaml,
base_local_planner_params.yaml, I
have set a minimum speed of 0.3 and a max speed of 1.0. - The rplidar and the frames in Rviz are active and don't show errors
(Noetic with ROS1)
can anyone tell me what to change or add?
Thanks a lot
move_base
will send a zero-velocity message each time the local planner fails "just to be safe," so those may be the messages you are seeing. This hints you do not have a good config for the local planner. If the local planner is failing, you should be getting error messages in the logs saying so.I find it useful to disable retries in both move_base and in the local planner while debugging issues like this - you want it to fail immediately to diagnose the problem.
In my opinion, forcing such a high min. velocity for linear.x is a bad idea - it should be 0 (or negative if your robot can go backwards.)
Thanks, Mike. Looks you are right. After "Got new map" it comes with a warning:
Have you any idea why? My local DWA planner yaml file is configured:
There are a large number of reasons that cause the local planner to fail. An obstacle inside the footprint, or very close to the robot, is one that I see a lot. Even a single pixel obstacle will put the robot in collision.
If this robot has never moved under control of move_base, you might want to experiment with a simpler planner (maybe
carrot_planner
?) just to make sure the data path works end-to-end. The DWAPlanner is the most complicated one in the navigation stack, and its default values are not great.Loads of thanks, Mike. Being still new in Ros, one last question. In order to change to another planner such as the carrot_planner, is it sufficient to replace in the move_base node my parameter "DWAPlanner" by "CarrotPlanner",
or is it also necessary to write a transform listener as written here: http://wiki.ros.org/carrot_planner?di...
The carrot_planner isn't going to help you debug your dwa_planner config - I forgot that it is a global planner, not a local planner, so it can't replace dwa_planner.
I'm not sure where you should go from here. Have you tried to enable debug-level log messages for dwa_planner to see if it says anything helpful to you? You can use the app
rqt_logger_level
to change log levels for most ros nodes.