rotation of laser and rviz miss position match
Update Question: Is it normal for delayed data in rivz laser not to rotate with odometry changes?
update: Here is a TF view showing current transformations. Should not this also show static latch transformation being published? Do the robot odometry need to do the translation between odometry and the laser frame?
void publishLatchTransforms()
{
// Send static link transforms
geometry_msgs::TransformStamped msg;
msg.header.stamp = ros::Time::now();
msg.transform.translation.x = 0.05;
msg.transform.translation.y = 0;
msg.transform.rotation.x = 0.0;
msg.transform.rotation.y = 0.0;
msg.transform.rotation.z = 0.0;
msg.transform.rotation.w = 1;
msg.header.frame_id = "tower_link";
msg.transform.translation.z = 0.3;
msg.child_frame_id = "hokuyo_frame";
static_broadcaster.sendTransform(msg);
msg.header.frame_id = "tower_link";
msg.transform.translation.z = 0.3;
msg.child_frame_id = "camera_frame";
static_broadcaster.sendTransform(msg);
}
update: checking the tf transformations. The only tf transformations that are not zeros are base_link->odom and map->odom. All other transformations are zeros. Even though the robot is in rotation. I am using the robot state publisher and have removed all static transforms from my code except for the laser_frame to the tower_link where it is attached. My updated question is who is responsible for rotating the laser_frame as the base_link turns. The tower_link is fixed to the base_link
I have a laser positioned on a fixed tower attached to my robot which is set to rotate slowly in a circle. I placed a construction cone in front of it. As you can see from the rivz image the laser plot of the code is spread around the robot instead stationary. Where does the issue lie here? I have static latch transforms for the base_link to the laser frame and publish odometry as the robot does rotate to scale as is shown in its gazebo sim.
What packages do you use? The rotation should be reflected either by a rotation of the tf frame the scan message refers to, or by a shift of the actual scan angles in the message. Make simple tests to check for wrong rotation direction etc.
Thanks I did have some static transforms and I removed them but I still get the same results. I have posted an update to the question. The transforms for the laser frame are all zeros. Who publishes these? I think gmapping yes.