Standalone WSAD keyboard teleoperation node for Hello Robot Stretch on ROS 2.
- w/s: forward/backward
- a/d: turn left/right
- space or x: stop
- q: quit
- ROS 2 Humble
rclpy,geometry_msgs,std_srvs
colcon build --packages-select stretch_wsad_teleop
source /ws/install/setup.bash
The driver launch file is from the official repository (stretch_core), and the following command works:
ros2 launch stretch_core stretch_driver.launch.py mode:=navigation broadcast_odom_tf:=True
ros2 run stretch_wsad_teleop wsad_teleop
ros2 launch stretch_wsad_teleop wsad_teleop.launch.py
You can override parameters:
ros2 launch stretch_wsad_teleop wsad_teleop.launch.py \
topic:=/stretch/cmd_vel linear:=0.2 angular:=1.0 repeat_stop_timeout:=0.2 auto_switch_mode:=true
- The node attempts to call
/switch_to_navigation_mode(Trigger) on startup ifauto_switch_modeis true. - It publishes to
/stretch/cmd_velby default.
- Hello Robot Stretch ROS 2: https://github.com/hello-robot/stretch_ros2
stretch_corepackage (driver and launch files): https://github.com/hello-robot/stretch_ros2/tree/main/stretch_core
Apache-2.0