Solvedrealsense ros Example tf tree with T265 and a mobile robot

Hi!

We've been trying to implement a RealSense T265 on a wheeled robot for quite a while now and we've been wondering if anyone could share a tf_tree on a working mobile robot? If someone could share a launch file too that would be superb!

I've been trying to set the base_frame_id to base_link, however this moves all the camera related frames to the center of the robot (even though there is a static transform between base_link and camera frame).

Another thing that's not clear for me is how the pose_frame relates to odometry frame?

31 Answers

✔️Accepted Answer

Hi @msadowski, I created a simple example assembly using the Kobuki robot base and T265 facing forward.
kobuki_t265_2_rviz_screenshot_2019_05_02-09_34_49
This is the corresponding tf tree:
frames_kobuki_t265_2
I used the camera pose frame with respect to the camera odom frame (as estimated by T265) to attach it to the robot (base link):
static_transform_publisher -0.2 0 -0.1 0 0 0 camera_pose_frame base_link

You can adapt this launch file for your needs:
https://github.com/intel-ros/realsense/blob/development/realsense2_camera/launch/rs_t265.launch

To fuse wheel odometry, currently a json configuration file is still required:
https://github.com/intel-ros/realsense/blob/development/realsense2_camera/launch/rs_t265.launch#L9
The format is described here: https://github.com/IntelRealSense/librealsense/blob/master/doc/t265.md#appendix
and the odometry topic has to be mapped to this one: https://github.com/intel-ros/realsense/blob/development/realsense2_camera/launch/includes/nodelet.launch.xml#L74

We are working on simplifying the usage. Thank you for trying it out and thank you for your patience.

Other Answers:

@msadowski Sure thing! Here is my tf tree. I also put the code into a ros package so you can have a better idea of what i did.

functional_tree

functional_tree_zoom

@schmidtp1 thanks for the information! It's really useful!

Can you check if in your setup the base_frame_id argument is set to camera_link (that's what I would expect based on your tree)?

Since in standard cases the offset between base_link and camera_link is always static I'm wondering if the tree would be a bit 'cleaner' if a tf transform between base_link and camera_link could be specified in the urdf and then the realsense_manager could perform a lookup. This way I imagine we could avoid a static_transform between camera_pose_frame and base_link.

I also noticed there is another tree detached (odom->base_footprint), normally I'd expect the tree to be organized as (odom->base_footprint->base_link) but in case of your tree this would cause conflicts with the static transform. I assume this transform could be disable in the odometry node (I assume that T265 is only listening to the information on the odometry topic).

Did you also happen to use this setup with some existing mapping packages? I'm wondering if there are some specific things that you needed to do to make map->camera_odom work reliably for localization.

Related Issues:

41
realsense ros missing dependency with ddynamic_reconfigure
Hi A couple of changes happened The folder ddynamic_reconfigure was removed in favor of the newly re...
8
realsense ros Release to Melodic/Ubuntu 18.04?
Got it working by modifying CMakelists.txt: #Ros realsense_camera download https://github.com/intel-...
6
realsense ros Example tf tree with T265 and a mobile robot
Hi @msadowski I created a simple example assembly using the Kobuki robot base and T265 facing forwar...
3
realsense ros Auto-Exposure Not Consistently Working at System Init on D435
I have had the same issue with the d415 I believe it is caused as setting the manual exposure causes...