Commit Graph

1518 Commits

Author SHA1 Message Date
Matthias Grob ca6db94e39 Velocity limit: remove duplicate message and if(true) 2023-12-08 21:17:59 +01:00
Marcin 4cf43a68a3 FlightTask: add subscription to VELOCITY_LIMITS msg 2023-12-08 21:17:59 +01:00
Matthias Grob 54ce9813c8 FlightModeManager: Add task for position slow mode 2023-12-08 21:17:59 +01:00
Matthias Grob ef0926d64b Commander: add position slow mode 2023-12-08 21:17:59 +01:00
Konrad 1d07697a9e NPFG: Add fallback for corner cases 2023-12-05 10:42:23 +01:00
Matthias Grob 4c0b6dbe86 Remove trailing whitespaces and trailing duplicate newlines 2023-12-01 13:11:00 -05:00
bresch fe7988672f ekf2: auxiliary position fusion
Co-authored-by: Daniel Agar <daniel@agar.ca>
2023-12-01 11:50:22 +01:00
Matthias Grob 14785eeb47 GotoSetpoint message: reorder flag directly before value 2023-11-30 17:16:02 +01:00
Thomas Stastny e47aba8bc9 msg: add go-to setpoint interface 2023-11-30 17:16:02 +01:00
Beat Küng f69636feef fix msg: add_custom_command needs to depend on files instead of custom_command target name
This fixes incremental builds when msg files change.

Introduced with https://github.com/PX4/PX4-Autopilot/pull/21995.
2023-11-30 10:36:39 -05:00
Konrad 36f0c0f0bf mavlink-mission: Add support for opaque ids and replace update counter with it 2023-11-29 11:10:40 -05:00
PerFrivik 09d30568ab Roboclaw: Consistent Left & Right naming convertion with Differential Drive class 2023-11-28 16:30:17 +01:00
Matthias Grob f53edfa440 Roboclaw: major cleanup 2023-11-28 16:30:17 +01:00
Matthias Grob 8f4ce28e84 RoboClaw: declutter, make it compile again 2023-11-28 16:30:17 +01:00
Per Frivik e9810e7be6 Update WheelEncoders.msg 2023-11-28 16:30:17 +01:00
Per Frivik dd9c1c02d1 Delete msg/ActuatorControls.msg 2023-11-28 16:30:17 +01:00
Per Frivik a6b2bcd166 Update msg/CMakeLists.txt
Remove ActuatorControls.msg

Co-authored-by: Daniel Agar <daniel@agar.ca>
2023-11-28 16:30:17 +01:00
PerFrivik 549c6b565c ported roboclaw driver from older commits into newest develop branch 2023-11-28 16:30:17 +01:00
Konrad 6a34b63b60 mission_base: perform mission_check_valid if mission, geofence ot homeposition have changed 2023-11-24 08:11:41 +01:00
Konrad 5e1f0b73ce HomePosition: Add an instance counter 2023-11-24 08:11:41 +01:00
Konrad a92e7a8796 missionResult: remove unnecessary constants and rename instance_count to mission_update_counter 2023-11-24 08:11:41 +01:00
Matthias Grob 8271faedeb control_mode: reorder modes according to controller cascade 2023-11-23 20:35:48 +01:00
Silvan Fuhrer 8a899170bf VehicleLocalPosition.msg: add comments for heading reset fields
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-11-23 13:54:07 +01:00
Silvan Fuhrer 7833d2a879 VehicleLocalPosition.msg: add comments for reset fields
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-11-23 13:54:07 +01:00
Beniamino Pozzan 1c8f31f339 [offboard] add thrust and torque control mode
New thrust and torque control mode added which replaces the previous
actuator mode,
in this mode the rate controllers are disables, the control allocator
is enabled and the used externally provices
vehicle_thrust_setpoints and vehicle_torque_setpoints.

New direct_actuator mode
In direct_actuator mode the control allocator module does not publish
actuator_motors and actuator_servos messages which must instead be
provided extrernally by the user.

