Deleting Robot in gazebo causes segfault in gzserver

asked 2020-08-03 11:51:38 -0500

felcjo gravatar image

Hello,

I'm trying to implement a kill_robot() function that removes a robot from gazebo. I spawn the robot in, attach gazebo_ros_control and move_base + lidar. The spawning works just fine. When I try to delete the model through the gazebo api, however (rosservice call /gazebo/delete_model ...), I get a segfault. I tried calling the delete_model on static models in the world, and it worked just fine. I tried to debug further by commenting out the move_base, lidar plugins - deleting the model worked fine then! When I uncomment either, however, I revert back to error land. I get either of the two errors below ..

[gazebo-2] process has died [pid 22004, exit code 139, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -u -e ode /home/lxu9/gazebo_ws/src/agility_cassie/cassie_delivery/worlds/neighborhood_basic.world __name:=gazebo __log:=/home/lxu9/.ros/log/4499b8d4-d5a5-11ea-b79f-e4a4715f5686/gazebo-2.log]. log file: /home/lxu9/.ros/log/4499b8d4-d5a5-11ea-b79f-e4a4715f5686/gazebo-2*.log

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)

edit retag flag offensive close merge delete