ros-drivers / velodyne

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

How to build velodyne_driver for ROS2 Iron #528

Closed anb1 closed 1 year ago

anb1 commented 1 year ago

I'm trying to build the velodyne_driver for ROS2 iron. This is on Linux Mint (I had no choice of distro). I installed the ros-iron-velodyne dependency as suggested in another ticket but if I navigate to ~/ws/src/velodyne/launch/ and run ros2 launch velodyne-all-nodes-VLP16-launch.py then it terminates with this exception:

If I run ros2 pkg list | grep velodyne, the velodyne package/s are not present. I'm sorry if I betray my ignorance, this library and build system is new to me.

I installed ros-iron-desktop and ros-dev-tools, sourced /opt/ros/iron/setup.bash to configure my environment and tested the talker/listener example to verify that it works. I installed ros-iron-velodyne and then cloned https://github.com/ros-drivers/velodyne.git ros2 branch (no tag) to ~/ws/src/. I navigated back to ~/ws/ and ran rosdep install --from-paths src --ignore-src --rosdistro iron -y --os="ubuntu:jammy" to install dependencies. So far no errors.

I installed python3-colcon-core and ran colcon build in ~/ws/. This produced build and install directories, but the contents of my install directory is

COLCON_IGNORE .colcon_install_layout local_setup.sh _local_setup_util_sh.py setup.sh

The contents of .colcon_install_layout is isolated. Deleting the directory and running colcon build --merge-install makes no difference. At this point I'm grasping for straws. Any help is appreciated. Thanks.

anb1 commented 1 year ago

I purged all packages and reinstalled ros-iron-velodyne and this fixed the issue.