Skip to content

ROS onboarding

X. Chen edited this page Oct 20, 2021 · 9 revisions

1. Install a Linux system

Our lab has several Linux computers set up, but if you want to test ROS on your computer, you will need to create a Linux system. There are several ways to do this. (assume you are using Mac or Win PC)

1.1 Use VirtualBox

This is the easiest way and it will not destroy your current system in any way. But we don't recommend this way if you are controlling a real robot (setting up the communication from the virtual machine to a physical robot could be tricky). However, if you are just learning ROS, using a virtual machine is more than enough.

There are many detailed tutorials on this topic, for example, https://itsfoss.com/install-linux-in-virtualbox/

We are using ROS Melodic so please install Ubuntu 18.04 LTS version. This is the version that is currently used by ROS-Industrial. Research into upgrading to the more recent long-term support ROS Noetic Ninjemys is underway 2021-2022.

1.2 Dual boot Linux

If you have enough disk space, you can install a Ubuntu system alongside your Windows system (I haven't tested with MacOS yet). When you boot your computer, you can choose which OS to go into. This is the current setting on my personal computer.

See https://itsfoss.com/guide-install-linux-mint-16-dual-boot-windows/ for instructions.

1.3 Fresh install

Just follow the Dual boot Linux process, you will have an option to choose whether or not to wipe out your current OS.

2. Install ROS

This is easy. See http://wiki.ros.org/ROS/Installation

At the time of writing, our lab is using the melodic version of ROS.

3. Follow the ROS Tutorials

Going over all basic beginner-level tutorials is highly recommended. See http://wiki.ros.org/ROS/Tutorials

If your time is very limited, skip the tutorials 10, 14, 15, 16.

4. Test your skills

In the tutorial "Understanding ROS Topics", you have seen the turtlesim node displaying a turtle on your screen. This node is a subscriber that subscribed to the "/turtle1/command_velocity" topic.

Now please try to code your own keyboard teleoperation program to control the motion of the turtle (i.e., control the turtle using your keyboard). We already had a keyboard receiver available to use (source: https://github.com/xiaohuits/keyboard_receiver).

Hint: here you need to code a node that subscribes to the keyboard_receiver to get key input, convert to the velocity information, then publish to the topic that the turtlesim subscribed.

If you can successfully code the above practice task (either using C++ or Python), then we believe that you have learned the basics and are ready to play with the real robot.

Tools

  • VSCode: This is our preferred IDE for coding. Install the ROS extension and it's all set! If you are a Vim or Emacs person, multiple extensions exist to set up a flexible IDE. Debug ROS node is also possible (see here)!
  • Tmux: enhance your terminal experience! Read, e.g.: introduction, customize key bindings

5. Advanced Topics