T265 odometry TF translation node
I have this robot where I want to setup the ROS navigation stack on it.
I am using ROS Melodic on an UDOO Bolt (Ununtu machine).
For the odometry I am using an Intel Realsense T265 which is mounted on the robot as shown in the picture above.
The laser is an YDLidar which is mounted underneath the robot.
The current problem which I have (and from a throw google search I am not the only one) is that I cannot correctly connect the T265 odom in my TF.
If I use the T265 odom TF frame and I do a static transform from the T265_pose_frame to my base link, I have the problem that my odom frame is above my laser scan, and the move_base local costmap is not trowing errors that the origin of the sensor is out of map bounds:
[ WARN] The origin for the sensor at (0.35, -0.02, 0.23) is out of map bounds. So, the costmap cannot raytrace for it.
Therefore I decided to not use the TF of the Intel Realsense, but instead to try an create a node in python which is listening on the odometry messages of the T265 and it is generating the TF which directly linked to base_link (see TF view-frames below)
Currently if I do not modify the data from the T265 at all, and I publish the TF based on the odometry input, I have the following behavior:
because the T265 is connected with an offset of 0.307 on x and 0.21 on z.
I am not that good with the geometry problems :) can you please give me some advice how to correct the translation issue (remove the "hole in the middle")?
I tried the obvious "solution" to subtract from the x and y odometry the (sin(θ) * hole_radius) and (cos(θ) * hole_radius), but ofcourse this does not work, because the T265 odometry always starts from 0, and then the whole TF is translated. Does the ros_tf2 package already provide some kind of API to make this translation programatically?
Or is there maybe a better solution to this problem?
Sorry, I do not have karma points to upload the pictures.. therefore I put some links..