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

rtabmap launch file for roomba with kinect

asked 2020-11-24 14:16:29 -0600

Batstru gravatar image

Dear all,

my hardware is a roomba with a kinect 360 and a nvidia jetson nano. Software is ros melodic. To drive the roomba I use the create_robot package (here the link to my fork).

I'm following this tutorials to set up rtabmap according to the hardware: in details, paragraph 2.4 - Kinect + Odometry.

I'd like to use this setup as the create_robot package provides the odometry, which is correctly coming with the topic "/odom".

I'm having big issues with the launch file, which I customized a bit to fit also the roomba driver.

Maybe I have a rookie question, but could you please explain how I should set up this launch file?

  • It seems unclear also the remap from..to topics. Actually some are there, other missing.
  • From the example I removed the namespace, as I noticed topics names are built on top of it.

Below my latest version of the launch file and the list of published topics.

<?xml version="1.0"?>
<launch>
    <include file="$(find freenect_launch)/launch/freenect.launch">
        <arg name="depth_registration" value="True" />
    </include>
    <arg name="config" default="$(find create_bringup)/config/default.yaml" />
    <arg name="desc" default="true" />
    <arg name="rate" default="5" />
    <arg name="data_skip" default="2" />
    <arg name="approx_sync" default="true" />
    <arg name="rgbd_sync" default="false" />
    <node name="create_driver" pkg="create_driver" type="create_driver" output="screen">
        <rosparam command="load" file="$(arg config)" />
        <param name="robot_model" value="CREATE_2" />
    </node>
    <include if="$(arg desc)" file="$(find create_description)/launch/create_2.launch" />
    <node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_ros/rgbd_sync" output="screen">
        <remap from="rgb/image" to="/camera/rgb/image_rect_color" />
        <remap from="depth/image" to="/camera/depth_registered/image_raw" />
        <remap from="rgb/camera_info" to="/camera/rgb/camera_info" />
        <remap from="rgbd_image" to="rgbd_image" />
        <param name="approx_sync" value="true" />
    </node>
    <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
        <param name="frame_id" type="string" value="base_link" />
        <param name="subscribe_depth" type="bool" value="false" />
        <param name="subscribe_rgbd" type="bool" value="true" />
        <remap from="/odom" to="/base_controller/odom" />
        <remap from="/rtabmap/rgbd_image" to="/rgbd_image" />
        <param name="queue_size" type="int" value="10" />
        <param name="RGBD/AngularUpdate" type="string" value="0.01" />
        <param name="RGBD/LinearUpdate" type="string" value="0.01" />
        <param name="RGBD/OptimizeFromGraphEnd" type="string" value="false" />
    </node>
</launch>

Topic list:

/base_controller/odom
/battery/capacity
/battery/charge
/battery/charge_ratio
/battery/charging_state
/battery/current
/battery/temperature
/battery/voltage
/bumper
/camera/depth/camera_info
/camera/depth/disparity
/camera/depth/image
/camera/depth/image/compressed
/camera/depth/image/compressed/parameter_descriptions
/camera/depth/image/compressed/parameter_updates
/camera/depth/image/compressedDepth
/camera/depth/image/compressedDepth/parameter_descriptions
/camera/depth/image/compressedDepth/parameter_updates
/camera/depth/image_raw
/camera/depth/image_raw/compressed
/camera/depth/image_raw/compressed/parameter_descriptions
/camera/depth/image_raw/compressed/parameter_updates
/camera/depth/image_raw/compressedDepth
/camera/depth/image_raw/compressedDepth/parameter_descriptions
/camera/depth/image_raw/compressedDepth/parameter_updates
/camera/depth/image_rect
/camera/depth ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-11-25 19:16:31 -0600

matlabbe gravatar image

This:

<remap from="/odom" to="/base_controller/odom" />
<remap from="/rtabmap/rgbd_image" to="/rgbd_image" />

should be:

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

"from" is default topic name used by the node (the topic shown in ros wiki). "to" is the name of the topic you want to use. If you prefix the topic name with "/", it means the global namespace. For example, if rtabmap node is under "rtabmap" namespace (like in the original example), using the remap as above will make rtabmap subscribing to /odom and /rtabmap/rgbd_image. Note that if rgbd_sync node is also under "rtabmap" namespace, it will produce /rtabmap/rgbd_image by default.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-11-24 14:16:29 -0600

Seen: 307 times

Last updated: Nov 25 '20