Understanding ROS and Gazebo error messages: a beginner’s guide

ROS error messages

Sometimes ROS can give you really detailed error messages that you struggle to fix as a beginner.

The first thing to try is roswtf. This command will run checks on your system to try find any problems (warnings and errors).

Here is a non-exhaustive list of how to decipher some typical ROS error messages:

  • Error when using roscd: roscd: No such package/stack 'beginner_tutorials'. This happens when the environment for the particular workspace/package you’re using isn’t available. To fix this, try the following
    • cd ~/directory/pointing/to/my/workspace
    • source devel/setup.bash
  • Error when using rosrun: [registerPublisher] Failed to contact master at [localhost:11311].  Retrying... To fix thus start the master
    • roscore

Gazebo error messages

When running Gazebo from the command line, make sure to turn on verbosity in order to show any error or warning messages. Here is a non-exhaustive list of how to decipher some typical Gazebo errors:

  • Error when running a plugin: [Err] [Plugin.hh:165] Failed to load plugin lib[plugi-name]_plugin.so: lib[plugin-name]_plugin.so: cannot open shared object file: No such file or directory. To fix this, make sure the correct
  • library paths are included:
    • export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:[path-to-plugin-build-directory]
      gazebo --verbose [path-to-plugin .world file]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s