Removed old direct mode.

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2023-11-22 22:14:50 -05:00
Silvan Fuhrer 2865bbb8ab Geofence: rework messaging and notification
- do reporting of breaching in-air only in geofenceCheck
- remove geofence_violation_reason_t
- replace geofence_breached field in GeofenceResult.msg with 3 fields
(one for each GF type: max dist, max alt, custom geofence)
- the warning message after breaching a GF is only done by Commander,
and it's specific to the GF type failure

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-11-22 21:45:02 -05:00
Silvan Fuhrer a41f24a2e2 geofence_result.msg: rename premove unused field home_required
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-11-22 21:45:02 -05:00
bresch 1c3a1183c8 ekf2-flow: refactor control logic
Use flow rates instead of integrals in backend. This allows us to delay
the data to the mitpoint integration time and simplifies the code in
general.
Gyro compensation can still be done in EKF2 if needed, but the
flow module normally already appends the correct gyro data to the flow
message.
2023-11-21 21:56:34 -05:00
Roman Bapst dd2322d622
Added PerformanceModel for fixed wing (#22091)
* created a Performance Model for fixed wing vehicle
- added compensation for maximum climbrate, minimum sinkrate, minimum airspeed and trim airspeed based on weight ratio and air density
- added atmosphere lib to standard atmosphere calculations


---------

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Thomas Stastny <thomas.stastny@auterion.com>
2023-11-21 17:13:50 +01:00
Beat Küng 22acb08406 uorb: add message format compatibility check
This can be used by DDS/ROS 2 to check for matching message definitions.
2023-11-15 13:18:58 +01:00
Beat Küng bb900264e0 commander+mavlink: implement MAVLink standard modes 2023-11-15 13:18:58 +01:00
Beat Küng b46e1d744b commander: add config overrides 2023-11-15 13:18:58 +01:00
Beat Küng 889b6a1a78 commander: add VEHICLE_CMD_SET_NAV_STATE internal command 2023-11-15 13:18:58 +01:00
Beat Küng fbbccf6997 commander: implement external modes and mode executors 2023-11-15 13:18:58 +01:00
Beat Küng 1ad5a9de08 uorb: compress format definitions
Reduces flash usage by ~16KB.

- compress formats at build-time into a single string with all formats
- then at runtime iteratively decompress using
  https://github.com/atomicobject/heatshrink
2023-11-08 00:31:26 -05:00
Silvan Fuhrer a47b684fd7 tecs_status.msg: directly add underspeed ratio to msg instead of boolean
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-11-07 12:18:06 -05:00
Silvan Fuhrer 8741a9784d TECS: remove TECS_MODE enum and instead add descriptive boolean flag to tecs_status
New flag: underspeed_mode_enabled.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-11-07 12:18:06 -05:00
Konrad e5e66370e7 FixedwingPositionControl: Add support for figure 8 loitering.
The command is sent by a dedicated mavlink command and forwarded to the fixed wing position controller.

The pattern is defined by the radius of the major axis, the radius of the minor axis and the orientation. The pattern is then defined by:
The upper part of the pattern consist of a clockwise circle with radius defined by the minor axis. The center of the circle is defined by the major axis minus the minor axis away from the pattern center.
The lower part of the pattern consist of a counter-clockwise circle with the same definitions as above.
In between, the circles are connected with straight lines in a cross configuration. The lines are always tangetial to the circles.
The orientation rotates the major axis around the NED down axis.

The loitering logic is defined inside its own class used by the fixed wing position control module. It defines which segment (one of the circles or lines) is active and uses the path controller (npfg or l1-control) to determine the desired roll angle.

A feedback mavlink message is send with the executed pattern parameters.
2023-10-31 15:57:59 -04:00
Mathieu Bresciani 0d6c2c8ce9
EKF2: Error-State Kalman Filter (#22262)
* ekf derivation: change to error state formulation
* ekf2: update auto-generated code for error-state
* ekf2: adjust ekf2 code for error state formulation
* ekf2_tests: adjust unit tests for error-state EKF
* update change indicator for error-state EKF
* ekf2_derivation: allow disabling mag and wind states

---------

Co-authored-by: bresch <[brescianimathieu@gmail.com](mailto:brescianimathieu@gmail.com)>
2023-10-31 10:02:18 -04:00
Peter van der Perk 019d232911 Add Zenoh pico support 2023-10-18 15:30:36 -04:00
Daniel Agar 408c30de13
ekf2: delete redundant aid src status getters 2023-10-18 15:21:51 -04:00
Daniel Agar 5f87f3a046 ekf2: drag fusion add aid source status topic 2023-10-09 09:26:28 -04:00
Mathieu Bresciani d61743412c
ekf2: fix flow gyro bias corrections (#22145)
* ekf2-flow: fix flow gyro bias compensation
* ekf2-flow: apply flow gyro bias when used
* ekf2: log optical flow gyro bias
* ekf2: optical flow control always use provided flow gyro (with bias applied)
* ekf2-flow: log flow gyro and gyro reference
* ekf2-flow: support senrors with XY flow gyro

---------

Co-authored-by: Daniel Agar <daniel@agar.ca>
Co-authored-by: bresch <[brescianimathieu@gmail.com](mailto:brescianimathieu@gmail.com)>
2023-10-05 10:51:30 -04:00
Konrad 007ed11bbe Mission+RTL: Refactoring mission and RTL to keep them separate. RTL does all its mission related computation in its own class.
Dataman: Add write function to dataman cache.

RTL and mission have a new common base class mission_base. Both inherit from them and mission, RTL mission, and rtl reverse mission inherit from them and implement their desired functionalities. This simplifies the logic in mission as well as make the logic in rtl mission reverse and mission more readable.
Rtl mission reverse now functional again for VTOL flying back the mission and transitioning to MC at the home position.
Dataman cache has new write functionality to write to dataman while updating write item in its cache if necessary.
Dataman cache is now only updated when the respective module is active. Leads to a higher computation time once on activation, but decreases unnecessary cache updates when inactive.
2023-09-29 14:25:03 +02:00
Daniel Agar 14a967e2ca ekf2: remove aid src status fusion_enabled flag 2023-09-26 10:30:16 -04:00
Daniel Agar 10b54d08fc ekf2: add dedicated EKF2_CONFIG_TERRAIN in kconfig
- new estimator_aid_src_terrain_range_finder for HAGL RNG
2023-09-15 10:02:09 -04:00
Daniel Agar 7d497d4959 msg: set all ORB_QUEUE_LENGTH to actual rounded value 2023-09-08 15:28:16 -04:00
bresch 0aa4afdbce ekf2: add unaided_yaw for more resilient yaw control
This estimate doesn't converge to the true yaw but can be used as a
more consistent but drifting heading source.
It can be used by a setpoint generator to adjust its heading setpoint
while the true yaw estimate is converging in order to keep a constant
course over ground.
2023-08-30 09:56:19 +02:00
Beat Küng 03365658d5 VehicleControlMode: add flag_control_allocation_enabled
Allows (external) modes to directly publish actuator_{motors,servos}.
2023-08-21 20:53:51 -04:00
Mathieu Bresciani 74a54b3b12
EKF2: improve resilience against incorrect mag data
- when GNSS is used require low mag heading innovations during
  horizontal acceleration (yaw observable) to validate the mag
- only fuse mag heading just enough to constrain the yaw estimate
  variance to a sane value. Leave enough uncertainty to allow for a
  correction when the yaw is observable through GNSS fusion
2023-08-17 09:55:15 -04:00