Commit Graph
690 Commits
Author SHA1 Message Date
Jesús Bautista Villar 4ee8e5e1b9 [gvf] Refactor GVF module framework, add GVF_IK, fix bugs, and provide full example config (#3451) 2025-05-16 22:00:28 +02:00
Christophe De Wagter e6bcd60666 actuators[ ] array of structs with pprz units and driver units (#3205)
* actuators[ ] array in pprz units, conversion to actuator_driver units when sending to the actuator_driver.

actuators becomes an array

* Moved scaling of the Servo to the Set function.

* Fixed switches and pan-tilt to work in PPRZ units now. Simplified code.
2024-05-25 09:38:51 +02:00
7b54c09acc [checks] Add preflight checks (#2951)
---------

Co-authored-by: Christophe De Wagter <dewagter@gmail.com>
Co-authored-by: Gautier Hattenberger <gautier.hattenberger@enac.fr>
2023-11-15 22:54:38 +01:00
Gautier Hattenberger b152b927b3 Fix nav rework (#3004)
* fix guidance_v in flight plan and remove old settings

* nav radius, descend and climb

* [stab] make a attitute set quat function

* fix function name

* fix parsing of variables in proc, don't use = in fp

* fix nav heading in modules

* fix some more errors

* fix var name
2023-03-06 10:45:44 +01:00
Gautier HattenbergerandFreek van Tienen 28ef30ed80 Nav rotorcraft rework (#2964)
This is a complete rework of the navigation for rotorcraft with the key features:

- all nav functions and interface in float
- nav function are registered (decoupling between nav API and implementation of standard pattern)
- submodes to specify if setpoint is a position (legacy), speed or accel (better integration of algorithms like GVF)
- guidance (H and V) is reorganized with default function to implement (run_pos, run_speed, run_accel) 
- guidance control (the old default PID) is separated from the guidance logic

---------

Co-authored-by: Freek van Tienen <freek.v.tienen@gmail.com>
2023-03-02 22:15:23 +01:00
Freek van Tienen 3211fa011c [settings] Support functions (#2880)
* [chibios] Add reboot functionality
* [modules] Add power switch module
2022-05-19 23:53:22 +02:00
Gautier Hattenberger 502427f823 [fix] remove ins_neutrals settings file (#2843)
this is not a proper fix, but a workaroud to compile example files and
prevent to use the old ins_neutrals.xml file that is no longer valid.
the issue of ins neutrals should be treated correctly later, either by
adding proper settings to each modules that requires it, or using a
ins_common module
2022-03-20 16:03:34 +01:00
Gautier Hattenberger 0b62eb89ef [fix] collection of fixes after AP/FBW merge
some errors after #2828
- fix all airframes using dual boards
- fix calls to ap_state or old imcu API
- fix some includes
- protect some code to compile test programs (without 'commands' API)

close #2840
2022-03-11 16:39:43 +01:00
Gautier Hattenberger ab033e7f74 fix actuators settings path 2021-11-15 13:31:42 +01:00
Gautier Hattenberger 1e14fd5bde [modules] clean some remaining traces of subsystems 2021-11-13 00:48:14 +01:00
Gautier Hattenberger dbf6396a58 [modules] move intermcu to modules
both fixedwing and rotorcraft
2021-11-13 00:48:14 +01:00
Gautier Hattenberger eef2792d39 [modules] move datalink from subsystems to modules 2021-11-13 00:48:14 +01:00
Gautier Hattenberger 304f957a0b [modules] move actuators from subsystems to modules 2021-11-13 00:48:14 +01:00
Gautier Hattenberger a4632c33ca [modules] move gps from subsystems to modules 2021-11-13 00:48:14 +01:00
Gautier Hattenberger addc8d051c [cleaning] removing some old stuff (#2696)
* [cleaning] removing some old stuff

- infrared sensors and related ahrs
- mkk and asctec actuators
- old carto modules
- fix bebop actuators for NPS
- clean airframe and conf

* [conf] add back asctec_v2 actuators that is still being used
2021-04-16 17:56:16 +02:00
Gautier Hattenberger 4c1785d00b [cleaning] drop support of LPC21 boards and related conf (#2695) 2021-04-14 14:05:17 +02:00
Gautier Hattenberger 09c0c8ccb9 Aircraft generator (#2545)
* [ocaml] massive update of the build process
convert individual code generator to a single process, parsing everything once and calling the required generators
- remove all subsystems makefiles
- fix module name
- example of radio file without ctl attribute

* [build] start with flight plan to make semaphore happy
* [ocaml] move the buffer outside the lazy block
for some reason, it seems to make problems with compilation server
Semaphore
it really makes no sense, but nevermind...
2020-07-05 21:38:09 +02:00
Gautier Hattenberger 547f32c5b0 [setting] group power switch in strip 2020-03-10 15:51:03 +01:00
Hector Garcia de Marina 2289512bbb Merge pull request #2447 from enacuavlab/enac_student_projects-integration
Enac student projects integration
2019-07-08 18:19:00 +02:00
Gautier Hattenberger 69df254c26 [ins] INS invariant filter can use GPS heading instead of magneto 2019-07-01 13:14:21 +02:00
Gautier Hattenberger c8dba29208 [fix] typo and body_accel update 2019-07-01 13:04:44 +02:00
Gautier Hattenberger 2114b8ae4e [firmware] add rover firmware
Basic support for a rover firmware based on ChibiOS and generated AP:
- simple control loop
- new navigation layer based on registered functions
- xbee_api for telemetry, gps_passthrough for ins
- basic telemetry and settings files
2018-06-23 21:51:48 +02:00
Michal Podhradsky 74f8b74624 First shot towards a separate HITL target (#2062)
* First shot towards a separate HITL target

* Changes in HITL - still doesn't compile

* Added makefile selection

* HITL target works for fixedwing and rotorcraft - still needs cleanup and TLC

* Removed info messages from compilation process
2017-06-13 13:39:10 -07:00
Open UAS 2a1eea87ac Fixedwing for Pixracer 2017-05-30 08:12:20 +02:00
Gautier Hattenberger 363dec8693 Autopilot refactor (#2009)
* [autopilot] refactor autopilot API for both firmwares

With this, fixedwing and rotorcraft are mostly using the same interface
for the autopilot. Some specific code and messages handling are still
firmware dependent.
A large part of the autopilot logic of the fixedwing is moved from
main_ap to autopilot_static.
More getter/setter functions are provided.

* [autopilot] update the rest of the system and the conf

for using the refactored autopilot API

* [autopilot] fix some errors from CI servers

* [actuators] use dummy actuators module to prevent autoloading

* Rename Bart_heliDD_INDI.xml to tudelft_bs_helidd_indi.xml

* Rename Bart_heliDD_pid.xml to tudelft_bs_helidd_pid.xml

* Delete tudelft_course2016_bebop_colorfilter.xml

* Delete tudelft_course2016_bebop_avoider.xml

* [actuators] don't autoload actuators when set to 'none'

* [gcs] autodetect firmware for strip mode button
2017-02-19 11:45:57 +01:00
Michal Podhradsky 93394f85d5 Fixed gain scheduling settings 2016-12-09 10:50:27 -08:00
Ewoud Smeur 6dcabb3a57 update INDI tu use full control effecitvens matrix (#1916)
* update INDI tu use full control effecitvens matrix

Instead of using commands (roll, pitch, yaw, thrust), give the
controller direct control over all actuators.
This allows for online individual actuator control effectiveness
estimation and inversion, as well as better saturation handling.
The INDI controller as it was previous is renamed to 'simple'.

* Made INDI more flexible wrt number of actuators

- 4x4 matrix inverse to accomodate the thrust axis as well
- support for more actuators
- cleanup of code

* Change filters guidance indi to butterworth

* Added body acceleration to state interface

* Better adaptation and guidance thrust increment

- Adaptation flexible wrt. number of actuators.
- Added adaptation of the specific force effectiveness of the actuators.
- Added connection to guidance INDI through ABI. The thrust increment is
  caclulated in guidance INDI and sent to the stabilization.

* lower case variables

* change filter of indi to butterworth

* INDI fix array index & no declarations in for loop

- Also added doxygen comments

* Added actuators_pprz

the array actuators is used to drive the servos, so a new array to store
the command to the actuators in pprz scale is needed

* Removed hardcoded scaling
2016-12-01 10:02:36 -08:00
kevindehecker 7859e0a66f Px4 imu fixes (#1950)
* Lsm303d spi driver

* Use lsm303d for pixhawk instead of depricated lsm303dlhc

* Fixed the actual acc problem

* Removed lsm303dlhc_spi device, which does not even exist

* Updated acc calibration after solving scaling bug

* INDI adaptive tuned Iris

* Conf stuff

* Remove seperate pid airframe, as indi works pretty good and I'm not maintaining it anyway

* Fixed units in airframe file

* Enlarged range of slider for indi max rates
2016-11-18 10:38:05 -08:00
Felix Ruess 1da855f408 [ahrs] move settings to modules 2016-09-20 14:12:32 +02:00
Gautier Hattenberger 16a447da37 Ap mode setting (#1852)
* [rotorcraft] allow to change some modes from settings even without RC

see #1819

* [rotorcraft] allow some more modes without RC

* [joystick] change mode directly instead of rc_auto2

* [rotorcraft] change handler name to avoid confusion
2016-09-02 21:22:35 +02:00
Ewoud Smeur 30eb43b5ab Changed sliders for gain_scheduling settings 2016-08-31 11:29:24 +02:00
Ewoud Smeur 7086b68c17 fixed path in gain_scheduling settings 2016-08-26 16:38:45 +02:00
Felix Ruess 17d32772c0 [imu] convert imu subsystems to modules (#1788)
* [imu] convert imu subsystems to modules

Also
- get rid of explicit imu init|event|periodic calls in main
- each imu implementation has their own imu_x_init/event/periodic

* [imu] fix some imu modules

* [imu] fix bad paths

* [imu] add imu_common module that every implementation autoloads

and put body_to_imu settings in imu_common module

* [imu] fix imu_ardrone2

* [conf] add imu_common settings module in conf_example and conf_tests
2016-08-12 12:02:38 +02:00
Deon Blaauw f1f75e96b8 Hybrid guidance code for hybrid drones (#1769)
This pull request is for the guidance algorithms used to control hybrid drones like the Quadshot and MavShot. It supports autonomous waypoint navigation as well as "forward-flight". The code was flight tested in autonomous waypoint navigation mode, including autonomous landing (using sonar).
2016-06-30 21:51:52 +02:00
Felix Ruess 861cb83014 [gps] change GPS_MODE_AUTO to be 0 and GPS_MODE_PRIMARY 1, etc 2016-06-16 14:24:06 +02:00
Felix Ruess 59ac2449a6 [gps] remove gps_Reset settings handler
this should be added to each GPS implementation separately (where appropriate)
2016-06-15 23:51:35 +02:00
Ewoud Smeur 53b8a78500 added the possibility to add a yaw rate limit to stabilization indi (#1684)
the yaw of a typical quadrotor easily saturates. One of the problems that occur when asking for a large change in yaw angle, is that the quadrotor can build up so much angular velocity in the yaw axis, that it can not physically slow down before reaching the yaw setpoint due to saturating. This will result in overshoot.

This can be helped by adding a yaw rate limit, which this PR does for the INDI controller.
2016-05-30 23:15:33 +02:00
masierra 424d91f890 [multigps] added gps selector 2016-02-05 15:21:20 -08:00
Freek van Tienen 58ce0582b4 [stabilization] Repair INDI settings 2016-01-27 17:23:23 +01:00
Freek van Tienen a3a641c1ee [stabilization] INDI rewrite and rate control 2016-01-27 17:23:23 +01:00
Felix Ruess 85777e86cd [rotorcraft] add a GUIDED mode
meant for controlling the rotorcraft via external input (from a module or datalink message)

Currently positions mode only:
- specify frame via first 4 bits in flags:
  - 0x0: LOCAL_NED
  - 0x1: LOCAL_OFFSET_NED
  - 0x2: BODY_NED
  - 0x3: BODY_OFFSET_NED
2015-12-12 21:45:12 +01:00
Gautier Hattenberger a8b996bd48 [nav] add some variables to control flight plan parameters 2015-11-29 22:08:13 +01:00
Felix Ruess b6186c9a21 [settings] ahrs settings ony for targets ap|nps|test_ahrs 2015-11-26 13:45:12 +01:00
Felix Ruess 0031d60b34 Merge pull request #1419 'ewoud/rate_control'
"pleasent" rate control without reference model
- updated airframes with removal of rate control reference model
- removed everything related to rate reference
2015-11-25 15:01:44 +01:00
Ewoud Smeur 5637b0f37e updated airframes with removal of rate control reference model 2015-11-25 14:24:08 +01:00
Felix Ruess f30d131d6e Merge pull request #1404 from flixr/nps_udp_telemetry
use UDP telemetry in NPS sim

When launching a Simulator session from the Paparazzi Center, link should be automatically started as well.
If sitl is started directly, one also needs to start link with the -udp option.
2015-11-17 00:22:22 +01:00
Ewoud Smeur ec2f508c4b new Asctec esc I2C protocol 2015-11-12 10:54:03 +01:00
Felix Ruess b050714681 [nps] add possibility to disable datalink again 2015-11-04 22:47:40 +01:00
Felix Ruess aba6faefcd [nps] remove datalink_enabled hacks 2015-11-04 22:43:37 +01:00
Bart Slinger 20fb60d938 [settings] wrong max number fix 2015-10-27 09:12:21 +01:00