Deleting URDF model causes error

asked 2017-09-07 23:35:44 -0500

autonomous gravatar image

updated 2017-09-07 23:37:05 -0500

Not sure if this is ROS or Gazebo related.

The URDF contains the differential drive plugin shown at the bottom. If the code for this plugin is removed, then the URDF can be deleted without issue. Otherwise, if the URDF is deleted either through a script or through the world tab in the GUI, it causes the following error:

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)

The plugin creates a subscription to the cmd_vel topic and I think that I will need to remove this subscription before deleting the URDF to avoid this error. However I don't know how I can unsubscribe to certain topics (preferably in python).

  <plugin filename="" name="differential_drive_controller">
edit retag flag offensive close merge delete