Ask Your Question
0

How to make ardrone_autonomy work on ROS Melodic?

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

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
_ardrone_a

utonomy_generate_messages_check_deps_navdata_hdvideo_stream
[  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
1

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

new_wanderer gravatar image

updated 2019-08-26 03:33:56 -0500

I found an answer here.

EDIT:

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: [http://wiki.ros.org/docker/Tutorials/...]

  2. 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
  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"

with:

"mov %0, %2\n"

and now should work just fine.

edit flag offensive delete link more

Comments

1

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

jayess gravatar imagejayess ( 2019-08-13 11:34:43 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 92 times

Last updated: Aug 26