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

Moveit Python Demo causes [Errno 9] Bad file descriptor [closed]

asked 2014-06-16 13:07:06 -0500

Rick C NIST gravatar image

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.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by tfoote
close date 2014-10-30 12:36:23.268088

Comments

tfoote gravatar image tfoote  ( 2014-10-30 12:36:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-06-16 13:59:30 -0500

Rick C NIST gravatar image

I think that I resolved the problem just by rebooting. I closed all terminals. Logged out and logged back in. The problem disappeared.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-06-16 13:07:06 -0500

Seen: 186 times

Last updated: Jun 16 '14