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

NameError: global name 'ms' is not defined after running learning_tf start_demo.launch

asked 2015-05-23 06:20:55 -0500

andrewwi gravatar image

updated 2015-05-23 11:53:58 -0500

tfoote gravatar image

Hi. Running through the tf tutorials in sequence and currently at tfTutorialsWriting a tf listener (Python).

Run roslaunch learning_tf start_demo.launch and get following errors:

[ERROR] [WallTime: 1432379077.642128] bad callback: <function handle_turtle_pose at 0x7fd1eb45d6e0>
Traceback (most recent call last):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/", line 709, in _invoke_callback
    cb(msg, cb_args)
  File "/home/andrew/catkin_ws/src/learning_tf/nodes/", line 12, in handle_turtle_pose
    tf.transformations.quaternion_from_euler(0, 0, ms.theta),
NameError: global name 'ms' is not defined

Can see the 2 turtles appearing in the window. Can move 1 turtle via arrow keys but 2nd turtle does not follow turtle 1

Note: have run apt-get update and lots of ROS packages updated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-05-23 11:53:06 -0500

tfoote gravatar image

It looks like you are missing a g in msg in your code. see the example

edit flag offensive delete link more


Oops. Thanks <embarrassed>.

andrewwi gravatar image andrewwi  ( 2015-05-24 20:15:42 -0500 )edit

Question Tools

1 follower


Asked: 2015-05-23 06:20:55 -0500

Seen: 1,253 times

Last updated: May 23 '15