yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
ROS USB Handle📖
Wired Handle Tutorial
Raspberry Pi Tutorial
  • 1.Install jupyterLab
  • 2.Basic course
  • 3.Control DOFBOT
Jetson nano tutorial
  • 1. Install jupyterLab
  • 2.Basic course
  • 3.Control DOFBOT
  • 4.Control Jetbot
Wireless Handle Tutorial
Basic Control Cases
  • 1. Install JupyterLab
  • 2. Basic course
ROS1 Course
  • 1. ROS1 Course
ROS2 course
  • 1. Environment Construction
  • 2.Handle controlled robot
Download
  • Code
  • APP(Android/iOS)
Download ZIP

Welcome to ROS USB Handle repository

1. Environment Construction

1、Environmental construction

This course takes ROS2 and Foxy versions as examples to illustrate how to install and run the required environment, and make modifications based on the installed version of ROS

1、Installation dependencies

Terminal input,

xxxxxxxxxx
#Replace the foxy here with the actual installed version name of ROS
sudo apt install ros-foxy-joy*

image-20230530104348856

After installation is complete, refresh the environment variables again,

xxxxxxxxxx
source ~/.bashrc

2、Test handle

Connect the handle to the motherboard and enter the following command to check if it is detected,

xxxxxxxxxx
ll /dev/input/js0

image-20230530104904118

As shown in the figure, it indicates the recognition of the handle receiver. Note that if a mouse or keyboard is connected, it may also recognize the JS device, but the program only recognizes JS0. Therefore, if multiple JS devices appear, first connect the handle receiver and then connect other devices. If the handle is connected, the indicator light of the handle is in a constant state, and flashing indicates disconnection.

The terminal enters the following command to run the handle node program,

xxxxxxxxxx
ros2 run joy joy_node

image-20230530153052839

The controller displayed on the terminal is the current mode controlled by the handle. Press and hold the mode for 15 seconds to switch modes, and the terminal will print the replaced mode,

image-20230530153251812

The above image shows switching to X-Box mode. The code values of the two modes are different。

We can first check what topics have been posted and input them through the terminal,

xxxxxxxxxx
ros2 topic list

image-20230530153530197

The '/joy' here is the terminal we focus on, which will publish the current status of various code values of the controller. You can view the content of the topic data through the following command,

xxxxxxxxxx
ros2 topic echo /joy

image-20230530153741616

As shown in the above figure, the data content of the topic is represented by [axes], which represents the two joysticks, and [buttons], which represents the values of the buttons.

ROS1 Course
Handle controlled robot

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文