Getting a Rover to Rove, Virtually

Today’s goal is to get a rover robot roving in the Gazebo robotics simulator. Gazebo is used by many for simulating robotics, including the DARPA Robotics Challenge, and the Space Robotics Challenge.

We’ll be starting with the bare-bones ROS install, running on Ubuntu 16.04:

Running ./go brings up an empty world in Gazebo.

That’s a good start.

Let’s spawn a model into the world:

rosrun gazebo_ros spawn_model object.urdf

Oh noes, an error:

ImportError: No module named catkin_pkg.packages

Oh boy, ROS is going to be fun. After a bit of Stack Overflow, I find this is because I’m using Conda, instead of plain Python 2.7, and catkin’s not installed in Conda’s python. So running this fixes it:

conda install -c auto catkin_pkg

Also, need to get numpy.

conda install -c auto numpy

Run it again. Cool, a new error.

No handlers could be found for logger “rosout”

Ah, it’s of course because there’s a bug in spawn_model where if you don’t give it the right command line, it fails with that error because the command line arguments are parsed before setting up logging. That’s nice.

So, after a little more Stack Overflow, I find that running this line actually spawns a model!

rosrun gazebo_ros spawn_model -sdf -model beer -database beer

It’s a beer, not a rover, but it’s progress. Who knew ROS was so easy to get started with?

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.