Ask Your Question
0

how to Transform Pointcloud2 with tf

asked 2017-08-12 07:33:24 -0600

Mekateng gravatar image

Hi, I tried to run the python code on this link http://answers.ros.org/question/9103/... and got such an error below : Traceback(most recent call last): File "/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.

How to solve this problem ? Please help me this time . @jayess

edit retag flag offensive close merge delete

Comments

Please also use the Preformatted Text button (the one with 101010 on it) to format your terminal output. Also, can you please post your tf tree and rqt_graph?

jayess gravatar imagejayess ( 2017-08-12 11:19:43 -0600 )edit

I coulnd't paste my terminal output using preformatted text button @jayess . So ı will write again this error:listener.waitForTransform("/base_link", "/odom" , rospy.Time(0),rospy.Duration(1.0)) tf.Exception: . canTransform returned after 1.00039 timeout was 1.

Mekateng gravatar imageMekateng ( 2017-08-14 08:25:13 -0600 )edit

And because the code doesn't work ,the tf tree doesn't come out either

Mekateng gravatar imageMekateng ( 2017-08-14 08:27:26 -0600 )edit
1

@Mekateng, @jayess is being very patient and helpful. Copying and pasting the same content does not give any more information. The onus is on you to provide more information if you want help to answer to your question.

tfoote gravatar imagetfoote ( 2017-08-14 13:08:37 -0600 )edit

@Mekateng, it's very simple to use the button. Highlight the portion that needs to be formatted, then click the 101010 button or type Ctrl-k. Then, it will be formatted correctly.

jayess gravatar imagejayess ( 2017-08-14 15:06:17 -0600 )edit

The error is saying that it times out waiting for the transform from base_link to odom. Without the requested information or more information about what you're running/doing then that's all that can be said. You need a transform from base_link to odom.

jayess gravatar imagejayess ( 2017-08-14 15:07:29 -0600 )edit

Thank you very much Mr. @jayess . I hope ı will deal with it . Again thank you for your patient

Mekateng gravatar imageMekateng ( 2017-08-15 03:51:26 -0600 )edit

last question mr. @jayess . Of course How do I change the code to convert from base_link to odom? python code link: https://answers.ros.org/question/9103...

Mekateng gravatar imageMekateng ( 2017-08-15 05:29:06 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-08-15 13:51:33 -0600

jayess gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-08-12 07:33:24 -0600

Seen: 560 times

Last updated: Aug 15 '17