【问题标题】:How to make ardrone autonomy package work on Jetson Nano?如何使 ardrone 自治包在 Jetson Nano 上工作?
【发布时间】:2019-12-12 23:32:18
【问题描述】:

我正在开发 Jetson Nano 板,我需要将它与 parrot ar 无人机 2.0 连接,所以为了做到这一点,我想使用 ardrone_autonomy 包,但我不能这样做,因为 jetson 有Ubuntu 18,只支持ROS Melodic,没有这个包。

这是我尝试过的:

  1. 我从这个存储库构建了包: https://github.com/dsapandora/ardrone_autonomy

但是我得到了这个错误:

/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

在我使用这里的几乎所有解决方案解决了这个问题之后: https://github.com/AutonomyLab/ardrone_autonomy/issues/71

我可以毫无问题地编译包,但是当我尝试运行节点时,它说 ardrone_driver 已死,没有任何其他信息。

2.然后我尝试在 ROS Kinetic 下的 docker 中构建包,但是在得到与上述相同的 bswap 错误后,在应用上述解决方案后,我得到了这个:

/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

这就是我卡住的地方,因为据我所知这是处理器架构的问题(Jetson 使用 armv8),以上所有解决方案都是针对 armv7 的,但我不知道如何解决这个问题.如果其他人找到解决此问题的方法,请告诉我。任何帮助将不胜感激!

【问题讨论】:

    标签: ros ubuntu-18.04 armv8 nvidia-jetson-nano


    【解决方案1】:

    我终于解决了这个问题,这里是完整的步骤,如果有其他人正在努力解决同样的问题:

    1. 我使用以下方式下载了 docker 映像: sudo docker pull ros:kinetic-robot-xenial 然后按照以下步骤运行镜像:http://wiki.ros.org/docker/Tutorials/Docker

    2. 我在一个工作空间中克隆了 ardrone_autonomy 包,来自上面的链接:

    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. 出现bswap 的错误后,编辑此文件:devel/src/ardronelib/ARDroneLib/VP_SDK/VP_Os/linux/intrin.h 并替换:

    static INLINE uint32_t _byteswap_ulong(uint32_t value) { __asm("bswap %0": "=r" (value): "0" (value));

    return value; }

    用这个:

    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; }

    并评论这一行:_BitScanReverse(&index, code);

    1. 执行此操作后,如果您尝试给它一个catkin_make,它应该会出现最后一个可以“简单”解决的错误(在您了解那里发生的事情之后:))只需替换此行(来自相同文件如上):

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

    与:

    "mov %0, %2\n"

    现在应该可以正常工作了。

    PS:不要忘记为您的工作区提供资源。

    【讨论】:

    • 今天只需要前两个步骤就足够了
    【解决方案2】:

    AR Drone 2.0 仍然兼容。

    只需将固件从

    降级到 2.4.1(我使用这个)

    https://www.espaciodrone.com/todos-los-firmware-del-ar-drone-1-y-2/

    启动您的 AR.Drone
    将您的计算机连接到 AR.Drone 的网络
    打开到 192.168.1.1 的 telnet 会话
    键入以下内容: echo "1.1.1" > /firmware/version.txt
    按回车
    键入以下内容: echo "2.4.1" > /update/version.txt
    将 FTP 客户端连接到:192.168.1.1 端口:5551(我使用 nautilius ctrl + l 然后ftp://192.168.1.1:5551)
    将下载的 plf 文件上传到 FTP 服务器(AR.Drone)
    断开计算机与 AR.Drone 的连接
    从 AR.Drone 断开电池
    重新连接电池
    升级完成后等待大约 5 分钟,让您的无人机保持开启状态

    并使用这个 git clone https://github.com/dsapandora/ardrone..。

    它就像一个魅力......

    【讨论】:

      猜你喜欢
      • 2019-12-23
      • 2021-10-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-18
      • 2021-06-17
      • 2020-10-17
      • 2021-04-21
      相关资源
      最近更新 更多