utiasSTARS / PX4-PhoenixDrone

PX4 Source Code for Phoenix Tail-sitter
Other
7 stars 10 forks source link

NuttX @ 44ad7e2 #10

Closed mengchaoheng closed 3 years ago

mengchaoheng commented 3 years ago

Hi, I can't clone the submodule NuttX @ 44ad7e2, can you help me ? the link is 404 now.

yilun-wu commented 3 years ago

Hi, I can open the link on my browser in incognito mode, the submodule should be accessible - https://github.com/PX4/PX4NuttX/tree/44ad7e224c1ef17911ab8b4101fd624ad9ee4177

mengchaoheng commented 3 years ago

but the PX4NuttX/misc/tools is 404. I really need you help!!!

mengchaoheng commented 3 years ago

I saw your paper at ICRA2019. I am very interested in your project. You did a great job! I found that the submodules of the project have become invalid, I mean PX4NuttX/misc/tools. Can you package the compiled program and send it to me?

yilun-wu commented 3 years ago

Does the code compile without that submodule? If not, could you post the output?

mengchaoheng commented 3 years ago

Does the code compile without that submodule? If not, could you post the output?

Cannot compile, because it fails during the submodule clone update stage, which means that the complete code cannot be downloaded. The cloned and compiled results are as follows:

mch@ubuntu:~/PX4-PhoenixDrone$ git submodule update --init --recursive

Cloning into 'misc/tools'... Username for 'https://github.com': Password for 'https://github.com': remote: Repository not found. fatal: Authentication failed for 'https://github.com/PX4-NuttX/tools.git/' fatal: clone of 'https://github.com/PX4-NuttX/tools.git' into submodule path 'misc/tools' failed Failed to recurse into submodule path 'NuttX'

mch@ubuntu:~/PX4-PhoenixDrone$ make nuttx_px4fmu-v4_tailsitter

PX4 CONFIG: /home/mch/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter ninja: Entering directory `/home/mch/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter' ninja: error: '../NuttX/fs/mmap/README.txt', needed by 'nuttx_copy_px4fmu-v4.stamp', missing and no known rule to make it Makefile:140: recipe for target 'nuttx_px4fmu-v4_tailsitter' failed make: *** [nuttx_px4fmu-v4_tailsitter] Error 1

When I use the official new NuttX to compile, even if I switch to the old version, I still get an error. The compilation result is as follows:

mch@ubuntu:~/ICRA/PX4-PhoenixDrone$ make nuttx_px4fmu-v4_tailsitter

PX4 CONFIG: /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter ninja: Entering directory `/home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter' [1/618] Applying /home/mch/ICRA/PX4-Ph...patches/wip_inflight_to_upstream.patch FAILED: px4fmu-v4/NuttX/nuttx_patch_wip_inflight_to_upstream.patch-px4fmu-v4.stamp cd /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter && /usr/bin/patch -d /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX -s -p1 -N < /home/mch/ICRA/PX4-PhoenixDrone/nuttx-patches/wip_inflight_to_upstream.patch && /usr/bin/touch /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX/nuttx_patch_wip_inflight_to_upstream.patch-px4fmu-v4.stamp The text leading up to this was:

|diff --git NuttX/nuttx/drivers/usbdev/cdcacm.c NuttX/nuttx/drivers/usbdev/cdcacm.c |index 64e2e68..15f92dd 100644 |--- NuttX/nuttx/drivers/usbdev/cdcacm.c |+++ NuttX/nuttx/drivers/usbdev/cdcacm.c

File to patch: Skip this patch? [y] 1 out of 1 hunk ignored The text leading up to this was:

|diff --git NuttX/nuttx/arch/arm/src/stm32/stm32_serial.c NuttX/nuttx/arch/arm/src/stm32/stm32_serial.c |index 644c810..10919e8 100644 |--- NuttX/nuttx/arch/arm/src/stm32/stm32_serial.c |+++ NuttX/nuttx/arch/arm/src/stm32/stm32_serial.c

File to patch: Skip this patch? [y] 1 out of 1 hunk ignored The text leading up to this was:

|diff --git NuttX/nuttx/arch/arm/src/stm32/stm32f40xxx_rcc.c NuttX/nuttx/arch/arm/src/stm32/stm32f40xxx_rcc.c |index 5e2ba73..adda863 100644 |--- NuttX/nuttx/arch/arm/src/stm32/stm32f40xxx_rcc.c |+++ NuttX/nuttx/arch/arm/src/stm32/stm32f40xxx_rcc.c

