dusty-nv / ros_deep_learning

Deep learning inference nodes for ROS / ROS2 with support for NVIDIA Jetson and TensorRT
879 stars 257 forks source link

Can not build this node on Xaiver Jetpack 4.2 #21

Closed ghost closed 4 years ago

ghost commented 4 years ago

I am trying to use this node on Xaiver Jetpack 4.2, ROS Melodic. I first built and installed jetson-inference. Ran the example fine. Then downloaded this node, but got the following error when I built the workspace. Anyone knows why?

[ 90%] Built target lane_detector_generate_messages /home/nvidia/racecar_ws/src/ros_deep_learning/src/node_detectnet.cpp: In function ‘void img_callback(const ImageConstPtr&)’: /home/nvidia/racecar_ws/src/ros_deep_learning/src/node_detectnet.cpp:74:119: error: no matching function for call to ‘detectNet::Detect(float*, uint32_t, uint32_t, float*&, int*, float*&)’ const bool result = net->Detect(cvt->ImageGPU(), cvt->GetWidth(), cvt->GetHeight(), bbCPU, &numBoundingBoxes, confCPU); ^ In file included from /home/nvidia/racecar_ws/src/ros_deep_learning/src/node_detectnet.cpp:29:0: /usr/local/include/jetson-inference/detectNet.h:309:6: note: candidate: int detectNet::Detect(float*, uint32_t, uint32_t, detectNet::Detection**, uint32_t) int Detect( float* input, uint32_t width, uint32_t height, Detection** detections, uint32_t overlay=OVERLAY_BOX ); ^~~~~~ /usr/local/include/jetson-inference/detectNet.h:309:6: note: candidate expects 5 arguments, 6 provided /usr/local/include/jetson-inference/detectNet.h:321:6: note: candidate: int detectNet::Detect(float*, uint32_t, uint32_t, detectNet::Detection*, uint32_t) int Detect( float* input, uint32_t width, uint32_t height, Detection* detections, uint32_t overlay=OVERLAY_BOX ); ^~~~~~ /usr/local/include/jetson-inference/detectNet.h:321:6: note: candidate expects 5 arguments, 6 provided /home/nvidia/racecar_ws/src/ros_deep_learning/src/node_detectnet.cpp:77:7: error: in argument to unary ! if( !result ) ^~~~~~ /home/nvidia/racecar_ws/src/ros_deep_learning/src/node_detectnet.cpp: In function ‘int main(int, char**)’: /home/nvidia/racecar_ws/src/ros_deep_learning/src/node_detectnet.cpp:205:20: error: ‘class detectNet’ has no member named ‘GetMaxBoundingBoxes’ maxBoxes = net->GetMaxBoundingBoxes(); ^~~~~~~~~~~~~~~~~~~ /home/nvidia/racecar_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘int main(int, char**)’: /home/nvidia/racecar_ws/src/ros_deep_learning/src/node_segnet.cpp:254:28: error: ‘class segNet’ has no member named ‘GetClassLabel’; did you mean ‘GetClassPath’? const char* label = net->GetClassLabel(n); ^~~~~~~~~~~~~ GetClassPath ros_deep_learning/CMakeFiles/detectnet.dir/build.make:62: recipe for target 'ros_deep_learning/CMakeFiles/detectnet.dir/src/node_detectnet.cpp.o' failed make[2]: *** [ros_deep_learning/CMakeFiles/detectnet.dir/src/node_detectnet.cpp.o] Error 1 CMakeFiles/Makefile2:1850: recipe for target 'ros_deep_learning/CMakeFiles/detectnet.dir/all' failed make[1]: *** [ros_deep_learning/CMakeFiles/detectnet.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... ros_deep_learning/CMakeFiles/segnet.dir/build.make:62: recipe for target 'ros_deep_learning/CMakeFiles/segnet.dir/src/node_segnet.cpp.o' failed make[2]: *** [ros_deep_learning/CMakeFiles/segnet.dir/src/node_segnet.cpp.o] Error 1 CMakeFiles/Makefile2:1919: recipe for target 'ros_deep_learning/CMakeFiles/segnet.dir/all' failed make[1]: *** [ros_deep_learning/CMakeFiles/segnet.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed

ghost commented 4 years ago

Anyone know?

dusty-nv commented 4 years ago

The ros_deep_learning repo has now been updated for JetPack 4.2 and to build against jetson-inference master. Let me know if you have any more problems building it.