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

ROS Init Exception

asked 2013-03-10 07:39:14 -0500

JaRu gravatar image

updated 2013-09-30 02:04:54 -0500

130s gravatar image

Hi all!

I wrote two nodes in python and get the following exception when I start the nodes.

Can somebody tell me whats the problem?

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/opt/ros/electric/stacks/geometry/tf/src/tf/listener.py", line 238, in     run
    rospy.spin()
  File "/opt/ros/electric/stacks/ros_comm/clients/rospy/src/rospy/client.py", line 98, in spin
    raise rospy.exceptions.ROSInitException("client code must call    rospy.init_node() first")
ROSInitException: client code must call rospy.init_node() first

Thanks for help!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-03-10 07:57:17 -0500

dornhege gravatar image

You did not call rospy.init_node before calling rospy.spin.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-03-10 07:39:14 -0500

Seen: 1,857 times

Last updated: Sep 30 '13