Robotics StackExchange | Archived questions

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 cmdvel topic. To be sure, I have omitted the joystick launch, to avoid conflicting cmdvel messages, but the navigator keeps sending zero-velocity messages, no matter where I drop the 2D-Nav_Goal arrow in the RVIZ screen.

Details:

(Noetic with ROS1)

can anyone tell me what to change or add?

Thanks a lot

Asked by RH56 on 2022-02-25 13:29:25 UTC

Comments

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

Asked by Mike Scheutzow on 2022-02-26 08:03:22 UTC

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:

DWAPlannerROS:
  # for details see: https://wiki.ros.org/dwa_local_planner
  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

Asked by RH56 on 2022-02-28 12:02:48 UTC

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.

Asked by Mike Scheutzow on 2022-02-28 17:12:34 UTC

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: http://wiki.ros.org/carrot_planner?distro=noetic

Asked by RH56 on 2022-03-01 06:58:17 UTC

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.

Asked by Mike Scheutzow on 2022-03-01 10:09:45 UTC

Answers

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.

Asked by RH56 on 2022-03-01 10:39:50 UTC

Comments