Troubleshooting Gazebo Simulation
This section explains how to solve problems that you might encounter when setting up Gazebo simulation environment and simulating a model in Gazebo.
Missing C/C++ Compiler
Description
Compiler not found error while running simulation.
Action
Install a supported C++ Compiler and run these commands in MATLAB®.
mex -setup c mex -setup c++
Regenerate Custom Message Handlers
Description
Simulation errors out indicating that custom messages are not found.
Action
Install a C++ Compiler supported by
gazebogenmsg
and then perform these
steps in MATLAB.
Create an empty folder and open it.
Run this command.
vexv5_gzsim_gazebogenmsg
Add path to install folder as indicated by the output of
vexv5_gzsim_gazebogenmsg
command.
Regenerate Gazebo Plugin
Description
An error indicating that Gazebo plugin is not running or is outdated is shown while testing connection to Gazebo simulator or while running simulation.
Action
Install a C++ Compiler supported by gazebogenmsg
and then
perform these steps in MATLAB.
Create an empty folder and open it.
Run this command.
mex -setup c++ vexv5_gzsim_gazebogenmsg
Add path to install folder as indicated by the output of
vexv5_gzsim_gazebogenmsg
command.Run this command.
packageGazeboPlugin('gzSLPluginWithCustomMsgs', pwd);
Open Ubuntu® VM and perform these steps.
Delete previous
gzSlPluginWithCustomMsg
commands in/home/user/VEX/plugins
.Copy the generated zip file to
/home/user/VEX/plugins
and extract it.Open a terminal at
/home/user/VEX/
.Run make command in Ubuntu terminal.
IP Address Not Seen in Ubuntu VM
Description
IP address not seen in Ubuntu desktop (VM).
Action
Restart the VM. If the problem exists, check and ensure the network settings are correct in VMware/VirtualBox.
Unable to Ping the VM IP Address from Host
Description
Ping command unable to reach Ubuntu VM.
Action
If the ping command fails even though an IP address is displayed in the VM, then the VM might have trouble with incoming requests. Check the network settings. If you are running the VM on VMware, use Bridged or Host-only mode to fix this issue.
VEX Robot Model Does Not open in Ubuntu VM
Description
Clicking on desktop shortcut for VEX® robot does not launch Gazebo.
Action
Gazebo’s port might be blocked by some other application. Restart the VM to fix the issue.
If the problem persists,
Navigate to
/home/user/VEX/
in Ubuntu VM, right click and open a terminal.Run the
make
command in terminal.