Lecture: Course Administration


This lecture describes the logistics of the course including what material we will use for learning, pedagogical approach (lecture style, exercises, assignements), grading scale, etc.

Slides (pdf)

Lecture: ROS2 Concept Overview, Installation, and Development Environment Setup


This lecture provides a survey of primary concepts of ROS2 middleware and support libraries. It also indicates what concepts we will emphasize in our lectures, assignments, and projects.

Slides (pdf)

Resources

  • Technical overview of ROS2 “Robot Operating System 2: Design, Architecture, and Uses In The Wild” by Steve Macenski, Tully Foote, Brian Gerkey, Chris Lalancette, William Woodall.

Homework

This homework is necessary for setting up your ROS2 environemnt and making sure that you are ready to do in-class exercises in the next lecture.

Lecture: Coding ROS2 Nodes, Using ROS2 Timers and Topics, Computation Graphs (rqt_graph)


This lecture provides an introduction to coding ROS2 nodes, timers, and topics (we will focus on Python – you will need to study C++ on your own).
These are the most basic aspects of ROS2 computation. We provide templates for node code and use these to discuss the required code elements for a node, timers, topic publishers and subscribers. We discuss the most basic aspect of activating application code in a node: timers and associated call-backs functions. ROS2 tools associated with nodes are discussed including CLI facilities for listing active nodes. Then we use the templates to code a simple publisher and subscriber for a topic.

Lecture Materials

There are no slides from this lecture. Everything is based off of live coding via templates and workflow cheat sheets listed below. Below is the activity script for the lecture and the completed workspace from the activity (private repo).

Resources

Objectives

  • Know how to create a ROS2 Python node from scratch
  • Know how to create a timer and an associated call-back
  • Understand the basics of ROS2 topic, and know how to create a simple topic publisher and subscriber in Python
  • Know how to use CLI tools ros2 node list and ros2 node info <nodeName> (cheat sheet)

Homework

Lecture: Node Parameters Basics

This lecture provides an overview and examples of how to use ROS2 node parameters. Node parameters provide a convenient way to configure properties of your nodes at run/launch time and even dynamically(!).

Lecture Materials

Preparation

The following material is useful to go through before class.

Resources

Lecture: Launch File Basics


This lecture provides an overview and examples of how to use ROS2 launch file. Launch files provide a way to run (launch) a collection of ROS2 nodes (e.g., all the nodes in a system) with one command.

Lecture Materials

Below is the activity script for the lecture (private repo).

Resources

Lecture: Interfaces


This lecture describes the purpose and gives examples of ROS2 interfaces - type signatures for ROS2 messages (topics), services, and actions. It provides links to documentation indicating how interface base types are mapped to Python and C++ types. Also covered are directions for how to find pre-defined ROS2 interface types as well as how to define your own.

Lecture Materials

Resources

Lecture: Services


This lecture describes the purpose and gives examples of ROS2 services – request/response interactions between a service provider and a service client. It illustrates how to code a simple service and client in Python.

Lecture Materials

Resources

Lecture: Modeling: TF, URDF, and RVIZ Overview


Robots include physical components (wheels, bodies, arms, etc.), and part of programming a robot is to (1) keep track of where these part are (and how they are oriented) relative to each other and to their environment and (2) to make them move relative to each other and to their environment. The ROS2 Transform framework (TF2) provides support for activities. This lecture provides an overview of TF2, including its purpose, and main use cases. It describes the purpose of a unified robotics description format (URDF) file which is used to specify physical aspects of a robot in terms of basic components, connections between components (joints), and possible joint movements. It illustrates the use of the RVIZ framework to visualize the physical definition of a robot and its transforms.

Lecture Materials

Resources

Lecture: Modeling: URDF Basics


This lecture is an in-class exercise that involves building a basic URDF file for a simple robot. Concepts covered include defining links (with box and cylinder geometries), defining joints (with fixed, revolute, continuous, and prismatic joint types), issues regarding positioning of links and joint transforms.

Lecture Materials

Resources

Activities are based on the following source

For a good written overview (supported by some videos), see the Articulated Robotics URDF/XACRO overview.

Documentation for the XML elements of a URDF can be found at the links below. These are actually from the ROS1 documentation, but URDF format is the same in ROS2 as in ROS1.

Lecture: Modeling: XACRO Basics


