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:
Rviz correctly shows the calculated path on its screen
In the terminal, I see /movebasesimple/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 teblocalplannerparams.yaml, dwalocalplannerparams.yaml,
baselocalplanner_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
Asked by RH56 on 2022-02-25 13:29:25 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
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:
Have you any idea why? My local DWA planner yaml file is configured:
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",
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