Problems with Transform-Broadcaster on custom Bot
Hi Everyone,
i hope someone can answer me a question. I have a custom robot and i would like to use the Navigation-Stack of ROS. i follow this tutorial: ( http://wiki.ros.org/navigation ) The Problem is that anything is incorrect on my Transform-Boradcaster. The tf-tree is map-->odom-->base_link-->base_laser.
Here is my Transform-Broadcaster:
#include <ros/ros.h>
#include <tf/transform_broadcaster.h>
int main(int argc, char** argv){
ROS_INFO("starte tf_broadcaster!");
ros::init(argc, argv, "robot_tf_publisher");
ros::NodeHandle n;
ros::Rate r(100);
tf::TransformBroadcaster broadcaster;
while(n.ok()){
broadcaster.sendTransform(
tf::StampedTransform(
tf::Transform(tf::Quaternion(0, 0, 0, 1), tf::Vector3(0.1, 0.0, 0.2)),
ros::Time::now(),"base_link", "base_laser"));
broadcaster.sendTransform(
tf::StampedTransform(
tf::Transform(tf::Quaternion(0, 0, 0, 0), tf::Vector3(0.0, 0.0, 0.0)),
ros::Time::now(),"odom", "base_link"));
broadcaster.sendTransform(
tf::StampedTransform(
tf::Transform(tf::Quaternion(0, 0, 0, 0), tf::Vector3(0.0, 0.0, 0.0)),
ros::Time::now(),"map", "odom"));
r.sleep();
}
}
If i start the Ros-Navigation the last Message is "odom received". All is ok! So when i click on "2D Pose Estimate" the result is this: https://www.dropbox.com/s/n211hzuvjrr...
The Odom-Frame and the base_link/base_laser-Frame are on two different places. Why?
if i still click on the button "2D Nav Goal" the robot rotates in a circle and i get an Error:
"Rotate recovery can't´t rotate in place because there is a potential collision. cost -1.00"
Here is the log: https://www.dropbox.com/s/7d4fv3ad2h2...
I think the Problem is the Transform-Broadcaster. Can anybody help me?
Thanks
Max