The ROS 2 teleop snap allows for teleoperating a robot from either the keyboard, gamepad or leave it to the navigation stack.
The snap offers the possibility to teleoperate the robot from a joystick with:
snap start ros2-teleop.joy
This app launches both the gamepad driver as well as the joy teleop node.
Parameters for the joystick application are:
At least one between the joy-config and the config-filepath parameters must be set for the application to run.
In case both joy-config and config-filepath are set, the configuration file will take precedence.
The upstream package offers some default joystick configurations. Those can be set up with the joy-config parameter as follows:
snap set ros2-teleop joy-config="ps3"
In alternative, a custom configuration file can be used. The file can be provided
by means of a URL. In such case, the snap will download the file and
place it in $SNAP_COMMON/config/joy_teleop.config.yaml
.
To configure the config-filepath to a URL:
snap set ros2-teleop config-filepath="https://raw.githubusercontent.com/robot-repo/joy_teleop.config.yaml"
Note: the URL must be reachable by the snap. When using a URL, the configuration file will be downloaded everytime the joy app is launched. Therefore a configuration update upstream will be applied with the application relaunch.
Otherwise to configure the config-filepath to a local configuration file:
snap set ros2-teleop config-filepath="/var/snap/ros2-teleop/common/config/joy_teleop.config.yaml"
The local configuration should be at a path accessible to the snap such as $SNAP_COMMON.
The robot can also be teleoperated from a keyboard (e.g. SSH) by launching the application with:
ros2-teleop.key
Optional parameters for the keyboard application are: key-vel (string, default: 'key_vel')
The snap makes use of a topic multiplexer to switch from one source to another. Its input topic can be selected as,
ros2-teleop.mux-select <topic>
The topics names can also be configured with snap parameters:
Note that when launching the joy or key app, the appropriate topic is automatically selected.
Thank you for your report. Information you provided will help us investigate further.
There was an error while sending your report. Please try again later.
You are about to open
Do you wish to proceed?
Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.
Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions.
Snap can be installed from the command line on openSUSE Leap 15.x and Tumbleweed.
You need first add the snappy repository from the terminal. Leap 15.5 users, for example, can do this with the following command:
sudo zypper addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_15.5 snappy
Swap out openSUSE_Leap_15.5
for openSUSE_Leap_15.4
or openSUSE_Tumbleweed
if you’re using a different version of openSUSE.
With the repository added, import its GPG key:
sudo zypper --gpg-auto-import-keys refresh
Finally, upgrade the package cache to include the new snappy repository:
sudo zypper dup --from snappy
Snap can now be installed with the following:
sudo zypper install snapd
You then need to either reboot, logout/login or source /etc/profile
to have /snap/bin added to PATH.
Additionally, enable and start both the snapd and the snapd.apparmor services with the following commands:
sudo systemctl enable --now snapd
sudo systemctl enable --now snapd.apparmor
To install ros2-teleop, simply use the following command:
sudo snap install ros2-teleop
Browse and find snaps from the convenience of your desktop using the snap store snap.
Interested to find out more about snaps? Want to publish your own application? Visit snapcraft.io now.