xacro is macro framework for XML. Although it can be used for any type of XML file, it is primarily used in the ROS ecosystem for URDF files. xacro can enable better “software engineering” of your URDF files by introducing named constants (as associated expression evaluation), macros for commonly used URDF elements, and decomposing your URDF content into multiple files (enabling a more modular organization of your URDF source material and easier reuse of URDF definitions across projects).

This lecture is an in-class exercise that introduces basic aspects of xacro. We first review how to set up a launch file for (a) loading a URDF into the robot state publisher node and (b) launching accompanying joint state publisher gui and rviz nodes. This type of setup is often used in the early prototype phase of the physical robot design. We cover how to migrate the basic URDF file to a xacro file. Then we review the most common xacro features including named constants (properties), macros for creating parameterized/reusable URDF elements, and decomposing URDF content into multiple xacro files.

Lecture Materials

Acknowledgement

This lecture is based on content from Eduard Renard.

Resources

Lecture: Modeling: Gazebo Overview


Gazebo is a physics simulation framework that is part of the ROS ecosystem, but independent of ROS. By “physics simulation”, we mean that it can simulate physical objects, interactions between objects (collisions, friction), the effect of gravity, etc. In addition, it has a plug-in architecture that enables you to control your robot in a simulation and even operator standardized sensors on your robot such as cameras and lidar in the context of the simulation. Finally, you can define various simulated “worlds” that you can use to evaluate concepts associated with your robot.

This lecture gives an overview of the Gazebo GUI, basic functionality, SDF files, and loading models/worlds into Gazebo.

Lecture Materials

Acknowledgement

This lecture is based on content from the Gazebo Fortress documentation.

Resources

These activities are based on the following sources

Lecture: Modeling: Preparing URDF Specifications for Gazebo


This lecture does a walk-through of artifacts that we need to use basic features of Gazebo. This includes add collision and inertia properties to your URDF file.

Lecture Materials

Resources

For inertia, collision information…

  • Articulated Robotics written tutorial – Describing robots with URDF – among other things, describes general concepts associated with inertial, mass, and collision properties.
  • Articulated Robotics written tutorial – URDF Design – builds on the general tutorial above to describe how to specify inertia and collision properties for the Articubot.
  • Nav2 written tutorial – Setting Up The URDF

For integrating ROS2/URDF with Gazebo Fortress…

These activities are based on the following sources

Lecture: Modeling: Gazebo / ROS Integration


A primary aspect of robotics development workflow is integrating portions of a robot’s software with simulation environments in Gazebo that are designed to test/assess the robot’s features and capabilities. Ideally, the development infrastructure is set up so that you can easily switch between simulation and actual implementation. This will involve designing launch files to bring up both ROS aspects and Gazebo aspects.

Unfortunately, ROS and Gazebo aren’t directly compatible – for example, they use different topic names, middleware implementations, etc. ROS2 distributions including libraries for bridging topic-based communication between ROS and Gazebo. This lecture covers basic aspects of these libraries and the bridging concept.

Lecture Materials

Resources

The ros_gz* packages provide ROS-side nodes and utilities that wrap Gazebo functions and that bridge between ROS and Gazebo.

  • Examples/demos that illustrate the ros_gz packages. Some of the most applicable for building on our lecture content are..

All of these demos are already installed when you have ros_gz* installed, so you can just run the launch commands provided in the Readme to launch them.

Lecture: Modeling: Gazebo / Camera as Illustration of Sensor


Realistic simulation of a robot in Gazebo will often rely on the robot sensing aspects of its environment, e.g., to determine how to navigate or otherwise achieve some goal. Gazebo has a basic organizational framework for incorporating different types of sensors. For example, an SDF/URDF file with Gazebo configuration information includes XML blocks for utilizing sensor plug-ins.

In this lecture, we look at how to add a sensor component (a camera) to the diff drive robot from the previous lecture and to simulate the camera’s acquisition of scene information from the Gazebo world using a Gazebo sensor plug-in. We will also see how to communicate information from the simulated camera to the robot implementation using the Gazebo / ROS2 bridging infrastructure.

Lecture Materials

Lecture: ROS2 Control: An Overview of the ROS2 Control Framework


ROS2 Control is a framework for interface ROS2 applications with hardware. It provides framework approaches for APIs that provide hardware interfaces, APIs that provide control logic, and an architecture for flexibly integrating controllers with hardware interfaces.

In this lecture, we provide an overview of the ROS2 Control and illustrate its APIs and architecture with examples from the ROS2 Control libraries.

Lecture Materials