ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

I get zero-speed messages when using 2D-Nav-Goal in Rviz

asked 2022-02-25 12:29:25 -0500

RH56 gravatar image

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.


  • 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

edit retag flag offensive close merge delete


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.)

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-02-26 07:03:22 -0500 )edit

Thanks, Mike. Looks you are right. After "Got new map" it comes with a warning:

[ WARN] [1646066043.620563171]: DWA planner failed to produce path.

Have you any idea why? My local DWA planner yaml file is configured:

  # for details see:
  odom_topic: odom

# Robot Configuration Parameters
  max_vel_x: 1.0
  min_vel_x: -0.7

  max_vel_y: 0            # 0 for non-holonomic robot
  min_vel_y: 0           # 0 for non-holonomic robot

# The velocity when robot is moving in a straight line
  max_trans_vel:  1.0
  min_trans_vel:  -0.7

  max_rot_vel: 0.5
  min_rot_vel: 0.1

  acc_lim_x: 0.8
  acc_lim_y: 0.0
  acc_lim_theta: 1 

# Goal Tolerance Parametes
  xy_goal_tolerance: 0.1
  yaw_goal_tolerance: 0.17
  latch_xy_goal_tolerance: false
RH56 gravatar image RH56  ( 2022-02-28 11:02:48 -0500 )edit

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.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-02-28 16:12:34 -0500 )edit

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",

<param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />

or is it also necessary to write a transform listener as written here:

RH56 gravatar image RH56  ( 2022-03-01 05:58:17 -0500 )edit

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.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-03-01 09:09:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2022-03-01 09:39:50 -0500

RH56 gravatar image

I have just taken away the "max_vel_y: 0" in my yaml file. The navigator now produces messages with only y-velocity, no matter in which direction I put the arrow in Rviz. It is still strange though because I have my "odom_model_type value" set as "diff" and "holonomic_robot" set to "false". But at least it is now producing speed messages. Remains to be sorted out the confusion in direction.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2022-02-25 12:29:25 -0500

Seen: 140 times

Last updated: Mar 01 '22