Using Rtabmap with KinectV2 and iai_kinect2_bridge

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Using Rtabmap with KinectV2 and iai_kinect2_bridge

Ross_L
This post was updated on .
Hello there

I feel kind of bad asking this here, as its more an issue to do with using iai_kinect2_bridge, but I hoped someone had some experience with it that might get me out of a corner!

I want to do mapping and navigation on a real world robot I have made. I have a model in urdf as well as the real bot. The problem comes when trying to link up the tf's for the output of kinect2_bridge with the relevant tf on the robot. The below linked documents shows what my tf tree and launch files look like. As you can see the tf's generated by kinect2_bridge are not attached to the robot tree at the shelf1 link, and just float up at the top right. However I cannot find a way to make them link. Is it just a parameter of some kind in the launch file?

frames1.pdf
rtabmap.launch

In the urdf I simply have the xacro entry for the iai_kinect2_description.urdf.xacro, which works to pull their kinect model into the urdf, and its parent is defined as the shelf it sits on as illustrated in the tree. If needed I can post the urdf.

If I have left any needed info out please ask and I will post it.

Thanks!

EDIT: Additional rtabmap error info in case it is useful:

/rtabmap/rtabmap: 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"). If topics are not published at the same rate, you could increase "queue_size" parameter (current=10).
/rtabmap/rtabmap subscribed to (approx sync):
   /kinect2/hd/image_color,
   /kinect2/hd/image_depth_rect,
   /kinect2/hd/camera_info,
   /scan

/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"). If topics are not published at the same rate, you could increase "queue_size" parameter (current=10).
/rtabmap/rtabmapviz subscribed to (approx sync):
   /base_controller/odom,
   /camera/data_throttled_image/compressed,
   /camera/data_throttled_image_depth/compressedDepth,
   /camera/data_throttled_camera_info,
   /base_scan

The topics are publishing, but RVIZ and rtabmap cannot link to them, I am assuming due to the tf issue.
Reply | Threaded
Open this post in threaded view
|

Re: Using Rtabmap with KinectV2 and iai_kinect2_bridge

Ross_L
Small update, I found the following snippet in another thread here posted by Matthieu, which seems to have worked!

   <arg name="pi/2" value="1.5707963267948966"/>
   <arg name="optical_rotate" value="0 0 0 -$(arg pi/2) 0 -$(arg pi/2)" />
   <node pkg="tf" type="static_transform_publisher" name="kinect2_base_link"
   args="$(arg optical_rotate) shelf1_kinect2_rgb_optical_frame kinect2_link 100" /> 

Thanks again Matthieu, I owe you many beers :)
Reply | Threaded
Open this post in threaded view
|

Re: Using Rtabmap with KinectV2 and iai_kinect2_bridge

matlabbe
Administrator
Great that you've found a solution, it was indeed a missing static_transform_publisher.