Skip to content

Starting joy node with non-zero axis values returns ROS2 topic with zero axis values until moved a bit #292

@devvaibhav455

Description

@devvaibhav455

I have a FLysky FS-i6X controller that I use as a joystick on Ubuntu 22.04 with ROS2 humble.

Steps to reproduce the issue:

  1. Power ON the joystick and move any of the axis to a non-zero value and stay over there. I ensured that its not within the deadzone value.
  2. Start the joy node with below config. Turning ON/ OFF the autorepeat functionality didn't help.
joy_node:
  ros__parameters:
    deadzone: 0.1
    autorepeat_rate: 10.0
    dev: /dev/input/flysky_red_js_port
  1. Observe the published ROS2 topic. The axes values are all zero unless I move that particular axis. In order to read the current value of other axis, I need to move it a bit. However, the buttons state is all fine.
  2. On the other hand, if I test the raw input from joystick using jstest /dev/input/js_port, it reads out the current values without having to move them a little.

This is the readout for incorrect axis values when they are in a non-zero position and not within the dead zone. It is correct for buttons though.

header:
  stamp:
    sec: 5
    nanosec: 880000000
  frame_id: joy
axes:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
buttons:
- 0
- 1
- 0
- 1
- 0
- 0
- 1
- 0
- 1

Expectation: The topic should read the current value of the joystick axes without having to move the them like it does for the buttons.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions