DISCOWER / PX4-Space-Systems

PX4 Space Systems Fork
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Spacecraft Modules Stack #10

Closed Pedro-Roque closed 2 months ago

Pedro-Roque commented 3 months ago

PR directed to adding all functionality for spacecrafts using PX4.

To-does:

@Jaeyoung-Lim ideally we should work on this branch or towards merging things on this branch before merging in main.

Pedro-Roque commented 3 months ago

Build currently failing with

Exception while parsing /home/roque/ros2_astrobee_ws/src/submodules/px4/src/modules/control_allocator/module.yaml:
Traceback (most recent call last):
  File "/home/roque/ros2_astrobee_ws/src/submodules/px4/Tools/module_config/generate_actuators_metadata.py", line 484, in <module>
    raise e
  File "/home/roque/ros2_astrobee_ws/src/submodules/px4/Tools/module_config/generate_actuators_metadata.py", line 476, in <module>
    parsed_mixers = get_mixers(yaml_config, output_functions, verbose)
  File "/home/roque/ros2_astrobee_ws/src/submodules/px4/Tools/module_config/generate_actuators_metadata.py", line 307, in get_mixers
    output_function = output_functions['common'][function_name]
KeyError: 'Thruster'

Will fix it later.

Pedro-Roque commented 3 months ago

Thrusters changes reflected all the way in QGC, but arming is still denied. Will attempt to fix that. Screenshot from 2024-04-22 19-01-27

Pedro-Roque commented 3 months ago

@Jaeyoung-Lim Sorry for the spam - I tagged you where in the code we would take your input. Right now the mixer seems to be working, but I'll be testing it with a few position setpoints.

@E-Krantz I tagged you where I believe you would add the code that modifies the setpoints based on how many thrusters are requested to be open (probably you will have some adjustment to ask for more thrust when more thrusters are used, to have effectively the nominal thruster behavior)

I'll see if I get this to run with attitude and position control :smile:

Pedro-Roque commented 3 months ago

Control pipeline from att control through the rate, allocation and mixer seems alive. Needs testing.

Next step will be to add SC Position Control.

Pedro-Roque commented 3 months ago

@Jaeyoung-Lim I merged everything into this branch - you can use it to develop the Gazebo plugin. Branch out of this one and then merge back into it.

Pedro-Roque commented 3 months ago

Big Pile of Changes from upstream sync...

Edit: probably should have kept this separated...

Pedro-Roque commented 2 months ago

@Jaeyoung-Lim a thing that is annoying now is that without without rate control running, the simulator stalls, so we can't test Manual mode; We should really consider moving the lockstep elsewhere...

Jaeyoung-Lim commented 2 months ago

@Pedro-Roque Where would you move it? Fundamentally, direct actuator control does not really work with lockstep, because the actuator commands do not correlate with sensor data.

We could also just turn lockstep off for testing actuator controls.

I am not really motivated to fix this " properly" for gazebo classic, as we fixed this in the new gazebo with a better architecture, and gazebo classic will not last more than a year or two...