Programming Robots: Python, Linux and ROS 2

Practical robot programming on Linux with Python and ROS 2: the command line, permissions, processes and networking, Python for robots, Git, the ROS 2 graph and QoS, rclpy publishers and subscribers, services, actions and parameters, packages and custom interfaces, launch files, tf2 transforms, simulation, RViz and rosbag2, and a safe teleoperation capstone.

ROB-110 Year 1 3 credits 12 lessons · 5 h 55 min

Offered by HSM University · Robotics

This is the American version of this course. See the Canadian version.

What you'll learn

  • Explain why robots run Linux, choose a ROS 2 distribution and Ubuntu release, and navigate, search and configure a Linux system from the command line
  • Manage file permissions, device access, processes, signals and boot-time services, and work on a robot remotely over SSH and the network
  • Write organized, testable Python for robots using classes, NumPy arrays and deadline-based timing, and make programs fail safely
  • Use Git branches, commits, tags and .repos files to manage robot code, choose versions and licenses, and record what code ran
  • Describe the ROS 2 computation graph, message types, conventions and quality-of-service policies, and estimate topic bandwidth
  • Write rclpy publisher and subscriber nodes with timers and suitable QoS, keep callbacks short and measure timing jitter
  • Choose between topics, services and actions, write servers and asynchronous clients, and declare and validate parameters
  • Create, build and test ROS 2 packages with colcon and rosdep, and define custom message, service and action interfaces
  • Write Python and XML launch files that use arguments, remapping, namespaces and YAML configuration, and explain lifecycle nodes
  • Compose and invert 2-D transforms, use quaternions, and publish and look up transforms in the standard frame tree with tf2
  • Use Gazebo, simulated time, RViz and rosbag2 to simulate, visualize, record, replay and analyze robot data
  • Specify, design, implement and test a safe teleoperation system for a mobile robot from requirements to a traced test plan

Course content

12 lessons · 5 h 55 min total · final exam

  1. 1 Linux and the command line for robotics 33 min · quiz
  2. 2 Files, processes, permissions and networking on a robot 29 min · quiz
  3. 3 Python for robot programs 30 min · quiz
  4. 4 Version control with Git and project structure 30 min · quiz
  5. 5 ROS 2 concepts: the graph, nodes, topics and messages 29 min · quiz
  6. 6 Writing publishers and subscribers in rclpy 30 min · quiz
  7. 7 Services, actions and parameters 30 min · quiz
  8. 8 Custom interfaces, packages, colcon and workspaces 28 min · quiz
  9. 9 Launch files and configuration 28 min · quiz
  10. 10 Coordinate frames and transforms with tf2 29 min · quiz
  11. 11 Simulation, visualization and recording data 28 min · quiz
  12. 12 Capstone: a small mobile robot program 31 min · quiz
  13. E Final exam 20 questions

Requirements

Recommended background. You can start any course at any time.

Description

Practical robot programming on Linux with Python and ROS 2: the command line, permissions, processes and networking, Python for robots, Git, the ROS 2 graph and QoS, rclpy publishers and subscribers, services, actions and parameters, packages and custom interfaces, launch files, tf2 transforms, simulation, RViz and rosbag2, and a safe teleoperation capstone.

Part of the Science stream, typically taken in year 1.