Deleting URDF model causes error
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="libgazebo_ros_diff_drive.so" name="differential_drive_controller">
<leftJoint>left_wheel_joint</leftJoint>
<rightJoint>right_wheel_joint</rightJoint>
<robotBaseFrame>base_link</robotBaseFrame>
<wheelSeparation>0.5207</wheelSeparation>
<wheelDiameter>0.254</wheelDiameter>
<publishWheelJointState>true</publishWheelJointState>
<legacyMode>false</legacyMode>
<wheelTorque>180</wheelTorque>
</plugin>
</gazebo>
Asked by autonomous on 2017-09-07 23:35:44 UTC
Answers
I have the exact same problem. Does anyone have solution for this?
Edit: I solved the problem replacing the robot instead of deleting it. Replacing tutorial is given in the answer below:
Asked by kemalbektas on 2019-11-08 05:14:41 UTC
Comments