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

Revision history [back]

click to hide/show revision 1
initial version

Until you post the information that I've asked for I can't give you much of answer beyond go through the ROS tutorials and the tf tutorials.

The error tells you exactly what the problem is:

"/home/ahmet/catkin_ws/src/laserTF/src/laserTransform.py", line 26 in module> listener.waitForTransform("/base_link", "/odom" , rospy.Time(0),rospy.Duration(1.0)) 
tf.Exception: . canTransform returned after 1.00039 timeout was 1

This comes from the line:

listener.waitForTransform("/base_link", "/odom", rospy.Time(0),rospy.Duration(1.0))

It's waiting for the transform from the /base_link frame to the /odom frame.

According to the tf tutorials that I linked to,

The waitForTransform() takes four arguments:

  1. frame...
  2. ... to this frame,
  3. at this time, and
  4. timeout: don't wait for longer than this maximum duration

Therefore, you need to publish the transform from the /base_link frame to the /odom frame.