ROS 2 Dashing and Gazebo
Show older comments
Hi,
I am wokring on windows and have the VM installed and sucessfully have the ros_melodic_dashing_gazebov9.vmx operating.
When trying to use the worlds on my desktop, they simply open a terminal windows for a split second and then close again. It seems that they crash or Gazebo runs into issues and fails to open any of the worlds.
I have also tried this in conjunciton with the differetial drive example here . Which indicates to use
export SVGA_VGPU10=0
before opening the world, however this does not work either.
Any suggestions as to what is the problem?
Thanks,
Rob
8 Comments
Cam Salzberger
on 2 Dec 2020
Hello Rob,
I think we'll need some real error message to make any guesses. If you right-click the shortcut on the desktop, you can see the target shell-script that the shortcut runs. If you open that shell script, you can see the commands that will be run when it opens. For example, here is the Gazebo Empty shell script:
#!/bin/sh
export SVGA_VGPU10=0
export ROS_IP=$(hostname -I | tr -d [:blank:])
export ROS_MASTER_URI=http://$ROS_IP:11311
# Launch Gazebo world with TurtleBot3 Waffle Pi
gnome-terminal --title="Gazebo Empty World" -- /bin/bash -c 'export TURTLEBOT3_MODEL=burger; source /opt/ros/melodic/setup.bash; roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch '
I'd suggest running each of those commands one at a time in a newly-launched terminal, see what command gives an error, and what the error message is (since you launched the terminal separately, it shouldn't close on error). You can even break up the final command to see the issue more specifically:
export TURTLEBOT3_MODEL=burger
source /opt/ros/melodic/setup.bash
roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch
-Cam
Robert Corby
on 2 Dec 2020
Cam Salzberger
on 3 Dec 2020
So what happens if you run these three commands in the terminal?
export SVGA_VGPU10=0
export GAZEBO_PLUGIN_PATH=/home/user/src/GazeboPlugin/export:$GAZEBO_PLUGIN_PATH
gazebo /home/user/src/GazeboPlugin/world/differentialDriveRobot.world --verbose
The reason the window is closing is because the "bash" command is opening a separate bash terminal. If you run it in the terminal you have open already, you should see the error message.
-Cam
Robert Corby
on 3 Dec 2020
Robert Corby
on 3 Dec 2020
Cam Salzberger
on 3 Dec 2020
That is bizarre, to put it lightly. I did a little searching, but it seems like Gazebo usually gives some kind of error when crashing. This post sounded very similar to that issue though, so it may be worth trying their solution (save a backup of the file to put back in place just in case though).
It also may be telling that the Gazebo empty world worked, but the one that should have the Pioneer model did not. It could be an issue with loading the model (either a corrupted model file, or a graphics issue as you suggested). Or it could be the difference between using roslaunch and a lauch file, versus calling "gazebo" directly. Maybe try the other shortcuts on the desktop and see which ones launch correctly and which don't.
Also, what settings are you using for your VM? Memory, disk space, and processors are probably the most important for this situation.
Robert Corby
on 3 Dec 2020
Robert Corby
on 3 Dec 2020
Answers (1)
Cam Salzberger
on 4 Dec 2020
Moved: Jagadeesh Konakalla
on 8 Jul 2024
The "roscore" not found error is the correct behavior for the default terminal, actually. ROS needs to be "sourced" to put its various tools and libraries on the path, but you generally shouldn't have both ROS and ROS 2 sourced in the same terminal (except if you are going to use ros1_bridge). So if you want to access the ROS functionality, use the "ROS Melodic Terminal" shortcut instead of the default terminal, which will source the right folder for you. If you want to use ROS 2, you can call:
source /opt/ros/dashing/setup.bash
Those error messages with Gazebo are not supremely helpful either. In the Gazebo Office world output, you should be able to safely ignore the complaint about "rosdep". I see that output as well, but it has no impact. The error that Gazebo is giving just seems to be an irregular crash that some people experience more than others. I've seen a couple of similar posts here and here, so you could try their suggested workarounds.
Also, since the error is so generic, it would probably help to take a look at the log files mentioned to see if there is anything there that stands out.
At this point, you probably need more direct assistance. I'd suggest contacting Tech Support with all of the error messages (copied as text instead of images, if possible) and log files. They should be able to provide more in-depth assistance.
If you get an answer that works, though, be sure to post it back here!
-Cam
Categories
Find more on ROS Node Generation and Deployment in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




