Ask Your Question

Quadrotor cannot be moving and planning its way correctly, automap cannot be launched.

asked 2016-06-01 10:05:24 -0600

Envo gravatar image

updated 2016-06-02 06:13:36 -0600

We have add PointCloud2 and set the Topic as /rtabmap/cloud_map in our RVIZ. And our Fixed Frame of Global Options is setting as odom, while the Reference Frame of Grid is setting as Fixed Frame. But our quadrotor cannot planning its way correctly and it will just pass through the buildings which we build out by using the Asus Xtion Pro Live through RTAB-Map. Besides, the automap also cannot be launched.

Below there is our rtabmap.launch:

  <!-- Convenience launch file to launch odometry, rtabmap and rtabmapviz nodes at once -->

  <!-- For rgbd:=true
        Your RGB-D sensor should be already started with "depth_registration:=true".
           $ roslaunch freenect_launch freenect.launch depth_registration:=true 
           $ roslaunch openni2_launch openni2.launch depth_registration:=true -->

  <!-- For stereo:=true
        Your camera should be calibrated and publishing rectified left and right 
        images + corresponding camera_info msgs. You can use stereo_image_proc for image rectification.
           $ roslaunch rtabmap_ros bumblebee.launch -->

  <!-- Choose between RGB-D and stereo -->      
  <arg name="rgbd"            default="true"/>
  <arg name="stereo"          default="false"/>

  <!-- Choose visualization -->
  <arg name="rtabmapviz"              default="true" /> 
  <arg name="rviz"                    default="false" />

  <!-- Corresponding config files -->
  <arg name="cfg"                     default="" /> <!-- To change RTAB-Map's parameters, set the path of config file (*.ini) generated by the standalone app -->
  <arg name="gui_cfg"                 default="~/.ros/rtabmap_gui.ini" />
  <arg name="rviz_cfg"                default="-d $(find rtabmap_ros)/launch/config/rgbd.rviz" />

  <arg name="frame_id"                default="base_link"/>     <!-- Fixed frame id, you may set "base_link" or "base_footprint" if they are published -->
  <arg name="namespace"               default="rtabmap"/>
  <arg name="database_path"           default="~/.ros/rtabmap.db"/>
  <arg name="queue_size"              default="10"/>
  <arg name="wait_for_transform"      default="0.2"/>
  <arg name="rtabmap_args"            default=""/>              <!-- delete_db_on_start, udebug -->
  <arg name="launch_prefix"           default=""/>              <!-- for debugging purpose, it fills launch-prefix tag of the nodes -->

  <!-- RGB-D related topics -->
  <arg name="rgb_topic"               default="/camera/rgb/image_rect_color" />
  <arg name="depth_topic"             default="/camera/depth_registered/image_raw" />
  <arg name="camera_info_topic"       default="/camera/rgb/camera_info" />

  <!-- stereo related topics -->
  <arg name="stereo_namespace"        default="/stereo_camera"/>
  <arg name="left_image_topic"        default="$(arg stereo_namespace)/left/image_rect_color" />
  <arg name="right_image_topic"       default="$(arg stereo_namespace)/right/image_rect" />      <!-- using grayscale image for efficiency -->
  <arg name="left_camera_info_topic"  default="$(arg stereo_namespace)/left/camera_info" />
  <arg name="right_camera_info_topic" default="$(arg stereo_namespace)/right/camera_info" />
  <arg name="approx_sync"             default="false"/>         <!-- if timestamps of the stereo images are not synchronized -->

  <arg name="compressed"              default="false"/>         <!-- If you want to subscribe to compressed image topics -->
                                                                <!-- For depth_topic, "compressedDepth" image_transport is used. --> 
                                                                <!-- For rgb_topic, see "rgb_image_transport" argument. -->
  <arg name="rgb_image_transport"     default="compressed"/>    <!-- Common types: compressed, theora (see "rosrun image_transport list_transports") -->

  <arg name="subscribe_scan"          default="false"/>
  <arg name="scan_topic"              default="/scan"/>

  <arg name="subscribe_scan_cloud"    default="false"/>
  <arg name="scan_cloud_topic"        default="/scan_cloud"/>

  <arg name="visual_odometry"         default="true"/>          <!-- Launch rtabmap visual odometry node -->
  <arg name="odom_topic"              default="/odom_combined"/>         <!-- Odometry topic used if visual_odometry is false -->
  <arg name="odom_args"               default="$(arg rtabmap_args)"/>

  <!-- These arguments should not be modified directly, see referred topics without "_relay" suffix above -->
  <arg if="$(arg compressed)"     name="rgb_topic_relay"           default="$(arg rgb_topic)_relay"/>
  <arg unless="$(arg compressed)" name="rgb_topic_relay"           default="$(arg rgb_topic)"/>
  <arg if="$(arg compressed)"     name="depth_topic_relay"         default="$(arg depth_topic)_relay"/>
  <arg unless="$(arg compressed)" name="depth_topic_relay"         default="$(arg depth_topic)"/>
  <arg if ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-06-01 18:40:40 -0600

