Getting translation error [closed]
Update: I published my own transforms and they work fine....see code following for one wheel. But if I go through the robot-state-publisher not.
void calculateJointState2(const float pv, const std::string name)
{
geometry_msgs::TransformStamped msg;
msg.header.stamp = ros::Time::now();
msg.transform.rotation.x = 0.0;
msg.transform.rotation.y = 0;
msg.transform.rotation.z = 0;
msg.transform.rotation.w = pv*(M_PI/180); // calc not tested yet
msg.header.frame_id = "base_link";
msg.transform.translation.x = 0.05;
msg.transform.translation.y = -0.15;
msg.transform.translation.z = 0.1;
msg.child_frame_id = "right_wheel";
odom_broadcaster.sendTransform(msg);
}
Update: here is a copy of the topic as published from my odometry to jointstate and the associated tf that is from the robot state publisher.
joint state as I sent it: rostopic echo /joint_states
header:
seq: 251
stamp:
secs: 13
nsecs: 927000000
frame_id: base_link
name: ['joint2']
position: [-0.003120610024780035]
velocity: [0.0]
effort: []
Transform received: rostopic echo /tf
transforms:
-
header:
seq: 0
stamp:
secs: 13
nsecs: 927000000
frame_id: base_link
child_frame_id: right_wheel
transform:
translation:
x: nan
y: nan
z: nan
rotation:
x: nan
y: nan
z: nan
w: nan
---
Getting translation error, move_base and gmapping should be providing odom to map translation. I am publishing base-link to odom odometry. Joint states are published with same time stamp as the odometry. What is the best way to investigate this error? What should I be looking for.
I am sending joint states (base-link to joint) with robot-state-publisher node running in background. It is doing the translation to wheel. yes? When set the global and fixed frame id in rviz to base-link it prints same msg but say base-link instead of map
[ERROR] [1380206510.724690354, 7.561000000]: Error getting latest time from frame `'right_wheel' to frame 'map': Could not find a connection between 'map' and 'NO_PARENT' because they are not part of the same tree. Tf has two or more unconnected trees. (Error code: 2)`
This error seems to be unrelated to weather I publish joint states or not. It is also being generated at a rate that far exceeds the rate of odometry I am publishing.
Can you transform from base_link to right_wheel?
Not sure what you are asking. I am sending joint states (base-link to joint) with robot-state-publisher node running in background. It is doing the translation to wheel. yes? When set the global and fixed frame id in rviz to base-link it prints same msg as above but say base-link instead of map