File to patch: Skip this patch? [y] 2 out of 2 hunks ignored The text leading up to this was:

|diff --git NuttX/nuttx/arch/arm/src/stm32/stm32_flash.c NuttX/nuttx/arch/arm/src/stm32/stm32_flash.c |index 73f1419..9ac38a1 100644 |--- NuttX/nuttx/arch/arm/src/stm32/stm32_flash.c |+++ NuttX/nuttx/arch/arm/src/stm32/stm32_flash.c

File to patch: Skip this patch? [y] 2 out of 2 hunks ignored [2/618] Applying /home/mch/ICRA/PX4-Ph...nuttx-patches/fix_CRTSCTS-define.patch FAILED: px4fmu-v4/NuttX/nuttx_patch_fix_CRTSCTS-define.patch-px4fmu-v4.stamp cd /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter && /usr/bin/patch -d /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX -s -p1 -N < /home/mch/ICRA/PX4-PhoenixDrone/nuttx-patches/fix_CRTSCTS-define.patch && /usr/bin/touch /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX/nuttx_patch_fix_CRTSCTS-define.patch-px4fmu-v4.stamp The text leading up to this was:

|diff -ruN NuttX/nuttx/include/termios.h NuttX/nuttx/include/termios.h |--- NuttX/nuttx/include/termios.h 1969-12-31 14:00:00.000000000 -1000 |+++ NuttX/nuttx/include/termios.h 2014-12-25 17:33:53.404950574 -1000

File to patch: Skip this patch? [y] 1 out of 1 hunk ignored [3/618] Applying /home/mch/ICRA/PX4-PhoenixDrone/nuttx-patches/c++11.patch FAILED: px4fmu-v4/NuttX/nuttx_patch_c++11.patch-px4fmu-v4.stamp cd /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter && /usr/bin/patch -d /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX -s -p1 -N < /home/mch/ICRA/PX4-PhoenixDrone/nuttx-patches/c++11.patch && /usr/bin/touch /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX/nuttx_patch_c++11.patch-px4fmu-v4.stamp The text leading up to this was:

|diff --git NuttX/nuttx/include/cxx/cwchar NuttX/nuttx/include/cxx/cwchar |index 67716ab..a6c6cfe 100755 |--- NuttX/nuttx/include/cxx/cwchar |+++ NuttX/nuttx/include/cxx/cwchar

File to patch: Skip this patch? [y] 1 out of 1 hunk ignored [4/618] Applying /home/mch/ICRA/PX4-Ph...ttx-patches/Fixed-Shadow-wanings.patch FAILED: px4fmu-v4/NuttX/nuttx_patch_Fixed-Shadow-wanings.patch-px4fmu-v4.stamp cd /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter && /usr/bin/patch -d /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX -s -p1 -N < /home/mch/ICRA/PX4-PhoenixDrone/nuttx-patches/Fixed-Shadow-wanings.patch && /usr/bin/touch /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX/nuttx_patch_Fixed-Shadow-wanings.patch-px4fmu-v4.stamp The text leading up to this was:

|diff --git NuttX/nuttx/include/signal.h NuttX/nuttx/include/signal.h |index bd8ee9f..7ee242a 100644 |--- NuttX/nuttx/include/signal.h |+++ NuttX/nuttx/include/signal.h

File to patch: Skip this patch? [y] 1 out of 1 hunk ignored The text leading up to this was:

|diff --git NuttX/nuttx/include/stdlib.h NuttX/nuttx/include/stdlib.h |index aa259c9..f2b0640 100644 |--- NuttX/nuttx/include/stdlib.h |+++ NuttX/nuttx/include/stdlib.h

File to patch: Skip this patch? [y] 1 out of 1 hunk ignored The text leading up to this was:

|diff --git NuttX/nuttx/include/sys/stat.h NuttX/nuttx/include/sys/stat.h |index 3f2658b..41c8604 100644 |--- NuttX/nuttx/include/sys/stat.h |+++ NuttX/nuttx/include/sys/stat.h

File to patch: Skip this patch? [y] 1 out of 1 hunk ignored The text leading up to this was:

