Setting maximum velocity
giuseppe-chiari opened this issue · comments
Hi,
I'd like to be able to set a maximum velocity by pressing a specified button on a Logitech controller.
So far I've been able to understand that a joy_node
node takes raw input from the controller and in stores those values in a std_msg/Joy
, then a teleop_node
takes those messages as input and reads a config file as teleop.yaml
, which looks like this:
axis_linear:
x: 1
y: 0
scale_linear:
x: 0.75
y: 0.75
axis_angular:
yaw: 2
scale_angular:
yaw: 1.57
enable_button: 5
enable_turbo_button: 7
scale_linear_turbo:
x: 1.20
y: 1.20
scale_angular_turbo:
yaw: 6.28
I'd like to add few parameters, to be able to switch to a slow speed mode that activates when the button 0 (in the Logitech controller is button number 1, or X on a Xbox One controller):
slow_vel_button: 0
scale_linear_slow:
x: 0.25
y: 0.25
scale_angular_slow:
yaw: 2
It seems to me that I would need to modify the teleop_twist_joy
but I cannot do that since I only have the executable in opt/ros/melodic/share/teleop_twist_joy/
, the executable is teleop_node
.
So how can I achieve this modification?
Thanks!