参考:
wiki官网链接
https://github.com/ros-teleop/teleop_twist_joy.git
查看每个按钮和轴对应的索引以及键值
# 1.通过话题查看
rostopic echo /joy
# 2.直接查看
sudo jstest /dev/input/jsX
配置文件说明
axis_linear: 1
#Joystick axis to use for linear movement control.
#控制线速度的 axis号
scale_linear: 0.5
# Scale to apply to joystick linear axis for regular-speed movement, in m/s.
#普速模式最大线速度
scale_linear_turbo: 1.0
#Scale to apply to joystick linear axis for high-speed movement, in m/s.
#高速模式最大线速度
axis_angular: 0
#Joystick axis to use for angular movement control.
# 控制角速度的 axis号
scale_angular: 1.0
# Scale to apply to joystick linear axis for regular-speed movement, in m/s.
#普通速度模式最大角速度
scale_angular_turbo: 1.0
# Scale to apply to joystick angular axis for high-speed movement, in rad/s.
#高速模式速度模式最大角速度
enable_button: 6 # button6
enable_turbo_button: 4 #LB键 是button4