Moveit Python Demo causes [Errno 9] Bad file descriptor
Hello ROS Community,
This is my first post to this forum. I am attempting to run the tutorial for moveit using python. Specifically the Move Group Interface/Python API tutorial. Sorry, my karma is not yet good enough to post links.
- I am running python 2.7.
- OS is Ubuntu 12.04
- ROS and ROS packages are installed using apt-get
I have created a package called my_youbot_moveit with a simple python script. The script contains the following:
import sys
import copy
import rospy
import moveit_commander
import moveit_msgs.msg
import geometry_msgs.msg
print("============ Starting tutorial setup")
moveit_commander.roscpp_initialize(sys.argv)
rospy.init_node('move_group_python_interface_tutorial', anonymous=True)
When I run the code
source ~/catkin/develop/setup.bash
rosrun my_youbot_moveit my_youbot_moveit.py
I get the error
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 504, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 153, in run
(client_sock, client_addr) = self.server_sock.accept()
File "/usr/lib/python2.7/socket.py", line 202, in accept
sock, addr = self._sock.accept()
File "/usr/lib/python2.7/socket.py", line 170, in _dummy
raise error(EBADF, 'Bad file descriptor')
error: [Errno 9] Bad file descriptor
Please help me understand what is causing this problem and how to solve it.
I reran the moveit setup assistant, and this problem went away. Must have been an error in one of my configuration files