Commit Graph

3468 Commits

Author SHA1 Message Date
chfriedrich98 55f51d7e7e ackermann: refactor code architecture 2025-02-10 15:54:24 +01:00
mahimayoga 093b379b6b sf45/collision-prevention: replace repeated code with ObstacleMath library functions. 2025-02-07 13:28:17 +01:00
mahimayoga cb332e047d obstacle-math: add standard obstacle map functions.
These functions help simplify repeated calculations accross driver and collision prevention files that are computing bins, angles and sensor offsets in obstacle maps.
2025-02-03 17:17:35 +01:00
Perre f7dadd9b89 Remove inclusion of rotors in library to enable test (#24286) 2025-02-03 15:51:55 +01:00
Pedro Roque b09340cc98 Control Allocator: Add option for metric allocation (skip normalization) (#24199)
* add: metric allocation

* add: actual files

* rft: moved metric allocation to pseudo-inverse via flag with public method

* del: removed metric allocation test and added test in pseudo-inverse testing

* rft: deleted extra newline at the end of pseudo inverse test file

* feat: removed unnecessary log include
2025-01-20 13:30:51 +01:00
mahimayoga ab46502cbd obstacle-math: add unit tests for project_distance_on_horizontal_plane function. 2025-01-20 11:11:29 +01:00
mahimayoga 29f981f14c collision-prevention: extract rotation scaling function into new ObstacleMath library.
New library created for static and/or repeated code across collision prevention and driver files.
2025-01-20 11:11:29 +01:00
Mathieu Bresciani 8ecb76aba2 [Multirotor] add yaw torque low pass filter (#24173)
co-authored-by: danielmellinger <107884356+danielmellinger@users.noreply.github.com>
co-authored-by: Eric Katzfey <eric.katzfey@modalai.com>
2025-01-15 14:02:28 +01:00
Jaeyoung Lim 974446c0e8 Make control allocation and actuator effectiveness a non-module-specific library (#24196)
* Remove more circular dependencies with ActuatorEffectiveness

* Separate vehicle specific actuator effectiveness

Keep actuator effectivenss in control allocator

* Remove test dependency for now

* Group library directories
Fix

* Change directory names

* Rebase fix
2025-01-15 10:12:29 +01:00
Matthias Grob b042f2101f system_params: clarify SYS_HAS_MAG description
after answering the questions:
Ah the value can be 2? Should I set the number of magnetometers the board has or include the external ones?
2025-01-08 21:24:00 -05:00
Alex Klimaj 1043aebf5d analog_battery: add option for filter (#23987) 2025-01-03 16:01:16 +01:00
Mahima Yoga defccfa99b Collision Prevention: Scale obstacle distance with vehicle attitude for varying sensor orientations (#24107) 2024-12-20 14:47:22 +01:00
Matthias Grob c69f96ec04 ADSB: replace last excess hrt_absolute_time() in the loop 2024-12-19 09:35:38 +01:00
Silvan Fuhrer 30e51cb80e ADSB: improve readability of unit tests
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-12-19 09:35:38 +01:00
Silvan Fuhrer 1a1fd59302 ADSB: pass now timestamp as arguemnt of send_traffic_warning()
Saves some flash and CPU by not having to call hrt_absolute_time().

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-12-19 09:35:38 +01:00
Silvan Fuhrer 741e3e8589 ADSB: pass now timestamp as arguemnt of get_traffic_state()
That enables us to time the unit tests better plus saves some flash and CPU.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-12-19 09:35:38 +01:00
Beat Küng 491ee01ac4 rpm_capture: add rpm capture driver, publising pwm_input (for now) 2024-12-19 07:30:25 +01:00
bresch fa5a781e20 AlphaFilter: set time constant instead of alpha
Then the update function can set the dt at every iteration if needed
2024-12-18 14:11:08 +01:00
bresch 37401d6fd1 AlphaFilter: allow setting dt in update call 2024-12-18 14:11:08 +01:00
Beat Küng 9e9d352eb2 mavlink: update submodule
MAV_STANDARD_MODE_SAFE_RECOVERY and MAV_STANDARD_MODE_RETURN_HOME got
merged.
2024-12-18 07:12:36 +01:00
Beat Küng aca5a70964 standard_modes: add vehicle-type specific standard modes
See https://mavlink.io/en/messages/development.html#MAV_STANDARD_MODE.
The only standard mode that is not set is MAV_STANDARD_MODE_SAFE_RECOVERY,
as PX4 uses RTL for that (with configuration parameters).
2024-12-18 07:12:36 +01:00
Silvan Fuhrer 4db55cd25f mixer: FunctionMotors: compare against FLT_EPSILON instead of 0.f
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-12-13 17:56:46 +01:00
Silvan Fuhrer d7904b5f2c mixer: FunctionMotors: leave NAN control values at NAN with non-zero THR_MDL_FAC
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-12-13 17:56:46 +01:00
Jacob Dahl ae61b4bfe0 params: flash: erase corrupt sector (#24065) 2024-12-05 07:24:56 +01:00
bresch 6b637f82f8 lla; fix conversion to ECEF 2024-12-03 13:03:54 +01:00
Claudio Chies 1a165a4956 Added possibility to modify the start position from external sources, as its done in the _getMaxXYSpeed 2024-12-02 14:52:31 +01:00
Matthias Grob 7dcfeb2f77 PositionSmoothing: refactor _getMaxZSpeed() 2024-12-02 14:52:31 +01:00
Matthias Grob 092e5e8f9d TrajectoryConstraints: clarify waypoint indexing 2024-12-02 14:52:31 +01:00
Claudio Chies 06dde4ede8 MPC: PositonSmoothing, change test to reflect that we have to come inwithing the acceptance radius, and not exact position. 2024-12-02 14:52:31 +01:00
Claudio Chies 72e758950b Included turning radius calculations for vertical changes and removed the requirement for the same altitude in the 2D turning radius logic. 2024-12-02 14:52:31 +01:00
bresch 189122d553 lla: add gravity constant at equator 2024-11-29 14:21:29 +01:00
bresch b6658df169 lla: move to lib directory 2024-11-29 14:21:29 +01:00
bresch 9b172d36a2 matrix: allow casting float<->double 2024-11-29 14:21:29 +01:00
Matthias Grob a280d67be8 PID: Fix test to respect integral updates being applied in the next iteration
Co-authored-by: chfriedrich98 <125505139+chfriedrich98@users.noreply.github.com>
2024-11-26 16:13:48 +01:00
Matthias Grob f9bcbc31ae PID: protect from division by zero because of dt
Co-authored-by: chfriedrich98 <125505139+chfriedrich98@users.noreply.github.com>
2024-11-26 16:13:48 +01:00
Matthias Grob b89c53d28c Replace old pid library with new one 2024-11-26 16:13:48 +01:00
Matthias Grob e047972cde Add new C++ PID library 2024-11-26 16:13:48 +01:00
Silvan Fuhrer 2f65644aeb mixer module: remove unused functions
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-11-21 11:57:50 -05:00
Claudio Chies db13b9cb50 CollisionPrevention: Added Case where velocity gets reduced to zero if we are closer to the obstacle than the minimal distance 2024-11-21 11:36:03 +01:00
Matthias Grob bbc59dcde7 CollisionPrevention: prevent illegal array index with malicious obstacle_dsitance message 2024-11-21 11:36:03 +01:00
Matthias Grob 1410325c62 CollisionPrevention: follow parameter variable naming convention 2024-11-21 11:36:03 +01:00
Matthias Grob 30eec33e09 CollisionPrevention: slightly simplify _transformSetpoint() 2024-11-21 11:36:03 +01:00
Matthias Grob 399a8ad5b7 CollisionPrevention: fix early return and use unified bin count + array size 72 2024-11-21 11:36:03 +01:00
Claudio Chies f41a08aea8 CollisionPrevention: changed to resolution of 5 degrees, and adapted tests to reflect the change
rewrite of obstacle_distance merging methods, and fix of various issues
2024-11-21 11:36:03 +01:00
Matthias Grob b74dd57e7c CollisionPrevention: restore rate limited warning for no data, minor cleanup 2024-11-21 11:36:03 +01:00
Matthias Grob 4c8c5fbb37 CollisionPrevention: only save quaternion and yaw on attitude update 2024-11-21 11:36:03 +01:00
Matthias Grob 001d722abd CollisionPrevention: move main functions to the top in the order they get called 2024-11-21 11:36:03 +01:00
Matthias Grob 1fa76ac71d CollisionPrevention: reduce internal array size, zero initialize what's possible 2024-11-21 11:36:03 +01:00
Matthias Grob c879ca531d CollisionPrevention: Clarify bin size definitions, move wrap functions into class 2024-11-21 11:36:03 +01:00
Matthias Grob 84dbbb4351 CollisionPrevention: clarify mode switch command to hold/loiter 2024-11-21 11:36:03 +01:00