Isaac ROS packages build error with "magic_enum.hpp: No such file or directory"

Hi, I am kinda getting used to Isaac ROS environment, and currently struggling with setting isaac_ros-dev environment by building from source.
My device is Ubuntu 22.04, with NVIDIA-SMI 550.107.02

I’m pretty sure that i have followed all the steps properly in these links:
https://nvidia-isaac-ros.github.io/getting_started/dev_env_setup.html

And I tried to follow this Tutorial: Run all Sensors on the Nova Orin Developer Kit — isaac_ros_docs documentation
steps to install nova_developer_kit_bringup which is supported in not only AGX Orin devices but also x86 devices, which is my case.

However every time i try to build inside the docker container, it fails with the same error:

In file included from /workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/core/parameter_registrar.hpp:31,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/core/registrar.hpp:28,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/core/component.hpp:31,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/cuda/cuda_stream.hpp:27,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_image_segmentation/isaac_ros_gxf_extensions/gxf_isaac_ros_unet/gxf/image_segmentation/segmentation_mask_colorizer.hpp:23,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_image_segmentation/isaac_ros_gxf_extensions/gxf_isaac_ros_unet/gxf/image_segmentation/segmentation_postprocessor_ext.cpp:17:
/workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/core/expected_macro.hpp:24:10: fatal error: magic_enum.hpp: No such file or directory
   24 | #include "magic_enum.hpp"  // NOLINT(build/include)
      |          ^~~~~~~~~~~~~~~~
In file included from /workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/core/parameter_registrar.hpp:31,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/core/registrar.hpp:28,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/core/component.hpp:31,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/cuda/cuda_stream.hpp:27,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_image_segmentation/isaac_ros_gxf_extensions/gxf_isaac_ros_unet/gxf/image_segmentation/segmentation_postprocessor.hpp:22,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_image_segmentation/isaac_ros_gxf_extensions/gxf_isaac_ros_unet/gxf/image_segmentation/segmentation_postprocessor.cpp:17:
/workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/core/expected_macro.hpp:24:10: fatal error: magic_enum.hpp: No such file or directory
   24 | #include "magic_enum.hpp"  // NOLINT(build/include)
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
compilation terminated.
In file included from /workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/core/parameter_registrar.hpp:31,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/core/registrar.hpp:28,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/core/component.hpp:31,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/cuda/cuda_stream.hpp:27,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_image_segmentation/isaac_ros_gxf_extensions/gxf_isaac_ros_unet/gxf/image_segmentation/segmentation_mask_colorizer.hpp:23,
                 from /workspaces/isaac_ros-dev/src/isaac_ros_image_segmentation/isaac_ros_gxf_extensions/gxf_isaac_ros_unet/gxf/image_segmentation/segmentation_mask_colorizer.cpp:17:
/workspaces/isaac_ros-dev/src/isaac_ros_nitros/isaac_ros_gxf/gxf/core/include/gxf/core/expected_macro.hpp:24:10: fatal error: magic_enum.hpp: No such file or directory
   24 | #include "magic_enum.hpp"  // NOLINT(build/include)
      |          ^~~~~~~~~~~~~~~~
compilation terminated.

magic_enum package is already successfully built, so i can’t understand.
This happens the same even when i try to build any of gxf_isaac_ros_*** packages.

Inside the docker container, all the packages source files are cloned in /workspaces/isaac_ros-dev/src/ directory.
I didn’t modify any lines in there, including run_dev.sh

Is there any thing that i have missed? If additional informations are needed, please ask me.

Best
Seungseok Oh

1 Like

Hi @oxcarxierra ,

Welcome to the Isaac ROS forum.

The docker image is aarch64 base and is created for nova orin devkit.

For x86_64 platform with RTX-enabled GPU, you might want to try Isaac perceptor in isaac sim.
https://nvidia-isaac-ros.github.io/reference_workflows/isaac_perceptor/run_perceptor_in_sim.html

Best,
Ahung

Hello @Ahung , thanks for the reply.

I’m confused, because basically docker image is aarch64 based but should be possible to use in both Jetson and x86_64 platform devices according to the docs.
(This problem is reproduced even with building in AGX Jetson Orin platform anyways)

