dusty-nv / jetbot_ros

ROS nodes and Gazebo model for NVIDIA JetBot with Jetson Nano
MIT License
382 stars 178 forks source link

Built Error on jetson #30

Open Savigoyal89 opened 4 years ago

Savigoyal89 commented 4 years ago

I am getting error while building the package jetbot_ros on my nvidia jetbot. Attached the error logs

jetbot@jetson-4-3:~/workspace/catkin_ws$ catkin_make Base path: /home/jetbot/workspace/catkin_ws Source space: /home/jetbot/workspace/catkin_ws/src Build space: /home/jetbot/workspace/catkin_ws/build Devel space: /home/jetbot/workspace/catkin_ws/devel . . . [ 26%] Building CXX object jetbot_ros/CMakeFiles/jetbot_camera.dir/src/jetbot_camera.cpp.o [ 46%] Built target detectnet [ 53%] Building CXX object jetbot_ros/CMakeFiles/jetbot_camera.dir/src/image_converter.cpp.o In file included from /usr/local/include/jetson-utils/cudaRGB.h:27:0, from /home/jetbot/workspace/catkin_ws/src/jetbot_ros/src/image_converter.cpp:25: /home/jetbot/workspace/catkin_ws/src/jetbot_ros/src/image_converter.cpp: In member function ‘bool imageConverter::Convert(const ImageConstPtr&)’: /home/jetbot/workspace/catkin_ws/src/jetbot_ros/src/image_converter.cpp:83:18: error: ‘cudaBGR8ToRGBA32’ was not declared in this scope

