Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Ok, well this is interesting - Today joy is seeing my controller, and publishing joy topics with xy axes and button values!

Thanks @clalancette - Looks like I was over thinking this. Today it works:

Perhaps running jstest or jscal yesterday before trying the node messed it up. Perhaps accessing it with Python-evdev didn't release it, I did have to CTRL-C twice to exit my programs. Perhaps it just needed a reboot. (Yesterday "$ ros2 run joy joy_node" was stuck with no printout, today it works.)

$ ros2 run joy joy_enumerate_devices
Joystick Device ID : Joystick Device Name
-----------------------------------------
                 0 : Controller
pi@ROSbot:~/rosbot-on-gopigo3/handsonros2$ ros2 run joy joy_node
[INFO] [1629144617.662619904] [joy_node]: No haptic (rumble) available, skipping initialization
[INFO] [1629144617.663449763] [joy_node]: Opened joystick: Controller.  deadzone: 0.050000  

$ ros2 topic echo /joy
header:
  stamp:
    sec: 1629144685
    nanosec: 390600086
  frame_id: joy
axes:
- -0.0
- -0.0
- -0.0
- -0.0
- 0.0
- 0.0
buttons:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
---

And with y-axis-up rocker depressed:

---
header:
  stamp:
    sec: 1629144707
    nanosec: 519377462
  frame_id: joy
axes:
- 1.0          <------ Y "Joy Pad" Up depressed
- -0.0
- -0.0
- -0.0
- 0.0
- 0.0
buttons:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
---

Ok, well this is interesting - Today joy is seeing my controller, and publishing joy topics with xy axes and button values!

Thanks @clalancette - Looks like I was over thinking this. Today it works:

Perhaps running jstest or jscal yesterday before trying the node messed it up. Perhaps accessing it with Python-evdev didn't release it, I did have to CTRL-C twice to exit my programs. Perhaps it just needed a reboot. (Yesterday "$ ros2 run joy joy_node" was stuck with no printout, today it works.)

$ ros2 run joy joy_enumerate_devices
Joystick Device ID : Joystick Device Name
-----------------------------------------
                 0 : Controller
pi@ROSbot:~/rosbot-on-gopigo3/handsonros2$ ros2 run joy joy_node
[INFO] [1629144617.662619904] [joy_node]: No haptic (rumble) available, skipping initialization
[INFO] [1629144617.663449763] [joy_node]: Opened joystick: Controller.  deadzone: 0.050000  

$ ros2 topic echo /joy
header:
  stamp:
    sec: 1629144685
    nanosec: 390600086
  frame_id: joy
axes:
- -0.0
- -0.0
- -0.0
- -0.0
- 0.0
- 0.0
buttons:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
---

And with y-axis-up rocker depressed:

---
header:
  stamp:
    sec: 1629144707
    nanosec: 519377462
  frame_id: joy
axes:
- -0.0         
- 1.0         <------ Y "Joy Pad" Up depressed
- -0.0
- -0.0
- -0.0
- 0.0
- 0.0
buttons:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
---

Ok, well this is interesting - Today joy is seeing my controller, and publishing joy topics with xy axes and button values!

Thanks @clalancette - Looks like I was over thinking this. Today it works:

Perhaps running jstest or jscal yesterday before trying the node messed it up. Perhaps accessing it with Python-evdev didn't release it, I did have to CTRL-C twice to exit my programs. Perhaps it just needed a reboot. (Yesterday "$ ros2 run joy joy_node" was stuck with no printout, today it works.)

$ ros2 run joy joy_enumerate_devices
Joystick Device ID : Joystick Device Name
-----------------------------------------
                 0 : Controller
pi@ROSbot:~/rosbot-on-gopigo3/handsonros2$ ros2 run joy joy_node
[INFO] [1629144617.662619904] [joy_node]: No haptic (rumble) available, skipping initialization
[INFO] [1629144617.663449763] [joy_node]: Opened joystick: Controller.  deadzone: 0.050000  

$ ros2 topic echo /joy
header:
  stamp:
    sec: 1629144685
    nanosec: 390600086
  frame_id: joy
axes:
- -0.0
- -0.0
- -0.0
- -0.0
- 0.0
- 0.0
buttons:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
---

And with y-axis-up rocker depressed:

---
header:
  stamp:
    sec: 1629144707
    nanosec: 519377462
  frame_id: joy
axes:
- -0.0         
- 1.0        <------ Y "Joy Pad" Up depressed
- -0.0
- -0.0
- 0.0
- 0.0
buttons:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
---

Now I can figure out what config file I need to create for the SNES Controller to drive teleop_joy. I'm stoked!