NVIDIA-ISAAC-ROS / isaac_ros_nitros

NVIDIA Isaac Transport for ROS package for hardware-acceleration friendly movement of messages
Other
95 stars 18 forks source link

Build fails with errors #9

Closed omerts closed 1 year ago

omerts commented 1 year ago

Hello,

Trying to build this project on Ubuntu 22.04, and it fails with the following errors:

/home/amram/development/nakai/packages/nakai-onboard/src/isaac_ros_nitros/isaac_ros_nitros/gxf/include/gxf/std/parameter_storage.hpp:1:1: note: ‘std::unique_lock’ is defined in header ‘<mutex>’; did you forget to ‘#include <mutex>’?
  +++ |+#include <mutex>
    1 | /*
/home/amram/development/nakai/packages/nakai-onboard/src/isaac_ros_nitros/isaac_ros_nitros/gxf/include/gxf/std/parameter_storage.hpp:50:45: error: expected primary-expression before ‘>’ token
   50 |     std::unique_lock<std::shared_timed_mutex> lock(mutex_);
      |                                             ^
/home/amram/development/nakai/packages/nakai-onboard/src/isaac_ros_nitros/isaac_ros_nitros/gxf/include/gxf/std/parameter_storage.hpp:50:47: error: there are no arguments to ‘lock’ that depend on a template parameter, so a declaration of ‘lock’ must be available [-fpermissive]
   50 |     std::unique_lock<std::shared_timed_mutex> lock(mutex_);`

...

/home/amram/development/nakai/packages/nakai-onboard/src/isaac_ros_nitros/isaac_ros_nitros/gxf/include/gxf/std/parameter_storage.hpp:92:10: error: ‘unique_lock’ is not a member of ‘std’
   92 |     std::unique_lock<std::shared_timed_mutex> lock(mutex_);
      |          ^~~~~~~~~~~
/home/amram/development/nakai/packages/nakai-onboard/src/isaac_ros_nitros/isaac_ros_nitros/gxf/include/gxf/std/parameter_storage.hpp:92:10: note: ‘std::unique_lock’ is defined in header ‘<mutex>’; did you forget to ‘#include <mutex>’?
omerts commented 1 year ago

Seems like adding #include <mutex> as suggested in the error solved the problem. I don't mind creating a PR for it, but I am not sure that this is the correct fix.

wep21 commented 1 year ago

8 may fix this issue.

jaiveersinghNV commented 1 year ago

Thanks for the contribution, we will confirm that the changes work on our end and include them in our next release.

reinzler commented 1 year ago

Have same issue, how did you solved it?

jaiveersinghNV commented 1 year ago

@reinzler , the specific compilation issue reported in this thread was solved with the latest Isaac ROS DP3.1 release. If you're still experiencing this specific issue, please try updating to the latest release and building again.

If you're encountering an unrelated issue with isaac_ros_nitros, please open a new GitHub Issue and we'll take a look in that thread. Thanks!

nakai-omer commented 1 year ago

Verified as fixed in latest version. Thanks. @jaiveersinghNV