Getting started
This set of guides/tutorials will walk through writing complex teleop for a twist-based robot using Teleop Modular. If you don’t have a robot, you should also be able to use turtlesim.
Prerequisites
This documentation will assume a familiarity with fundamental ROS2 concepts.
If you’re new to ROS2, follow these guides from the ROS2 Documentation to get started:
Installation
First, you’ll need to make sure you have the teleop_modular packages added to your workspace. Currently, you will have to build the packages manually.
Compatibility
The CI workflow uses Ubuntu (latest) and a colcon workspace to build for:
ROS2 Rolling
ROS2 Kilted
ROS2 Jazzy
ROS2 Humble
The package was primarily developed and tested on ROS2 Jazzy with the nix package manager using lopsided98/nix-ros-overlay and hacker1024/nix-ros-workspace.
Building with colcon
Note
I don’t yet serve a prebuilt underlay for you to use :(
For now, I recommend just cloning it into the workspace as a git submodule:
# Using a colcon workspace (in a git repo!), add teleop_modular as a submodule
cd workspace/src
git submodule add https://github.com/BaileyChessum/teleop_modular.git teleop_modular
# Set the revision to avoid unexpected updates to teleop_modular. Set the appropriate version.
cd teleop_modular
git checkout tags/v0.1.0
# Commit your changes to the workspace
cd ../../
git add ./src/teleop_modular
git commit -m "feat: added teleop_modular as a submodule"
# You should now be able to build your workspace
colcon build
. install/setup.bash
Please raise an issue or post in discussions if you have issues!
Contributor Note
I will work to make using colcon workspaces easier in the future. If this is your main workflow, I encourage you to contribute improvements to the installation process!
Building with nix
If you’re using nix with lopsided98/nix-ros-overlay, add overlay.nix on top of it in your overlays.
If you don’t already use nix, I wouldn’t recommend using it to get started with Teleop Modular.
Running teleop_node
Once added to your workspace, build and source it. You should be able to run teleop_node
:
ros2 run teleop_node teleop_node
And your output might look like:
$ ros2 run teleop_node teleop_node
[ERROR] [teleop_node]: control_modes.names was not set.
[INFO] [teleop_node]: Control Modes:
[INFO] [teleop_node]: Input Sources:
But until we configure teleop_node
, it won’t do anything.
Follow the next guide to start writing your own teleop package with the framework: