Re: Mapping performance and hallway problems with Kinect 2

Posted by Wezza on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Mapping-performance-and-hallway-problems-with-Kinect-2-tp3956p3971.html

Hello again!

I have used ntp to synchronize the computers, i hope that's okay too.

I set rate=10, the output for
"rostopic hz /kinect2/data_throttled_camera_info" average rate: 8.405
	min: 0.060s max: 0.200s std dev: 0.01963s window: 68
"rostopic hz /kinect2/data_throttled_image/compressed" average rate: 8.546
	min: 0.085s max: 0.145s std dev: 0.01778s window: 51
"rostopic hz /kinect2/data_throttled_image_depth/compressedDepth" average rate: 0.585
	min: 1.327s max: 4.592s std dev: 0.82700s window: 20
no new messages
no new messages

I tried to start only rtabmapviz on the client, but I didn't succeed. As a starting point I used the launchfile from chapter 5.1 of the manual (Remote_Mapping) and modified it.

<launch>
  <!-- Visualisation (client side) -->
  <group ns="rtabmap">
    <node pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz" args="-d $(find rtabmap_ros)/launch/config/rgbd_gui.ini" output="screen">
      <param name="subscribe_depth" type="bool" value="false"/>
      <param name="queue_size" type="int" value="10"/>
      <param name="frame_id" type="string" value="camera_link"/>

      <remap from="rgb/image" to="/kinect2/data_throttled_image"/>
      <remap from="depth/image" to="/kinect2/data_throttled_image_depth"/>
      <remap from="rgb/camera_info" to="/kinect2/data_throttled_camera_info"/>
      
      <param name="rgb/image_transport" type="string" value="compressed"/>
      <param name="depth/image_transport" type="string" value="compressedDepth"/>
    </node>
  </group>
</launch>

Can you please look at my code and tell me if it's all right? I'd like to see at least one camera image to drive safely. Right now i get no warning or error message and all I see is this:



started roslaunch server http://192.168.1.11:38987/

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.7
 * /rtabmap/rtabmapviz/depth/image_transport: compressedDepth
 * /rtabmap/rtabmapviz/frame_id: camera_link
 * /rtabmap/rtabmapviz/queue_size: 10
 * /rtabmap/rtabmapviz/rgb/image_transport: compressed
 * /rtabmap/rtabmapviz/subscribe_depth: False

NODES
  /rtabmap/
    rtabmapviz (rtabmap_ros/rtabmapviz)

ROS_MASTER_URI=http://192.168.1.2:11311

core service [/rosout] found
process[rtabmap/rtabmapviz-1]: started with pid [23171]
[ INFO] [1513099755.881005553]: Starting node...
[ INFO] [1513099756.145582915]: rtabmapviz: Using configuration from "/home/bjorn/catkin_ws/src/rtabmap_ros/launch/config/rgbd_gui.ini"
[ INFO] [1513099757.458254732]: Reading parameters from the ROS server...
[ INFO] [1513099759.154948058]: Parameters read = 254
[ INFO] [1513099760.143094973]: /rtabmap/rtabmapviz: queue_size    = 10
[ INFO] [1513099760.143168667]: /rtabmap/rtabmapviz: rgbd_cameras = 1
[ INFO] [1513099760.143215229]: /rtabmap/rtabmapviz: approx_sync   = false
[ INFO] [1513099760.175320931]: 
/rtabmap/rtabmapviz subscribed to:
   /rtabmap/odom
[ INFO] [1513099760.175686968]: rtabmapviz started.

I get the same result when I copy the rtabmapviz part from the rtabmap.launch file. When i set subscribe_depth=true I get the warning:
[ WARN] [1513101861.395385368]: /rtabmap/rtabmapviz: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
/rtabmap/rtabmapviz subscribed to (exact sync):
   /rtabmap/odom,
   /kinect2/data_throttled_image/compressed,
   /kinect2/data_throttled_image_depth/compressedDepth,
   /kinect2/data_throttled_camera_info,
   /rtabmap/odom_info

ROS Master commands are integrated into the .bashrc. Commands used on robot:

roslaunch kinect2_bridge kinect2_bridge.launch publish_tf:=true
roslaunch freenect2_throttle.launch rate:=10
rosrun tf static_transform_publisher 0 0 0 -1.57079667948966 0 -1.5707963267948966 camera_link kinect2_link 100
roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" rgb_topic:=/kinect2/qhd/image_color_rect depth_registered_topic:=/kinect2/qhd/image_depth_rect camera_info_topic:=/kinect2/qhd/camera_info rtabmapviz:=false
Commands used on client:
roslaunch rtabmap_ros rtabmapviz_remote.launch

Best regards, Wezza