
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 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 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.
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.
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.
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.
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.
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.
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.
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.
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 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.
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.
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.
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!