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...
I'm Using Kaa Opensource IoT platform to control GPIO of ESP8266. Im using ESP-01 module for this project. Im using this example. Getting error while compiling the code
[ 93%] Building C object CMakeFiles/demo_client_s.dir/src/kaa_demo.c.obj
/home/sse/Kaa/ESP8266/kaa_gpio_esp8266_example/src/kaa_demo.c:23:40: fatal error: gen/kaa_remote_control_ecf.h: No such file or directory
#include <gen/kaa_remote_control_ecf.h>
^
compilation terminated.
CMakeFiles/demo_client_s.dir/build.make:62: recipe for target 'CMakeFiles/demo_client_s.dir/src/kaa_demo.c.obj' failed
make[2]: *** [CMakeFiles/demo_client_s.dir/src/kaa_demo.c.obj] Error 1
CMakeFiles/Makefile2:69: recipe for target 'CMakeFiles/demo_client_s.dir/all' failed
make[1]: *** [CMakeFiles/demo_client_s.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
there is a file missing named gen/kaa_remote_control_ecf.h Im not able to locate this file anywhere.
Is there any other way to find this file?
I'm using latest Kaa SDK 0.10.
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
I'm using an Arch machine and trying to compile ROS desktop full from source. The build fails when image_proc is trying to link executable.
Here is the error log:
[ 23%] Built target image_proc_gencfg
[ 84%] Built target image_proc
[ 92%] Linking CXX executable /home/alphayed/ROS/ros_catkin_ws/devel_isolated/image_proc/lib/image_proc/image_proc
/home/alphayed/ROS/ros_catkin_ws/install_isolated/lib/libopencv_viz3.so.3.1.0: undefined reference to `vtkSTLReader::New()'
/home/alphayed/ROS/ros_catkin_ws/install_isolated/lib/libopencv_viz3.so.3.1.0: undefined reference to `vtkOBJReader::New()'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/image_proc_exe.dir/build.make:219: /home/alphayed/ROS/ros_catkin_ws/devel_isolated/image_proc/lib/image_proc/image_proc] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/image_proc_exe.dir/all] Error 2
make: *** [Makefile:139: all] Error 2
I think the problem is related to opencv3. I removed it from the system and recompiled it from source but that didn't solve the issue. Can you please help?
I have found a fix as per this thread. You need to modify opencv3/cmake/OpenCVDetectVTK.cmake, for every find_package(VTK QUIET COMPONENTS ... add an entry vtkIOGeometry
I have tried to obtain the rpm associated to ContextBroker component (https://github.com/telefonicaid/fiware-orion.git) but I have obtained the following error after executing make rpm.
[ 98%] Building CXX object src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/mongoNotifyContextAvailability.cpp.o
Linking CXX static library libmongoBackend.a
make[4]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
[ 98%] Built target mongoBackend
make[3]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
make[1]: *** [release] Error 2
make[1]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next'
error: Bad exit status from /var/tmp/rpm-tmp.NPtnCN (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.NPtnCN (%build)
make: *** [rpm] Error 1
Previously to this stage I compiled and executed the unit tests as well as functional tests with no problems I am working on Red Hat 4.4.7-3 with repo/branch:
https://github.com/telefonicaid/fiware-orion/tree/release/iotplatform-v1
Thanks for your help
UPDATE:
The linux distribution used was CentOS 6.4
This problems is solved if you install cantcoap and COAP client, as described in the Orion README.md file, then execute make rpm.
Note that although COAP stuff is optional to build the code itself with make release or make debug the RPM building target needs them by the time being (we probably fix this in the future).
UPDATE: the fix of the RPM makefile target is being dealed at this Github.com issue: https://github.com/telefonicaid/fiware-orion/issues/579