Hands on ROS: Chapter 7

I’ll post updates as I work through the chapter - others can chime in on the appropriate sections

For Running the gopigo3 node in the robot (p228) the roslaunch command listed won’t work as listed. You have to copy in the launch file from the pkg_gopigo files that you copied earlier with the Chapter 6 files (p174). You’ll also need to copy over the srv and msg folders, any missing programs in the src folder, and then replace the existing CMakeLists.txt and package.xml files with the ones from the Chap 6 downloaded files. When we originally created the package (p187) we didn’t include all of the necessary dependencies. As the top of p188 suggests, you’ll need to change the name in the CMakeLists.txt and package.xml to mygopigo, and then rebuild (run catkin_make from the catkin_ws directory). After that things will work (mostly)

I could rostopic list, etc. from my laptop just fine after I started the launch file on the robot. The weird thing is that rostopic echo didn’t work for some topics on the laptop - I got an error message asking if the messages were built. If I ran the same command on the robot, it would echo just fine. In trying to google this I found answers for rostopic echo not working at all (which boils down to the network configuration done earlier in chapter 7 not being done correctly). These answers didn’t seem to fit my case, since I could see most topics, just not the motor status ones (but I know they were built, because they showed just fine with rostopic echo on the robot. I could also rosnode ping the node. So no idea on that one despite an evening spent googling. If I find an answer I’ll post it in a reply.


The rest of the chapter was very straightforward. Pay attention to what you’re running on the robot (e.g. roslaunch) and what you’re running on the laptop.

In the Gazebo portion, on p244 where you have to add material to the gopigo.gazebo file from Chapter 5, note that the full file is available in the Chapter 7 files from the book. Just copy it over (may want to save the old version first).

The only confusing part on p244 was the line:
Further down in the file (from Chapter 5), we use 0.2 as the wheel radius. Gazebo runs fine with 0.2 as the diameter. The robot does rock forward when it stops. Just to check I tried 0.4 as the diameter, and it ran fine as well, although perhaps there was more tipping forward/rocking after a stop.

1 Like