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

LookupTransform argument target_frame does not exist

asked 2015-07-13 04:59:27 -0500

flaminga gravatar image

updated 2015-07-13 09:25:55 -0500

I try to send odom message: The code is, but it gives me an error:

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
File "/opt/ros/indigo/lib/python2.7/dist-packages/tf/listener.py", line 237, in run
    self.last_update_ros_time = rospy.Time.now()   
File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/rostime.py", line 155, in now
    return get_rostime()   
File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/rostime.py", line 209, in get_rostime
    raise rospy.exceptions.ROSInitException("time is not initialized. Have you called init_node()?")
ROSInitException: time is not initialized. Have you called init_node()?

[INFO] [WallTime: 1436785911.264067]
Starting odom node Traceback (most recent call last):
   File "/home/robotics/Documents/ros/src/navigation_car/odom_sender.py", line 49, in <module>
    trans,rot = tf_listener.lookupTransform(odom_frame, base_frame, current_time )
tf.LookupException: "odom" passed to lookupTransform argument target_frame does not exist.

Tf-tree is normal, tf-echo odom base_link works properly

Edit 0:

Traceback (most recent call last):
File "/home/robotics/Documents/ros/src/navigation_car/odom_sender.py", line 51, in <module> trans,rot = tf_listener.lookupTransform(odom_frame, base_frame, rospy.Time() ) tf.LookupException: "odom" passed to lookupTransform argument target_frame does not exist.

Edit 1: new error:

Traceback (most recent call last):
File "/home/robotics/Documents/ros/src/navigation_car/odom_sender.py", line 66, in <module> odom_pub.publish(odom) File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/topics.py", line 843, in publish self.impl.publish(data) File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/topics.py", line 1027, in publish serialize_message(b, self.seq, message) File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/msg.py", line 152, in serialize_message msg.serialize(b) File "/opt/ros/indigo/lib/python2.7/dist-packages/nav_msgs/msg/_Odometry.py", line 167, in serialize buff.write(_struct_7d.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w)) AttributeError: 'tuple' object has no attribute 'x'

Edit 2: All is well) This is code

edit retag flag offensive close merge delete

Comments

please be more specific. This is not a question.

mgruhler gravatar image mgruhler  ( 2015-07-13 05:36:17 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-07-13 08:14:01 -0500

mgruhler gravatar image

Well, there are two errors.

the one with init_node() is coming from your tf_listener() being a global variable. Put this one after the init_node() call, then it shoudl work.

I'm not sure about the other one. Does this still occur after having the tf_listener setup correctly?

edit flag offensive delete link more

Comments

i corrected the code. Now it give on error (see edit).

flaminga gravatar image flaminga  ( 2015-07-13 08:34:09 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-07-13 04:59:27 -0500

Seen: 6,017 times

Last updated: Jul 13 '15