Lectures#

Overview#

The lectures in ENPM605 follow a progressive structure, starting with Python fundamentals and building toward real-world robotics applications using ROS 2. Each lecture introduces new concepts through explanation, live demonstrations, and in-class exercises. Lecture materials, including slides and demo scripts, are available on Canvas and GitHub.

Tip

Review the demo scripts after each lecture and re-run them on your own machine. Experimenting with the code is the fastest way to internalize the concepts.

Schedule#

Lecture

Topic

Key Concepts

L1

Course Introduction

Development environment setup, Python execution pipeline, variables, data types, mutability

L2

Python Fundamentals, Part I

Packages and imports, operators, boolean logic, strings, indexing and slicing, control flow

L3

Python Fundamentals, Part II

Lists, tuples, dictionaries, sets, loops, list comprehensions, copying

L4

Introduction to Functions

Function definition, arguments (positional, default, keyword, *args, **kwargs), scopes (LEGB), pass-by-assignment, type hints, recursion

L5

Advanced Functions

Programming paradigms, first-class functions, lambda expressions, closures, decorators, functools.wraps, functools.partial

L6

Object-Oriented Programming, Part I

OOP design phase, classes and objects, dunder methods, operator overloading, abstraction, encapsulation, @property

L7

Object-Oriented Programming, Part II

Class and static methods, association, aggregation, composition, inheritance, super(), polymorphism, duck typing, abstract base classes, @dataclass, __slots__, typing.Protocol

L8

Introduction to ROS 2

Distributed architecture, DDS middleware, QoS policies, pub/sub model (nodes, topics, messages), workspace setup, colcon builds, Python package creation, minimal and OOP-based nodes, spinning, timers, publishers, subscribers, communication timing scenarios

L9

Launch Files, Parameters, & Executors

Python launch files, advanced launch features (includes, conditionals, grouping, arguments), parameter lifecycle (declaration, retrieval, setting, runtime callbacks), single-threaded and multi-threaded executors, callback groups (mutually exclusive and reentrant), Python GIL

L10

Parameters, Custom Interfaces, Services & Actions

Parameter declaration, descriptors, callbacks, YAML parameter files, custom .msg/.srv/.action definitions, CMake interface packages, service servers and clients (sync vs async), action servers and clients, feedback, cancellation, communication pattern selection

L11

Coordinate Frames, TF2, and Mobile Robot Control

Pose representation (position, Euler angles, quaternions, gimbal lock), coordinate frames (REP 105), TF2 transform tree, static and dynamic broadcasters, transform listeners, Buffer and lookup_transform, Gazebo Harmonic simulation, RViz2 visualization, differential drive kinematics, cmd_vel/TwistStamped, odometry, proportional controllers, KDL frame composition, ArUco marker detection with PnP

L12

Namespaces, Remapping, and Behavior Trees

Namespaces (topic isolation, CLI __ns, launch file namespace), remapping (node, topic, parameter, CLI and launch file), behavior trees (composites, conditions, actions, decorators, py_trees, py_trees_ros, tick mechanism, memory flag, proportional controller integration)

L13

Mapping and Navigation with Nav2

Occupancy grid maps, map frame, SLAM with slam_toolbox, localization with AMCL, Nav2 stack (planner, controller, behavior tree, recovery), NavigateToPose action

L14

Lifecycle Nodes & ROS 2 Bags

Lifecycle node state machine (Unconfigured, Inactive, Active, Finalized), transition commands and callbacks, LifecycleNode, create_lifecycle_publisher, TransitionCallbackReturn (SUCCESS/FAILURE/ERROR), CLI-driven and programmatic transitions via the change_state service, ROS 2 bags (SQLite3 vs.MCAP storage, ros2 bag record / info / play, recording a Nav2 navigation run), Foxglove Studio for multi-panel offline visualization

Contents#