I decided that the easiest, and probably most expeditious, way to learn about ROS is through their own tutorials. I guess this will be a bit of a crash course for me on their tutorials and ROS itself. There are dozens of tutorials available on the ROS site. I plan to give my own synopsis of how things go with each tutorial and my impression of its usefulness and efficacy. And, since I ran into an issue forcing me to alter the version of ROS on the Pi, I decided to restart the tutorials to make sure all of the same environments and factors are set up.
Beginner level
Tutorial 1: Installing and Configuring Your ROS Environment (29-Jan)
“Description: This tutorial walks you through installing ROS and setting up the ROS environment on your computer.”
1. ROS Install
This was already accomplished in my previous blog post.
2. Managing Your environment
I typed in the printenv | grep ROS
command and it spit out all of the ROS details, so no additional sourcing is required.
For those who are not aware, the printenv
command is asking the terminal to print all of the details of the current environment with one key/value pair per line. Adding the pipe |
tells it to send that data to the next command, which is grep
. Greater Regular Expression Printer is used to filter the data to show only what was elected, in this case variables pertaining to text immediately after the command (which can also use regular expression tags and keys). So, this command searched all of the environment variables for those with the name ‘ROS’ and printed it:
ROS_VERSION = 1
ROS_PYTHON_VERSION = 3
ROS_PACKAGE_PATH = /opt/ros/noetic/share
ROSLISP_PACKAGE_DIRECTORIES =
ROS_ETC_DIR = /opt/ros/noetic/etc/ros
ROS_MASTER_URI = http://localhost:xxxxx
ROS_ROOT = /opt/ros/noetic/share/rosed
ROS_DISTRO = noetic
3. Create a ROS workspace
This time when setting up the ROS workspace, there were no issues at all with running the catkin_make
command. Everything went very smoothly, although I was not forced to impose Python3 onto the system either, since Noetic has been upgraded to Python3 completely.
Sourcing the setup files was also easy and error-free.
Tutorial 2: Navigating the ROS Filesystem (29-Jan)
“Description: This tutorial introduces ROS filesystem concepts, and covers using the roscd, rosls, and rospack commandline tools.”
1. Prerequisite
I ran the appropriate command to install the tutorial package, but the latest version was noted to already be installed.
2. Quick Overview of Filesystem Concepts
This section defined packages and manifests, as well as explaining that stacks had been removed.
3. Filesystem Tools
This portion was pretty direct with the alterations of commands to find rospack find [package_name]
or change directories roscd [package_name]
straight to a specific ROS package. It is nice to have short cuts like that. It also showed the power of utilising the tab key with under-completed file names, but that is a pretty common trick for anyone that regularly does programming. Although, the double-tap on the tab key for all options was a new one for me.
The roscd log
was also an interesting tool, allowing you to see all of the log files that have been stored. Although, I have not run anything on this rendition, so received the error message.
The rosls [location_name[/subdir]]
seems like it will also be a useful tool in the future. Being able to remotely access the contents of a different folder within the ROS set up would make copying or relocating files much easier.