ros-drivers / velodyne

ROS support for Velodyne 3D LIDARs
http://ros.org/wiki/velodyne
Other
652 stars 651 forks source link

Error while launching thev velodyne driver from ros2-galactic #487

Closed abhilash1998 closed 1 year ago

abhilash1998 commented 1 year ago

Please complete the following information:

Describe the bug I am using docker of ros-galactic and after git cloning the galactic branch of the velodyne and building I get the following error InvalidLaunchFileError: Caught exception when trying to load file of format [py]: init() missing 1 required keyword-only argument: 'executable' when running ros2 launch velodyne_driver velodyne_driver_node-VLP16-launch.py

To Reproduce Steps to reproduce the behavior:

  1. Create a docker with ubuntu 20 then install ros galactic in it.
  2. Create a workspace
  3. git clone --branch galactic-devel https://github.com/ros-drivers/velodyne.git
  4. colcon build the workspace
  5. source the workspace and run - ros2 launch velodyne_driver velodyne_driver_node-VLP16-launch.py
JWhitleyWork commented 1 year ago

@abhilash1998 Can you please clarify? There is no launch file called velodyne_driver_node-VLP16-launch.py in the galactic-devel branch, only velodyne_convert or velodyne_transform.

TZECHIN6 commented 1 year ago

@abhilash1998 you can either manually change it or use ros2 branch instead.

abhilash1998 commented 1 year ago

@abhilash1998 Can you please clarify? There is no launch file called velodyne_driver_node-VLP16-launch.py in the galactic-devel branch, only velodyne_convert or velodyne_transform.

Hey @JWhitleyWork This is the command ros2 launch velodyne velodyne-all-nodes-VLP16-launch.py

I fixed it, the fix was to convert - “”” velodyne_driver_node = launch_ros.actions.Node(package='velodyne_driver', node_executable='velodyne_driver_node', output='both', parameters=[driver_params_file]). “””

to

“”” velodyne_driver_node = launch_ros.actions.Node(package='velodyne_driver', executable='velodyne_driver_node', output='both', parameters=[driver_params_file])”””

as the syntax changed from “node_executable” to “executable” in galactic.

Similar changes need to be done in the other launch files.

Thanks

JWhitleyWork commented 1 year ago

Unfortunately (sorry for being late on this), galactic is now EOL. It looks like back-porting #435 would fix this issue but I could not release a new binary version. Please create a PR to back-port #435 if you would like this feature in the repo and I will approve it.