0
$\begingroup$

Rosanswers logo

I am trying to launch a world file using roslaunch and running into errors. I am working with ROS kinetic and gazebo-7. My ultimate goal is to open a custom world made with the world plugin, and spawn a urdf into that world.

I have been using roslaunch to start an empty world with the following launch file, and that has worked fine.

<?xml version="1.0" encoding="UTF-8"?>
<launch>
    <include file="$(find gazebo_ros)/launch/empty_world.launch">
    </include>
</launch>

However, when I try to use the examples found in the Gazebo Ros tutorials to launch another world file, the execution fails.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<launch>
    
    <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="world_name" value="mud.world"/> 
        <arg name="debug" value="true"/> 
    </include>
</launch>

Results in the error below:

   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
terminate called recursively

Thread 18 "gzserver" received signal SIGABRT, Aborted.

The result is that the gazebo window opens but never loads any world, it simply stays at a black screen.

Note: I have already put the gazebo worlds directory in my .bashrc and I have tried apt-get update and apt-get upgrade.


Originally posted by rmmilner on ROS Answers with karma: 11 on 2020-11-18

Post score: 1


Original comments

Comment by 130s on 2020-11-19:
By no means this will be a "solution", but a potential workaround https://answers.gazebosim.org/question/15138/need-help-with-error-when-launch-gazebo-first-time/

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Solution was a simple syntax error:

<?xml version="1.0" encoding="UTF-8"?>
<launch>
    
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="worlds/mud.world"/> 
  </include>
</launch>

Originally posted by rmmilner with karma: 11 on 2020-11-19

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.