roboticsleeds / ur5controller

OpenRAVE Controller Plugin for UR5 (Universal Robots UR5) Robot
GNU General Public License v3.0
34 stars 8 forks source link

'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >' what(): boost: mutex lock failed in pthread_mutex_lock: Invalid argument #4

Closed gxxzs closed 5 years ago

gxxzs commented 5 years ago

I follow the tips to install openrave_catkin and or_urdf http://computingstories.com/robotics%20stories/installing-or_urdf-openrave-plugin.html, but there are something wrong when i run "openrave -listplugins": terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector >' what(): boost: mutex lock failed in pthread_mutex_lock: Invalid argument Aborted (core dumped)

the urdf plugins can be seen in the terminal: URDF - /home/zs/catkin_ws/devel/share/openrave-0.9/plugins/or_urdf_plugin.so

But when i run the test.py, the window is shutdown quickly. Here is the detail of the script:

!/usr/bin/env python

from openravepy import *

env = Environment() env.SetDebugLevel(1) env.SetViewer('qtcoin') originaxes = misc.DrawAxes(env, [1, 0, 0, 0, 0, 0, 0], dist=1, linewidth=2) module = RaveCreateModule(env, 'urdf') name = module.SendCommand('load /home/zs/rosmake_ws/ur5controller/ur5_description/urdf/clearpath_ridgebackur5robotiq_two_finger_gripper.urdf') body = env.GetKinBody(name)

Did you know how can i fix these problem? thanks! I install these on ubuntu 14.04 and ros indigo.

rpapallas commented 5 years ago

Hi @gxxzs,

Thanks for reaching out.

First, for the error message. It looks like it's a common issue; see the discussion here. It looks like is related to console_bridge. It's not a big concern as this shouldn't prevent you from using or_urdf and ur5controller.

For the second point, the window shuts down immediately because there is no code to keep your Python script running. One simple way is to use IPython.embed() in your script (or an endless loop to keep your script running):

#!/usr/bin/env python
from openravepy import *
import IPython

env = Environment()
env.SetDebugLevel(1)
env.SetViewer('qtcoin')
originaxes = misc.DrawAxes(env, [1, 0, 0, 0, 0, 0, 0], dist=1, linewidth=2)
module = RaveCreateModule(env, 'urdf')
name = module.SendCommand('load /home/rafael/catkin_ws/src/ur5controller/ur5_description/urdf/clearpath_ridgeback__ur5__robotiq_two_finger_gripper.urdf')
body = env.GetKinBody(name)

IPython.embed()

You will need to install IPython first:

pip install --user ipython

Make sure that your path /home/zs/rosmake_ws/ur5controller/ur5_description/urdf/clearpath_ridgeback__ur5__robotiq_two_finger_gripper.urdf is a valid one. Try to run:

cat /home/zs/rosmake_ws/ur5controller/ur5_description/urdf/clearpath_ridgeback__ur5__robotiq_two_finger_gripper.urdf

If you see the contents of the file then that's fine.

Also, it looks like you are trying to build ur5controller using rosmake which is not any more valid. ur5controller is now a catkin package and as such, you should create a catkin workspace and build ur5controller using catkin. You will need to create a catkin workspace using this tutorial. You will also need the openrave_catkin package from here.

Please let me know if that helped.

rpapallas commented 5 years ago

We have also created a singularity container that basically automates everything: https://github.com/roboticsleeds/ur5controller_singularity