/home/jetbot/workspace/catkin_ws/src/jetbot_ros/src/image_converter.cpp: In member function ‘bool imageConverter::Convert(sensor_msgs::Image&, const string&, float)’: /home/jetbot/workspace/catkin_ws/src/jetbot_ros/src/image_converter.cpp:106:19: error: ‘cudaRGBA32ToBGR8’ was not declared in this scope if( CUDA_FAILED(cudaRGBA32ToBGR8((float4)imageGPU, (uchar3)mInputGPU, mWidth, mHeight)) ) ^ /home/jetbot/workspace/catkin_ws/src/jetbot_ros/src/image_converter.cpp:106:19: note: suggested alternative: ‘cudaRGBA32ToRGB8’ /home/jetbot/workspace/catkin_ws/src/jetbot_ros/src/image_converter.cpp:126:19: error: ‘cudaRGBA32ToBGRA8’ was not declared in this scope if( CUDA_FAILED(cudaRGBA32ToBGRA8((float4)imageGPU, (uchar4*)mInputGPU, mWidth, mHeight)) ) ^ /home/jetbot/workspace/catkin_ws/src/jetbot_ros/src/image_converter.cpp:126:19: note: suggested alternative: ‘cudaRGBA32ToRGBA8’ jetbot_ros/CMakeFiles/jetbot_camera.dir/build.make:86: recipe for target 'jetbot_ros/CMakeFiles/jetbot_camera.dir/src/image_converter.cpp.o' failed make[2]: [jetbot_ros/CMakeFiles/jetbot_camera.dir/src/image_converter.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... [ 73%] Built target segnet [ 93%] Built target imagenet CMakeFiles/Makefile2:615: recipe for target 'jetbot_ros/CMakeFiles/jetbot_camera.dir/all' failed make[1]: [jetbot_ros/CMakeFiles/jetbot_camera.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: [all] Error 2 Invoking "make -j2 -l2" failed

lstk520 commented 4 years ago

I have the same error with JetPack 4.3

Savigoyal89 commented 4 years ago

I have the same error with JetPack 4.3

In /home/jetbot/workspace/catkin_ws/src/jetbot_ros/src/image_converter.cpp

reaplace cudaRGBA32ToBGRA8 -> cudaRGBA32ToRGBA8 or whereever you see BGR in this file replace it with RGB. Things will work

dusty-nv commented 4 years ago

Hi all, switch your jetson-inference to the 20200714 branch:

https://github.com/dusty-nv/jetson-inference/tree/20200714

Then re-build and re-install jetson-inference with make followed by sudo make install.

Savigoyal89 commented 4 years ago

Hi all, switch your jetson-inference to the 20200714 branch:

https://github.com/dusty-nv/jetson-inference/tree/20200714

Then re-build and re-install jetson-inference with make followed by sudo make install.

Thanks, for your reply Once I updated the branch and followed the remaining steps I got error when i come to the step of building ros_deep learning package. last time error came while building package jetbot_ros, this time it came even before that. home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp: In function ‘cudaError_t cudaBGR8ToRGBA32(uchar3, float4, size_t, size_t)’: /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:34:77: error: too many arguments to function ‘cudaError_t cudaRGB8ToRGBA32(uchar3, float4, size_t, size_t)’ return cudaRGB8ToRGBA32(input, output, width, height, /swapRedBlue=/ true); ^ In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:25:0: /usr/local/include/jetson-utils/cudaRGB.h:42:13: note: declared here cudaError_t cudaRGB8ToRGBA32( uchar3 input, float4 output, size_t width, size_t height ); ^~~~ /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp: In function ‘cudaError_t cudaRGBA32ToBGR8(float4, uchar3, size_t, size_t, const float2&)’: /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:39:89: error: no matching function for call to ‘cudaRGBA32ToRGB8(float4&, uchar3&, size_t&, size_t&, bool, const float2&)’ return cudaRGBA32ToRGB8(input, output, width, height, /swapRedBlue=/ true, pixelRange); ^ In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:25:0: /usr/local/include/jetson-utils/cudaRGB.h:64:13: note: candidate: cudaError_t cudaRGBA32ToRGB8(float4, uchar3, size_t, size_t) cudaError_t cudaRGBA32ToRGB8( float4 input, uchar3 output, size_t width, size_t height ); ^~~~ /usr/local/include/jetson-utils/cudaRGB.h:64:13: note: candidate expects 4 arguments, 6 provided /usr/local/include/jetson-utils/cudaRGB.h:71:13: note: candidate: cudaError_t cudaRGBA32ToRGB8(float4, uchar3, size_t, size_t, const float2&) cudaError_t cudaRGBA32ToRGB8( float4 input, uchar3 output, size_t width, size_t height, const float2& inputRange ); ^~~~ /usr/local/include/jetson-utils/cudaRGB.h:71:13: note: candidate expects 5 arguments, 6 provided /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp: In function ‘cudaError_t cudaRGBA32ToBGRA8(float4, uchar4, size_t, size_t, const float2&)’: /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:44:90: error: no matching function for call to ‘cudaRGBA32ToRGBA8(float4&, uchar4&, size_t&, size_t&, bool, const float2&)’ return cudaRGBA32ToRGBA8(input, output, width, height, /swapRedBlue=/ true, pixelRange); ^ In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:25:0: /usr/local/include/jetson-utils/cudaRGB.h:78:13: note: candidate: cudaError_t cudaRGBA32ToRGBA8(float4, uchar4, size_t, size_t) cudaError_t cudaRGBA32ToRGBA8( float4 input, uchar4 output, size_t width, size_t height ); ^~~~~ /usr/local/include/jetson-utils/cudaRGB.h:78:13: note: candidate expects 4 arguments, 6 provided /usr/local/include/jetson-utils/cudaRGB.h:85:13: note: candidate: cudaError_t cudaRGBA32ToRGBA8(float4, uchar4, size_t, size_t, const float2&) cudaError_t cudaRGBA32ToRGBA8( float4 input, uchar4 output, size_t width, size_t height, const float2& inputRange ); ^~~~~ /usr/local/include/jetson-utils/cudaRGB.h:85:13: note: candidate expects 5 arguments, 6 provided In file included from /usr/local/include/jetson-utils/cudaRGB.h:27:0, from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:25: /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp: In member function ‘bool imageConverter::Convert(sensor_msgs::Image&, const string&)’: /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:132:92: error: call of overloaded ‘cudaRGBA32ToBGR8(float4, uchar3, uint32_t&, uint32_t&)’ is ambiguous if( CUDA_FAILED(cudaRGBA32ToBGR8((float4)mOutputGPU, (uchar3)mInputGPU, mWidth, mHeight)) ) ^ /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:37:13: note: candidate: cudaError_t cudaRGBA32ToBGR8(float4, uchar3, size_t, size_t, const float2&) cudaError_t cudaRGBA32ToBGR8( float4 input, uchar3 output, size_t width, size_t height, const float2& pixelRange ) ^~~~ In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:25:0: /usr/local/include/jetson-utils/cudaRGB.h:101:13: note: candidate: cudaError_t cudaRGBA32ToBGR8(float4, uchar3, size_t, size_t) cudaError_t cudaRGBA32ToBGR8( float4 input, uchar3 output, size_t width, size_t height ); ^~~~ In file included from /usr/local/include/jetson-utils/cudaRGB.h:27:0, from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:25: /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:152:93: error: call of overloaded ‘cudaRGBA32ToBGRA8(float4, uchar4, uint32_t&, uint32_t&)’ is ambiguous if( CUDA_FAILED(cudaRGBA32ToBGRA8((float4)mOutputGPU, (uchar4)mInputGPU, mWidth, mHeight)) ) ^ /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:42:13: note: candidate: cudaError_t cudaRGBA32ToBGRA8(float4, uchar4, size_t, size_t, const float2&) cudaError_t cudaRGBA32ToBGRA8( float4 input, uchar4 output, size_t width, size_t height, const float2& pixelRange ) ^~~~~ In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:25:0: /usr/local/include/jetson-utils/cudaRGB.h:115:13: note: candidate: cudaError_t cudaRGBA32ToBGRA8(float4, uchar4, size_t, size_t) cudaError_t cudaRGBA32ToBGRA8( float4 input, uchar4 output, size_t width, size_t height ); ^~~~~ /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp: In function ‘cudaError_t cudaBGR8ToRGBA32(uchar3, float4, size_t, size_t)’: /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:34:77: error: too many arguments to function ‘cudaError_t cudaRGB8ToRGBA32(uchar3, float4, size_t, size_t)’ return cudaRGB8ToRGBA32(input, output, width, height, /swapRedBlue=/ true); ^ In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:25:0: /usr/local/include/jetson-utils/cudaRGB.h:42:13: note: declared here cudaError_t cudaRGB8ToRGBA32( uchar3 input, float4 output, size_t width, size_t height ); ^~~~ /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp: In function ‘cudaError_t cudaRGBA32ToBGR8(float4, uchar3, size_t, size_t, const float2&)’: /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:39:89: error: no matching function for call to ‘cudaRGBA32ToRGB8(float4&, uchar3&, size_t&, size_t&, bool, const float2&)’ return cudaRGBA32ToRGB8(input, output, width, height, /swapRedBlue=/ true, pixelRange); ^ In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:25:0: /usr/local/include/jetson-utils/cudaRGB.h:64:13: note: candidate: cudaError_t cudaRGBA32ToRGB8(float4, uchar3, size_t, size_t) cudaError_t cudaRGBA32ToRGB8( float4 input, uchar3 output, size_t width, size_t height ); ^~~~ /usr/local/include/jetson-utils/cudaRGB.h:64:13: note: candidate expects 4 arguments, 6 provided /usr/local/include/jetson-utils/cudaRGB.h:71:13: note: candidate: cudaError_t cudaRGBA32ToRGB8(float4, uchar3, size_t, size_t, const float2&) cudaError_t cudaRGBA32ToRGB8( float4 input, uchar3 output, size_t width, size_t height, const float2& inputRange ); ^~~~ /usr/local/include/jetson-utils/cudaRGB.h:71:13: note: candidate expects 5 arguments, 6 provided /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp: In function ‘cudaError_t cudaRGBA32ToBGRA8(float4, uchar4, size_t, size_t, const float2&)’: /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:44:90: error: no matching function for call to ‘cudaRGBA32ToRGBA8(float4&, uchar4&, size_t&, size_t&, bool, const float2&)’ return cudaRGBA32ToRGBA8(input, output, width, height, /swapRedBlue=/ true, pixelRange); ^ In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:25:0: /usr/local/include/jetson-utils/cudaRGB.h:78:13: note: candidate: cudaError_t cudaRGBA32ToRGBA8(float4, uchar4, size_t, size_t) cudaError_t cudaRGBA32ToRGBA8( float4 input, uchar4 output, size_t width, size_t height ); ^~~~~ /usr/local/include/jetson-utils/cudaRGB.h:78:13: note: candidate expects 4 arguments, 6 provided /usr/local/include/jetson-utils/cudaRGB.h:85:13: note: candidate: cudaError_t cudaRGBA32ToRGBA8(float4, uchar4, size_t, size_t, const float2&) cudaError_t cudaRGBA32ToRGBA8( float4 input, uchar4 output, size_t width, size_t height, const float2& inputRange ); ^~~~~ /usr/local/include/jetson-utils/cudaRGB.h:85:13: note: candidate expects 5 arguments, 6 provided In file included from /usr/local/include/jetson-utils/cudaRGB.h:27:0, from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:25: /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp: In member function ‘bool imageConverter::Convert(sensor_msgs::Image&, const string&)’: /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:132:92: error: call of overloaded ‘cudaRGBA32ToBGR8(float4, uchar3, uint32_t&, uint32_t&)’ is ambiguous if( CUDA_FAILED(cudaRGBA32ToBGR8((float4)mOutputGPU, (uchar3)mInputGPU, mWidth, mHeight)) ) ^ /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:37:13: note: candidate: cudaError_t cudaRGBA32ToBGR8(float4, uchar3, size_t, size_t, const float2&) cudaError_t cudaRGBA32ToBGR8( float4 input, uchar3 output, size_t width, size_t height, const float2& pixelRange ) ^~~~ In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:25:0: /usr/local/include/jetson-utils/cudaRGB.h:101:13: note: candidate: cudaError_t cudaRGBA32ToBGR8(float4, uchar3, size_t, size_t) cudaError_t cudaRGBA32ToBGR8( float4 input, uchar3 output, size_t width, size_t height ); ^~~~ In file included from /usr/local/include/jetson-utils/cudaRGB.h:27:0, from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:25: /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:152:93: error: call of overloaded ‘cudaRGBA32ToBGRA8(float4, uchar4, uint32_t&, uint32_t&)’ is ambiguous if( CUDA_FAILED(cudaRGBA32ToBGRA8((float4)mOutputGPU, (uchar4)mInputGPU, mWidth, mHeight)) ) ^ /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:42:13: note: candidate: cudaError_t cudaRGBA32ToBGRA8(float4, uchar4, size_t, size_t, const float2&) cudaError_t cudaRGBA32ToBGRA8( float4 input, uchar4 output, size_t width, size_t height, const float2& pixelRange ) ^~~~~ In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/image_converter.cpp:25:0: /usr/local/include/jetson-utils/cudaRGB.h:115:13: note: candidate: cudaError_t cudaRGBA32ToBGRA8(float4, uchar4, size_t, size_t) cudaError_t cudaRGBA32ToBGRA8( float4 input, uchar4 output, size_t width, size_t height ); ^~~~~

Savigoyal89 commented 4 years ago

Hi all, switch your jetson-inference to the 20200714 branch:

https://github.com/dusty-nv/jetson-inference/tree/20200714

Then re-build and re-install jetson-inference with make followed by sudo make install.

One more thing, when previously I have worked with master branch of jetson-inference, my ros_deep_learning built was successful. There was issues in making built of jetson_nano......I made a quick fix there by making changes in /home/jetbot/workspace/catkin_ws/src/jetbot_ros/src/image_converter.cpp by replacing BGR by RGB and make was successful of jetson_ros package.

But in it when I start testing the Robot for making it move forward and backward, no movement was there in Robot. Then I opened the https://github.com/dusty-nv/jetbot_ros/blob/master/scripts/jetbot_motors.py file on my system and I made change in parameter "motor_ID". I tried with different combination of 1,2,3 and 4. Only motor with id 3 is working, not able to move second wheel. I even tried directly with this library file https://github.com/adafruit/Adafruit-Motor-HAT-Python-Library/blob/master/examples/DCTest.py Again, this is working only for motor is 3, so only one wheel is rotating, second one is not moving. Do you have any idea what can be the issue? Any help will be appreciated

dusty-nv commented 4 years ago

One more thing, when previously I have worked with master branch of jetson-inference, my ros_deep_learning built was successful. There was issues in making built of jetson_nano......I made a quick fix there by making changes in /home/jetbot/workspace/catkin_ws/src/jetbot_ros/src/image_converter.cpp by replacing BGR by RGB and make was successful of jetson_ros package.

You could also check out the 0ad346df2b712d19d5647d8d45886fe1279efda8 branch of ros_deep_learning to match the older jetson-inference. I will be updating jetbot_ros shortly to support the latest of both ros_deep_learning and jetson-inference.

Again, this is working only for motor is 3, so only one wheel is rotating, second one is not moving. Sorry, I'm not sure, sounds like it could be a hardware issue.

Have you tried using the Jupyter notebooks from https://github.com/NVIDIA-AI-IOT/jetbot? Do both wheels work then?

Savigoyal89 commented 4 years ago

Have you tried using the Jupyter notebooks from https://github.com/NVIDIA-AI-IOT/jetbot? Do both wheels work then?

yes, both are working perfectly fine with that

Savigoyal89 commented 4 years ago

You could also check out the 0ad346df2b712d19d5647d8d45886fe1279efda8 branch of ros_deep_learning to match the older jetson-inference. I will be updating jetbot_ros shortly to support the latest of both ros_deep_learning and jetson-inference.

To clarify , are you asking me to checkout the branch **0ad346df2b712d19d5647d8d45886fe1279efda8** of ros_deep_learning and use that with the 20200714 branch of the jetson-inference.

tohruk commented 4 years ago

I have the same error with the JetPack 4.3. I was able to build the jetson_ros with the 20200714 branch of the jetson-inference, however the branch was not compatible with the latest ros_deep_learning. Which ros_deep_learning revision should I use?

What I tried is below.

$ cd ~/workspaces # install latest jetson-utils
$ git clone https://github.com/dusty-nv/jetson-utils.git
$  cd jetson-utils/
$  mkdir build
$  cd build/
$  cmake ../
$  make
$  sudo make install
$ cd ~/workspaces/jetson-inference # checkout the specific branch and rebuild it
$ git checkout 20200714
$ cd build/
$ cmake ../
$ make
$ sudo make install
$ cd ~/workspace/catkin_ws/
$ rm -fr build devel
$ ls src
CMakeLists.txt  jetbot_ros  ros_deep_learning
$ catkin_make 
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 2 packages in topological order:
-- ~~  - jetbot_ros
-- ~~  - ros_deep_learning
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'jetbot_ros'
-- ==> add_subdirectory(jetbot_ros)
-- Found CUDA: /usr/local/cuda (found version "10.0") 
-- +++ processing catkin package: 'ros_deep_learning'
-- ==> add_subdirectory(ros_deep_learning)
detected ROS1 (catkin_make)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jetbot/workspace/catkin_ws/build
####
#### Running command: "make -j2 -l2" in "/home/jetbot/workspace/catkin_ws/build"
####
Scanning dependencies of target jetbot_camera
Scanning dependencies of target segnet
[  3%] Building CXX object jetbot_ros/CMakeFiles/jetbot_camera.dir/src/jetbot_camera.cpp.o
[  7%] Building CXX object ros_deep_learning/CMakeFiles/segnet.dir/src/node_segnet.cpp.o
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘bool publish_overlay(uint32_t, uint32_t)’:
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:66:74: error: no matching function for call to ‘segNet::Overlay(imageConverter::PixelType*, uint32_t&, uint32_t&, segNet::FilterMode&)’
  if( !net->Overlay(overlay_cvt->ImageGPU(), width, height, overlay_filter) )
                                                                          ^
In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:
/usr/local/include/jetson-inference/segNet.h:212:7: note: candidate: bool segNet::Overlay(float*, uint32_t, uint32_t, segNet::FilterMode)
  bool Overlay( float* output, uint32_t width, uint32_t height, FilterMode filter=FILTER_LINEAR );
       ^~~~~~~
/usr/local/include/jetson-inference/segNet.h:212:7: note:   no known conversion for argument 1 from ‘imageConverter::PixelType* {aka uchar3*}’ to ‘float*’
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘bool publish_mask_color(uint32_t, uint32_t)’:
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:91:71: error: no matching function for call to ‘segNet::Mask(imageConverter::PixelType*, uint32_t&, uint32_t&, segNet::FilterMode&)’
  if( !net->Mask(mask_color_cvt->ImageGPU(), width, height, mask_filter) )
                                                                       ^
In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:
/usr/local/include/jetson-inference/segNet.h:195:7: note: candidate: bool segNet::Mask(uint8_t*, uint32_t, uint32_t)
  bool Mask( uint8_t* output, uint32_t width, uint32_t height );
       ^~~~
/usr/local/include/jetson-inference/segNet.h:195:7: note:   candidate expects 3 arguments, 4 provided
/usr/local/include/jetson-inference/segNet.h:200:7: note: candidate: bool segNet::Mask(float*, uint32_t, uint32_t, segNet::FilterMode)
  bool Mask( float* output, uint32_t width, uint32_t height, FilterMode filter=FILTER_LINEAR );
       ^~~~
/usr/local/include/jetson-inference/segNet.h:200:7: note:   no known conversion for argument 1 from ‘imageConverter::PixelType* {aka uchar3*}’ to ‘float*’
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘void img_callback(sensor_msgs::ImageConstPtr)’:
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:144:88: error: no matching function for call to ‘segNet::Process(imageConverter::PixelType*, uint32_t, uint32_t)’
  if( !net->Process(input_cvt->ImageGPU(), input_cvt->GetWidth(), input_cvt->GetHeight()) )
                                                                                        ^
In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:
/usr/local/include/jetson-inference/segNet.h:189:7: note: candidate: bool segNet::Process(float*, uint32_t, uint32_t, const char*)
  bool Process( float* input, uint32_t width, uint32_t height, const char* ignore_class="void" );
       ^~~~~~~
/usr/local/include/jetson-inference/segNet.h:189:7: note:   no known conversion for argument 1 from ‘imageConverter::PixelType* {aka uchar3*}’ to ‘float*’
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:1454: recipe for target 'ros_deep_learning/CMakeFiles/segnet.dir/all' failed
make[1]: *** [ros_deep_learning/CMakeFiles/segnet.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 11%] Building CXX object jetbot_ros/CMakeFiles/jetbot_camera.dir/src/image_converter.cpp.o
[ 15%] Linking CXX executable /home/jetbot/workspace/catkin_ws/devel/lib/jetbot_ros/jetbot_camera
[ 15%] Built target jetbot_camera
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j2 -l2" failed
dusty-nv commented 4 years ago

To clarify , are you asking me to checkout the branch 0ad346df2b712d19d5647d8d45886fe1279efda8 of ros_deep_learning and use that with the 20200714 branch of the jetson-inference.

Yes, that is correct. I will update jetbot_ros to support the latest next week, sorry about that.


From: tohruk notifications@github.com Sent: Friday, July 31, 2020 8:52:22 PM To: dusty-nv/jetbot_ros jetbot_ros@noreply.github.com Cc: Dustin Franklin dustinf@nvidia.com; Comment comment@noreply.github.com Subject: Re: [dusty-nv/jetbot_ros] Built Error on jetson (#30)

I have the same error with the JetPack 4.3. I was able to build the jetson_ros with the 20200714 branch of the jetson-inference, however the branch was not compatible with the latest ros_deep_learning. Which ros_deep_learning revision should I use?

What I tried is below.

$ cd ~/workspaces/jetson-inference

$ git checkout 20200714

$ cd build/

$ cmake ../

$ make

$ sudo make install

$ cd ~/workspace/catkin_ws/

$ rm -fr build devel

$ ls src

CMakeLists.txt jetbot_ros ros_deep_learning

$ catkin_make

-- ~~~~~~~~~~~~~

-- ~~ traversing 2 packages in topological order:

-- ~~ - jetbot_ros

-- ~~ - ros_deep_learning

-- ~~~~~~~~~~~~~

-- +++ processing catkin package: 'jetbot_ros'

-- ==> add_subdirectory(jetbot_ros)

-- Found CUDA: /usr/local/cuda (found version "10.0")

-- +++ processing catkin package: 'ros_deep_learning'

-- ==> add_subdirectory(ros_deep_learning)

detected ROS1 (catkin_make)

-- Configuring done

-- Generating done

-- Build files have been written to: /home/jetbot/workspace/catkin_ws/build

Running command: "make -j2 -l2" in "/home/jetbot/workspace/catkin_ws/build"

Scanning dependencies of target jetbot_camera

Scanning dependencies of target segnet

[ 3%] Building CXX object jetbot_ros/CMakeFiles/jetbot_camera.dir/src/jetbot_camera.cpp.o

[ 7%] Building CXX object ros_deep_learning/CMakeFiles/segnet.dir/src/node_segnet.cpp.o

/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘bool publish_overlay(uint32_t, uint32_t)’:

/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:66:74: error: no matching function for call to ‘segNet::Overlay(imageConverter::PixelType*, uint32_t&, uint32_t&, segNet::FilterMode&)’

if( !net->Overlay(overlay_cvt->ImageGPU(), width, height, overlay_filter) )

                                                                      ^

In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:

/usr/local/include/jetson-inference/segNet.h:212:7: note: candidate: bool segNet::Overlay(float*, uint32_t, uint32_t, segNet::FilterMode)

bool Overlay( float* output, uint32_t width, uint32_t height, FilterMode filter=FILTER_LINEAR );

   ^~~~~~~

/usr/local/include/jetson-inference/segNet.h:212:7: note: no known conversion for argument 1 from ‘imageConverter::PixelType {aka uchar3}’ to ‘float*’

/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘bool publish_mask_color(uint32_t, uint32_t)’:

/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:91:71: error: no matching function for call to ‘segNet::Mask(imageConverter::PixelType*, uint32_t&, uint32_t&, segNet::FilterMode&)’

if( !net->Mask(mask_color_cvt->ImageGPU(), width, height, mask_filter) )

                                                                   ^

In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:

/usr/local/include/jetson-inference/segNet.h:195:7: note: candidate: bool segNet::Mask(uint8_t*, uint32_t, uint32_t)

bool Mask( uint8_t* output, uint32_t width, uint32_t height );

   ^~~~

/usr/local/include/jetson-inference/segNet.h:195:7: note: candidate expects 3 arguments, 4 provided

/usr/local/include/jetson-inference/segNet.h:200:7: note: candidate: bool segNet::Mask(float*, uint32_t, uint32_t, segNet::FilterMode)

bool Mask( float* output, uint32_t width, uint32_t height, FilterMode filter=FILTER_LINEAR );

   ^~~~

/usr/local/include/jetson-inference/segNet.h:200:7: note: no known conversion for argument 1 from ‘imageConverter::PixelType {aka uchar3}’ to ‘float*’

/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘void img_callback(sensor_msgs::ImageConstPtr)’:

/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:144:88: error: no matching function for call to ‘segNet::Process(imageConverter::PixelType*, uint32_t, uint32_t)’

if( !net->Process(input_cvt->ImageGPU(), input_cvt->GetWidth(), input_cvt->GetHeight()) )

                                                                                    ^

In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:

/usr/local/include/jetson-inference/segNet.h:189:7: note: candidate: bool segNet::Process(float, uint32_t, uint32_t, const char)

bool Process( float input, uint32_t width, uint32_t height, const char ignore_class="void" );

   ^~~~~~~

/usr/local/include/jetson-inference/segNet.h:189:7: note: no known conversion for argument 1 from ‘imageConverter::PixelType {aka uchar3}’ to ‘float*’

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:1454: recipe for target 'ros_deep_learning/CMakeFiles/segnet.dir/all' failed

make[1]: *** [ros_deep_learning/CMakeFiles/segnet.dir/all] Error 2

make[1]: *** Waiting for unfinished jobs....

[ 11%] Building CXX object jetbot_ros/CMakeFiles/jetbot_camera.dir/src/image_converter.cpp.o

[ 15%] Linking CXX executable /home/jetbot/workspace/catkin_ws/devel/lib/jetbot_ros/jetbot_camera

[ 15%] Built target jetbot_camera

Makefile:140: recipe for target 'all' failed

make: *** [all] Error 2

Invoking "make -j2 -l2" failed

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/dusty-nv/jetbot_ros/issues/30#issuecomment-667441364, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADVEGK2PWWUDZIGD4D5NCBDR6NRMNANCNFSM4PIMMZOQ.

pacomms commented 4 years ago

Just wondered is this fixed now as i have the same issue when doing 1st time install on new jetbot ?

Savigoyal89 commented 4 years ago

Just wondered is this fixed now as i have the same issue when doing 1st time install on new jetbot ?

checkout the branch 0ad346df2b712d19d5647d8d45886fe1279efda8 of ros_deep_learning and use that with the 20200714 branch of the jetson-inference

Savigoyal89 commented 4 years ago

I have the same error with the JetPack 4.3. I was able to build the jetson_ros with the 20200714 branch of the jetson-inference, however the branch was not compatible with the latest ros_deep_learning. Which ros_deep_learning revision should I use?

What I tried is below.

$ cd ~/workspaces # install latest jetson-utils
$ git clone https://github.com/dusty-nv/jetson-utils.git
$  cd jetson-utils/
$  mkdir build
$  cd build/
$  cmake ../
$  make
$  sudo make install
$ cd ~/workspaces/jetson-inference # checkout the specific branch and rebuild it
$ git checkout 20200714
$ cd build/
$ cmake ../
$ make
$ sudo make install
$ cd ~/workspace/catkin_ws/
$ rm -fr build devel
$ ls src
CMakeLists.txt  jetbot_ros  ros_deep_learning
$ catkin_make 
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 2 packages in topological order:
-- ~~  - jetbot_ros
-- ~~  - ros_deep_learning
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'jetbot_ros'
-- ==> add_subdirectory(jetbot_ros)
-- Found CUDA: /usr/local/cuda (found version "10.0") 
-- +++ processing catkin package: 'ros_deep_learning'
-- ==> add_subdirectory(ros_deep_learning)
detected ROS1 (catkin_make)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jetbot/workspace/catkin_ws/build
####
#### Running command: "make -j2 -l2" in "/home/jetbot/workspace/catkin_ws/build"
####
Scanning dependencies of target jetbot_camera
Scanning dependencies of target segnet
[  3%] Building CXX object jetbot_ros/CMakeFiles/jetbot_camera.dir/src/jetbot_camera.cpp.o
[  7%] Building CXX object ros_deep_learning/CMakeFiles/segnet.dir/src/node_segnet.cpp.o
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘bool publish_overlay(uint32_t, uint32_t)’:
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:66:74: error: no matching function for call to ‘segNet::Overlay(imageConverter::PixelType*, uint32_t&, uint32_t&, segNet::FilterMode&)’
  if( !net->Overlay(overlay_cvt->ImageGPU(), width, height, overlay_filter) )
                                                                          ^
In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:
/usr/local/include/jetson-inference/segNet.h:212:7: note: candidate: bool segNet::Overlay(float*, uint32_t, uint32_t, segNet::FilterMode)
  bool Overlay( float* output, uint32_t width, uint32_t height, FilterMode filter=FILTER_LINEAR );
       ^~~~~~~
/usr/local/include/jetson-inference/segNet.h:212:7: note:   no known conversion for argument 1 from ‘imageConverter::PixelType* {aka uchar3*}’ to ‘float*’
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘bool publish_mask_color(uint32_t, uint32_t)’:
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:91:71: error: no matching function for call to ‘segNet::Mask(imageConverter::PixelType*, uint32_t&, uint32_t&, segNet::FilterMode&)’
  if( !net->Mask(mask_color_cvt->ImageGPU(), width, height, mask_filter) )
                                                                       ^
In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:
/usr/local/include/jetson-inference/segNet.h:195:7: note: candidate: bool segNet::Mask(uint8_t*, uint32_t, uint32_t)
  bool Mask( uint8_t* output, uint32_t width, uint32_t height );
       ^~~~
/usr/local/include/jetson-inference/segNet.h:195:7: note:   candidate expects 3 arguments, 4 provided
/usr/local/include/jetson-inference/segNet.h:200:7: note: candidate: bool segNet::Mask(float*, uint32_t, uint32_t, segNet::FilterMode)
  bool Mask( float* output, uint32_t width, uint32_t height, FilterMode filter=FILTER_LINEAR );
       ^~~~
/usr/local/include/jetson-inference/segNet.h:200:7: note:   no known conversion for argument 1 from ‘imageConverter::PixelType* {aka uchar3*}’ to ‘float*’
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘void img_callback(sensor_msgs::ImageConstPtr)’:
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:144:88: error: no matching function for call to ‘segNet::Process(imageConverter::PixelType*, uint32_t, uint32_t)’
  if( !net->Process(input_cvt->ImageGPU(), input_cvt->GetWidth(), input_cvt->GetHeight()) )
                                                                                        ^
In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:
/usr/local/include/jetson-inference/segNet.h:189:7: note: candidate: bool segNet::Process(float*, uint32_t, uint32_t, const char*)
  bool Process( float* input, uint32_t width, uint32_t height, const char* ignore_class="void" );
       ^~~~~~~
/usr/local/include/jetson-inference/segNet.h:189:7: note:   no known conversion for argument 1 from ‘imageConverter::PixelType* {aka uchar3*}’ to ‘float*’
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:1454: recipe for target 'ros_deep_learning/CMakeFiles/segnet.dir/all' failed
make[1]: *** [ros_deep_learning/CMakeFiles/segnet.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 11%] Building CXX object jetbot_ros/CMakeFiles/jetbot_camera.dir/src/image_converter.cpp.o
[ 15%] Linking CXX executable /home/jetbot/workspace/catkin_ws/devel/lib/jetbot_ros/jetbot_camera
[ 15%] Built target jetbot_camera
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j2 -l2" failed

checkout the branch 0ad346df2b712d19d5647d8d45886fe1279efda8 of ros_deep_learning and use that with the 20200714 branch of the jetson-inference

Savigoyal89 commented 4 years ago

I have the same error with the JetPack 4.3. I was able to build the jetson_ros with the 20200714 branch of the jetson-inference, however the branch was not compatible with the latest ros_deep_learning. Which ros_deep_learning revision should I use? What I tried is below.

$ cd ~/workspaces # install latest jetson-utils
$ git clone https://github.com/dusty-nv/jetson-utils.git
$  cd jetson-utils/
$  mkdir build
$  cd build/
$  cmake ../
$  make
$  sudo make install
$ cd ~/workspaces/jetson-inference # checkout the specific branch and rebuild it
$ git checkout 20200714
$ cd build/
$ cmake ../
$ make
$ sudo make install
$ cd ~/workspace/catkin_ws/
$ rm -fr build devel
$ ls src
CMakeLists.txt  jetbot_ros  ros_deep_learning
$ catkin_make 
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 2 packages in topological order:
-- ~~  - jetbot_ros
-- ~~  - ros_deep_learning
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'jetbot_ros'
-- ==> add_subdirectory(jetbot_ros)
-- Found CUDA: /usr/local/cuda (found version "10.0") 
-- +++ processing catkin package: 'ros_deep_learning'
-- ==> add_subdirectory(ros_deep_learning)
detected ROS1 (catkin_make)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jetbot/workspace/catkin_ws/build
####
#### Running command: "make -j2 -l2" in "/home/jetbot/workspace/catkin_ws/build"
####
Scanning dependencies of target jetbot_camera
Scanning dependencies of target segnet
[  3%] Building CXX object jetbot_ros/CMakeFiles/jetbot_camera.dir/src/jetbot_camera.cpp.o
[  7%] Building CXX object ros_deep_learning/CMakeFiles/segnet.dir/src/node_segnet.cpp.o
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘bool publish_overlay(uint32_t, uint32_t)’:
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:66:74: error: no matching function for call to ‘segNet::Overlay(imageConverter::PixelType*, uint32_t&, uint32_t&, segNet::FilterMode&)’
  if( !net->Overlay(overlay_cvt->ImageGPU(), width, height, overlay_filter) )
                                                                          ^
In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:
/usr/local/include/jetson-inference/segNet.h:212:7: note: candidate: bool segNet::Overlay(float*, uint32_t, uint32_t, segNet::FilterMode)
  bool Overlay( float* output, uint32_t width, uint32_t height, FilterMode filter=FILTER_LINEAR );
       ^~~~~~~
/usr/local/include/jetson-inference/segNet.h:212:7: note:   no known conversion for argument 1 from ‘imageConverter::PixelType* {aka uchar3*}’ to ‘float*’
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘bool publish_mask_color(uint32_t, uint32_t)’:
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:91:71: error: no matching function for call to ‘segNet::Mask(imageConverter::PixelType*, uint32_t&, uint32_t&, segNet::FilterMode&)’
  if( !net->Mask(mask_color_cvt->ImageGPU(), width, height, mask_filter) )
                                                                       ^
In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:
/usr/local/include/jetson-inference/segNet.h:195:7: note: candidate: bool segNet::Mask(uint8_t*, uint32_t, uint32_t)
  bool Mask( uint8_t* output, uint32_t width, uint32_t height );
       ^~~~
/usr/local/include/jetson-inference/segNet.h:195:7: note:   candidate expects 3 arguments, 4 provided
/usr/local/include/jetson-inference/segNet.h:200:7: note: candidate: bool segNet::Mask(float*, uint32_t, uint32_t, segNet::FilterMode)
  bool Mask( float* output, uint32_t width, uint32_t height, FilterMode filter=FILTER_LINEAR );
       ^~~~
/usr/local/include/jetson-inference/segNet.h:200:7: note:   no known conversion for argument 1 from ‘imageConverter::PixelType* {aka uchar3*}’ to ‘float*’
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘void img_callback(sensor_msgs::ImageConstPtr)’:
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:144:88: error: no matching function for call to ‘segNet::Process(imageConverter::PixelType*, uint32_t, uint32_t)’
  if( !net->Process(input_cvt->ImageGPU(), input_cvt->GetWidth(), input_cvt->GetHeight()) )
                                                                                        ^
In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:
/usr/local/include/jetson-inference/segNet.h:189:7: note: candidate: bool segNet::Process(float*, uint32_t, uint32_t, const char*)
  bool Process( float* input, uint32_t width, uint32_t height, const char* ignore_class="void" );
       ^~~~~~~
/usr/local/include/jetson-inference/segNet.h:189:7: note:   no known conversion for argument 1 from ‘imageConverter::PixelType* {aka uchar3*}’ to ‘float*’
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:1454: recipe for target 'ros_deep_learning/CMakeFiles/segnet.dir/all' failed
make[1]: *** [ros_deep_learning/CMakeFiles/segnet.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 11%] Building CXX object jetbot_ros/CMakeFiles/jetbot_camera.dir/src/image_converter.cpp.o
[ 15%] Linking CXX executable /home/jetbot/workspace/catkin_ws/devel/lib/jetbot_ros/jetbot_camera
[ 15%] Built target jetbot_camera
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j2 -l2" failed

checkout the branch 0ad346df2b712d19d5647d8d45886fe1279efda8 of ros_deep_learning and use that with the 20200714 branch of the jetson-inference

Are you able to sends the pwm commands to the motor controller, did test Motor Commands have worked on your Robot?

dusty-nv commented 4 years ago

Just wondered is this fixed now as i have the same issue when doing 1st time install on new jetbot ?

Sorry for the delay - this jetbot_ros repo is now patched in commit c7d0e6 to work with jetson-inference master and ros_deep_learning master.

lift-zpz commented 3 years ago

I have the same error with the JetPack 4.3. I was able to build the jetson_ros with the 20200714 branch of the jetson-inference, however the branch was not compatible with the latest ros_deep_learning. Which ros_deep_learning revision should I use?

What I tried is below.

$ cd ~/workspaces # install latest jetson-utils
$ git clone https://github.com/dusty-nv/jetson-utils.git
$  cd jetson-utils/
$  mkdir build
$  cd build/
$  cmake ../
$  make
$  sudo make install
$ cd ~/workspaces/jetson-inference # checkout the specific branch and rebuild it
$ git checkout 20200714
$ cd build/
$ cmake ../
$ make
$ sudo make install
$ cd ~/workspace/catkin_ws/
$ rm -fr build devel
$ ls src
CMakeLists.txt  jetbot_ros  ros_deep_learning
$ catkin_make 
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 2 packages in topological order:
-- ~~  - jetbot_ros
-- ~~  - ros_deep_learning
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'jetbot_ros'
-- ==> add_subdirectory(jetbot_ros)
-- Found CUDA: /usr/local/cuda (found version "10.0") 
-- +++ processing catkin package: 'ros_deep_learning'
-- ==> add_subdirectory(ros_deep_learning)
detected ROS1 (catkin_make)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jetbot/workspace/catkin_ws/build
####
#### Running command: "make -j2 -l2" in "/home/jetbot/workspace/catkin_ws/build"
####
Scanning dependencies of target jetbot_camera
Scanning dependencies of target segnet
[  3%] Building CXX object jetbot_ros/CMakeFiles/jetbot_camera.dir/src/jetbot_camera.cpp.o
[  7%] Building CXX object ros_deep_learning/CMakeFiles/segnet.dir/src/node_segnet.cpp.o
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘bool publish_overlay(uint32_t, uint32_t)’:
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:66:74: error: no matching function for call to ‘segNet::Overlay(imageConverter::PixelType*, uint32_t&, uint32_t&, segNet::FilterMode&)’
  if( !net->Overlay(overlay_cvt->ImageGPU(), width, height, overlay_filter) )
                                                                          ^
In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:
/usr/local/include/jetson-inference/segNet.h:212:7: note: candidate: bool segNet::Overlay(float*, uint32_t, uint32_t, segNet::FilterMode)
  bool Overlay( float* output, uint32_t width, uint32_t height, FilterMode filter=FILTER_LINEAR );
       ^~~~~~~
/usr/local/include/jetson-inference/segNet.h:212:7: note:   no known conversion for argument 1 from ‘imageConverter::PixelType* {aka uchar3*}’ to ‘float*’
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘bool publish_mask_color(uint32_t, uint32_t)’:
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:91:71: error: no matching function for call to ‘segNet::Mask(imageConverter::PixelType*, uint32_t&, uint32_t&, segNet::FilterMode&)’
  if( !net->Mask(mask_color_cvt->ImageGPU(), width, height, mask_filter) )
                                                                       ^
In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:
/usr/local/include/jetson-inference/segNet.h:195:7: note: candidate: bool segNet::Mask(uint8_t*, uint32_t, uint32_t)
  bool Mask( uint8_t* output, uint32_t width, uint32_t height );
       ^~~~
/usr/local/include/jetson-inference/segNet.h:195:7: note:   candidate expects 3 arguments, 4 provided
/usr/local/include/jetson-inference/segNet.h:200:7: note: candidate: bool segNet::Mask(float*, uint32_t, uint32_t, segNet::FilterMode)
  bool Mask( float* output, uint32_t width, uint32_t height, FilterMode filter=FILTER_LINEAR );
       ^~~~
/usr/local/include/jetson-inference/segNet.h:200:7: note:   no known conversion for argument 1 from ‘imageConverter::PixelType* {aka uchar3*}’ to ‘float*’
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp: In function ‘void img_callback(sensor_msgs::ImageConstPtr)’:
/home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:144:88: error: no matching function for call to ‘segNet::Process(imageConverter::PixelType*, uint32_t, uint32_t)’
  if( !net->Process(input_cvt->ImageGPU(), input_cvt->GetWidth(), input_cvt->GetHeight()) )
                                                                                        ^
In file included from /home/jetbot/workspace/catkin_ws/src/ros_deep_learning/src/node_segnet.cpp:26:0:
/usr/local/include/jetson-inference/segNet.h:189:7: note: candidate: bool segNet::Process(float*, uint32_t, uint32_t, const char*)
  bool Process( float* input, uint32_t width, uint32_t height, const char* ignore_class="void" );
       ^~~~~~~
/usr/local/include/jetson-inference/segNet.h:189:7: note:   no known conversion for argument 1 from ‘imageConverter::PixelType* {aka uchar3*}’ to ‘float*’
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:1454: recipe for target 'ros_deep_learning/CMakeFiles/segnet.dir/all' failed
make[1]: *** [ros_deep_learning/CMakeFiles/segnet.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 11%] Building CXX object jetbot_ros/CMakeFiles/jetbot_camera.dir/src/image_converter.cpp.o
[ 15%] Linking CXX executable /home/jetbot/workspace/catkin_ws/devel/lib/jetbot_ros/jetbot_camera
[ 15%] Built target jetbot_camera
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j2 -l2" failed

Hello, I met the same problem with you. Have you solved it?

ReallyCreativeName commented 2 years ago

I tried downloading ros for by jetbot. In the Build Jetson-infernece step in the make command i get following error:

[ 42%] Building CXX object CMakeFiles/jetson-inference.dir/plugins/FlattenConcat.cpp.o [ 43%] Linking CXX shared library aarch64/lib/libjetson-inference.so /usr/bin/ld: cannot find -lnvcaffe_parser collect2: error: ld returned 1 exit status CMakeFiles/jetson-inference.dir/build.make:335: recipe for target 'aarch64/lib/libjetson-inference.so' failed make[2]: [aarch64/lib/libjetson-inference.so] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/jetson-inference.dir/all' failed make[1]: [CMakeFiles/jetson-inference.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

Is this a known issue? - How do i resolve this? Thanks in advance for any help :)