Skip to content

Joy Control is a ROS2 package designed to integrate joystick inputs into robotic control systems. It facilitates the mapping of joystick commands to various robot functionalities, enabling intuitive and responsive manual control.

License

Notifications You must be signed in to change notification settings

nsaitarun-git/joy_control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Joy Control

Joy Control is a ROS2 package designed to integrate joystick inputs into robotic control systems. It facilitates the mapping of joystick commands to various robot functionalities, enabling intuitive and responsive manual control.


Features

  • Joystick Integration: Seamlessly connects compatible joysticks to the ROS ecosystem.
  • Customizable Mappings: Allows users to define specific joystick-to-robot command mappings.
  • Real-time Control: Enables immediate response to joystick inputs for precise maneuvering.

Requirements

  • ROS 2 Humble: The latest version of the Robot Operating System.
  • Gamepad: For this project, I used a PS4 controller to teleoperate a differential drive robot. For more information refer to this page.

Getting Started

Cloning the Package

Clone the package into a workspace and build it. Create a workspace with the following commands if you haven't done so already.

# Create workspace and source folder
mkdir joy_control_ws
cd joy_control_ws
mkdir src
cd src

# Clone the package
git clone https://github.com/nsaitarun-git/joy_control.git

# Build the workspace
cd ..
colcon build --symlink-install

Usage

Within the joy_control_ws folder, source the installation and run the launch file with your gamepad connected to the PC via USB or Bluetooth.

# Source the installation
source install/setup.bash

# Run the launch file
ros2 launch joy_control joystick.launch.py

To view the data being published to the /cmd_vel topic, use the following command.

# See the data published from gamepad
ros2 topic echo /cmd_vel

Turbo Mode

You can enable turbo mode by setting the line below to true in the config/joystick.yaml file.

require_enable_button: false

You can enable turbo mode and normal speed mode by using the buttons on your gamepad. Edit the following lines of code in the config/joystick.yaml file according to your gamepad's button numbers. On my PS4 controller, these buttons correspond to square and triangle.

  enable_button: 2
  enable_turbo_button: 3

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Joy Control is a ROS2 package designed to integrate joystick inputs into robotic control systems. It facilitates the mapping of joystick commands to various robot functionalities, enabling intuitive and responsive manual control.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published