Joey is a highly-customizable ROS joystick driver designed for differential-drive robots. Users are able to customize axis and buttons for linear/angular velocity, linear/angular boost(acceleration) and safety(shutdown) mode.
Joey
depends on ROS default joystick driver, you can install it via sudo apt install ros-<distr>-joy
.
cd <ros_workspace>/src
git clone https://github.com/MuchenSun/Joey.git
cd ..
catkin build
The Joey_node
ROS node will subscribe to a joystick topic (with sensor_msgs::Joy
message) from the joy_node
node in the joy
package (installation step above), and publish a velocity command in the format of geometry_msgs::Twist
on the specified topic.
There are two example launch files named "sony_dualshock3.launch" and "logitech_f310.launch" specified for two common joystick models. They are a good start for customizing your own joystick driver.
- joy_topic: Joystick topic to subscribe to.
- cmd_topic: Control topic to publish to.
- max_lin_vel: Maximum linear velocity allowed.
- max_ang_vel: Maximum angular velocity allowed.
- lin_boost_ratio: When not boosted, the maximum achievable linear velocity would be (max_lin_vel)x(lin_boost_ratio), the true maximum velocity could only be achieved with full boost.
- ang_boost_ratio: When not boosted, the maximum achievable angular velocity would be (max_ang_vel)x(ang_boost_ratio), the true maximum velocity could only be achieved with full boost.
- fractional_boost: Whether the joystick supports (for example, whether the L1/2 and R1/2 buttons support fractional input).
- lin_vel_axis: Joystick axis for linear velocity control.
- lin_boost_axis: Joystick axis for linear boost control.
- ang_vel_axis: Joystick axis for angular velocity control.
- ang_boost_axis: Joystick axis for angular boost control.
- shutdown_axis: Joystick axis for enabling "shutdown" mode, in which all other inputs will be ignored and the driver will publish zero-velocity command.
- recover_axis: Joystick axis for recovering from "shutdown" mode.
This project is licensed under GPLv3. For any question, feel free to contact Muchen Sun (sunmch15@gmail.com).