|diff --git NuttX/nuttx/include/sys/statfs.h NuttX/nuttx/include/sys/statfs.h |index 1d1786a..12f802b 100644 |--- NuttX/nuttx/include/sys/statfs.h |+++ NuttX/nuttx/include/sys/statfs.h

File to patch: Skip this patch? [y] 1 out of 1 hunk ignored [5/618] Applying /home/mch/ICRA/PX4-Ph...e/nuttx-patches/static_asset-fix.patch FAILED: px4fmu-v4/NuttX/nuttx_patch_static_asset-fix.patch-px4fmu-v4.stamp cd /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter && /usr/bin/patch -d /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX -s -p1 -N < /home/mch/ICRA/PX4-PhoenixDrone/nuttx-patches/static_asset-fix.patch && /usr/bin/touch /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX/nuttx_patch_static_asset-fix.patch-px4fmu-v4.stamp The text leading up to this was:

|diff --git NuttX/nuttx/include/assert.h NuttX/nuttx/include/assert.h |index 88254f6..b9fb6c2 100644 |--- NuttX/nuttx/include/assert.h |+++ NuttX/nuttx/include/assert.h

File to patch: Skip this patch? [y] 1 out of 1 hunk ignored [6/618] Applying /home/mch/ICRA/PX4-PhoenixDrone/nuttx-patches/fixStdint.patch FAILED: px4fmu-v4/NuttX/nuttx_patch_fixStdint.patch-px4fmu-v4.stamp cd /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter && /usr/bin/patch -d /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX -s -p1 -N < /home/mch/ICRA/PX4-PhoenixDrone/nuttx-patches/fixStdint.patch && /usr/bin/touch /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX/nuttx_patch_fixStdint.patch-px4fmu-v4.stamp The text leading up to this was:

|diff --git NuttX/nuttx/include/cxx/cstdint NuttX/nuttx/include/cxx/cstdint |index d662c5d..95334e9 100644 |--- NuttX/nuttx/include/cxx/cstdint |+++ NuttX/nuttx/include/cxx/cstdint

File to patch: Skip this patch? [y] 2 out of 2 hunks ignored [7/618] Applying /home/mch/ICRA/PX4-Ph.../nuttx-patches/serial_dma_hotfix.patch FAILED: px4fmu-v4/NuttX/nuttx_patch_serial_dma_hotfix.patch-px4fmu-v4.stamp cd /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter && /usr/bin/patch -d /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX -s -p1 -N < /home/mch/ICRA/PX4-PhoenixDrone/nuttx-patches/serial_dma_hotfix.patch && /usr/bin/touch /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX/nuttx_patch_serial_dma_hotfix.patch-px4fmu-v4.stamp The text leading up to this was:

|diff --git NuttX/nuttx/arch/arm/src/stm32/stm32_serial.c NuttX/nuttx/arch/arm/src/stm32/stm32_serial.c |index 644c810..80bb69a 100644 |--- NuttX/nuttx/arch/arm/src/stm32/stm32_serial.c |+++ NuttX/nuttx/arch/arm/src/stm32/stm32_serial.c

File to patch: Skip this patch? [y] 17 out of 17 hunks ignored [8/618] Applying /home/mch/ICRA/PX4-Ph...rone/nuttx-patches/ctypecctype.patch FAILED: px4fmu-v4/NuttX/nuttx_patch_ctypecctype.patch-px4fmu-v4.stamp cd /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter && /usr/bin/patch -d /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX -s -p1 -N < /home/mch/ICRA/PX4-PhoenixDrone/nuttx-patches/ctypecctype.patch && /usr/bin/touch /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX/nuttx_patch_ctypecctype.patch-px4fmu-v4.stamp The text leading up to this was:

|diff --git NuttX/nuttx/include/ctype.h NuttX/nuttx/include/ctype.h |index dcf918b..65706b7 100644 |--- NuttX/nuttx/include/ctype.h |+++ NuttX/nuttx/include/ctype.h

File to patch: Skip this patch? [y] 2 out of 2 hunks ignored [10/618] Applying /home/mch/ICRA/PX4-P...rone/nuttx-patches/export_insitu.patch FAILED: px4fmu-v4/NuttX/nuttx_patch_export_insitu.patch-px4fmu-v4.stamp cd /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter && /usr/bin/patch -d /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX -s -p1 -N < /home/mch/ICRA/PX4-PhoenixDrone/nuttx-patches/export_insitu.patch && /usr/bin/touch /home/mch/ICRA/PX4-PhoenixDrone/build_nuttx_px4fmu-v4_tailsitter/px4fmu-v4/NuttX/nuttx_patch_export_insitu.patch-px4fmu-v4.stamp The text leading up to this was:

