Robotics StackExchange | Archived questions

Why the joy node cannot work well using launch file while it works well using ros2 run?

Hi, I use ROS2 humble for developing robot. I want to use a joystick for controlling the robot, but when I run the joy node using launch file:

ros2 launch joy joy-launch.py

It shows warning:

[joy_node-1] [WARN] [1691248053.043572221] [joy_node]: Could not get joystick with name '': Haptic: Unable to get device's features: Invalid argument

But when I use ros2 run:

ros2 run joy joy_node

The node works well:

[INFO] [1691228079.448547240] [joy_node]: Opened joystick: Logitech Gamepad F710.  deadzone: 0.050000

So how to solve this problem? Thank you!

Asked by muronglindong on 2023-08-05 11:36:36 UTC

Comments

Answers