How to make ardrone autonomy package work on Jetson Nano? - ros

I'm working on a Jetson Nano board and I need to connect it with a parrot ar drone 2.0, so in order to do that I would like to use the ardrone_autonomy package, but I can't do that because jetson has Ubuntu 18, which only supports ROS Melodic, which doesn't have this package.
Here is what I tried:
I built the package from this repository:
https://github.com/dsapandora/ardrone_autonomy
But I obtained this error:
/tmp/ccIoQjBo.s: Assembler messages:
/tmp/ccIoQjBo.s:128: Error: unknown mnemonic `bswap' -- `bswap x3'
generic.makefile:231: recipe for target '../../Soft/Build/targets_versions/vlib_PROD_MODE_Linux_4.9.140-tegra_GNU_Linux_usrbingcc_5.4.0/video_mem32.o' failed
make[8]: *** [../../Soft/Build/targets_versions/vlib_PROD_MODE_Linux_4.9.140-tegra_GNU_Linux_usrbingcc_5.4.0/video_mem32.o] Error 1
vlib.makefile:104: recipe for target 'all' failed
make[7]: *** [all] Error 2
Makefile:167: recipe for target 'build_vlib' failed
make[6]: *** [build_vlib] Error 2
Makefile:170: recipe for target 'all' failed
make[5]: *** [all] Error 2
Makefile:84: recipe for target 'build_libs' failed
make[4]: *** [build_libs] Error 2
Makefile:20: recipe for target 'all' failed
make[3]: *** [all] Error 2
ardrone_autonomy/CMakeFiles/ardronelib.dir/build.make:110: recipe for target '/catkin_ws/devel/src/ardronelib-stamp/ardronelib-build' failed
make[2]: *** [/catkin_ws/devel/src/ardronelib-stamp/ardronelib-build] Error 2
CMakeFiles/Makefile2:578: recipe for target 'ardrone_autonomy/CMakeFiles/ardronelib.dir/all' failed
make[1]: *** [ardrone_autonomy/CMakeFiles/ardronelib.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
After I resolved that using almost any solution from here:
https://github.com/AutonomyLab/ardrone_autonomy/issues/71
I can compile the package without problems but when I try to run the node, it says that the ardrone_driver has died, without any other information.
2.Then I tried to build the package in a docker under ROS Kinetic, but after getting the same bswap error as above, after applying the above solution I get this:
/tmp/ccFs5LFZ.s: Assembler messages:
/tmp/ccFs5LFZ.s:130: Error: unexpected characters following instruction at operand 2 -- `mov x4,x4,ror#8'
generic.makefile:231: recipe for target '../../Soft/Build/targets_versions/vlib_PROD_MODE_Linux_4.9.140- tegra_GNU_Linux_usrbingcc_5.4.0/video_mem32.o' failed
make[8]: *** [../../Soft/Build/targets_versions /vlib_PROD_MODE_Linux_4.9.140-tegra_GNU_Linux_usrbingcc_5.4.0 /video_mem32.o] Error 1
vlib.makefile:110: recipe for target 'all' failed
make[7]: *** [all] Error 2
Makefile:167: recipe for target 'build_vlib' failed
make[6]: *** [build_vlib] Error 2
Makefile:170: recipe for target 'all' failed
make[5]: *** [all] Error 2
Makefile:84: recipe for target 'build_libs' failed
make[4]: *** [build_libs] Error 2
Makefile:24: recipe for target 'all' failed
make[3]: *** [all] Error 2
ardrone_autonomy/CMakeFiles/ardronelib.dir/build.make:110: recipe for target '/ardrone_ws/devel/src/ardronelib-stamp/ardronelib-build' failed
make[2]: *** [/ardrone_ws/devel/src/ardronelib-stamp/ardronelib-build] Error 2
CMakeFiles/Makefile2:578: recipe for target 'ardrone_autonomy/CMakeFiles/ardronelib.dir/all' failed
make[1]: *** [ardrone_autonomy/CMakeFiles/ardronelib.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 2%] Built target _ardrone_autonomy_generate_messages_check_deps_matrix33
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j2" failed
And here is where I'm stuck, because as much as I know it is a problem of processor architecture (Jetson uses armv8), and all the above solutions are for armv7, but I don't know how to solve this. Please let me know if anyone else found a solution to this problem. Any help would be highly appreciated!

I finally solved the problem, here are the complete steps, if there is someone else who is struggling with the same problems:
I downloaded the docker image using:
sudo docker pull ros:kinetic-robot-xenial
And then followed this steps to run the image: http://wiki.ros.org/docker/Tutorials/Docker
The I cloned the ardrone_autonomy package in a worksapce, from the above link:
mkdir -p catkin_ws/src
cd catkin_ws/src
git clone https://github.com/dsapandora/ardrone_autonomy.git
apt-get update
cd ../
rosdep install --from-paths src --ignore-src -r -y
catkin_make
After the error with bswap appears, edit this file: devel/src/ardronelib/ARDroneLib/VP_SDK/VP_Os/linux/intrin.h and replace:
static INLINE uint32_t _byteswap_ulong(uint32_t value)
{
__asm("bswap %0":
"=r" (value):
"0" (value));
return value;
}
with this:
static INLINE uint32_t _byteswap_ulong(uint32_t value)
{
int32_t tmp;
__asm __volatile(
"eor %1, %2, %2, ror #16\n"
"bic %1, %1, #0x00ff0000\n"
"mov %0, %2, ror #8\n"
"eor %0, %0, %1, lsr #8"
: "=r" (value), "=r" (tmp)
: "r" (value)
);
return value;
}
and comment this line: _BitScanReverse(&index, code);
After you do this if you try to give it a catkin_make it should appear the last error which can be resolved "simply" (after you understand what is happening there :) ) just by replacing this line (from the same file as above):
"mov %0, %2, ror #8\n"
with:
"mov %0, %2\n"
and now should work just fine.
PS: Don't forget to source your workspace.

AR Drone 2.0 is still compatible.
Just Downgrade the firmware to 2.4.1 (i use this one) from
https://www.espaciodrone.com/todos-los-firmware-del-ar-drone-1-y-2/
Power up your AR.Drone
Connect your computer to the AR.Drone’s network
Open a telnet session to 192.168.1.1
type the following: echo "1.1.1" > /firmware/version.txt
press enter
type the following: echo "2.4.1" > /update/version.txt
Connect an FTP client to: 192.168.1.1 Port: 5551 (i use nautilius ctrl + l then ftp://192.168.1.1:5551)
Upload the downloaded plf file to the FTP server (AR.Drone)
Disconnect your computer from the AR.Drone
Disconnect the battery from the AR.Drone
Reconnect the battery
Wait about 5 minutes while the upgrade completes, leave your drone switched on
And use this git clone https://github.com/dsapandora/ardrone...
It works like a charm...

Related

AzerothCore Docker build cmake error: No rule to make target

I'm trying to setup AzerothCore using Docker, however when I give the command:
./bin/acore-docker-build
It fails with:
make[2]: *** No rule to make target '../src/server/game/Entities/Item/ItemPrototype.h', needed by 'src/server/game/cotire/game_CXX_prefix.hxx.pch'. Stop.
CMakeFiles/Makefile2:936: recipe for target 'src/server/game/CMakeFiles/game.dir/all' failed
make[1]: *** [src/server/game/CMakeFiles/game.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** No rule to make target '../src/server/game/Entities/Item/ItemPrototype.h', needed by 'src/server/scripts/cotire/scripts_CXX_prefix.hxx.pch'. Stop.
CMakeFiles/Makefile2:1122: recipe for target 'src/server/scripts/CMakeFiles/scripts.dir/all' failed
make[1]: *** [src/server/scripts/CMakeFiles/scripts.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
The problem was in the docker build cache and removing it solved the issue:
sudo ./bin/acore-docker-remove-build-cache
this command will delete the build cache located at docker/build/cache

Docker NodeMCU ESP32 recipe for target 'build' failed

On OSX 10.13.6 I get the following failure in an ESP32 build using marcelstoer/docker-nodemcu-build:
make[3]: *** No rule to make target '/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h', needed by '/opt/nodemcu-firmware/build/luac_cross/uzlib_deflate.d'. Stop.
make[3]: Leaving directory '/opt/nodemcu-firmware/build/luac_cross'
/opt/nodemcu-firmware/components/luac_cross/component.mk:5: recipe for target 'build' failed
make[2]: *** [build] Error 2
make[2]: Leaving directory '/opt/nodemcu-firmware/build/luac_cross'
/opt/nodemcu-firmware/sdk/esp32-esp-idf/make/project.mk:552: recipe for target 'component-luac_cross-build' failed
make[1]: *** [component-luac_cross-build] Error 2
make[1]: Leaving directory '/opt/nodemcu-firmware'
Makefile:18: recipe for target 'all' failed
make: *** [all] Error 2`
Anyone got any suggestions?
Not the answer you were looking for but...
This appears to be a known issue. At https://github.com/nodemcu/nodemcu-firmware/issues/2779 a few people are discussing an issue that looks a lot like yours.

ORB-SLAM2 openCV installation error

I am trying out ORB SLAM2 for further processes of pose estimation. I m installing it in Ubuntu and after installing python, openGL, openCV, C++ compiler, Pangolin, Eigen3, BLAS and LAPACK, I am getting a make error while I install DBoW2.
The error is as follows.
root#wehubs:/src/orbslam2/DBoW2/build# cmake ..
-- Boost version: 1.54.0
DLib library not found in the system, it will be downloaded on build
-- Configuring done
-- Generating done
-- Build files have been written to: /src/orbslam2/DBoW2/build
root#wehubs:/src/orbslam2/DBoW2/build#
root#wehubs:/src/orbslam2/DBoW2/build# make
[ 6%] Performing update step for 'DLib'
Already on 'master'
Your branch is up-to-date with 'origin/master'.
[ 13%] Performing configure step for 'DLib'
-- Configuring done
-- Generating done
-- Build files have been written to: /src/orbslam2/DBoW2/build/dependencies/src/DLib-build
[ 20%] Performing build step for 'DLib'
[ 3%] Building CXX object CMakeFiles/DLib.dir/src/DVision/BRIEF.cpp.o
In file included from /src/orbslam2/DBoW2/build/dependencies/src/DLib/src/DVision/BRIEF.cpp:13:0:
/src/orbslam2/DBoW2/build/dependencies/src/DLib/include/DVision/BRIEF.h:32:28: fatal error: opencv2/core.hpp: No such file or directory
#include <opencv2/core.hpp>
^
compilation terminated.
make[5]: *** [CMakeFiles/DLib.dir/src/DVision/BRIEF.cpp.o] Error 1
make[4]: *** [CMakeFiles/DLib.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [dependencies/src/DLib-stamp/DLib-build] Error 2
make[1]: *** [CMakeFiles/DLib.dir/all] Error 2
make: *** [all] Error 2

OpenCV installation

In file included from /home/lucas/OpenCV/opencv-3.2.0/modules/core/src/hal_internal.cpp:49:0:
/home/lucas/OpenCV/build/opencv_lapack.h:2:45: fatal error: LAPACKE_H_PATH-NOTFOUND/lapacke.h: No such file or directory
compilation terminated.
modules/core/CMakeFiles/opencv_core.dir/build.make:906: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/src/hal_internal.cpp.o' failed
make[2]: * [modules/core/CMakeFiles/opencv_core.dir/src/hal_internal.cpp.o] Error 1
CMakeFiles/Makefile2:1945: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: * [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
I believe this is because my python path is set incorrectly...
install package liblapacke-dev
manually define -DLAPACKE_H_PATH=/usr/include when calling cmake

Error building opencv on a raspberry pi 3

I was following this example and received the following error when running make
In file included from /root/src/opencv-3.1.0/modules/videoio/src/cap_ffmpeg.cpp:45:0:
/root/src/opencv-3.1.0/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function ‘bool OutputMediaStream_FFMPEG::open(const char*, int, int, double)’:
/root/src/opencv-3.1.0/modules/videoio/src/cap_ffmpeg_impl.hpp:2207:41: warning: ignoring return value of ‘int avformat_write_header(AVFormatContext*, AVDictionary**)’, declared with attribute warn_unused_result [-Wunused-result]
avformat_write_header(oc_, NULL);
^
Linking CXX shared library ../../lib/libopencv_videoio.so
/usr/bin/ld: /usr/local/lib/libx264.a(common.o): relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libx264.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:215: recipe for target 'lib/libopencv_videoio.so.3.1.0' failed
make[2]: *** [lib/libopencv_videoio.so.3.1.0] Error 1
CMakeFiles/Makefile2:4058: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:147: recipe for target 'all' failed
make: *** [all] Error 2
I have successfully installed opencv on Raspberry Pi 3 by following the steps in the link http://www.pyimagesearch.com/2015/02/23/install-opencv-and-python-on-your-raspberry-pi-2-and-b/
The changes i made while following the steps are:
Use 'aptitude' instead of 'apt-get' and accept all recommendations given
Before following Step 11, run 'source ~/.profile'. To quit, run 'deactivate'
Hope this helps :)

Resources