
Self-driving cars and robots are becoming real, enabling automated warehouses, home deliveries, and safer roads as these systems see, sense, locate themselves, avoid obstacles, and share space with humans.
Explore the principles and working logic of self-driving systems, learning by doing with a real robot prototype or a simulator, using ROS 2 and practical concepts.
Explore odometry and control for a self-driving robot by translating joystick velocity commands into differential kinematic control, and estimate motion from wheel encoders using sensor fusion and a Kalman filter.
Follow setup guidelines, use the Q&A and forums to resolve issues, and leverage both C++ and Python implementations to practice ros2 concepts and build a self-driving robot with a simulator.
Install ros2 jazzy on Ubuntu 24.04 and configure the desktop version with rviz, demos, and tutorials by copying commands, updating the system, and sourcing the bashrc.
Install ROS 2 Humble on Ubuntu 22.04 and set up ROS 2 desktop tools, developer tools, and environment, including sourcing in bashrc for seamless ROS 2 usage.
Set up a ros2 development environment on Ubuntu 24.04 using Visual Studio Code with ROS extensions, Terminator terminal, and essential ROS 2 packages for Gazebo and joystick control.
Configure an Ubuntu 22.04 development environment by installing Visual Studio Code with ROS 2 extensions, Terminator terminal, and essential ROS 2 packages and tools for simulation and control.
Explore the course GitHub repository, organized by section, with the most up-to-date, tested nodes and features code you can copy, adapt, or use as a debugging template.
Explore why the robot operating system (ROS) enables interoperable, reusable software modules for autonomous navigation, obstacle avoidance, and object manipulation across diverse robots.
Explore how ROS 2 unifies hardware interfaces and driver management for self-driving robots, enabling code reuse across different cameras and motors without rewriting modules.
Describe why a new robot operating system emerged to overcome ROS 1 limitations, including unreliable wireless networks, real-time guarantees, and security concerns, enabling fleet collaboration and hardware integration.
Explore the ROS 2 architecture centered on the DDS middleware for robust inter-node messaging, enabling bindings with cpp, python, java via rclcpp and rclpy using Cyclone DDS.
Explore hardware abstraction in ROS, which provides a standard interface to sensors and motors, allowing robotics software to run without worrying about specific hardware or protocols.
Explore low-level device control in ros2 by examining how drivers provide a standard interface between hardware such as cameras and the operating system, enabling commands and data retrieval.
Explore how ROS 2 enables inter-node communication through topics (publisher-subscribe), services, and actions, including publishers, subscribers, servers, clients, goals, feedback, cancel messages, and the final result.
Organize a robot's code into modular packages that interact and focus on single functionalities, enabling reuse of navigation and mapping components across mobile robots and drones.
Create your first ros2 package and ros2 application, and learn how underlay and overlay shape a ros2 workspace with nodes and startup files from standard and new open source packages.
Create and activate a ros2 workspace by building an overlay, adding python and c++ packages, and sourcing setup.bash to recognize new packages in each terminal.
Publish a ROS 2 node in Python using a publisher subscriber model on the chapter topic. The node publishes a string message per second via a timer and demonstrates setup.
Publish a first ros2 c++ node that sends string messages on a topic via a publisher-subscriber pattern, and learn building, launching, and verifying with ros2 topic list and echo.
Implement a python ros2 subscriber node using the publisher-subscriber protocol to read string messages from a topic and log each message, alongside a c++ publisher to show language-agnostic communication.
Implement a ros2 c++ simple subscriber node that subscribes to a string topic, reads and prints messages, and demonstrates ros2 publisher-subscriber communication within the bumper bot cpp package.
Explore how mobile robots exchange forces with their environment using wheeled, legged, and aerial locomotion. Learn how environment and application shape the choice of locomotion, balancing efficiency, complexity, and versatility.
Explore differential drive and other wheeled architectures, such as Ackermann and omnidirectional drives, and learn how motor speed and direction achieve any pose in the 2D plane and state space.
Explores friction effects on wheeled locomotion by comparing ideal spring behavior to real ground, and explains energy losses and rolling friction on soft surfaces.
Learn how ROS 2 lets you model, visualize, and simulate a robot on your PC, including sensors and physics, to speed debugging without real hardware.
Use URDF to define the robot through XML tags, building a parent-child link and joint tree with fixed or movable connections and visual, collision, and inertial properties for simulation.
Create a ros2 bumper bot urdf sakro model, build the bumper bot description package, define base footprint, base link, wheels and caster joints, attach meshes, and visualize the model.
Visualize RViz 2 messages on ros2 topics, using a subscriber to interpret and display maps, laser scans, and camera images through plugins for clear, real-time robotic data visualization.
Explore how nav2 and ros2 enable autonomous mobile robots with path planning and obstacle avoidance, and learn how node parameters configure software behavior for different robot setups.
Create a simple ros2 python node configurable by parameters, with a runtime change callback that handles an integer and a string parameter, logs updates, and returns a set_parameters_result.
Learn to implement a ROS 2 C++ node with configurable parameters, declare defaults (int 28 and string Antonio), and handle runtime changes via an on set parameters callback returning set_parameters_result.
Start the simple parameter node in ROS 2, read and set its parameters with ros2 param, and use the C++ or Python implementation while changing values at runtime.
Visualize the robot in rviz by publishing the urdf robot description through ros 2, using the robot state publisher, joint state publisher gui, tf plugin, and robot model plugin.
Use launch files in ros 2 to start multiple nodes with a single command by listing operations, dependencies, and parameters in Python, XML, or YAML, enabling reusable compositions.
Create a first launch file to visualize the robot's urdf in rviz2, launching robot_state_publisher, joint_state_publisher_gui, and rviz with a model argument for different urdf files.
simulate your ros 2 robot in Gazebo, reproducing motor, encoder, and IMU data via ros 2 topics to test nodes in a virtual environment without hardware.
Enhance the bumper bot urdf for Gazebo by adding collision and inertia tags, replacing complex meshes with simple spherical geometry, and exporting Gazebo-ready friction and joint parameters.
Launch the simulation demonstrates building a robot digital twin in gazebo with a ros 2 launch file and urdf model, then spawns the bumper robot into an empty world.
Explore how ros2 control enables motor actuation by sending commands and reading states, using the resource manager and controller manager to connect hardware, simulations, and controllers in Gazebo and rviz.
Discover the ros control library's three interfaces for position, velocity, and force/torque control, and how error drives commands toward a target while rejecting disturbances.
Modify the bumper bot urdf to load ros2 control plugins in gazebo, selecting humble or jesse via is_ignition, and define joint velocity commands with position and velocity feedback.
Use yaml configuration files to define all ros parameters for a node in a comprehensible, simple format, set them in one command, and expose them to the node at runtime.
Create a bumper boat controller package with bumper boat controllers.yaml to configure the controller manager for ros2_control, load joint state broadcaster and simple velocity controller, and enable ignition-aware gazebo plugin.
Create a launch file to start the bumper boat controller ros2 control setup in Gazebo, spawning joint state broadcaster and simple velocity controller via the controller manager.
Launch gazebo, launch ROS 2 control, and use the simple velocity controller to drive robot wheels. Learn to list controllers and hardware interfaces, and publish velocity commands.
Explore robot kinematics to relate wheel speeds to the robot’s velocity using the ros control library; learn forward and inverse kinematics to drive motion via a joystick.
Express the pose of a mobile robot in 2d space with a world frame and a robot-attached frame, using x, y, and theta, then address roto-translation motion.
Compute world coordinates by adding the translation vector to robot-relative x and y, converting obstacle positions from the robot frame to the world frame.
Explore ros2 turtle sim to apply 2D pose kinematics, publish velocity commands via turtle teleop key, visualize node and topic flows with Arc Graph, and spawn multiple turtles.
Compute the translation vector between two turtles in turtle sim using a Python ros2 node, subscribing to each turtle's pose and printing the vector as the turtles move.
Create a ROS 2 C++ node to compute the translation vector between two turtles in turtle sim from pose topics and report the x and y components.
Use the rotation matrix to relate the robot frame to the world frame and compute world coordinates from p_x_first and p_y_first using theta.
Compute the rotation matrix between two turtles in a ROS 2 Python node, deriving the relative orientation in radians and degrees and visualizing the matrix and angles in real time.
Develop a two-node c++ ros 2 application that computes and prints the rotation matrix between two turtles from their world poses, including theta in radians and degrees.
Learn to express robot motion in two-dimensional space using a transformation matrix that combines rotation and translation. Use homogeneous coordinates to compute obstacle's world position from its robot frame coordinates.
Derive the differential kinematics relating wheel speeds to the robot's linear and angular velocity, enabling velocity commands in the robot frame and joystick-driven motion in the world frame.
Describe a mobile robot's velocity from its pose in a 2d frame using time derivatives, and derive a two-wheel differential kinematics model for joystick control.
derive the equation linking a differential-drive robot's linear velocity to wheel speeds, using wheel radii and right/left wheel rotational velocities, with two-wheel geometry.
Derive the robot's angular velocity from wheel velocity differences in a differential drive using the wheel separation and the M_S matrix.
Map the differential-drive robot’s velocity from its own frame to the world frame using rotation matrices. Use V, W, and theta to compute world-frame velocity under the drivetrain constraint.
Derive the forward differential kinematics for a differential drive robot by combining two velocity equations, yielding a Jacobian that links wheel speeds to the robot’s world velocity.
Apply differential kinematics to translate joystick velocity into wheel commands for a ros 2 robot, subscribing to velocity topics and publishing wheel speeds for teleoperation.
Develop a Python ros2 node that receives a velocity message, converts it to per-wheel commands with a differential drive matrix, and publishes wheel speeds.
Develop a c++ simple speed controller node that receives a robot-frame velocity and publishes wheel commands using a differential drive speed conversion matrix.
Launch the simple controller in ros2, choosing python or c++ and configuring wheel radius and wheel separation. Watch the node translate velocity commands into wheel motions.
Teleoperate a ros2 robot with a joystick by converting joystick input into twist stamped commands and publishing them to the bumper bot controller command velocity topic via joy teleop.
Learn by doing: configure the ROS 2 diff drive controller to convert velocity commands into wheel speeds, compare it with a simple controller, and teleoperate a differential-drive robot in Gazebo.
Explore the TF2 library in ROS 2 to manage frame transformations and odometry. Use URDF and the robot state publisher to visualize the robot's frames.
Explore how to relate robot, camera, and map frames by chaining transformation matrices, compute relative positions using intermediate frames, and master the crucial order of matrix multiplication.
Explore static and dynamic transforms in the tf2 library, publishing fixed and time-varying frames to ros2 topics tf static and tf, and visualize them in rviz.
Publish a python ros2 node that broadcasts a static transform between bumper bot base and bumper bot top, with zero rotation and a 0.3 translation offset, then visualize in rviz.
Publish a static transform between bumper bot base and top using a ros2 c++ node with tf2 static broadcaster. Visualize the transform in rviz using the transform stamped message.
Publish a dynamic transform in ros 2 with a transform broadcaster, linking autumn to bumper bot base while static transform remains between bumper bot base and top, updating 0.1 seconds.
Publish a dynamic transform between Autumn and bumper boat base and a static transform from bumper boat base to bumper boat top using tf2 ros broadcaster, updated every 0.1 seconds.
ROS 2 services enable a request–response pattern where a service server offers functionality to service clients, such as a face recognition function, avoiding code duplication across nodes.
Develop a Python ros 2 service server that sums two integers, plus a client node, using bumper bot messages and ros 2 command line interface to interact with the service.
Create a simple ros 2 c++ service server that sums two integers, connect a client in another ros 2 node, and interact via the ros 2 command line interface.
Develop a Python ROS 2 service client that calls the AddTwoInt service to sum two integers. Wait for the service, send the request, and handle the asynchronous response.
Learn to build a ROS 2 C++ service client that calls a sum service, handle asynchronous responses, and verify service availability using wait for service.
Create a ros 2 python get_transform service that returns the transform between two frames using tf2, a transform buffer and listener, and a stamped response with a success flag.
Add a get transform service to the simple tf kinematics node to provide the transform between any two frames using tf2, including a transform listener and buffer.
Compare Euler angles and rotation matrices for three-dimensional orientation (z, y, x rotations) with quaternions, explaining why quaternions prevail in robotics and computer science.
Express the orientation of a 3d object with Euler angles via rotations about z, y, and x axes, producing roll, pitch, and yaw, then compose them with rotation matrices.
Learn quaternions, four coefficients A, B, C, D, as a rotation representation that simplifies composing rotations and inverses, offering efficiency over Euler angles and rotation matrices for ROS 2.
Convert roll, pitch, and yaw to quaternions with TF Transformations and rotate the bumper boat base frame as it translates along the x axis, composing orientation with multiply and inverse.
Apply Euler to quaternion concepts to rotate the bumper bot base frame around the z axis while translating along the x axis in a ROS 2 C++ node.
Explore TF2 tools in ROS 2 to visualize and inspect reference frames, publish static and dynamic transforms, and read transformation matrices using view frames and tf2 echo.
Learn to estimate the robot’s pose in a 2d map by composing transforms between the robot frame, starting frame, and map origin; focus on local localization using sensor data.
Track the robot’s motion to estimate its current pose using odometry from wheel rotations, speeds, and timing, and explore laser and visual odometry methods.
Explore wheel odometry for mobile robots: measure wheel radius, count encoder rotations to estimate position and velocity, and compare incremental and absolute encoders amid sensor fusion and global localization.
Use wheel encoders and differential kinematics to calculate the robot's odometry, deriving its linear velocity and angular velocity from wheel rotations via the wheel radius and wheel separation.
Compute the robot's linear and angular velocity from wheel encoders using differential kinematics in a Python controller, with ROS 2 joint state messages and odometry.
Implement differential kinematics in a ros 2 c++ node to compute the robot's linear and angular velocity from wheel encoder data, using odometry and joint state messages.
Derive the robot’s position and orientation from wheel odometry by integrating the differential kinematic equation, using wheel radii and right and left wheel velocities to compute and separate velocity integrals.
Compute the robot's orientation from wheel angular velocities using the differential kinematic equation, with wheel radius and wheel separation, by integrating over time to obtain odometry.
Compute the robot's position and orientation from wheel odometry in a Python controller by updating x, y, and theta from wheel rotations using the wheel radius and joint states.
this lecture implements wheel odometry in a c++ bumper bot controller to compute x, y, and theta from wheel rotations, using ds and dtheta with trig updates.
Publish odometry messages from the python controller to a ros2 topic, exposing robot pose, velocity, and orientation with quaternion conversion via tf transformations, frame IDs, and timestamped updates.
Publish an odometry message on a ros2 topic from the bumper bot controller, updating pose, twist, orientation, and timestamp using nav messages and tf2 quaternion handling.
Publish a dynamic odometry transform from the fixed odom frame to the robot base_footprint using a TF2 broadcaster in Python, deriving translation and orientation from wheel odometry.
Publish the dynamic odometry transform from the odom frame to the base footprint in a C++ ros 2 node using the Transform Broadcaster and a transform stamped message, enabling rviz.
Explore probability theory and statistics to manage uncertainty in robotics, and apply a probabilistic approach to localization, odometry, and sensor fusion.
Define random variables from experiments like coin tosses and dice rolls. Learn that probabilities sum to one, lie between zero and one, and that independence lets us multiply probabilities.
Investigate how dependent events, such as robot localization and rock detection, use conditional probability to compute joint probability as P(X) times P(Y|X).
Explore probability distributions for random experiments, from a uniform single-die case to sums of two dice. Learn to compute the mean, variance, and standard deviation.
Explore gaussian distributions, their mean and standard deviation, and how symmetry yields the bell curve. Learn to combine gaussians, compute resulting mean and variance, and apply to robot localization.
Apply the total probability theorem to dependent processes to estimate the robot's location on the park path. Break the park into B1, B2, B3 regions and sum P(A|Bi)P(Bi).
Use Bayes rule to update the robot's location estimate as new sensor observations arrive, reducing localization uncertainty from five meters through prior, likelihood, and posterior concepts.
Apply probability theory to model sensor noise and enhance localization in real environments. The chapter adds a normal random process to simulated encoder outputs to reproduce realistic noisy odometry.
Develop a Python node to simulate gaussian noise in wheel encoder readings, affecting odometry and robot localization in Gazebo, then publish noisy odometry separately for comparison with the simple controller.
Develop a ros 2 c++ noisy controller that adds gaussian noise to wheel encoder readings in gazebo, publishing noisy odometry and localization for comparison with the simple controller.
Extend the ros 2 launch file for the bumper bot to add noisy odometry parameters and read real-time values with opac, then compare python and c++ noisy controllers.
Compare perfect and noisy odometry in a gazebo robot simulation using ROS 2, with Plot Juggler visualizing odometry and velocity to highlight ground truth base footprint and sensor noise.
Would you like to build a real Self-Driving Robot using ROS2, the latest version of the Robot Operating System by building a real robot?
Would you like to take your first step into Physical AI and learn the theory and practice of Odometry, Control, and Sensor Fusion from industry experts?
In this course, you will:
Create a Digital Twin of a Self-Driving Robot and simulate it in Gazebo
Study Locomotion, Kinematics, and Differential Kinematics of a mobile robot
Develop a Controller and use the ros2_control library
Program an Arduino for robotics applications
Master the TF2 library and robot reference frames
Compute Odometry and fuse sensor data with Kalman Filters and the Extended Kalman Filter
Learn the Probability Theory behind modern robotics
The philosophy of this course is Learn by Doing, and quoting the American writer and teacher Dale Carnegie:
Learning is an Active Process. We learn by doing; only knowledge that is used sticks in your mind.
To help you master these concepts and use them in your projects and in your future job, I will guide you through every functionality of ROS 2, both from the theoretical and the practical point of view.
Each section is composed of three parts:
Theoretical explanation of the concept and functionality
Usage of the concept in a simple Practical example
Application of the functionality in a real Robot
There is more!
All the programming lessons are developed using both Python and C++. This means that you can choose the language you are most familiar with or become an expert Robotics Software Developer in both programming languages!
By taking this course, you will gain a deep understanding of self-driving robots, ROS 2, and the core skills behind Physical AI, opening up opportunities in the exciting field of robotics.