boost mutex exception thrown

asked 2020-08-01 12:41:23 -0500

strike_eagle_iii gravatar image

updated 2020-08-01 12:45:13 -0500

I've created a Dockerfile that installs CUDA enabled opencv along with ros melodic. I've also set it up so it runs well with vscode using their remote development tools. I started working through an exercise: using this repository: https://github.com/udacity/simple_arm... simple_arm

My basic setup is here: https://github.com/jasonbeach/ros_uda....

I tried roslaunch simple_arm robot_spawn.launch however an exception is thrown:

terminate called after throwing an instance of '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
Aborted (core dumped)
[gazebo-5] process has died [pid 3641, exit code 134, cmd /opt/ros/melodic/lib/gazebo_ros/gzserver -e ode /workspaces/ros/src/simple_arm/worlds/willow_garage.world __name:=gazebo __log:=/home/vscode/.ros/log/a6679600-d418-11ea-b3c8-0242ac110002/gazebo-5.log].
log file: /home/vscode/.ros/log/a6679600-d418-11ea-b3c8-0242ac110002/gazebo-5*.log

(full output below)

googling around most of the solutions indicated that rosconsole_bridge was to blame, however they all seem to reference ros kinetic and indicate the issue was fixed in newer versions of rosconsole_bridge.

https://github.com/personalrobotics/o...

https://answers.ros.org/question/1688...

apt list --installed | grep rosconsole yields

ros-melodic-rosconsole/now 1.13.11-1bionic.20200529.232409 amd64 [installed,local]
ros-melodic-rosconsole-bridge/now 0.5.3-0bionic.20200530.001213 amd64 [installed,local]

dpkg -l | grep "ros-melodic-urdf " yields

ii  ros-melodic-urdf                             1.13.2-1bionic.20200530.025645      amd64        This package contains a C++ parser for the Unified Robot Description Format (URDF), which is an XML format for representing a robot model.

roslaunch gazebo_ros empty_world.launch gives the same error. The other method suggested in these posts to trigger the exception in python actually don't throw the exception for me. i.e in python, this works without issue:

$ python
Python 2.7.17 (default, Jul 20 2020, 15:37:01) 
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> ctypes.cdll.LoadLibrary('/opt/ros/melodic/lib/liburdf.so')
<CDLL '/opt/ros/melodic/lib/liburdf.so', handle 557042927d30 at 7f36f80a6fd0>
>>>

python 3.6.9 works as well.

The gazebo-xxxxx.log files do not exist in the directories indicated in the full output.

The full output is

$ roslaunch simple_arm robot_spawn.launch
... logging to /home/vscode/.ros/log/a6679600-d418-11ea-b3c8-0242ac110002/roslaunch-c3a09c620403-3589.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: in-order processing became default in ROS Melodic. You can drop the option.
started roslaunch server http://c3a09c620403:36017/

SUMMARY
========

PARAMETERS
 * /gazebo/enable_ros_network: True
 * /joint_state_publisher/use_gui: False
 * /robot_description: <?xml version="1....
 * /rosdistro: melodic
 * /rosversion: 1.14.6
 * /simple_arm/joint_1_position_controller/joint: joint_1
 * /simple_arm/joint_1_position_controller/pid/d: 10.0
 * /simple_arm/joint_1_position_controller/pid/i: 0.01
 * /simple_arm/joint_1_position_controller/pid/p: 100.0
 * /simple_arm/joint_1_position_controller/type: effort_controller...
 * /simple_arm/joint_2_position_controller/joint: joint_2
 * /simple_arm/joint_2_position_controller/pid/d: 10.0
 * /simple_arm/joint_2_position_controller/pid/i: 0.01
 * /simple_arm/joint_2_position_controller/pid/p: 100.0
 * /simple_arm/joint_2_position_controller/type: effort_controller...
 * /simple_arm/joint_state_controller/publish_rate: 50
 * /simple_arm/joint_state_controller/type: joint_state_contr...
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver ...
(more)
edit retag flag offensive close merge delete