How to define a static_transform_publisher between two frames with a same child frame?
Hi everybody, I'm using ROS Indigo on Ubuntu 14.04 LTS with the package loam_velodyne and trying to run a static_transform_publisher between two frames (frame_velodyne and frame_imu) with the same child frame (map) so that I can get the correct offset, orientation, velocity, and acceleration with respect to one of my parent frames (frame_velodyne). My tree looks like this:
frame_velodyne/map
frame_imu/map
I tried to add a static_transform_publisher to the loam_velodyne.launch file so that it transformed my imu data when my bag file was played as follows:
<node pkg="tf2_ros" type="static_transform_publisher" name="tf_velodyne_to_imu" args="1 2 3 0.1 0.2 0.3 frame_velodyne frame_imu" output="screen"/>
but it didn't work, so I am wondering if this is the right procedure.
Thanks in advance!
could you explain what are you actually trying to do, from what it looks like you have 2 different tf trees, and you want to make one tree, am I correct?
I would like to use the orientation, velocity, and acceleration from my IMU device referred to frame_velodyne in the loam_velodyne algorithm. I thought that adding a static_transform_publisher between frame_velodyne and frame_imu would solve the problem, but it didn't work for me.
if you just want the same orientation as you have of IMU at any moment then you can simply add static transform where IMU is parent and velodyne is child, with zero rotations, so whatever rotation you get in IMU, velodyne will also get that.
If you want to use those values in algorithm, then better go into your node, and subscribe to IMU topic and use those values accordingly.
Actually, there is a translation and rotation between those coordinate systems and static_transform_publisher is not transforming my IMU data. I'll change the code manually.