ros2 pcl_ros VoxelGrid - How to use it via launch file?
Hi all, I'm wondering how I can start voxelGrid filter on a PCL directly via a launch file in ros2?
I'm using ros2 humble distro on ubuntu 22.04 VoxelGrid is now located in repo nav2voxelgrid
Before in ros1 I just created a launch xml using VoxelGrid nodelet which wraps the pcl::VoxelGrid filter as described here: http://wiki.ros.org/pcl_ros/Tutorials/filters#Developers
I tried to create below launch file now for ros2 but with no success. Instead I get below error. What I'm doing wrong? (I know I can create e.g. a python package to manage this but why if it can be realized just via a lauch file) I installed before ros-humble-nav2-voxel-grid. So I would think the lib should be there. I tried as well for exec voxelgrid or nav2voxelgrid or libvoxelgrid but the result is always the same.
$ ros2 launch pcl_throttle.launch
[INFO] [launch]: All log files can be found below /home/ros/.ros/log/2023-04-10-14-27-37-834685-xyz-7622
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: Caught exception in launch (see debug for traceback): package 'nav2_voxel_grid' found at '/opt/ros/humble', but libexec directory '/opt/ros/humble/lib/nav2_voxel_grid' does not exist
$ find /opt/ros/humble -name '*voxel*'
/opt/ros/humble/include/nav2_voxel_grid
/opt/ros/humble/include/nav2_voxel_grid/voxel_grid.hpp
/opt/ros/humble/share/ament_index/resource_index/parent_prefix_path/nav2_voxel_grid
/opt/ros/humble/share/ament_index/resource_index/packages/nav2_voxel_grid
/opt/ros/humble/share/ament_index/resource_index/package_run_dependencies/nav2_voxel_grid
/opt/ros/humble/share/nav2_voxel_grid
/opt/ros/humble/share/nav2_voxel_grid/cmake/nav2_voxel_gridConfig-version.cmake
/opt/ros/humble/share/nav2_voxel_grid/cmake/nav2_voxel_gridConfig.cmake
/opt/ros/humble/lib/libvoxel_grid.so
My current not working launch file:
launch:
- node:
pkg: "nav2_voxel_grid"
exec: "nav2_voxel_grid"
name: "pcl_throttle"
remap:
- from: "~input"
to: "/camera/depth_registered/points"
param:
- name: "filter_field_name"
value: "z"
- name: "filter_limit_min"
value: "0.01"
- name: "filter_limit_max"
value: "1.5"
- name: "filter_limit_negative"
value: "False"
- name: "leaf_size"
value: "0.01"
Asked by Pat on 2023-04-10 08:00:17 UTC
Comments