matlabbe gravatar image

updated 2016-06-02 09:10:12 -0600


Your error says that TF between /odom_combined and camera topics doesn't exist. Which node is actually publishing /odom_combined? Please show your TF tree and rqt_graph:

$ rosrun tf view_frames
$ rqt_graph

EDIT: What is automap? do you mean octomap?

Note that you don't need to modify rtabmap.launch directly. It is difficult to see what you modified. From differences I've seen, the corresponding command is:

$ roslaunch rtabmap_ros rtabmap.launch frame_id:=base_link odom_topic:=/odom_combined

So starting from that, if you have your own input of odometry /odom_combined, disable visual odometry because it is ignored. Also rtabmap will publish a TF /odom -> /base_link that may interfere with another TF related to /odom_combined:

 $ roslaunch rtabmap_ros rtabmap.launch frame_id:=base_link odom_topic:=/odom_combined visual_odometry:=false

The fixed frame in RVIZ would be /map instead of /odom.


Your TF looks okay. In rqt_graph, the octomap_server is not started. How do you start the octomap_server? Example (from this post):

$ roslaunch rtabmap_ros rtabmap.launch frame_id:=base_link
$ rosrun octomap_server octomap_server_node cloud_in:=rtabmap/cloud_map

Then make sure you can visualize the octomap in RVIZ using the octomap plugins. There is an issue when using octomap_server while doing mapping: the octomap didn't get automatically refreshed when a loop closure is detected (when the map is corrected). To avoid this problem, I recommend to do a mapping session (teleoperated), then restart rtabmap in localization-only mode with octomap and move_it stuff. For this example I use rgbd_mapping.launch instead of rtabmap.launch for convenience (as it has already the localization argument):

$ roslaunch rtabmap_ros rgbd_mapping.launch frame_id:=base_link rtabmap_args:="--delete_db_on_start"

// map for a while, then kill rgbd_mapping.launch and restart it in localization mode

$ roslaunch rtabmap_ros rgbd_mapping.launch frame_id:=base_link localization:=true
$ rosrun octomap_server octomap_server_node cloud_in:=rtabmap/cloud_map


edit flag offensive delete link more


Thank for your reply, we will try it by today. Here is one more question, we used the octomap server to convert RTAB-Map into octomap. But the quadrotor in RVIZ still remain the same, it will pass through the buildings again. So, how can we use the RTAB-Map to construct octomap correctly in MoveIt?

Envo gravatar image Envo  ( 2016-06-02 01:44:52 -0600 )edit

i have updated the tf tree and rqt graph in my thread.

Envo gravatar image Envo  ( 2016-06-02 06:15:07 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2016-06-01 10:05:24 -0600

Seen: 176 times

Last updated: Jun 02 '16