Using PCL library in Isaac SDK

I would like to use the PCL library in Isaac. But I am running into BUILD issues since I haven’t added the dependencies required in the right format.

INFO: Analyzed target //apps/robot_nav/ros_bridge:app_ros_bridge (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/ki-adm-2/workspace/adm_core/isaac/sdk/apps/robot_nav/ros_bridge/BUILD:78:1: Couldn't build file apps/robot_nav/ros_bridge/_objs/_modlib_ros_to_tim_components/RosToTim.o: C++ compilation of rule '//apps/robot_nav/ros_bridge:_modlib_ros_to_tim_components' failed (Exit 1) crosstool_wrapper_driver_is_not_gcc_host.py failed: error executing command external/toolchain/crosstool/scripts/crosstool_wrapper_driver_is_not_gcc_host.py -MD -MF bazel-out/k8-opt/bin/apps/robot_nav/ros_bridge/_objs/_modlib_ros_to_tim_components/RosToTim.d ... (remaining 233 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
In file included from apps/robot_nav/ros_bridge/RosToTim.cpp:1:0:
apps/robot_nav/ros_bridge/RosToTim.hpp:17:10: fatal error: pcl/segmentation/extract_clusters.h: No such file or directory
 #include <pcl/segmentation/extract_clusters.h>
compilation terminated.
Target //apps/robot_nav/ros_bridge:app_ros_bridge failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.365s, Critical Path: 1.03s
INFO: 0 processes.
FAILED: Build did NOT complete successfull

So, to fix this I tried to utilize the third party PCL library found in isaac/sdk/third_party/packages.bzl. I updated the dependencies of ros_to_tim_components,

  isaac_cc_module(
    name = "ros_to_tim_components",
    visibility = ["//visibility:public"],
    deps = [      
        "//packages/ros_bridge/components:ros_node",
        "//third_party:ros",
        "@pcl//:segmentation",
        "//packages/ros_bridge/components:ros_to_proto_converter",
     ],
    srcs = [ "RosToTim.cpp",  ],
    hdrs = [ "RosToTim.hpp",  ],
)

I am trying to use the pcl header #include <pcl/segmentation/extract_clusters.h> in the RosToTim.hpp header file. Even after the changes to the build file, bazel is unable to build the component.

$ bazel build //apps/robot_nav/ros_bridge:app_ros_bridge
INFO: Analyzed target //apps/robot_nav/ros_bridge:app_ros_bridge (1 packages loaded, 19 targets configured).
INFO: Found 1 target...
ERROR: /home/ki-adm-2/workspace/adm_core/isaac/sdk/apps/robot_nav/ros_bridge/BUILD:78:1: Couldn't build file apps/robot_nav/ros_bridge/_objs/_modlib_ros_to_tim_components/RosToTim.o: C++ compilation of rule '//apps/robot_nav/ros_bridge:_modlib_ros_to_tim_components' failed (Exit 1) crosstool_wrapper_driver_is_not_gcc_host.py failed: error executing command external/toolchain/crosstool/scripts/crosstool_wrapper_driver_is_not_gcc_host.py -MD -MF bazel-out/k8-opt/bin/apps/robot_nav/ros_bridge/_objs/_modlib_ros_to_tim_components/RosToTim.d ... (remaining 544 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
In file included from bazel-out/k8-opt/bin/external/isaac_ros_bridge_x86_64/_virtual_includes/isaac_ros_bridge_x86_64/boost/config.hpp:39:0,
                 from bazel-out/k8-opt/bin/external/isaac_ros_bridge_x86_64/_virtual_includes/isaac_ros_bridge_x86_64/boost/next_prior.hpp:19,
                 from ./packages/ros_bridge/gems/include_before_ros.hpp:20,
                 from ./packages/ros_bridge/components/RosNode.hpp:16,
                 from ./packages/ros_bridge/components/RosToProtoConverter.hpp:16,
                 from apps/robot_nav/ros_bridge/RosToTim.hpp:14,
                 from apps/robot_nav/ros_bridge/RosToTim.cpp:1:
bazel-out/k8-opt/bin/external/isaac_ros_bridge_x86_64/_virtual_includes/isaac_ros_bridge_x86_64/boost/config/compiler/gcc.hpp:303:0: error: "BOOST_FALLTHROUGH" redefined [-Werror]
 #  define BOOST_FALLTHROUGH __attribute__((fallthrough))
 
<command-line>:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
Target //apps/robot_nav/ros_bridge:app_ros_bridge failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 6.096s, Critical Path: 5.63s
INFO: 0 processes.
FAILED: Build did NOT complete successfully

How to go about utilizing the third party PCL library successfully? @shrinv @hemals

Hi nks,

Please ask this question in the Isaac SDK forum. This is Isaac Gym forum.

Kindly,
Liila

1 Like