This post was updated on .
Hey guys!
I created a robot using urdf files. My robot is a four wheeled robot with a kinect sensor linked to it. I am trying rtabmapping and I see no data being published in /map topic. Here's my robot_launch file: <?xml version="1.0" ?> <!-- Launch FILE FOR THE GAZEBO SIMULATIOR OF THE 4-WHEELED ROBOT --> <launch> <!--node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -model my_robot -x 0 -y 0 -z 0.1" /--> <include file="$(find gazebo_ros)/launch/empty_world.launch"> <arg name="world_name" value="$(find robot_model_pkg)/worlds/cafe.world"/> <arg name="paused" value="false"/> <arg name="use_sim_time" value="true"/> <arg name="gui" value="true"/> <arg name="headless" value="false"/> <arg name="debug" value="false"/> <!--arg name="rtabmap_viz" default="true"/--> </include> <!-- Load the robot description --> <param name="robot_description" command="$(find xacro)/xacro '$(find robot_model_pkg)/urdf/robot.xacro'"/> <param name="use_sim_time" value="true" /> <param name="Odom/MinInliers" value="10"/> <param name="publish_map" type="bool" value="true"/> <param name="map_topic" type="string" value="/map"/> <node pkg="tf" type="static_transform_publisher" name="odom_to_base" args="0 0 0 0 0 0 odom base_link 100" /> <node pkg="tf2_ros" type="static_transform_publisher" name="kinect_to_base" args="0.5 0 0.1 0 0 0 base_link kinect_link" /> <!-- Robot state publisher node --> <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" /> <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"/> <!-- Spawn the model --> <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen" args="-urdf -model robot_model -param robot_description -x 0 -y 0 -z 0.1" /> </launch> and below is my rtabmap launch file. Am I missing something? Apart from this can somebody give me a checklist on what should be done for the map topic to be published. <?xml version="1.0" ?> <!-- Launch FILE FOR THE GAZEBO SIMULATIOR OF THE 4-WHEELED ROBOT --> <launch> <node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_sync/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"/> <!-- output --> <!-- Should be true for not synchronized camera topics (e.g., false for kinectv2, zed, realsense, true for xtion, kinect360)--> <param name="approx_sync" value="true"/> </node> <!-- Odometry --> <node pkg="rtabmap_odom" type="rgbd_odometry" name="rgbd_odometry" output="screen"> <param name="subscribe_rgbd" type="bool" value="true"/> <param name="frame_id" type="string" value="base_link"/> <remap from="rgbd_image" to="rgbd_image"/> </node> <node name="rtabmap" pkg="rtabmap_slam" type="rtabmap" output="screen" args="--delete_db_on_start"> <param name="frame_id" type="string" value="base_link"/> <param name="wait_for_transform" type="bool" value="true"/> <param name="wait_for_transform_duration" type="double" value="0.2"/> <param name="odom_frame_id" type="string" value="odom"/> <param name="subscribe_depth" type="bool" value="false"/> <param name="subscribe_rgbd" type="bool" value="true"/> <param name="publish_map" type="bool" value="true"/> <param name="map_topic" type="string" value="/map"/> <param name="grid_map" type="bool" value="true"/> <param name="publish_map_2d" type="bool" value="true"/> <remap from="odom" to="/odom"/> <remap from="rgbd_image" to="rgbd_image"/> <param name="queue_size" type="int" value="10"/> <param name="approx_sync" type="bool" value="false"/> <param name="Grid/FromDepth" type="string" value="true"/> <param name="Grid/RangeMax" type="string" value="5.0"/> <!-- RTAB-Map's parameters --> <param name="RGBD/AngularUpdate" type="string" value="0.01"/> <param name="RGBD/LinearUpdate" type="string" value="0.01"/><nabble_a href="rtab_my_robot.launch">rtab_my_robot.launch</nabble_a><nabble_a href="robot_xacro.launch">robot_xacro.launch</nabble_a> <param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/> <remap from="grid_map" to="/map"/> </node> </launch> Can you please help me with this |
Administrator
|
Hi,
What are the warnings/errors you see? By the way, this should not exist: <node pkg="tf" type="static_transform_publisher" name="odom_to_base" args="0 0 0 0 0 0 odom base_link 100" /> Note also that if you are trying rgbd_odometry in simulation, make sure there is enough visual texture in your environment, otherwise it will just get lost. You may instead use a wheel odometry plugin in gazebo to provide odometry topic. cheers, Mathieu |
Hi Mathieu,
I removed the line you mentioned and made some changes in the plugin and now I see the robot working as expected. Thank you so much for your response. Regrards, Pranathi. |
Free forum by Nabble | Edit this page |