Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spacecraft Build and Bare Control Allocator #24221

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Pedro-Roque
Copy link
Member

Solved Problem

Provides support for spacecraft-like vehicles available in https://github.com/DISCOWER/PX4-Space-Systems . This PR introduces spacecraft board for SITL, as well as a barebones allocator for preliminary spacecraft build targets.

Solution

  • Add spacecraft SITL board
  • Add barebones spacecraft control allocator

Changelog Entry

For release notes:

Feature/Bugfix: Support for spacecraft vehicles
New parameter:
Documentation: 

Test coverage

  • Unit/integration test: on next PR
  • Simulation/hardware testing logs: on next PR

Copy link

github-actions bot commented Jan 16, 2025

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 0 byte (0 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%     +56  [ = ]       0    .debug_abbrev
   +11%     +56  [ = ]       0    ../../src/lib/version/version.c
-0.0%      -8  [ = ]       0    .debug_aranges
  -5.0%      -8  [ = ]       0    ../../src/lib/version/version.c
-0.0%      -4  [ = ]       0    .debug_info
  -0.2%      -4  [ = ]       0    ../../src/lib/version/version.c
-0.0%     -28  [ = ]       0    .debug_line
  -1.3%     -25  [ = ]       0    ../../src/lib/version/version.c
  -0.3%      -3  [ = ]       0    task/task_cancelpt.c
-0.0%      -8  [ = ]       0    .debug_ranges
  -2.6%      -8  [ = ]       0    ../../src/lib/version/version.c
+0.0%      +8  [ = ]       0    TOTAL

px4_fmu-v6x [Total VM Diff: 0 byte (0 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%     +56  [ = ]       0    .debug_abbrev
   +11%     +56  [ = ]       0    ../../src/lib/version/version.c
-0.0%      -8  [ = ]       0    .debug_aranges
  -5.0%      -8  [ = ]       0    ../../src/lib/version/version.c
-0.0%      -4  [ = ]       0    .debug_info
  -0.2%      -4  [ = ]       0    ../../src/lib/version/version.c
-0.0%     -28  [ = ]       0    .debug_line
  -1.3%     -25  [ = ]       0    ../../src/lib/version/version.c
  -0.3%      -3  [ = ]       0    task/task_cancelpt.c
-0.0%      -8  [ = ]       0    .debug_ranges
  -2.6%      -8  [ = ]       0    ../../src/lib/version/version.c
+0.0%      +8  [ = ]       0    TOTAL

Updated: 2025-01-20T15:02:50

@Pedro-Roque Pedro-Roque marked this pull request as ready for review January 20, 2025 12:35
@Pedro-Roque
Copy link
Member Author

@dagar @sfuhrer Inputs are welcome on this - Should I start by adding build target followed by the control modules, or should I go the other way around?

@sfuhrer
Copy link
Contributor

sfuhrer commented Jan 20, 2025

@dagar @sfuhrer Inputs are welcome on this - Should I start by adding build target followed by the control modules, or should I go the other way around?

You mean what to work on next? Should we clean up the build target / airframe side, then add SITL, then the low level control module (rate, possibly attitude)?
You'll also need to rebase since #24199 caused diffs. How do you plan to enable the metric allocation, hard-coded per vehicle type or configurable per parameter(s)?

"/home/roque/discower_ws/build/px4_mpc",
"/home/roque/discower_ws/install/px4_mpc/lib/python3.12/site-packages",
"/home/roque/discower_ws/build/px4_offboard",
"/home/roque/discower_ws/install/px4_offboard/lib/python3.12/site-packages",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local configurations propagating into the repo I presume?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A classic... We have .vscode/settings in the tracked files, how do you solve this locally? Should it be tracked?

@Pedro-Roque
Copy link
Member Author

@dagar @sfuhrer Inputs are welcome on this - Should I start by adding build target followed by the control modules, or should I go the other way around?

You mean what to work on next? Should we clean up the build target / airframe side, then add SITL, then the low level control module (rate, possibly attitude)? You'll also need to rebase since #24199 caused diffs. How do you plan to enable the metric allocation, hard-coded per vehicle type or configurable per parameter(s)?

Thanks for the prompt reply @sfuhrer ! Ok great, I was planning on proceeding exactly in that order, so its a perfect since. Currently I've added a build target with airframe and SITL, as well as a control allocator (just so that I could have the build target configure the sc_apps and sc_defaults.

Let me know if I should remove control allocator and just proceed with airframe. The issue is that none of the apps are then loaded, but that could go together with ca_allocator. What do you think?

@Pedro-Roque Pedro-Roque force-pushed the pr-spacecraft-allocator-and-board branch from 660d2bb to d4b6d75 Compare January 20, 2025 14:57
@@ -34,6 +34,8 @@
px4_add_library(ControlAllocation
ControlAllocation.cpp
ControlAllocation.hpp
ControlAllocationMetric.cpp
ControlAllocationMetric.hpp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be removed given that we have the ControlAllocation being able to do metric allocation now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants