Build DJI Guidance SDK ROS pkg for ARM64 architecture (Jetson Nano)

asked 2020-02-04 10:54:20 -0500

kaponloto gravatar image

updated 2020-02-04 11:49:12 -0500

gvdhoorn gravatar image

Hello, I have installed ROS on Jetson Nano following the instructions given at https://github.com/jetsonhacks/instal... Running DJI on board SDK works fine although i cant build Guidance SDK on ARM64. Up to this point, i needed to install arm-linux-gnueabi-g++ compiler in order to recognize libDJI_guidance.so. I also needed to cross compile opencv3. Right now i'm facing the following error when building guidance pkg.

Base path: /home/jetsonvvr/catkin_ws
Source space: /home/jetsonvvr/catkin_ws/src
Build space: /home/jetsonvvr/catkin_ws/build
Devel space: /home/jetsonvvr/catkin_ws/devel
Install space: /home/jetsonvvr/catkin_ws/install
Whitelisted packages: guidance

Running command: "make cmake_check_build_system" in "/home/jetsonvvr/catkin_ws/build"
Running command: "make -j4 -l4" in "/home/jetsonvvr/catkin_ws/build"
[ 12%] Linking CXX executable /home/jetsonvvr/catkin_ws/devel/lib/guidance/guidanceNode
[ 25%] Linking CXX executable /home/jetsonvvr/catkin_ws/devel/lib/guidance/guidanceNodeTest
[ 37%] Linking CXX executable /home/jetsonvvr/catkin_ws/devel/lib/guidance/guidanceNodeCalibration

****/opt/ros/melodic/lib/libroscpp.so: file not recognized: File format not recognized**

/opt/ros/melodic/lib/libroscpp.so: file not recognized: File format not recognized

/opt/ros/melodic/lib/libroscpp.so: file not recognized: File format not recognize

collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status

Guidance-SDK-ROS/CMakeFiles/guidanceNode.dir/build.make:149: recipe for target '/home/jetsonvvr/catkin_ws/devel/lib/guidance/guidanceNode' failed
make[2]: * [/home/jetsonvvr/catkin_ws/devel/lib/guidance/guidanceNode] Error 1
Guidance-SDK-ROS/CMakeFiles/guidanceNodeCalibration.dir/build.make:149: recipe for target '/home/jetsonvvr/catkin_ws/devel/lib/guidance/guidanceNodeCalibration' failed
make[2]: * [/home/jetsonvvr/catkin_ws/devel/lib/guidance/guidanceNodeCalibration] Error 1
CMakeFiles/Makefile2:1269: recipe for target 'Guidance-SDK-ROS/CMakeFiles/guidanceNode.dir/all' failed
make[1]: * [Guidance-SDK-ROS/CMakeFiles/guidanceNode.dir/all] Error 2
make[1]: * Waiting for unfinished jobs....
CMakeFiles/Makefile2:459: recipe for target 'Guidance-SDK-ROS/CMakeFiles/guidanceNodeCalibration.dir/all' failed
make[1]: * [Guidance-SDK-ROS/CMakeFiles/guidanceNodeCalibration.dir/all] Error 2
Guidance-SDK-ROS/CMakeFiles/guidanceNodeTest.dir/build.make:123: recipe for target '/home/jetsonvvr/catkin_ws/devel/lib/guidance/guidanceNodeTest' failed
make[2]: * [/home/jetsonvvr/catkin_ws/devel/lib/guidance/guidanceNodeTest] Error 1
CMakeFiles/Makefile2:496: recipe for target 'Guidance-SDK-ROS/CMakeFiles/guidanceNodeTest.dir/all' failed
make[1]: * [Guidance-SDK-ROS/CMakeFiles/guidanceNodeTest.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: * [all] Error 2

My cmake list if the following:

cmake_minimum_required(VERSION 2.8.3)
project(guidance)

SET ( CMAKE_CROSSCOMPILING TRUE)

SET ( CMAKE_C_COMPILER "arm-linux-gnueabi-g++" )

SET ( CMAKE_CXX_COMPILER "arm-linux-gnueabi-g++" )

SET(CMAKE_FIND_ROOT_PATH /usr/arm-linux-gnueabi)

SET (CMAKE_PREFIX_PATH "/home/jetsonvvr/Documents/Libraries/opencv3/opencv/build/install/share/OpenCV")

SET (OpenCV_INCLUDE_DIRS "/home/jetsonvvr/Documents/Libraries/opencv3/opencv/build/install/include")

SET (OpenCV_LIBS "/home/jetsonvvr/Documents/Libraries/opencv3/opencv/build/install/lib")

find_package(catkin REQUIRED COMPONENTS
roscpp
cv_bridge
std_msgs
sensor_msgs
geometry_msgs
)
find_package(OpenCV 3 REQUIRED core highgui)

catkin_package(
)

include_directories(
${OpenCV_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
include
)

message("System is: " ${CMAKE_SYSTEM_PROCESSOR})
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
message("-- 32bit detected")
link_directories(lib/x86)
elseif (CMAKE_SIZEOF_VOID_P EQUAL sunglasses
message("-- 64bit detected")
link_directories(lib/x64)
endif ()
else()
message("-- Non-linux platform detected but sorry we do not support grinning ...
(more)
edit retag flag offensive close merge delete