
Antonio Brandi introduces the learn-by-doing approach for robotics, using real projects and robots to teach ROS 2 concepts and their application in real-world scenarios.
Follow practical guidelines to set up your ROS 2 development environment, install all components, and use both C++ and Python to develop and test a real manipulator with a simulator.
Develop a real working manipulator robot by simulating and building it with ROS 2, test code in C++ and Python, and integrate voice control via the Amazon Alexa voice assistant.
Install ros2 humble on ubuntu 22.04 by copying and pasting the provided commands, choosing amble for 22.04 or jazzy for 24, and configuring bashrc for automatic sourcing.
Install ros2 jazzy on ubuntu 24.04 by following step-by-step commands, adding required repositories, and installing the ros developer tools and ros jazzy desktop. Then source bashrc and verify ros2 works.
Configure a Ubuntu 24.04 environment with Visual Studio Code and ROS 2 extensions. Install Terminator and ROS 2 packages such as Gazebo, MoveIt, ROS 2 Control, and serial tools.
Set up Ubuntu 22.04 for ROS 2 development by installing VSCode with ROS extensions, Terminator, and ROS 2 like MoveIt, Gazebo, ROS 2 control, Python serial, and Flask for Alexa.
Access the course GitHub repository, organized by section, to obtain up-to-date ROS 2 nodes and templates, copy or rewrite code, and apply debugging strategies with online resources.
Explore how robotics combines physical actions with intelligent decision making, and how ROS and ROS 2 enable modular, interoperable software reuse across diverse robots.
See how ros2 centralizes hardware drivers and communication to reuse modules across robots with different motors and cameras, enabling object grasping, trajectory planning, and computer vision within an operating system.
Explore why ROS 2 emerges to address wireless networking, fleet management, security, and real-time control, expanding from the original ROS to support diverse robots and complex collaborations.
Explore the ros2 architecture, centered on dds middleware for node discovery, message exchange between nodes and applications, and message serialization and transport.
Ros 2 manages devices through drivers, using printer and camera analogies to show a standard interface between hardware and software that enables sending commands and retrieving data.
Explore how ros2 enables inter-process communication between nodes through topics, services, and actions, including publishers, subscribers, and servers. Learn how goals, feedback, and results coordinate long-running tasks and data exchange.
Master package management in ROS 2 by dividing robot software into modular packages that interoperate, enabling code reuse, maintainability, and shared navigation and mapping functionalities.
Discover the architecture of a ROS 2 application by building your first application and first package in a workspace, and learn how underlay and overlay layers determine package versions.
Create and activate a ros two workspace by making a workspace folder with a src subfolder, building with con build, and sourcing setup.bash to recognize new packages.
Learn to implement a ros2 simple publisher in python that publishes string messages to the chatter topic at one hertz, using a timer.
Create a simple ros2 c++ publisher node that publishes string messages on a topic at one hertz, using a timer and a publisher object.
Implement a Python ros 2 subscriber node that subscribes to a string topic, prints received messages, and demonstrates cross-language communication with a C++ publisher.
Build a simple ros2 C++ subscriber using rclcpp in the Arduino CPP examples, subscribing to string messages on the topic chapter and printing received messages via the logger.
Learn to describe and model a robot in ROS 2, visualize its components, and simulate its manipulator in a physics engine on your PC to debug and refine algorithms.
Explore how to model a robot’s structure with URDF, using XML tags to define links, joints, and their tree-like connections, including visual, collision, and inertial properties for visualization and simulation.
Create a ROS 2 urdf model using acro for the Arduino bot, defining links, joints (fixed and revolute), and meshes with origins and properties for limits and motion in rviz.
Visualize robot state and sensor data in ros 2 using RViz 2, a graphical interface that subscribes to topics, interprets message types, and renders maps, lasers, and camera images.
Explore move it and open source tools enabling trajectory planning and pick and place for manipulator robots, with ros2 node parameters configuring behavior for 3 or 6 degrees of freedom.
Develop a Python ros2 node that declares and initializes parameters, supports runtime updates via a parameter change callback, and logs parameter changes using the node logger.
Develop a ROS 2 C++ node with declared simple int and string parameters, defaults, and a change callback that logs updates and returns a set parameter result.
Launch the simple parameter node and interact with its parameters using ros2 param list, get, and set to read and modify values. Observe changes in real time as parameters update.
Apply ros2 to publish the Erdf model and visualize it in rviz, using the robot state publisher and the joint state publisher GUI to display TFs and meshes.
Launch files in ros2 start multiple nodes with dependencies and parameters via a single command, enabling rviz visualization of the robot and efficient application composition using python, xml, or yaml.
Configure and execute a ros2 launch file to visualize the robot's urdf model in rviz, starting robot state publisher and joint state publisher from a single command.
Simulate your robot in Gazebo, a physics engine that models gravity and friction, reproducing encoder states and camera data via ROS 2 topics for RViz/arviz display.
Extend the URDF model for Gazebo by adding collision and inertia, reuse the visual mesh for collision, and define a default inertia macro to simplify ROS 2 launch simulations.
launch a gazebo simulation via a new ros2 launch file, boot the robot state publisher with the urdf, set sim time, spawn the Arduino bot, and bridge gazebo to ros2.
Explore the ROS 2 control library’s interfaces for position, velocity, and force/torque control, and see how position control drives a joint toward 90 degrees, reduces the error, and maintains pose.
Integrate ros2 control with gazebo by updating the urdf, loading the appropriate ros2 control plugin for your ros2 version, and separating gazebo configuration from the robot model.
Discover how the ros 2 control library uses yaml configuration files to set node parameters in one go, enabling modular control of manipulators, wheels, odometry, and localization.
Configure the ros2_control library with an Arduino bot controller package, a YAML config for the controller manager, trajectory and forward command controllers, and a joint state broadcaster; test in gazebo.
Launch a gazebo ros2 control setup by loading the urdf with robot state publisher, and spawn arm, gripper, and joint state broadcaster controllers via a launch file.
start the Gazebo robot simulation, launch the ros2 control system, inspect controllers and interfaces, and command the gripper via ros2 control cli, then switch to a joint trajectory interface.
Define the pose of a robot manipulator as position plus orientation in world and robot frames, and show how six or seven degrees of freedom enable forward and inverse kinematics.
Define the manipulator pose with six variables, decompose into translation and rotation, and compute world coordinates by adding the translation vector to the point on the robot arm.
Learn rotation matrices transform coordinates between reference frames using roll, pitch, and yaw around z, y, and x axes. Apply to robot arm and obstacle avoidance to compute world-frame positions.
Compute the pose of the mobile frame relative to the fixed world frame by combining translation and rotation into a 4x4 transformation matrix, enabling coordinate transformations and inverses.
Apply forward kinematics to calculate the gripper's position and orientation in the world frame from joint angles, via chained transformation matrices between frames W and R.
Explore forward kinematics with transformation matrices and the tf2 library in ros 2, using urdf models to publish and visualize robot reference frames.
Learn to use TF2 tools to visualize frames and their connections, graph frame trees, and interpret transformation matrices, then solve forward kinematics with the joint state publisher.
Explore ros 2 services, a request–response mechanism that lets a service server offer functionality to clients. Centralize features like face recognition in one server to avoid duplicating code across nodes.
Develop a simple python ros2 service server that sums two integers and a client node to call it from the command line, illustrating ros2 services and interfaces.
Develop a simple ROS 2 service server in C++ that sums two integers, then build a client to call it via ROS 2 CLI, illustrating a practical service workflow.
Explore static and dynamic reference frames in a robot, using fixed joints and tf static versus tf topics to publish transformation matrices for real-time visualization in RVs.
Build a python ros 2 service client that sends two integers to a server, waits for the service, and handles the response.
Create a C++ ros2 service client calling the add two integers service, waits for availability, sends a request with A and B, and handles the sum via a future callback.
Compare rotation matrices, Euler angles, and quaternions for representing three-dimensional orientation; explain why quaternions prevail in robotics and computer science.
Express three-dimensional orientation with Euler angles as three elementary rotations about Z, Y, and X axes, where nine components define orientation and rotation matrices involve 27 products and 18 sums.
Explore quaternions, a four-coefficient, unitary orientation representation that reduces arithmetic compared to rotation matrices and via conversion from Euler angles enables simple inverse calculations in ros2.
Develop a python ros 2 service to convert orientation between quaternion and euler angles, deploying two services in the arduino bot utils package with tf transformations.
Create a c++ ros2 service server to convert orientations between quaternion and Euler representations using tf2, with two services: Euler to quaternion and quaternion to Euler.
Explore how inverse kinematics translates a gripper position and orientation into joint angles, addressing non-unique or no-configuration cases, and use open source libraries to solve IK and plan trajectories.
Explore MoveIt 2's inverse kinematics and trajectory planning, using the move group middleware and ros 2 control to execute trajectories and manage collision-aware planning scene with RViz and Python/C++ APIs.
Launch MoveIt! 2 for a robot manipulator by creating a MoveIt! launch file, configuring Gazebo simulation, and planning trajectories with OMPL using RViz visualization.
Coordinate a robot simulator with ros2 control to move joints via trajectories, while leveraging Moovit’s GUI and APIs to enable voice control with Alexa.
Create a Python ros2 action server that computes the Fibonacci sequence, using a Fibonacci.action interface to send goals, feedback, and a final sequence as the result.
To install the simple_action_server in your CMakeLists.txt
add_library(simple_action_server SHARED src/simple_action_server.cpp)
target_include_directories(simple_action_server PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_compile_definitions(simple_action_server
PRIVATE "SIMPLE_ACTION_SERVER_CPP_BUILDING_DLL")
ament_target_dependencies(simple_action_server
"arduinobot_msgs"
"rclcpp"
"rclcpp_action"
"rclcpp_components")
rclcpp_components_register_node(simple_action_server
PLUGIN "arduinobot_cpp_examples::SimpleActionServer"
EXECUTABLE simple_action_server_node
)
Create a Python action client node in ROS 2 that communicates with a Fibonacci action server, using wait for server, send goal async, and feedback and result callbacks.
Design a C++ action client node that talks to the Fibonacci action server in ros2, with goal, feedback, and result callbacks, inside the Arduino CP examples package.
Explore MoveIt! 2 API and Moovit to develop motion control logic for robot manipulators, including trajectory planning and execution. Implement sample code and an action server to perform pick-and-place motions.
Learn to build a simple MoveIt! 2 Python node that moves a robot arm and gripper by sending goals via the Moovit Python API, including configuration, planning, and launching.
Learn to create a simple C++ ROS 2 node using MoveIt! 2 API to send joint targets for the arm and gripper, plan trajectories, and execute moves with feasibility checks.
Use the MoveIt! 2 API to set a goal, plan a trajectory, and execute it in Gazebo with ros2 launch and a robotic arm and gripper.
Develop a task server that moves the robot's gripper to default, pick, and rest positions via an action server. Use Moovit APIs and Alexa to send goals from voice commands.
Build a ROS 2 task server in the Arduino bot remote package, implementing a task action that uses MoveIt to move the arm and gripper to predefined positions.
Start the task server and configure a launch file to enable ROS 2 task execution with MoveIt, moving the robot to predefined peak, on, and rest positions via actions.
Connect the robot to the internet to access cloud resources and enable voice-controlled movements via the ROS 2 task server using an Alexa skill and ngrok.
Create and test a custom Alexa skill to control a Ros2 robot by voice. Define intents like pick, sleep, and wake, and expose a local web service with Ngrok.
Establish a connection between Alexa and a local PC using Ngrok, configure a secure http endpoint, and verify message exchange with the Alexa developer console to actuate the robot.
Create a Python-based Flask interface that translates Alexa intents into ROS 2 messages and sends them to the task server, exposing the service via ngrok.
Build the Alexa voice interaction model by adding peak, pick, wake, and sleep intent handlers with exception handling, then connect it to ROS 2 via task server and Alexa interface.
Assemble and simulate a ROS 2 manipulator by creating a launch file suite, launching Gazebo, MoveIt, and the controller, and enabling Alexa voice control via ngrok for remote commands.
Build a real robot by moving from simulation to a functional prototype with ROS integration, using an Arduino, servo motors, and CAD 3d printed parts.
Establish bidirectional ROS 2 communication between an Arduino and a PC to drive servo motors for the robot arms, using USB serial messages with minimal payloads.
Develop a simple Arduino program that reads Ros2 serial messages and toggles the onboard LED on pin 13. The code uses serial at 115200 in setup and loop.
this lab builds a simple c++ ros2 node that subscribes to a serial transmitter topic and forwards messages to an arduino via a configured serial port using lib serial.
Publish on the ros2 serial transmitter topic to turn the Arduino LED on or off by sending 1 or 0 via the serial port after configuring the port.
Publish a counter over the serial port with Arduino and enable reverse communication with ros2, preparing a ros2 node in C++ and Python to read and republish on a topic.
Develop a Python ros2 node that reads lines from an Arduino over serial, decodes UTF-8, and republishes them on the ros2 serial receiver topic using port and baud rate parameters.
Develop a C++ ros2 subscriber node that reads Arduino messages via serial and republishes them to a ros2 topic, using a 100 Hz timer and a parameterized port.
Learn to control a servo motor with Arduino via ROS 2 by publishing angle commands on a serial transmitter topic; Arduino receives and moves the servo using the Servo library.
Demonstrates how ROS 2 lifecycle nodes replace traditional drivers by enabling stateful, configurable operation through unconfigured, inactive, active, and finalized states with transitions for configure, activate, deactivate, cleanup, and shutdown.
Learn to build a ROS 2 lifecycle node in Python that subscribes to a topic and prints the current state and messages only when active.
Create a ros 2 lifecycle node in c++, subscribe to a topic, and display its active state and messages in terminal when active, as template in arduino bot cp examples.
Learn how to use the ROS 2 life cycle CLI to view and set life cycle node states, perform transitions such as configure, activate, deactivate, and shutdown, and manage topics.
Explores building a ros2_control hardware interface for an Arduino Bot Interface to control a manipulator with C++, including lifecycle overrides and serial communication.
Defines the ros2 control interface for a four-joint Arduino bot, initializing serial port, creating state and command interfaces, and sending a B,S,E,G string with radians-to-degrees conversion.
Configure the ros2_control interface to switch between simulated and real hardware by adding an is_sim argument in the urdf and launcher files, enabling the arduino boot interface and appropriate plugins.
Develop and upload an Arduino program that receives ros2 serial commands to move four servos: base, shoulder, elbow, and gripper, using gradual motion and initial positions.
Assemble the robot hardware and calibrate the motors to ensure precise manipulation in this hands-on manipulators lab.
Join a hwlab to assemble the robot manipulators in part 1, applying robotics fundamentals and ROS 2 concepts to build and test a functional system.
Engage in a hands-on hardware lab to assemble the robot, part two, focusing on manipulators within the robotics and ROS 2 learn-by-doing course.
Engage in part 3 of the hwlab to assemble the robot manipulator, applying robotics and ros 2 concepts through a hands-on, learn-by-doing approach.
Create a real-robot launch file, set is_sim to false, omit gazebo, connect the Arduino board, and run ros2 control with ngrok and Alexa.
Explore ros 2 driven manipulator robotics by building an rdf model for kinematics, simulating in Gazebo, developing a control system, and enabling web and Alexa integrations for intuitive 3d motion.
Continue exploring robotics by applying course concepts to your robot, share your project to inspire others, and learn ROS 2 self-driving with joystick control, mapping, localization, and manipulators.
Would you like to learn ROS 2, the second and last version of Robot Operating System, by building a real robot?
The philosophy of this course is the 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.
In order for you to master the concepts covered in this course and use them in your projects or, why not, also in your future job, I will guide you through the learning of all the functionalities of ROS, both from a theoretical and 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
I almost forgot! We need one more essential and exciting part of this course for your active learning!
Experiment, Develop, and Test your ideas in the Robot (real or simulated on your PC)
In each Section of the course, I'll introduce you to a new concept, and then we will use it to add new functionalities to the robot:
Introduction to the Course
Set up the Environment: Install Ubuntu and ROS Noetic
Introduction to ROS: What is ROS and why is it so important in Robotics.
Create the first ROS node
ROS Publisher/Subscriber
Digital Twin: Use a simulator to develop and test the functionalities of the robot without the need of any hardware device
URDF
Gazebo
Parameters
RViz2
Launch Files
Control: How to create a Control System for Robot Actuators
Timer
Services
ros2_control
Kinematics: Use the package MoveIt! for the Trajectory Planning
TF2
MoveIt! 2
Application: Interface and make available all the functionalities of the robot to other software to create more complex applications and functionalities
Actions
Alexa: Use the Alexa Voice Assistant to actuate the robot with the voice
Build the Robot: Build the real robot and migrate all the functionalities from a simulated robot to a real one
Arduino IDE
Serial Communication
Conclusion and Summary of the course
To facilitate your learning and help you join the robotic world, the code lessons are available both in C++ and in Python and you can decide which language to use during the course.
Anyway, I would suggest that you follow both in order to complete your Robotics Software Developer profile!