/ROS2_live_course

Notes taken while plowing through Mat Sadowski's ROS2 Live Course

Apache License 2.0Apache-2.0

ROS2 - Installation and Learning

Getting Help with ROS

ROS2 Documentation

ROS 2 has quite a community. The main meeting place of the community is ROS Discourse. In that forum you will find announcements, discussions about projects, working groups, packages, and more.

If you are looking for help with a package, your setup, or ROS 2, the best place to seek help is answers.ros.org. If you find a bug or an issue with a certain package, the best way to seek help will most likely be to reach out to the authors of the package through the issue tracker. If the packages are hosted on GitHub, look for “Issues” embedded within the repo.

Coming up the ROS2 learning curve (with Galactic Geochelone)

A series of Manning Live Courses: Build Mobile Robots with ROS2

Project 1: Get Started

  1. Installed Ros2

    • df (on /) went from 73% before installation to 74% after.
    • set up the ROS 2 build tool colcon by following this Colcon Tutorial.
  2. Followed Beginner tutorials which points to: Galactic Tutorials

    • Beginner: CLI tools &
    • Beginner: Client libraries

    Before sourcing the overlay, it is very important that you open a new terminal, separate from the one where you built the workspace. Sourcing an overlay in the same terminal where you built, or likewise building where an overlay is sourced, may create complex issues.

  3. List of commonly used ones:

    • ros2 run <pkg_name> <exe_name>
    • ros2 node list
    • ros2 node info <node_name>
    • ros2 topic list
    • ros2 topic list -t --> type
    • ros2 topic echo <topic_name>
    • ros2 topic info <topic_name> --> msg_type pub_count sub_count
    • ros2 interface show <msg_type>
    • ros2 topic pub [--once | --rate 1] <topic_name> <msg_type> "args"
    • ros2 service list
    • ros2 service list -t --> type
    • ros2 service find <type_name>
    • ros2 service call <service_name> <srvc_type> <args>
      • eg: ros2 service call /clear std_srvs/srv/Empty
    • ros2 param list>
    • ros2 action list
    • ros2 action list -t
    • ros2 interface show <action_type> --> goal result feedback
    • ros2 action send_goal <action_name> <action_type> "args"
    • ros2 pkg create --build-type ament_python | ament_cmake <pkg_name> --dependencies ...
    • colcon build --packages-select <pkg_name>
  4. Nice summary of ROS2 command line tools

Project Milestones (Deliverables)

  1. Creating Launch Files various ROS2 launch tutorials

  2. Creating Workspaces and Nodes

  3. Custom Services

    We create a new package for our services because ament_python packages don’t support message generation —a potential surprise for anyone switching from ROS 1 to ROS 2.

  4. Custom Messages

Milestones (Deliverables)

  1. Creating a Robot Description
  2. Simulating the Robot in Gazebo 11
    • Getting Ready for ROS Part 8: Simulating with Gazebo is a very good introduction to Gazebo. Even though you don’t strictly need to cover this for this project series, it’s a good entry point to getting more familiar with Gazebo 11.
    • On Including a launch file in your launch file:

    In this project there will be cases in which you will need to include a launch file inside your launch file, but unfortunately this process is not well described in the documentation yet. To import a launch file you can use IncludeLaunchDescription from launch.actions. To make your life easier, here is an example of what the snippet could look like:

import os

from ament_index_python.packages import get_package_share_directory

from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource


def generate_launch_description():
    your_pkg_dir = get_package_share_directory('your_pkg_name')

    rviz_cmd = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            os.path.join(your_pkg_dir, 'launch', 'your_launchfile_name.py')
        )
    )

    ld = LaunchDescription()
    ld.add_action(rviz_cmd)
    return ld

Explore twist_mux, available for install using apt-get.

  1. Sending Velocities to the Robot
  2. Extra Task: Color It Up
  3. Explore ROS2 Control

Project 5: Navigation

General Notes/Comments about questions/answers encountered.