This shows you the differences between two versions of the page.
|
rasb:lab:ros2 [2026/06/28 08:10] jan.vaduva created |
rasb:lab:ros2 [2026/06/28 08:13] (current) jan.vaduva [How to get started?] |
||
|---|---|---|---|
| Line 9: | Line 9: | ||
| ==== Key Concepts: ==== | ==== Key Concepts: ==== | ||
| - | Nodes: Think of nodes as small programs or modules that perform specific tasks, like controlling a motor or processing sensor data. | + | * Nodes: Think of nodes as small programs or modules that perform specific tasks, like controlling a motor or processing sensor data. |
| - | + | * Topics: Nodes communicate with each other by sending and receiving messages through topics, which are like channels for specific types of information. | |
| - | Topics: Nodes communicate with each other by sending and receiving messages through topics, which are like channels for specific types of information. | + | * Services: Besides passing messages, nodes can also request specific actions from each other using services, which is like making a phone call and asking for something to be done. |
| - | + | * Middleware: ROS 2 uses a middleware (DDS - Data Distribution Service) that helps with data transfer between nodes, even if they’re running on different machines or systems. | |
| - | Services: Besides passing messages, nodes can also request specific actions from each other using services, which is like making a phone call and asking for something to be done. | + | |
| - | + | ||
| - | Middleware: ROS 2 uses a middleware (DDS - Data Distribution Service) that helps with data transfer between nodes, even if they’re running on different machines or systems. | + | |
| ==== Why use ROS 2? ==== | ==== Why use ROS 2? ==== | ||
| Line 23: | Line 20: | ||
| ==== How to get started? ==== | ==== How to get started? ==== | ||
| - | Install ROS 2: Start by installing the ROS 2 distribution that fits your system. (We have done this for you on your Raspberry Pis already) | + | - Install ROS 2: Start by installing the ROS 2 distribution that fits your system. (We have done this for you on your Raspberry Pis already) |
| + | - Learn the Basics: Get familiar with basic concepts like nodes, topics, and services. The talker listener tutorial here https://docs.ros.org/en/foxy/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.html will be a good introduction to how to use publishers and subscribers in ROS2. | ||
| + | - Try it Out on the Robot: Pupper is fully controllable via ROS, so doing our labs and final project will help you get acquainted with ROS2 and be able to use it on any other robot you interface with. | ||
| - | Learn the Basics: Get familiar with basic concepts like nodes, topics, and services. The talker listener tutorial here https://docs.ros.org/en/foxy/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.html will be a good introduction to how to use publishers and subscribers in ROS2. | + | ==== Common ROS Commands ==== |
| - | + | ||
| - | Try it Out on the Robot: Pupper is fully controllable via ROS, so doing our labs and final project will help you get acquainted with ROS2 and be able to use it on any other robot you interface with. | + | |
| - | + | ||
| - | === Common ROS Commands === | + | |
| - ros2 launch <package> <launch_file>: Launches the nodes that are specified in the fields of the launch description in the python launch file | - ros2 launch <package> <launch_file>: Launches the nodes that are specified in the fields of the launch description in the python launch file | ||
| Line 42: | Line 37: | ||
| - source ~/.bashrc: All the custom configurations and environment variables defined in your .bashrc are re-applied to your current session. This is inherently performed when you open a new terminal window, but ROS2 is sometimes buggy and doing this may resolve some issues. | - source ~/.bashrc: All the custom configurations and environment variables defined in your .bashrc are re-applied to your current session. This is inherently performed when you open a new terminal window, but ROS2 is sometimes buggy and doing this may resolve some issues. | ||
| - source /opt/ros/<distro>/setup.bash: Sources the global ROS 2 setup file for a specific distribution. | - source /opt/ros/<distro>/setup.bash: Sources the global ROS 2 setup file for a specific distribution. | ||
| + | |||
| + | ==== ROS Debugging Tips ==== | ||
| + | |||
| + | - ROS is unable to find new information from changes you just made: sourcing install/setup.bash or the .bashrc can often help | ||
| + | - When running ros2 topic echo, only the rosout topic is visible: sourcing install/setup.bash or the .bashrc can often help | ||
| + | |||
| + | In essence, ROS 2 is a powerful tool that makes it easier to build and manage robotic systems, even if you’re just getting started. | ||