Home | Tutorials | Wiki | Issues
Ask Your Question
0

Gazebo crashes on simulating gpu_ray

asked 2013-10-15 05:07:04 -0500

RafBerkvens gravatar image

updated 2013-10-16 02:03:58 -0500

My situation is the following: I have a working robot model with a head_hokuyo_sensor as laser range finder. When using this model on my default setup, everything works fine. When using the model on a virtual machine, Gazebo crashes when the range readings are requested.

At first I thought Gazebo crashed any time when launched in the virtual machine. This is not true. It only crashes when the range readings are requested, either by visualization (as was default in my first try), or by ROS rviz. This is the output when the model is launched and the data is requested by rviz:

$ roslaunch p3dx_gazebo gazebo.launch 
... logging to /home/gazebo/.ros/log/0c658438-357b-11e3-952c-080027a2ea94/roslaunch-gazebo-VirtualBox-10513.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://gazebo-VirtualBox:44541/

SUMMARY
========

PARAMETERS
 * /robot_description
 * /rosdistro
 * /rosversion
 * /use_sim_time

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    urdf_spawner (gazebo_ros/spawn_model)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[gazebo-1]: started with pid [10534]
process[gazebo_gui-2]: started with pid [10539]
process[urdf_spawner-3]: started with pid [10546]
Gazebo multi-robot simulator, version 1.9.1
Copyright (C) 2013 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

Gazebo multi-robot simulator, version 1.9.1
Copyright (C) 2013 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

Msg Waiting for master.spawn_model script started
[ INFO] [1381829287.748584629]: Finished loading Gazebo ROS API Plugin.
[1;[ INFO] [1381829287.754626059]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
32mMsg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 10.0.2.15
OpenGL Warning: Failed to connect to host. Make sure 3D acceleration is enabled for this VM.
libGL error: failed to load driver: vboxvideo
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
[INFO] [WallTime: 1381829287.963248] [0.000000] Loading model xml from ros parameter
[INFO] [WallTime: 1381829287.969376] [0.000000] Waiting for service /gazebo/spawn_urdf_model
[INFO] [WallTime: 1381829288.279075] [0.000000] Calling service /gazebo/spawn_urdf_model

Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 10.0.2.15
OpenGL Warning: Failed to connect to host. Make sure 3D acceleration is enabled for this VM.
libGL error: failed to load driver: vboxvideo
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
Error [Param.cc:181] Unable to set value [1,0471975511965976] for key[horizontal_fov]
Error [Param.cc:181] Unable to set value [0,100000001] for key[near]
Warning [parser.cc:356] No <sdf> element in file[data-string]
[INFO] [WallTime: 1381829294.465796] [0.001000] Spawn status: SpawnModel: Successfully spawned model
[ INFO] [1381829294.500488438, 0.001000000]: LoadThread function completed
[ INFO] [1381829294.578569308, 0.001000000]: Loading gazebo_ros_control plugin
[ INFO] [1381829294.583119526, 0.001000000]: Starting gazebo_ros_control plugin in namespace: /p3dx
[ INFO] [1381829294.587561148, 0.001000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [/robot_description] on the ROS param server.
[urdf_spawner-3] process has finished cleanly ...
(more)
edit retag flag offensive close merge delete

Comments

I thought to have solved it by installing ros-hydro-hokuyo-node, but it results in the same error. The libGL errors can be resolved by turning on 3D acceleration and using export LIBGL_ALWAYS_SOFTWARE=1, but this does also not resolve the segmentation fault when the range readings are requested.

RafBerkvens gravatar imageRafBerkvens ( 2013-10-15 08:35:06 -0500 )edit

Can you post a backtrace? It would be most useful if you try running gazebo with any ROS infrastructure.

nkoenig gravatar imagenkoenig ( 2013-10-15 12:17:14 -0500 )edit

I have tested the setup with the new Gazebo 2.0. The backtrace is the same.

RafBerkvens gravatar imageRafBerkvens ( 2013-10-16 02:15:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-10-16 04:10:10 -0500

RafBerkvens gravatar image

The solution was, of course, simple.

The model used the libgazebo_ros_gpu_laser.so. Since Gazebo proved to be unable to run on virtual GPU ussage (export LIBGL_ALWAYS_SOFTWARE=1 was necessary to run Gazebo using hardware acceleration), it could not access the GPU. Changing the plugin to libgazebo_ros_laser.so and sensor type to ray solved the issue.

The hint was found in this discussion: https://bitbucket.org/osrf/gazebo/issue/760/uneven-sdf-model-updates-cuase, which was found thanks to the backtrace suggested by @nkoening.

edit flag offensive delete link more

Comments

Solve my problem :)

Raul Gui gravatar imageRaul Gui ( 2015-05-21 08:15:00 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-10-15 05:07:04 -0500

Seen: 2,428 times

Last updated: Oct 16 '13