You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the launch file it seems to be setting a dev parameter for the joy_node that doesn't exists. Instead, the joy_node uses device_id, since, afaict, its port to ROS 2.
Am I missing something or has this been broken forever in ROS 2?
The text was updated successfully, but these errors were encountered:
Am I missing something or has this been broken forever in ROS 2?
It hasn't been broken forever, but it has been broken quite a while. The history of the node to control joysticks in ROS 2 is a little twisted. The story below probably isn't all that relevant, but it is fun to walk down memory lane a little.
The original code of any kind of joystick control to ROS 2 was in 2016 as part of the turtlebot2_demo repository. That code was written from scratch to look at the /dev/input/js0 input device from Linux. This is equivalent in spirit to how the joystick driver in ROS 1 works, but is a very different and simplified implementation. It doesn't have any parameters at all; everything is hard-coded.
That code eventually got split out into its own repository in joystick_drivers_from_scratch. This also didn't have any parameters at all, everything is hard-coded.
Somewhat in parallel with joystick_drivers_from_scratch, joystick_drivers was forked off of the original https://github.com/ros/joystick_drivers, and a full port to ROS 2 was done. That version did have parameters, and the parameter in question was indeed called dev. It was around this time that the launch file here in teleop_twist_joy was created. At that time, the parameter was correct.
In 2020, I decided that we needed a cross-platform joystick driver, particularly one that would work in Windows. So I wrote an entirely new version based on SDL, which is the node we call "joy" today. That one was contributed to the upstream https://github.com/ros/joystick_drivers, and the old https://github.com/ros2/joystick_drivers and https://github.com/ros2/joystick_drivers_from_scratch were both deprecated. One other thing to note here is that I wasn't entirely confident that my SDL port would be sufficient, so retained the old, Linux-only joystick driver as "joy_linux". The new "joy" node uses the device_id parameter, while the old "joy_linux" node uses the dev parameter.
All of that said, you are correct that nowadays that parameter should indeed be changed to device_id. If you'd like to submit a pull request, I'd be happy to review it.
Hello,
Looking at the launch file it seems to be setting a
dev
parameter for thejoy_node
that doesn't exists. Instead, thejoy_node
usesdevice_id
, since, afaict, its port to ROS 2.Am I missing something or has this been broken forever in ROS 2?
The text was updated successfully, but these errors were encountered: