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

catkin_make failed after jetson-inference update #14

Closed aparwal closed 4 years ago

aparwal commented 5 years ago

Could not build ros package after installing latest version of jetson-inference

Output of catkin_make:

/home/nvidia/catkin_ws/src/ros_deep_learning/src/node_detectnet.cpp: In function ‘void img_callback(const ImageConstPtr&)’:
/home/nvidia/catkin_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/catkin_ws/src/ros_deep_learning/src/node_detectnet.cpp:29:0:
/usr/local/include/jetson-inference/detectNet.h:271: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:271:6: note:   candidate expects 5 arguments, 6 provided
/usr/local/include/jetson-inference/detectNet.h:283: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:283:6: note:   candidate expects 5 arguments, 6 provided
/home/nvidia/catkin_ws/src/ros_deep_learning/src/node_detectnet.cpp:77:7: error: in argument to unary !
  if( !result )
       ^
/home/nvidia/catkin_ws/src/ros_deep_learning/src/node_detectnet.cpp: In function ‘int main(int, char**)’:
/home/nvidia/catkin_ws/src/ros_deep_learning/src/node_detectnet.cpp:205:20: error: class detectNet’ has no member named ‘GetMaxBoundingBoxes’
  maxBoxes   = net->GetMaxBoundingBoxes();  
                    ^
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:7449: recipe for target 'ros_deep_learning/CMakeFiles/detectnet.dir/all' failed
make[1]: *** [ros_deep_learning/CMakeFiles/detectnet.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j6 -l6" failed

Seems like signature of detectNet::Detect() changed after this commit of jetson-inference but this package is using the old signature. Is there a tag/commit of jetson-inference for which this package works?

dusty-nv commented 5 years ago

Hi @aparwal, sorry - looks like I need to update this ROS node.

For now you should be able to use the L4T-R32.1 tag of jetson-inference, that was captured before these changes were merged into master.

aparwal commented 5 years ago

Thanks, the node works for that tag.

agoila commented 5 years ago

I am sorry, but I am relatively new to GitHub, and have been having difficulty understanding what you mean by tag? Is this the same as branch?

I ran into the same issue last night, and am wondering if I need to checkout the branch L4T-R32.1, and follow the build steps again (for jetson-inference) to get this node to work?

Thanks for your help @dusty-nv @aparwal !

luo980 commented 5 years ago

Found the same problem, but I will wait for the update :D Thanks

sgiraz commented 5 years ago

Looking at Detect method in "detectNet.h" and the same Detect method used in "node_detectnet.cpp", jetson-inference repo doesn't seems aligned with the ros_deep_learninig repo. I'm waiting for the update too!! ;)

neurondizzy commented 4 years ago

Hello kmartin .... just used your update and all went well with build, waiting on a camera to move further. Thanks for the update.

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.