-
Notifications
You must be signed in to change notification settings - Fork 195
teleop_tutorial
M1chaelM edited this page May 12, 2023
·
2 revisions
This guide explains how to manually control (teleoperate) the WAM-V using a gamepad.
We first start the simulation with the command:
ros2 launch vrx_gz competition.launch.py world:=sydney_regatta
This launches an environment with a WAM-V, two articulated aft thrusters, controlled by the following ROS 2 topics:
/wamv/thrusters/left/pos
/wamv/thrusters/left/thrust
/wamv/thrusters/right/pos
/wamv/thrusters/right/thrust
Note: some customization is required to support teleoperation of other thruster configurations.
Install the following dependencies:
sudo apt install ros-humble-joy-teleop
To enable teleoperation using a gamepad, run:
ros2 launch vrx_gz usv_joy_teleop.py
The gamepad drives the left and right thrusters directly - similar to a differential drive wheeled robot.
- The
L1
button needs to be pressed all the time in addition to the following commands (dead man's switch), - the left stick up/down axis (axis 1) is mapped to the left thruster forward/reverse,
- the right stick up/down axis (axis 3) is mapped to the right thruster forward/reverse,
- the left stick left/right axis (axis 2) is mapped to rotating the left thruster clockwise/counter-clockwise,
- the right stick left/right axis (axis 4) is mapped to rotating the right thruster clockwise/counter-clockwise.
Therefore, pushing both sticks forward should cause the WAM-V to drive forward.
You can activate the ball shooter with the A
button.
If you are using the default configuration:
- Make sure the Mode light is unlit.
- The switch on the bottom of the controller must be set to "D", not "X".
Back: Sequence Overview | Top: VRX Tutorials | Next: Thruster Articulation |
---|