Teleoperation
Teleoperation is basically controlling a vehicle remotely.
First learned from F1TENTH.
The joystick is constantly publishing, even though we don’t tell it to.
Repos in ROS:
- https://github.com/ros-drivers/joystick_drivers
- has the
joy
node andjoy_linux
- has the
- https://github.com/ros2/teleop_twist_joy
- has the
teleop_twist_joy
node
- has the
- NEW https://github.com/ros-teleop/teleop_tools/tree/master
joy → teleop_twist_joy
I think the other pipeline is to use joy_teleop
, in which case you don’t need to go through the teleop_twist_joy
. I learned from here:
https://articulatedrobotics.xyz/mobile-robot-14b-adv-teleop/
Teleop with Mux
To deal with the problem of both enabling Teleoperation and autonomous navigation, people from F1TENTH have come up with this implementation: https://github.com/f1tenth/ackermann_mux.
The config file with the mappings is here:
You can see a mapping of all controls used by the car in f110_system/racecar/racecar/config/racecar-v2/joy_teleop.yaml
. For example, in the default configuration, axis 1 (left joystick’s vertical axis) is used for throttle, and axis 2 (right joystick’s horizontal axis) is used for steering. If you need to check which axis correspond to what buttons/axis on the joystick, run the joy node, when the joystick is connected, you can see the index of the button/axis that’s changed.”
One day, for some reason, the telop stopped working. When your joystick is plugged in, you should be able to see it under /dev/input/js0
. If you don’t see it, you need to switch the mode and check again.
- D (Direct) Mode: Older version, I think I upgraded and then this mode DID NOT work again
- X Mode: Newer version, this one works
If you want to change the behavior of the F1TENTH, use the following commands
colcon build --packages-select f1tenth_stack && . install/setup.bash && ros2 launch f1tenth_stack bringup_launch.py
See https://github.com/ros-teleop/teleop_tools/blob/master/joy_teleop/config/joy_teleop_example.yaml
This is the my version of joy_teleop.yaml, you’ll notice that I have set stick_buttons
to true.
I’ve also increased the joystick max velocity to 10 because why not??
I enabled sticky buttons, so you don’t have to run for the car.
The autonomous code publishes to /drive
, regardless of whether you hold the deadman switch
However, if you look at the teleop
topic, the command is only published when you hold the deadman’s switch for control.