Problems with TF using the navigation stack
Hey everyone
To better understand my question I will provide some background information. I am running a mobile robot in Stage (simulation). The "problem" with this approach is that my odometry information is ideal and I want some error introduced to evaluate the navigation stack. I have therefore created a node which sends out a frame called "odom_error" which represents the erroneous odometry.
Basically the "odom_error" frame only contains the deviation and have "odom" as parent, the ideal odometry.
broadcaster.sendTransform(
tf::StampedTransform(
tf::Transform(
tf::createQuaternionFromRPY(0.0, 0.0, phi), tf::Vector3(x, y, 0.0)
), ros::Time::now(), "odom", "odom_error"
)
);
Here x, y and phi is my deviation.
There is thereby a link between the frames "odom_error" and "odom", but somehow the navigation stack is unable to detect this shown in the image below. I tell the AMCL node to use odom_error as source for odometry information, but when doing so the costmaps are unable to detect the connection between /map and /base_link. I get the following error:
Waiting on transform from /base_link to /map to become available before running costmap, tf error: Could not find a connection between '/map' and '/base_link' because they are not part of the same tree.Tf has two or more unconnected trees
But when I execute "rosrun tf tf_echo /odom /odom_error" I am able to detect a connection. Does anyone have any idea on how to fix this problem? It is pretty critical as my deadline is quite close. If there is something that does not make sense just ask and I will try to provide more information.