joystick_ros2 icon indicating copy to clipboard operation
joystick_ros2 copied to clipboard

Error running joystick_ros2 on ROS2 foxy (Ubuntu 20.04)

Open nitesh4146 opened this issue 3 years ago • 1 comments

Running ros2 run joystick_ros2 joystick_ros2 on ROS2 Foxy gives the following error. I built the package using colcon build --packages-select joystick_ros2 (with warnings about package.xml.

Traceback (most recent call last): File "/home/slickmind/Documents/e2e/e2e_ws/install/joystick_ros2/lib/joystick_ros2/joystick_ros2", line 11, in load_entry_point('joystick-ros2==0.0.1', 'console_scripts', 'joystick_ros2')() File "/home/slickmind/Documents/e2e/e2e_ws/install/joystick_ros2/lib/python3.8/site-packages/joystick_ros2.py", line 273, in main joystick_ros2 = JoystickRos2() File "/home/slickmind/Documents/e2e/e2e_ws/install/joystick_ros2/lib/python3.8/site-packages/joystick_ros2.py", line 189, in init self.publisher_ = self.create_publisher(Joy, 'joy') TypeError: create_publisher() missing 1 required positional argument: 'qos_profile'

Please let me know if I am missing something here.

nitesh4146 avatar Apr 26 '21 16:04 nitesh4146

My fix for ROS2 Foxy:

Line 189 change from self.create_publisher(Joy, 'joy') to self.create_publisher(Joy, 'joy', 10)

reubenstr avatar Aug 01 '21 15:08 reubenstr