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

Can't see some topics for planning and navigation

asked 2019-09-05 06:29:31 -0600

FabioZ96 gravatar image

updated 2019-09-05 07:16:37 -0600

Hi, I'm running ROS Melodic on Ubuntu 18.04. I'm following this tutorial to perform slam and navigation on my own robot:

I can create a good map using gmapping, but after that I can't navigate.

This is my launch file for navigation:

  <!--Start base control of robot and rviz-->
  <include file="$(find robot)/launch/start_robot_pc.launch">
    <arg name="fixed_frame" value="map"/>

  <!--Start kinect and fake scan-->
  <include file="$(find robot)/launch/kinect.launch"/>

  <!-- Load map previously created -->
  <node pkg="map_server" name="map_server" type="map_server" args="$(arg map_file)"/>

  <!-- AMCL -->
  <include file="$(find robot)/launch/includes/amcl.launch.xml"/>

  <!-- move_base -->
  <include file="$(find robot)/launch/includes/move_base.launch.xml">
    <!--param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" /-->

This is my move_base launch:


  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS"/>
    <rosparam file="$(find robot)/param/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find robot)/param/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find robot)/param/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find robot)/param/global_costmap_params.yaml" command="load" />
    <!--rosparam file="$(find robot)/param/base_local_planner_params.yaml" command="load" /-->
    <rosparam file="$(find robot)/param/dwa_local_planner_params.yaml" command="load" />
    <rosparam file="$(find robot)/param/move_base_params.yaml" command="load" />

    <remap from="cmd_vel" to="/cmd_vel"/>
    <remap from="odom" to="odom"/>


I can estimate 2D pose of robot but when I use "2D Nav Goal" arrow, nothing happens.

I run rostopic list and I get only this topics starting with /move_base:


I checked tutorial's topics and I saw this:


Why I can't see the same topics?

UPDATE: I have disassembled the tutorial's code and I discover that I saw those topics because rviz was subscribed, but no node was the publisher. So, why the navigation doesn't work for me?

edit retag flag offensive close merge delete


Do you get any warnings/errors when you launch your navigation launch file? If so, can you please share the terminal output? Otherwise it is hard to debug from this point where the problem might be. My initial lucky guess would be that you are missing a transform from base_link to map which does not allow costmap initialization.

pavel92 gravatar image pavel92  ( 2019-09-05 08:04:42 -0600 )edit

This is the warning I get:

Timed out waiting for transform from \base_footprint to \map to become available before running costmap, tf error: canTransform: target_frame \map does not exist. canTransform: source_frame \base_footprint does not exist..

If I don't set "map" as fixed frame, the majority part of rviz's visualizzations don't work.

But I can't see neither DWAPlannerROS and NavfnROS.

FabioZ96 gravatar image FabioZ96  ( 2019-09-05 11:09:49 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-09-06 02:33:07 -0600

pavel92 gravatar image

That is because you are missing the transform from \base_footprint to \map so your costmap and planner plugins are not started. You need to check which transforms are generated by your localization (amcl). It might be base_link instead of base_footprint to map or it might not be created at all. In the first case, in your costmap_common_params, or local/global_costmap_params files change the robot_base_frame: base_footprint to robot_base_frame: base_link. The other case is that amcl cant create the transform for some reason. You can check the existing transforms by running:

rosrun rqt_tf_tree rqt_tf_tree

If you just want to see if move_base launches properly and get all of the topics then you can temporary test this by creating a static transform:

rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 1.0  map base_footprint 100

On another note, you can remove the .xml from amcl.launch.xml and move_base.launch.xml in your navigation launch file since it is obsolete.

edit flag offensive delete link more


Thank you so much. Now it works and I can see maps an trajectories. But I get some warning and the robot doesn't move properly.

[ WARN] [1567787328.029768159]: Parameter max_trans_vel is deprecated (and will not load properly). Use max_vel_trans instead.
[ WARN] [1567787328.030064495]: Parameter min_trans_vel is deprecated (and will not load properly). Use min_vel_trans instead.
[ WARN] [1567787328.030338975]: Parameter max_rot_vel is deprecated (and will not load properly). Use max_vel_theta instead.
[ WARN] [1567787328.030609905]: Parameter min_rot_vel is deprecated (and will not load properly). Use min_vel_theta instead.
[ WARN] [1567787328.031128466]: Parameter rot_stopped_vel is deprecated (and will not load properly). Use theta_stopped_vel instead.

In move base I load DWA params: <rosparam file="$(find robot)/param/dwa_local_planner_params.yaml" command="load" /> and in this file I tried to rename files as suggest in warning but I get this warning too.

FabioZ96 gravatar image FabioZ96  ( 2019-09-06 11:32:00 -0600 )edit

What I mean is that robot receive little impulses of velocity that don't allow it to move forward. So periodically, the algorithm try to rotate it in place, but the rotation is very slow.

FabioZ96 gravatar image FabioZ96  ( 2019-09-06 12:24:38 -0600 )edit

On another note, you can remove the .xml from amcl.launch.xml and move_base.launch.xml in your navigation launch file since it is obsolete.

unless the goal was to hide those launch files from the roslaunch auto-complete ..

gvdhoorn gravatar image gvdhoorn  ( 2019-09-07 04:47:28 -0600 )edit

@FabioZ96 This is a totally new problem that you are facing and I would suggest to open a new question and post your dwa_local_planner_params config there. If the answer above solved your initial problem you can mark it as true.
As gvdhoorn has mentioned, you can keep the .xml extension if your goal is to hide it from roslaunch auto-completion.

pavel92 gravatar image pavel92  ( 2019-09-08 12:21:23 -0600 )edit

Ok, I opened a new question here:

FabioZ96 gravatar image FabioZ96  ( 2019-09-09 05:56:48 -0600 )edit

Question Tools

1 follower


Asked: 2019-09-05 06:29:31 -0600

Seen: 912 times

Last updated: Sep 06 '19