TF Frame delay transform
Hi,
I have a camera attached to a motor for yaw control. The motor has a encoder that I use to update the TF at 100Hz. Odometry is working at 50Hz.
The value measured from the encoder is in measured
variable and update the TF with the follwing code:
static tf::TransformBroadcaster br;
tf::Transform transform;
transform.setOrigin( tf::Vector3(0.0, 0.0, 1.550) );
tf::Quaternion q;
lastAngle = (((20000.0-control.measured)*0.04366)*(M_PI/180));
q.setRPY(0, 0, lastAngle);
transform.setRotation(q);
br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "base_link", "camera2_link"));
I have the following model defined:
<link name="camera2_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="${camera_length} ${camera_width} ${camera_height}"/>
</geometry>
</visual>
<inertial>
<mass value="1"/>
<inertia ixx="100" ixy="0.0" ixz="0.0" iyy="100" iyz="0.0" izz="100"/>
</inertial>
</link>
<joint name="CameratoBL" type="fixed">
<origin
xyz="${camera_x} ${camera_y} ${camera_z}"
rpy="0 0 0" />
<parent link="base_link" />
<child link="camera2_link" />
</joint>
If you look at the video https://www.youtube.com/watch?v=YG3-VHbiBzo there is a delay on the camera2_link and I can't understand where it come from :s
Asked by metRo_ on 2016-07-27 08:35:30 UTC
Comments
Any idea why is it happening?
Asked by metRo_ on 2016-08-18 04:43:21 UTC
Hey, did you figure out what the issue was?
Asked by i_robot_flight on 2017-11-10 10:05:23 UTC
Hi, I think it was only a rviz issue and if you change the frame on rviz it looks ok.
Asked by metRo_ on 2017-11-10 10:17:45 UTC
Okay, but I am seeing a delay between transforms even on rviz for a similar implementation on LiDAR pointclouds. Thanks!
Asked by i_robot_flight on 2017-11-10 12:42:16 UTC