ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to make ardrone_autonomy work on ROS Melodic?

asked 2019-07-26 03:48:48 -0600

new_wanderer gravatar image

I need to control an AR Drone from a Jetson Nano which has Ubuntu 18 (ROS Melodic), and I can not compile the ardrone_autonomy package, because when I try, it gives me the next errors:

Base path: /home/jetson/ardrone_ws Source space: /home/jetson/ardrone_ws/src Build space: /home/jetson/ardrone_ws/build Devel space: /home/jetson/ardrone_ws/devel Install space: /home/jetson/ardrone_ws/install
#### Running command: "make cmake_check_build_system" in "/home/jetson/ardrone_ws/build"
#### Running command: "make -j4 -l4" in "/home/jetson/ardrone_ws/build"
#### [  1%] Performing update step for 'ardronelib' [  2%] Performing configure step for 'ardronelib' No configure [  2%] Built target

[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_zimmu_3000
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_vector31
[  2%] Performing build step for 'ardronelib'
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
Libs already extracted
Building target static
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_kalman_pressure
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_LedAnim
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_time
[  2%] Built target geometry_msgs_generate_messages_cpp
Architecture aarch64 is already built
Creating universal static lib file from architectures aarch64
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_vision_perf
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_vision_detect
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_rc_references
Build done.
Building ARDroneTool/Lib
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_CamSelect
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_wifi
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_vision_of
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_raw_measures
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_pressure_raw
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_gyros_offsets
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_altitude
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_RecordEnable
[  2%] Built target std_msgs_generate_messages_cpp
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_wind_speed
cc video_mem32.c
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_euler_angles
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_magneto
/tmp/cc159hYQ.s: Assembler messages:
/tmp/cc159hYQ.s:130: Error: unknown mnemonic `bswap' -- `bswap x3'
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_demo
generic.makefile:231: recipe for target '../../Soft/Build/targets_versions/vlib_PROD_MODE_Linux_4.9.140-tegra_GNU_Linux_usrbingcc_7.4.0/video_mem32.o' failed
make[8]: *** [../../Soft/Build/targets_versions/vlib_PROD_MODE_Linux_4.9.140-tegra_GNU_Linux_usrbingcc_7.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 '/home/jetson/ardrone_ws/devel/src/ardronelib-stamp/ardronelib-build' failed
make[2]: *** [/home/jetson/ardrone_ws/devel/src/ardronelib-stamp/ardronelib-build] Error 2
CMakeFiles/Makefile2:2963: 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
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_phys_measures
[  2%] Built target _ardrone_autonomy_generate_messages_check_deps_navdata_vision
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

As much as I know it is a problem of using ardrone_autonomy package in ROS Melodic, and I couldn't find any solutions, so any help would be highly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-08-13 10:21:08 -0600

new_wanderer gravatar image

updated 2021-04-26 06:43:59 -0600

I found an answer here.

26.04.2021 EDIT: Only the first two steps are sufficient for making it work in ROS Melodic, the rest of the steps are important only if you try this on a Jetson. Also you can take an already working docker container with everything inside: docker pull funderburger/ardrone_autonomy_ros_ubuntu_16:latest (some more info here. )


So, basically, the answer I found it is not exactly what I want, because that guy use a docker container, but for now it works. So the steps I followed are exactly this (in case the page disappears):

  1. I downloaded the docker image using:

    sudo docker pull ros:kinetic-robot-xenial

    And then followed this steps to run the image: []

  2. Then I cloned the ardrone_autonomy package in a worksapce, from the above link:

 mkdir -p catkin_ws/src
 cd catkin_ws/src
 git clone
 apt-get update
 cd ../
 rosdep install --from-paths src --ignore-src -r -y
  1. 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);

  1. After you do this if you try to give it a catkin_make it should appear the last error which can be resolved by replacing this line (from the same file as above):

"mov %0, %2, ror #8\n"


"mov %0, %2\n"

and now should work just fine.

edit flag offensive delete link more



Can you please update your solution with the relevant steps? Linked pages can and often do disappear (even from Stack Overflow)

jayess gravatar image jayess  ( 2019-08-13 11:34:43 -0600 )edit

Question Tools


Asked: 2019-07-26 03:47:25 -0600

Seen: 1,607 times

Last updated: Apr 26 '21