Hands on ROS: Chapter 6 (so far)

tag: handsonros

Busy at work, so progress has been slower than I’d like. A few comments on Chapter 6 for others who may come along:

For setting up Ubuntu Mate 18.04 (p175), bullet #2 - you really should set up the user as “pi”. I chose a different username only to discover that the scripts run further on (p180) expect the “pi” user and won’t run otherwise.

For x11vnc - Forcing the HDMI output - there is a note in /boot/config.txt strongly asserting that you shouldn’t edit the file, and there was really nothing to uncomment. Instead as suggested I created a file /boot/usercfg.txt. That worked fine (mostly). As long as I’m connected to a monitor, I get a good display. But once it’s headless, my display is only 656x416, which I’m afraid will be nearly useless. After an entire afternoon of googling and trying different things (including assigning framebuffer width and height), nothing works. Any suggestions would be welcome. I’m going to try this. If it’s unworkable I may try tightVNC. Or I may just load a non-GUI version of raspbian and try that (I’m guessing that’s where I’ll end up in the end, but have wanted to follow the tutorials as is as much as possible).
/K

1 Like

Solved. Just went into raspi-config in the terminal and selected 1920x1080 as the default display size. Now I get that in VNC (using tightvnc viewer for windows, by the way).

Hope this is helpful for future users of the book.
/K

2 Likes

Out of curiosity, what does the ExecStart= line in
/etc/systemd/system/vncserver@.service
list as the resolution now that you changed via raspi-config?

1 Like

That file doesn’t seem to exist (searched using ‘find’ with different targets just to be sure).
In the process per the book, I created a '/lib/systemd/system/x11vnc.service" file. In that file the ‘ExecStart=’ line hasn’t changed. x11vnc doesn’t seem to have a command line option to set the screen size - I had checked that as part of my earlier exploration.
/K

2 Likes

Oh right - you did say Ubuntu Mate. Forgot that. I am so much thinking Raspbian For Robots all day.

1 Like

Further notes for Chapter 6:

  • curl isn’t installed by default - that has to be installed with apt or apt-get in order to run the configuration scripts (p180)
  • rosdep is no longer installed by default (see: ‘rosdep’ package installation no longer automatic on Melodic; again, easy enough to install (using sudo apt-get install python-rosdep [not plain ‘rosdep’]) (p183)
  • bottom of p184 it should be ‘source /opt/ros/melodic/setup.bash’ (not kinetic)

And please note I’m not at all complaining or nitpicking- I’m enjoying the book, and having edited books myself know how easy it is for typos to be overlooked, and things changing between submitting the manuscript and it getting published. I’m just hoping this can serve as a resource/conversation site for others.
/K

1 Like

Last notes for Chapter 6:

  • For the program on pp189-190, you may want to look at the programs in the chapter 6 folder in the files cloned from git to see the proper spacing
  • p201 the file for the roslaunch command actually there. You’ll have to copy the file from the git clone. Create a ‘launch’ folder in your mygopigo directory for this. Launch files aren’t actually discussed until p206
  • p214 - it suggests playing the rosbag session on the laptop, but how to do that hasn’t been covered yet. Works OK on vnc but very slow
1 Like