Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
devvaibhav455 opened this issue Dec 8, 2024 · 0 comments

Comments

@devvaibhav455
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant