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

Rviz not showing any output in operation with kitti rosbag and RTAB?

asked 2020-04-24 09:02:16 -0600

Shiva_uchiha gravatar image

updated 2022-03-20 09:45:59 -0600

lucasw gravatar image

Hi i am planning to do this demo:https://github.com/introlab/rtab... Below is the launch file , I have written .I am not able to visualise the result in rviz . Error is no transforms is found between the different links , But rosbag already records those transforms right ? I am not sure what i am missing. I am using kitti dataset for the demo

<launch>

<include file="$(find rtabmap_ros)/launch/rtabmap.launch">
      <arg name="stereo" value="true"/>
      <arg name="left_image_topic" value="/kitti/camera_color_left/image_raw"/>
      <arg name="right_image_topic" value="/kitti/camera_color_right/image_raw"/>
      <arg name="left_camera_info_topic" value="/kitti/camera_color_left/camera_info"/>
      <arg name="right_camera_info_topic" value="/kitti/camera_color_right/camera_info"/>
      <arg name="rtabmap_args" value="--delete_db_on_start"/>
      <arg name="approx_sync" value="true"/>
      <arg name="frame_id" value="base_link"/>

      <arg name="use_sim_time" value="true"/>
      <!--Here if you want rviz visualisation set raviz to true and rtabmap to false vice versa-->
      <arg name="rviz" value="true"/>
      <arg name="rtabmapviz" value="false"/>
      <!--                            -->
      <arg name="rgbd_sync" value="true"/>
      <arg name="approx_rgbd_sync" value="true"/>
      <arg name="subscribe_scan" value="true"/>
      <arg name="odom_frame_id" value="world"/>
      <arg name="odom_topic" value="/rtabmap/odom"/>
      <arg name="imu_topic" value="/kitti/oxts/imu"/>
      <arg name="gps_topic" value="/kitti/oxts/gps/fix"/>

</include>

<node pkg="rosbag" type="play" name="player" output="screen" args="  $(find project2pcl)/rosbag/kitti_2011_09_26_drive_0005_synced.bag"/>

<node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="pointcloud_to_laserscan">
      <remap from="cloud_in" to="/kitti/velo/pointcloud"/>
      <!--remap from="scan" to="/camera/scan" /-->
</node>





</launch>

update 1-

launch file

<?xml version="1.0"?>

<launch>
<!--node name="rviz" pkg="rviz" type="rviz" args="-d $(find project2pcl)/rviz/rtab2d.rviz"/-->
<include file="$(find rtabmap_ros)/launch/rtabmap.launch">
      <arg name="stereo" value="true"/>
      <arg name="left_image_topic" value="/kitti/camera_color_left/image_raw"/>
      <arg name="right_image_topic" value="/kitti/camera_color_right/image_raw"/>
      <arg name="left_camera_info_topic" value="/kitti/camera_color_left/camera_info"/>
      <arg name="right_camera_info_topic" value="/kitti/camera_color_right/camera_info"/>
      <arg name="rtabmap_args" value="--delete_db_on_start"/>
      <arg name="approx_sync" value="true"/>
      <arg name="frame_id" value="base_link"/>

      <arg name="use_sim_time" value="true"/>
      <!--Here if you want rviz visualisation set raviz to true and rtabmap to false vice versa-->
      <arg name="rviz" value="true"/> 
      <arg name="rtabmapviz" value="false"/>
      <!--                            -->
      <arg name="rgbd_sync" value="true"/>
      <arg name="approx_rgbd_sync" value="true"/>
      <arg name="subscribe_scan" value="true"/>
      <!--<arg name="odom_frame_id" value="world"/> -->
      <!--<arg name="odom_topic" value="/rtabmap/odom"/>-->
      <arg name="imu_topic" value="/kitti/oxts/imu"/>
      <arg name="gps_topic" value="/kitti/oxts/gps/fix"/>
      <!--<arg name="visual_odometry" value="false"/> -->

</include>

<node pkg="rosbag" type="play" name="player" output="screen" args="  $(find project2pcl)/rosbag/kitti_2011_09_26_drive_0005_synced.bag"/>

<node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="pointcloud_to_laserscan">
      <remap from="cloud_in" to="/kitti/velo/pointcloud"/>
      <!--remap from="scan" to="/camera/scan" /-->
</node>

</launch>

terminal output -

... logging to /home/shyam ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-04-26 22:53:14 -0600

matlabbe gravatar image

Hi,

I updated this example with a new section to include IMU, gps and ground truth.

In your example, if you want to use /world as odometry, set also visual_odometry:=false. This may be your problem with TF and rviz. If you want to use rtabmap's stereo odometry, follow the new example, there is a script to fix world->base_link TF so that there is no TF conflict with odometry publishing also odom -> base_link.

cheers,
Mathieu

edit flag offensive delete link more

Comments

Hi ! changing the visual_odometry:=false didn't work either . I need the occupancy map in rviz Which sadly I am not able to visualises as the nothing is published in related topic.

Shiva_uchiha gravatar image Shiva_uchiha  ( 2020-04-27 05:38:42 -0600 )edit

Can you add the terminal output to your question? There are maybe warnings showing why rtabmap is not running.

matlabbe gravatar image matlabbe  ( 2020-04-27 12:22:47 -0600 )edit

Hi sir ! sorry for late response , had been held up . I have updated the question as you have asked !

Shiva_uchiha gravatar image Shiva_uchiha  ( 2020-05-23 04:12:26 -0600 )edit

It is strange, rtabmap node is doing nothing, so it makes you don't have map. Normally, it should show a warning when it cannot synchronize input topics. It tries to synchronize:

/rtabmap/rtabmap subscribed to (approx sync):
   /rtabmap/odom,
   /rtabmap/rgbd_image,
   /scan,
   /rtabmap/odom_info

Is /scan published? What frame rate? Try:

rostopic hz /rtabmap/odom /rtabmap/rgbd_image /scan /rtabmap/odom_info
matlabbe gravatar image matlabbe  ( 2020-05-25 11:44:55 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-04-24 09:02:16 -0600

Seen: 361 times

Last updated: May 23 '20