Perception pcl and vision_open cv packages

Hello would be possible to have installed in my rosject (j16moto autonomous mobile robot for utimac application) the packages like in the title?
thanks
Salvatore

P.S.
user:~$ ros2 pkg list | grep pcl
pcl_conversions
pcl_msgs
user:~$ ros2 pkg list | grep openuser:~$ ros2 pkg list | grep cv
cv_bridge

pcl_ros
perception_pcl
vision_opencv
are missing

You can install them yourself, semi-permanently by;

  1. Creating a script at ~/course_install.sh
  2. Making the script executable
  3. Include all commands to install the packages you want in the script.
  4. Execute the script to install them

When you come back, this script will be automatically called and your custom packages will be installed.

We are working on a more permanent solution, and we’ll let you know when we have it.

Hello Bay,
I am trying to install as you suggest with the script but I received an error:

error: tf2_geometry_msgs/tf2_geometry_msgs.hpp: No such file or directory
54 | #include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>

but the packages are already installed.
Any suggestion?
thanks
Salvatore

user:~$ ./course_install.sh
clone repository perception_pcl…
Install needed dependencies…
…
— stderr: pcl_ros
/home/user/ros2_ws/src/perception_pcl/pcl_ros/tools/pointcloud_to_pcd.cpp:56:10: fatal error: tf2_eigen/tf2_eigen.hpp: No such file or directory
56 | #include <tf2_eigen/tf2_eigen.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/pointcloud_to_pcd_lib.dir/build.make:63: CMakeFiles/pointcloud_to_pcd_lib.dir/tools/pointcloud_to_pcd.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:149: CMakeFiles/pointcloud_to_pcd_lib.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
In file included from /home/user/ros2_ws/src/perception_pcl/pcl_ros/src/transforms.cpp:38:
/home/user/ros2_ws/src/perception_pcl/pcl_ros/include/pcl_ros/impl/transforms.hpp:54:10: fatal error: tf2_geometry_msgs/tf2_geometry_msgs.hpp: No such file or directory
54 | #include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/pcl_ros_tf.dir/build.make:63: CMakeFiles/pcl_ros_tf.dir/src/transforms.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:284: CMakeFiles/pcl_ros_tf.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Failed <<< pcl_ros [3.96s, exited with code 2]

Summary: 11 packages finished [6.64s]
1 package failed: pcl_ros
1 package had stderr output: pcl_ros
1 package not processed
Installation complete successfully!\

but

ser:~$ ros2 pkg list | grep tf2
…
tf2_eigen
tf2_eigen_kdl
…
tf2_geometry_msgs
…
tf2_msgs
…
tf2_sensor_msgs
tf2_tools

Hello,
I solved cloning

git clone -b galactic GitHub - ros-perception/perception_pcl: PCL (Point Cloud Library) ROS interface stack

Thanks

1 Like

Hello,
I have problem to install python-pcl

[amrj16_surface_detection_exe-1] File “/home/user/ros2_ws/install/amrj16_rendezvous/lib/python3.8/site-packages/amrj16_rendezvous/amrj16_surface_detection.py”, line 5, in
[amrj16_surface_detection_exe-1] import pcl
[amrj16_surface_detection_exe-1] ModuleNotFoundError: No module named ‘pcl’
[ERROR] [amrj16_surface_detection_exe-1]: process has died [pid 32113, exit code 1, cmd ‘/home/user/ros2_ws/install/amrj16_rendezvous/lib/amrj16_rendezvous/amrj16_surface_detection_exe --ros-args’].

Should be able to solve this by pip install pcl, and also adding it to ~/course_install.sh.

Hello Bay,
pip install pcl works but unfortunately when I excute the script to find the surfaces I get this
error

amrj16_surface_detection.py", line 56, in SurfaceDetection
[amrj16_surface_detection_exe-1] def from_ros_msg(self, msg: PointCloud2) → Union[pcl.PointCloud, None]:
[amrj16_surface_detection_exe-1] AttributeError: module ‘pcl’ has no attribute ‘PointCloud’
[ERROR] [amrj16_surface_detection_exe-1]: process has died [pid 6050, exit code 1, cmd ‘/home/user/ros2_ws/install/amrj16_rendezvous/lib/amrj16_rendezvous/amrj16_surface_detection_exe --ros-args’].
user:~$

Also I am trying to install this

git clone GitHub - PointCloudLibrary/pcl: Point Cloud Library (PCL)
cd pcl
mkdir build
cd build
cmake …
make -j$(nproc)
sudo make install

but there is no enought memory to install it
have you some suggestion to solve?
Thanks
Salvatore

This suggests that the module installed by pip was not the right one. I don’t know which one is, but the documentation should be able to say.

Well, you have the most powerful VMs available (enterprise-grade), so maybe you should try using one of the releases instead of compiling from source.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.