test_joy

This file is ai generated. Do not edit this file directly. Instead, edit the node source code and run the generate-node-docs command to update this file.

Description

A GUI-based testing tool for joysticks and gamepads. This node provides a visual representation of joystick inputs, displaying button states and axis values in real-time using a Tkinter-based graphical interface.

The node dynamically creates visual elements based on the received joystick message, showing:

  • Buttons as circles that turn red when pressed

  • Axes as horizontal bars with numerical values

Subscribers

Topic

Type

Description

joy

sensor_msgs/msg/Joy

Joystick input messages containing button states and axis values

Example Usage

Launch the node

ros2 run joy_tester test_joy

Test with a joystick driver

First, start a joystick driver node (e.g., using the joy package):

ros2 run joy joy_node

Then, in another terminal, start the test_joy node:

ros2 run joy_tester test_joy

The GUI window will open automatically and display the joystick state as you interact with your gamepad or joystick.

Remap the joy topic

If your joystick publishes to a different topic:

ros2 run joy_tester test_joy --ros-args -r joy:=/my_joy_topic