I’ve tried installing isaac perceptor as well, but failed with the same issue, when i try to do BUILD FROM SOURCE section.

I guess the problem is, some packages cannot find the magic_enum package while building, which is even already built. The packages with problem are: gxf_isaac_image_flip, gxf_isaac_utils, etc.

What I’ve tried

I tried to build the magic_enum in /workspaces/isaac_ros-dev/src/ by itself without using colcon build.
So like:
mkdir build && cd build && cmake .. && sudo make install
The build itself successes very well, but the same problem occurs when i build the isaac ros packages.

According to the docs of magic_enum library, It’s recommended to add <depend>magic_enum</depend> to the packages.xml and followings to the 'CMakeList.txt`:

find_package(magic_enum CONFIG REQUIRED)
...
target_link_libraries(your_executable magic_enum::magic_enum)

So i tried to modify that files in packages with problem, but unfortunatly it didn’t work.

Hi @oxcarxierra ,

  1. You can find the supported platform(s) noted in documentation of each demo / package.
  • For Isaac Perceptor, it supports running on the following robot platforms and simulation environment,
    ** robots equipped with the Nova Orin Developer Kit
    ** Nova Carter
    ** Isaac Sim

https://nvidia-isaac-ros.github.io/reference_workflows/isaac_perceptor/index.html#repositories-and-packages

  1. About the build error, please make sure that “rosdep install --from-paths …” had been run to install the package’s dependencies.

Let me know,

Best,
Ahung

Thanks for the kind reply again, @Ahung .

Isaac Perceptor is supposed to support Isaac Sim, so there should be no problem when i try to use isaac perceptor and isaac_ros-dev docker container in x86 device with Isaac Sim installed.
For the advice 2., yes i ran rosdep install -i -r --from-paths ${ISAAC_ROS_WS}/src/nova_developer_kit/nova_developer_kit_bringup/ --rosdistro humble .
but still having the same build error.

I wonder if this is the problem that only happens in my case. It’s reproduced every time when i try to build the source in both Ubuntu 20.04 device, Orin (which is attached to Nova Orin Developer Kit).

FYI: What i’m trying to do is running isaac_perceptor on desktop with rosbag file that i recorded from Nova Orin Developer Kit by running ros2 launch isaac_ros_data_recorder data_recorder.launch.py

Thanks for your support.

Best regards,
Seungseok Oh

Hi @oxcarxierra

I can build isaac_ros_image_flip on both AGX Orin and x86_64. The magic_enum.hpp is located at /opt/ros/humble/include/ once rosdep install had been run.

… It’s reproduced every time when i try to build the source in both Ubuntu 20.04 device, Orin (which is attached to Nova Orin Developer Kit).

I supposed that you are using Jetpack 5.1.2.
If you don’t mind, I’d suggest you move to Isaac ROS 3.1 + Jetpack 6.0.

Hello, @Ahung.

I solved this problem by adding include_directories(/opt/ros/humble/include) in every CMakeLists.txt that the build error occurs.
magic_enum.hpp is generated in /opt/ros/humble/include in my device as well, but seems like colcon cannot find that file while building.
This problem might be related to known issue: No /opt/ros/humble/install directory in Docker container

This was reproduced in following devices:

  • Jetpack 6.0 & Isaac ROS 3.1 installed Nova Orin Developer Kit
  • x86_64 device with Ubuntu 22.04
  • x86_64 device with Ubuntu 20.04

Thanks for your help.

Best regards.

Hi @oxcarxierra ,

Thank you for the detail info.

I managed to reproduce the colcon build error issue and I got a magic_enum error though the message is different. .

CMake Error at /opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_add_library.cmake:66 (add_library):
  Target "gxf_isaac_image_flip" links to target "magic_enum::magic_enum" but
  the target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  CMakeLists.txt:33 (ament_auto_add_library)

The solution I used is as below. If you met the issue again, you could give it a try.

  • Ensure to install rosdep for required packages.
  • Add --cmake-clean-cache in colcon build command or simply delete the build/ directory prior to colcon build.

Best,
Ahung

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