THIS PACKAGE IS UNDER DEVELOPMENT AND NOT IN A STABLE STATE!! THE FEATURES DOCUMENTED HERE WILL WORK.
A keyboard teleoperation package for ROS 2 filled with all the features you may want. Uses clay, ClayMan, and SDL2. The clay and ClayMan code included is not the original and has been altered a bit.
ros2 run omni_teleop_keyboard omni_teleop_keyboard
Publishing to a different topic (in this case /omni_cmd_vel
).
ros2 run omni_teleop_keyboard omni_teleop_keyboard --ros-args --remap /cmd_vel:=/omni_cmd_vel
A black window will open (it's under development). While you have the window open keep W, A, S, D, Q, E pressed to publish twist messages with non-zero velocities. The keyboard will publish zero velocities if you don't have any keys pressed. You can press multiple keys at the same time to add their velocities.
Press U, I, O to increase the default velocity (1.0). Pressing Shift alongside U, I, O will allow you to decrease the velocity.
Keybindings are currently not configurable but will be soon.
Format: {linear_x, linear_y, linear_z, angular_x, angular_y, angular_z}
You can keep one or more keys (will add their velocities) pressed to keep non-zero velocities published. If you don't press any keys zero velocities will be published.
W
:{1.0, 0.0, 0.0, 0.0, 0.0, 0.0}
A
:{0.0, 1.0, 0.0, 0.0, 0.0, 0.0}
S
:{-1.0, 0.0, 0.0, 0.0, 0.0, 0.0}
D
:{0.0, -1.0, 0.0, 0.0, 0.0, 0.0}
Q
:{0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0}
E
:{0.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0}
U
: Increaseslinear_x
by0.1
.I
: Increaseslinear_y
by0.1
.O
: Increasesangular_z
by0.1
.
To make the velocities decrease instead of increase press the Shift key also.
Publishes geometry_msgs/msg/TwistStamped
messages on /cmd_vel
by default.
You can remap the topic in the below way:
ros2 run omni_teleop_keyboard omni_teleop_keyboard --ros-args --remap /cmd_vel:=/omni_cmd_vel
Look at the ROS 2 Documentation for help with passing parameters.
-
frame_id (string, default: "base_link")
The frame_id to use forStamped
messages. -
publish_rate (double, default: 60.0)
Publish rate of messages [Hz].