NVIDIA-AI-IOT / isaac_ros_common

Isaac ROS common utilities, Dockerfiles, and testing code.
11 stars 4 forks source link

Build errors... #3

Closed bblumberg closed 3 years ago

bblumberg commented 3 years ago

Sorry to be such a pest. I tried building the package, and ran into compiler errors (see below). Any help would be appreciated.

Thanks,

bb


admin@bruce-xavier:/workspaces/isaac_ros-dev$ colcon build Starting >>> isaac_ros_common Starting >>> isaac_ros_test Finished <<< isaac_ros_test [2.04s]
--- stderr: isaac_ros_common
/workspaces/isaac_ros-dev/isaac_ros_common/src/vpi_utilities.cpp:30:19: error: ‘VPI_BACKEND_NVENC’ was not declared in this scope {"NVENC", VPI_BACKEND_NVENC}, ^~~~~ /workspaces/isaac_ros-dev/isaac_ros_common/src/vpi_utilities.cpp:30:19: note: suggested alternative: ‘VPI_BACKEND_VIC’ {"NVENC", VPI_BACKEND_NVENC}, ^~~~~ VPI_BACKEND_VIC /workspaces/isaac_ros-dev/isaac_ros_common/src/vpi_utilities.cpp:31:19: error: ‘VPI_BACKEND_TEGRA’ was not declared in this scope {"TEGRA", VPI_BACKEND_TEGRA}, ^~~~~ /workspaces/isaac_ros-dev/isaac_ros_common/src/vpi_utilities.cpp:31:19: note: suggested alternative: ‘VPI_BACKEND_PVA’ {"TEGRA", VPI_BACKEND_TEGRA}, ^~~~~ VPI_BACKEND_PVA /workspaces/isaac_ros-dev/isaac_ros_common/src/vpi_utilities.cpp:33:8: error: no matching function for call to ‘std::unordered_map<std::cxx11::basic_string, unsigned int>::unordered_map()’ }); ^ In file included from /usr/include/c++/7/unordered_map:48:0, from /opt/ros/foxy/install/include/rclcpp/executors/multi_threaded_executor.hpp:23, from /opt/ros/foxy/install/include/rclcpp/executors.hpp:21, from /opt/ros/foxy/install/include/rclcpp/rclcpp.hpp:146, from /workspaces/isaac_ros-dev/isaac_ros_common/include/isaac_ros_common/vpi_utilities.hpp:14, from /workspaces/isaac_ros-dev/isaac_ros_common/src/vpi_utilities.cpp:11: /usr/include/c++/7/bits/unordered_map.h:262:7: note: candidate: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::initializer_list<typename std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::__detail::_Select1st, _Pred, _Hash, std::detail::_Mod_range_hashing, std::detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::detail::_Hashtable_traits<std::not_<std::_and<std::is_fast_hash<_Hash>, std::detail::is_noexcept_hash<_Key, _Hash> > >::value, false, true> >::value_type>, std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const allocator_type&) [with _Key = std::cxx11::basic_string; _Tp = unsigned int; _Hash = std::hash<std::__cxx11::basic_string >; _Pred = std::equal_to<std::cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >; typename std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::detail::_Select1st, _Pred, _Hash, std::detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::detail::_Prime_rehash_policy, std::detail::_Hashtable_traits<std::not_<std::and_<std::__is_fast_hash<_Hash>, std::detail::is_noexcept_hash<_Key, _Hash> > >::value, false, true> >::value_type = std::pair<const std::cxx11::basic_string, unsigned int>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<std::cxx11::basic_string >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >] unordered_map(initializer_list l, ^~~~~ /usr/include/c++/7/bits/unordered_map.h:262:7: note: candidate expects 4 arguments, 1 provided /usr/include/c++/7/bits/unordered_map.h:256:7: note: candidate: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::initializer_list<typename std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::detail::_Select1st, _Pred, _Hash, std::detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::detail::_Prime_rehash_policy, std::detail::_Hashtable_traits<std::not_<std::and_<std::__is_fast_hash<_Hash>, std::detail::is_noexcept_hash<_Key, _Hash> > >::value, false, true> >::value_type>, std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const allocator_type&) [with _Key = std::cxx11::basic_string; _Tp = unsigned int; _Hash = std::hash<std::cxx11::basic_string >; _Pred = std::equal_to<std::cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >; typename std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::__detail::_Select1st, _Pred, _Hash, std::detail::_Mod_range_hashing, std::detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::detail::_Hashtable_traits<std::not_<std::_and<std::is_fast_hash<_Hash>, std::detail::is_noexcept_hash<_Key, _Hash> > >::value, false, true> >::value_type = std::pair<const std::cxx11::basic_string, unsigned int>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >] unordered_map(initializer_list l, ^~~~~ /usr/include/c++/7/bits/unordered_map.h:256:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/7/bits/unordered_map.h:250:2: note: candidate: template std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(_InputIterator, _InputIterator, std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const allocator_type&) unordered_map(_InputIterator __first, _InputIterator last, ^~~~~ /usr/include/c++/7/bits/unordered_map.h:250:2: note: template argument deduction/substitution failed: /workspaces/isaac_ros-dev/isaac_ros_common/src/vpi_utilities.cpp:33:8: note: candidate expects 5 arguments, 1 provided }); ^ In file included from /usr/include/c++/7/unordered_map:48:0, from /opt/ros/foxy/install/include/rclcpp/executors/multi_threaded_executor.hpp:23, from /opt/ros/foxy/install/include/rclcpp/executors.hpp:21, from /opt/ros/foxy/install/include/rclcpp/rclcpp.hpp:146, from /workspaces/isaac_ros-dev/isaac_ros_common/include/isaac_ros_common/vpi_utilities.hpp:14, from /workspaces/isaac_ros-dev/isaac_ros_common/src/vpi_utilities.cpp:11: /usr/include/c++/7/bits/unordered_map.h:243:2: note: candidate: template std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(_InputIterator, _InputIterator, std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const allocator_type&) unordered_map(_InputIterator first, _InputIterator __last, ^~~~~ /usr/include/c++/7/bits/unordered_map.h:243:2: note: template argument deduction/substitution failed: /workspaces/isaac_ros-dev/isaac_ros_common/src/vpi_utilities.cpp:33:8: note: candidate expects 4 arguments, 1 provided }); ^ In file included from /usr/include/c++/7/unordered_map:48:0, from /opt/ros/foxy/install/include/rclcpp/executors/multi_threaded_executor.hpp:23, from /opt/ros/foxy/install/include/rclcpp/executors.hpp:21, from /opt/ros/foxy/install/include/rclcpp/rclcpp.hpp:146, from /workspaces/isaac_ros-dev/isaac_ros_common/include/isaac_ros_common/vpi_utilities.hpp:14, from /workspaces/isaac_ros-dev/isaac_ros_common/src/vpi_utilities.cpp:11: /usr/include/c++/7/bits/unordered_map.h:237:7: note: candidate: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const allocator_type&) [with _Key = std::cxx11::basic_string; _Tp = unsigned int; _Hash = std::hash<std::cxx11::basic_string >; _Pred = std::equal_to<std::cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<std::cxx11::basic_string >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >] unordered_map(size_type n, const hasher& hf, ^~~~~ /usr/include/c++/7/bits/unordered_map.h:237:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/7/bits/unordered_map.h:233:7: note: candidate: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const allocator_type&) [with _Key = std::cxx11::basic_string; _Tp = unsigned int; _Hash = std::hash<std::cxx11::basic_string >; _Pred = std::equal_to<std::cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >] unordered_map(size_type n, const allocator_type& __a) ^~~~~ /usr/include/c++/7/bits/unordered_map.h:233:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/7/bits/unordered_map.h:225:7: note: candidate: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::initializer_list<typename std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::detail::_Select1st, _Pred, _Hash, std::detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::detail::_Prime_rehash_policy, std::detail::_Hashtable_traits<std::not_<std::and_<std::__is_fast_hash<_Hash>, std::detail::is_noexcept_hash<_Key, _Hash> > >::value, false, true> >::value_type>, std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = std::__cxx11::basic_string; _Tp = unsigned int; _Hash = std::hash<std::cxx11::basic_string >; _Pred = std::equal_to<std::cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >; typename std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::detail::_Select1st, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::detail::_Default_ranged_hash, std::detail::_Prime_rehash_policy, std::detail::_Hashtable_traits<std::not_<std::and_<std::is_fast_hash<_Hash>, std::detail::is_noexcept_hash<_Key, _Hash> > >::value, false, true> >::value_type = std::pair<const std::cxx11::basic_string, unsigned int>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<std::cxx11::basic_string >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<std::cxx11::basic_string >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >] unordered_map(initializer_list l, ^~~~~ /usr/include/c++/7/bits/unordered_map.h:225:7: note: no known conversion for argument 1 from ‘’ to ‘std::initializer_list<std::pair<const std::cxx11::basic_string, unsigned int> >’ /usr/include/c++/7/bits/unordered_map.h:209:7: note: candidate: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&&, const allocator_type&) [with _Key = std::cxx11::basic_string; _Tp = unsigned int; _Hash = std::hash<std::cxx11::basic_string >; _Pred = std::equal_to<std::cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::__cxx11::basic_string, unsigned int> >] unordered_map(unordered_map&& umap, ^~~~~ /usr/include/c++/7/bits/unordered_map.h:209:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/7/bits/unordered_map.h:199:7: note: candidate: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(const std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&, const allocator_type&) [with _Key = std::cxx11::basic_string; _Tp = unsigned int; _Hash = std::hash<std::__cxx11::basic_string >; _Pred = std::equal_to<std::cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >] unordered_map(const unordered_map& umap, ^~~~~ /usr/include/c++/7/bits/unordered_map.h:199:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/7/bits/unordered_map.h:190:7: note: candidate: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(const allocator_type&) [with _Key = std::__cxx11::basic_string; _Tp = unsigned int; _Hash = std::hash<std::cxx11::basic_string >; _Pred = std::equal_to<std::cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >] unordered_map(const allocator_type& a) ^~~~~ /usr/include/c++/7/bits/unordered_map.h:190:7: note: no known conversion for argument 1 from ‘’ to ‘const allocator_type& {aka const std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >&}’ /usr/include/c++/7/bits/unordered_map.h:183:7: note: candidate: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&&) [with _Key = std::__cxx11::basic_string; _Tp = unsigned int; _Hash = std::hash<std::cxx11::basic_string >; _Pred = std::equal_to<std::cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >] unordered_map(unordered_map&&) = default; ^~~~~ /usr/include/c++/7/bits/unordered_map.h:183:7: note: no known conversion for argument 1 from ‘’ to ‘std::unordered_map<std::cxx11::basic_string, unsigned int>&&’ /usr/include/c++/7/bits/unordered_map.h:180:7: note: candidate: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(const std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&) [with _Key = std::cxx11::basic_string; _Tp = unsigned int; _Hash = std::hash<std::cxx11::basic_string >; _Pred = std::equal_to<std::cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >] unordered_map(const unordered_map&) = default; ^~~~~ /usr/include/c++/7/bits/unordered_map.h:180:7: note: no known conversion for argument 1 from ‘’ to ‘const std::unordered_map<std::cxx11::basic_string, unsigned int>&’ /usr/include/c++/7/bits/unordered_map.h:171:2: note: candidate: template std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(_InputIterator, _InputIterator, std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) unordered_map(_InputIterator first, _InputIterator last, ^~~~~ /usr/include/c++/7/bits/unordered_map.h:171:2: note: template argument deduction/substitution failed: /workspaces/isaac_ros-dev/isaac_ros_common/src/vpi_utilities.cpp:33:8: note: candidate expects 6 arguments, 1 provided }); ^ In file included from /usr/include/c++/7/unordered_map:48:0, from /opt/ros/foxy/install/include/rclcpp/executors/multi_threaded_executor.hpp:23, from /opt/ros/foxy/install/include/rclcpp/executors.hpp:21, from /opt/ros/foxy/install/include/rclcpp/rclcpp.hpp:146, from /workspaces/isaac_ros-dev/isaac_ros_common/include/isaac_ros_common/vpi_utilities.hpp:14, from /workspaces/isaac_ros-dev/isaac_ros_common/src/vpi_utilities.cpp:11: /usr/include/c++/7/bits/unordered_map.h:150:7: note: candidate: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = std::cxx11::basic_string; _Tp = unsigned int; _Hash = std::hash<std::cxx11::basic_string >; _Pred = std::equal_to<std::cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<std::cxx11::basic_string >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<std::cxx11::basic_string >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >] unordered_map(size_type n, ^~~~~ /usr/include/c++/7/bits/unordered_map.h:150:7: note: no known conversion for argument 1 from ‘’ to ‘std::unordered_map<std::cxx11::basic_string, unsigned int>::size_type {aka long unsigned int}’ /usr/include/c++/7/bits/unordered_map.h:140:7: note: candidate: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::__cxx11::basic_string; _Tp = unsigned int; _Hash = std::hash<std::cxx11::basic_string >; _Pred = std::equal_to<std::cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::cxx11::basic_string, unsigned int> >] unordered_map() = default; ^~~~~ /usr/include/c++/7/bits/unordered_map.h:140:7: note: candidate expects 0 arguments, 1 provided make[2]: [CMakeFiles/isaac_ros_common.dir/src/vpi_utilities.cpp.o] Error 1 make[1]: [CMakeFiles/isaac_ros_common.dir/all] Error 2 make: *** [all] Error 2

