0
$\begingroup$

I've been trying to convert a rosbag which i've generated after running the kiss-icp algorithm (so output is sensor_msg/msg/PointCloud2) into a 3D map of the environment, by converting it into a .pcd format using the humble-pcl-ros library. For some reason it recognises other .cpp files as executables in the pcl_ros library (filter_cropbox_node, pcd_to_pointlcloud etc.) but not bag_to_pcd, leading to:

ros2 run pcl_ros bag_to_pcd.cpp /data/myrosbag.db3 /kiss/local_map /data/map1

No executable found

Is there any way to fix this or is there perhaps an easier method or package to use to convert my rosbag.db3 file into a 3D map? Thanks.

$\endgroup$

1 Answer 1

0
$\begingroup$

It is expecting the name of the executable, not the source file cpp:

Try:

ros2 run pcl_ros bag_to_pcd /data/myrosbag.db3 /kiss/local_map /data/map1

You need to include your node bag_to_pcd node in the build and installation process, in other words, add the node to the CMakeLists.txt file of the package to ensure it gets compiled and linked properly.

$\endgroup$
1
  • $\begingroup$ Made the edit in the CMakeList.txt file but now the build for pcl_ros is failing in the '#include <rosbag/bag.h>' line in bag_to_pcd.cpp, probably because i'm missing the package (rosbag is deprecated, think rosbag2 is now the one that is used). I've managed to convert my .db3 into a bunch of .pcds using this library link instead, but thanks for the help anyways, learnt a bit more about how the build process works. $\endgroup$ Commented Mar 25 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.