|diff --git NuttX/nuttx/tools/mkexport.sh NuttX/nuttx/tools/mkexport.sh |index 348a14c..3cc9182 100755 |--- NuttX/nuttx/tools/mkexport.sh |+++ NuttX/nuttx/tools/mkexport.sh

File to patch: Skip this patch? [y] 2 out of 2 hunks ignored ninja: build stopped: subcommand failed. Makefile:140: recipe for target 'nuttx_px4fmu-v4_tailsitter' failed make: *** [nuttx_px4fmu-v4_tailsitter] Error 1

mengchaoheng commented 3 years ago

So the key to the problem is https://github.com/PX4/PX4NuttX.git has been archived by the owner. I am interested in your project and I want to reproduce the results of your paper. I really want to know what the simulation looks like when it runs. Can you help me?

yilun-wu commented 3 years ago

So the key to the problem is https://github.com/PX4/PX4NuttX.git has been archived by the owner. I am interested in your project and I want to reproduce the results of your paper. I really want to know what the simulation looks like when it runs. Can you help me?

If you want to run simulation on Linux, you don't need to compile NuttX. The command is: make posix_sitl_tailsitter gazebo_STARS_TS

It seems to me the problem is the tools folder went missing. Have you tried replacing it with this?

Unfortunately, I don't have the original development environment on my system anymore, and the project is currently not actively maintained. The support we can offer is limited. If you would like to get the code running on real hardware, I'd suggest porting the tail-sitter controller code to a newer version of PX4, which is probably going to cause less trouble compared to fixing the current version.

mengchaoheng commented 3 years ago

So the key to the problem is https://github.com/PX4/PX4NuttX.git has been archived by the owner. I am interested in your project and I want to reproduce the results of your paper. I really want to know what the simulation looks like when it runs. Can you help me?

If you want to run simulation on Linux, you don't need to compile NuttX. The command is: make posix_sitl_tailsitter gazebo_STARS_TS

It seems to me the problem is the tools folder went missing. Have you tried replacing it with this?

Unfortunately, I don't have the original development environment on my system anymore, and the project is currently not actively maintained. The support we can offer is limited. If you would like to get the code running on real hardware, I'd suggest porting the tail-sitter controller code to a newer version of PX4, which is probably going to cause less trouble compared to fixing the current version.

Thank you for your suggestion. After I tried the tools you provided, the problem still persists, and an error is reported when I run make posix_sitl_tailsitter gazebo_STARS_TS. My environment can run the make posix_sitl_default gazebo and make px4fmu-v4_default commands normally. In addition, I have considered porting your program to the new PX4, but I don’t know where you changed it before. Can you provide ideas for porting? I just need gazebo simulation. What files need to be changed, is there any porting tutorial to share?

yilun-wu commented 3 years ago

So the key to the problem is https://github.com/PX4/PX4NuttX.git has been archived by the owner. I am interested in your project and I want to reproduce the results of your paper. I really want to know what the simulation looks like when it runs. Can you help me?

If you want to run simulation on Linux, you don't need to compile NuttX. The command is: make posix_sitl_tailsitter gazebo_STARS_TS It seems to me the problem is the tools folder went missing. Have you tried replacing it with this? Unfortunately, I don't have the original development environment on my system anymore, and the project is currently not actively maintained. The support we can offer is limited. If you would like to get the code running on real hardware, I'd suggest porting the tail-sitter controller code to a newer version of PX4, which is probably going to cause less trouble compared to fixing the current version.

Thank you for your suggestion. After I tried the tools you provided, the problem still persists, and an error is reported when I run make posix_sitl_tailsitter gazebo_STARS_TS. My environment can run the make posix_sitl_default gazebo and make px4fmu-v4_default commands normally. In addition, I have considered porting your program to the new PX4, but I don’t know where you changed it before. Can you provide ideas for porting? I just need gazebo simulation. What files need to be changed, is there any porting tutorial to share?

The main changes are:

An entrypoint I'd suggest is to read the official mc_pos_control and mc_att_control understand how they work and then port the changes from our version. The key idea of how the control is done is illustrated in the paper.