ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

According to the tf python api docs here for waitForTransform, it tells you "Waits for the given transformation to become available. If the timeout occurs before the transformation becomes available, raises tf.Exception." Common thing alot of people have is that there is a delay in the broadcasted tf messages being sent somewhere in your tf tree. Could that somehow be a possibilty in your case?

According to the tf python api docs here for waitForTransform, it tells you "Waits for the given transformation to become available. If the timeout occurs before the transformation becomes available, raises tf.Exception." Common thing alot of people have is that there is a delay in the broadcasted tf messages being sent somewhere in your tf tree. Could that somehow be a possibilty in your case?


EDIT: With the pictures that you have posted, it shows that you have two base_link frame:

  • Pioneer3AT/Pioneer3AT/base_link
  • Pioneer3AT/base_link

'Pioneer3AT_Gazebo' is broadcasting a transform from Pioneer3AT/odom --> Pioneer3AT/base_link (the tf tree on the right side of the image), but all of your wheels, sensors, top plate, axels, etc. are all being transformed into the frame Pioneer3AT/Pioneer3AT/base_link. This is where your problem is.

You can simply fix this by changing your Pioneer3AT_tf_broadcaster node to publish a transform from your sonars, axels, and top plate to frame id Pioneer3AT/base_link instead of Pioneer3AT/Pioneer3AT/base_link.

Should look something like this for the Pioneer3AT/front_sonar --> Pioneer3AT/base_link:

broadcaster.sendTransform(
            tf::StampedTransform(tf::Transform(tf::Quaternion(x, y, z, w), tf::Vector3(x, y, z)),
            ros::Time::now(),"Pioneer3AT/base_link", "Pioneer3AT/front_sonar"));

Hope that fixes it. Take out the Pioneer3AT/Pioneer3AT/base_link frame, switch it with Pioneer3AT/base_link, and your tf tree should be connected and you should be able to lookup the transform.

According to the tf python api docs here for waitForTransform, it tells you "Waits for the given transformation to become available. If the timeout occurs before the transformation becomes available, raises tf.Exception." Common thing alot of people have is that there is a delay in the broadcasted tf messages being sent somewhere in your tf tree. Could that somehow be a possibilty in your case?


EDIT: With the pictures that you have posted, it shows that you have two base_link frame:

  • Pioneer3AT/Pioneer3AT/base_link
  • Pioneer3AT/base_link

'Pioneer3AT_Gazebo' is broadcasting a transform from Pioneer3AT/odom --> Pioneer3AT/base_link (the tf tree on the right side of the image), but all of your wheels, sensors, top plate, axels, etc. are all being transformed into the frame Pioneer3AT/Pioneer3AT/base_link. This is where your problem is.

You can simply fix this by changing your Pioneer3AT_tf_broadcaster node to publish a transform from your sonars, axels, and top plate to frame id Pioneer3AT/base_link instead of Pioneer3AT/Pioneer3AT/base_link.

Should look something like this for the Pioneer3AT/front_sonar --> Pioneer3AT/base_link:

broadcaster.sendTransform(
            tf::StampedTransform(tf::Transform(tf::Quaternion(x, y, z, w), tf::Vector3(x, y, z)),
            ros::Time::now(),"Pioneer3AT/base_link", "Pioneer3AT/front_sonar"));

Hope that fixes it. Take out the Pioneer3AT/Pioneer3AT/base_link frame, switch it with Pioneer3AT/base_link, and your tf tree should be connected and you should be able to lookup the transform.


EDIT2:

As of right now, since you neither you nor I can find the tf broadcaster, the /Pioneer3AT/base_link and /Pioneer3AT/odom frames can be ignored. They will just be frames in our system (for now), so try to make your own broadcaster node that broadcasts just the transform from /Pioneer3AT/Pioneer3AT/base_link --> Pioneer3AT/odom.

Make sure you change the base_link frame in the Pioneer3AT core launch file here to "Pioneer3AT/Pioneer3AT/base_link". Leave all your other sensor frames how you had them originally (if you modified them).

This is just a temporary hack just so we can get this working.