Failed <<< isaac_ros_common [12.3s, exited with code 2]

hemalshahNV commented 3 years ago

Can you check if you're running JetPack 4.6 with VPI installed? Can you post the contents of /etc/nv_tegra_release here? It should show R32, Revision 6.1. Do you have the file /opt/nvidia/vpi1/lib64/libnvvpi.so.1.1.11 installed on your Xavier as well?

The compilation issues seems like a previous version of VPI installed which may mean an older JetPack installation.

bblumberg commented 3 years ago

I thought I had upgraded successfully to 6.1, but your diagnosis was correct, and once I did an apt full-upgrade I got the correct output from: more /etc/nv_tegra_release

R32 (release), REVISION: 6.1, GCID: 27863751, BOARD: t186ref, EABI: aarch64, DATE: Mon Jul 26 19:36:31 UTC 2021

here are the contents of /opt/nvidia/vpi1/lib64: libnvvpi.so libnvvpi.so.1 libnvvpi.so.1.1.12 python

I apologize for taking up your time on that one.

Now when I try to build the ros_common package I am getting this error:

admin@bruce-xavier:/workspaces/isaac_ros-dev$ colcon build Starting >>> isaac_ros_common Starting >>> isaac_ros_test Finished <<< isaac_ros_test [1.91s]
--- stderr: isaac_ros_common
make[2]: No rule to make target '/opt/nvidia/vpi1/lib64/libnvvpi.so.1.0.15', needed by 'libisaac_ros_common.so'. Stop. make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/isaac_ros_common.dir/all] Error 2 make: [all] Error 2

Failed <<< isaac_ros_common [7.58s, exited with code 2]

Summary: 1 package finished [8.05s] 1 package failed: isaac_ros_common 1 package had stderr output: isaac_ros_common

bb

hemalshahNV commented 3 years ago

I think the cmake files for VPI has not been updated. /usr/share/vpi1/cmake/vpi-config-version.cmake should list 1.1.11. In the stdout, I am seeing libnvvpi.so.1.0.15 which is the previous VPI version. Either that or you might need to clean build again to pick up the newer VPI version.

bblumberg commented 3 years ago

This is what I get doing something in between other stuff. Yes, once I did a clean build (which I should have thought about), it compiled fine.

Thanks for your patience.