Main Content

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.

Compiler error

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.

Simulation error

Action

Install a C++ Compiler supported by gazebogenmsg and then perform these steps in MATLAB.

  1. Create an empty folder and open it.

  2. Run this command.

    vexv5_gzsim_gazebogenmsg
  3. 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.

Configure Gazebo error

Action

Install a C++ Compiler supported by gazebogenmsg and then perform these steps in MATLAB.

  1. Create an empty folder and open it.

  2. Run this command.

    mex -setup c++
    vexv5_gzsim_gazebogenmsg
  3. Add path to install folder as indicated by the output of vexv5_gzsim_gazebogenmsg command.

  4. Run this command.

    packageGazeboPlugin('gzSLPluginWithCustomMsgs', pwd);

Open Ubuntu® VM and perform these steps.

  1. Delete previous gzSlPluginWithCustomMsg commands in /home/user/VEX/plugins.

  2. Copy the generated zip file to /home/user/VEX/plugins and extract it.

  3. Open a terminal at /home/user/VEX/.

  4. 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.

See Also