This PR allows to redefine the outer-loop for stabilization and
guidance, and to specify the guidance model for something else than a
quarotor (but still not an hybrid).
Two use case are proposed:
- replace the PD control of the outer-loop (still used by default) by
and Hinfinity controller
- parametrize the guidance for an hexa-copter with tilted motors,
allowing to produce side force for lateral motion control.
- possibility to use basic PID with steering rover
- fix navigation
- add support for mission mode
- fix simulator (orientation was wrong, leading to opposite steering
between sim and reality)
- add support of 2 wheels rover in simulation
- add and update config files
* [generator] generate unique ID and names table for modules
* [state] add accessors for the state origin
* [state] don't access directly to state origin, use getters
* [state] filter inputs with module ID
* [ahrs] convert AHRS modules to state input filter
- selection of ahrs with settings from each module
- init functions for each ahrs modules
- remove old chimu
* update unit test
* [ins] decoupled INS implementation
To allow multiple INS at the same time:
- remove weak functions from ins.c
- remove the INS_TYPE_H define
- use ABI message to trigger INS reset
* [state] protect for c++
* Add actuator type attribute to command
* Implemented new command based counting of the atuators in the oneloop controller
* Added group attribute to dtd file. Initialize as empty subgroup count of commands. Avoid unnecessary array to list conversion.
* Generate list of names from defined commands
* Use the defined commands number and name in NPS
* Update sw/tools/generators/gen_airframe.ml
Co-authored-by: Gautier Hattenberger <gautier.hattenberger@enac.fr>
* Added logic to remove redundant code
---------
Co-authored-by: Gautier Hattenberger <gautier.hattenberger@enac.fr>
- the exact same basic model is now a NPS FDM
- sim target still woks, it is just an alias to NPS with the proper FDM
- the old ocaml files are removed
- AHRS and INS are bypassed, since the accelerations are not well calculated by the model
- old way (based on ins_vectornav) is not supported anymore
- directly send sensor data and receive commands with a dedicated link
- examples with USB link for better results
- update sphinx documentation
- compilation in a single build
* Steering wheel rover main files and guidance
* Fix: Undeclared function nav_reset_alt warning
* GVF mission flight plan
* NPS FDM for rovers
* GVF low_level_control.c included in gvf.c
* Rover main loop for non chibios arch (copy/paste from rotorcraft)
* Delete conf/modules/rover.xml
The creation of this file was a mistake.
* NPS for rover fixed
* rover_guidance_steering periodic -> autopilot state machine
* Fixes and comments
There is no longer a separated FBW in normal operation for fixedwing,
only a single AP task/thread.
The code for main_ap is now factorized for all firmwares.
Dual MCU support (separated AP and FBW) is still possible, based on the
rotorcraft implementation and intermcu pprzlink messages. Relevant code
is also factorized and available in all firmwares.
The recovery mode (in case of hard fault) is still available for
fixedwing with ChibiOS implementation.
Only intermcu_uart is supported at the moment. Other options (spi/can)
might be added back in the future if really used.
Some other evolution are made:
- in the radio_control and actuators modules, now integrated to AP and
using ABI messages
- the message parsing on datalink event (defined in module) that is now
properly filtering the messages based on their class and allowing to
have multiple callbacks for the same message
- cleaning the part of code that were using the old intermcu fixedwing
interface
* FIX#2807 by using pprz geodetic transformations instead of Gazebo's
* Cleanup
* Remove outdated section in nps_fdm_gazebo
* (WIP) clean up position transform and change to double accuracy
* Replace fdm_gazebo's spherical functions by paparazzi's
Co-authored-by: Tom van Dijk <tomvand@users.noreply.github.com>
- add a generic linear kalman filter lib
- add a quad model with linear drag and simplified for recent jsbsim
- add example frame and noisy NPS sensor config
see "Estimating wind using a quadrotor" in IMAV2021 proceedings
The development of jsbsim is now switch to git with an new active team.
The stable release v1.0.0rc1 has several fix and improvements, but
requires some modification from us to properly handle the type of file
path passed as arguments to load models.
Also, the default path when pkg-config is not found was /opt, which was
used in very early versions of NPS. The default is now /usr so that it
is compatible with a standard install of the new lib version.
* [bug] fix takeoff detect
error in detection logic, introduced in #2319
* [bug] conf by name and id should not be 'property' methods
* [nps] don't send DL_VALUE message when datalink is disabled
* [rtcm] add timer between message sending to prevent buffer overflow
part of #2407 ongoing work but seems necessary for proper operation with
RTK modules
This pull request updates the Bebop camera simulation in order to work with the new defines and settings from #2364. It also includes a number of small fixes by @kirkscheper .
The new setup renders the entire camera sensor, which allows the crop and zoom settings to be changed at runtime just as on the real drone. The resolution of the simulated sensor can be reduced for better runtime performance.
----
* update gazebo sim camera
* WIP Revert Bebop SDF cam hfov to 3.0, TODO update to full sensor size
* WIP mt9f002.c remove OUTPUT_SCALER comment
* WIP FIX image.c casting problem
vectors.pos is now cast to float to prevent unwanted implicit
casting to uint. I did not change the point_t types as I
do not have time to test this, but this would be a good idea for a later
pull request.
* WIP lucas_kanade.c comment keep_bad_points
* WIP opticflow_module.c replace memcpy with assignment for readability
* WIP nps_fdm_gazebo fix mt9f117 check for bottom_cam instead of front_cam
* WIP nps_fdm_gazebo do not set env_texture_size
The current size (2048) is probably large enough for all
realistic ZOOM settings.
* WIP ERROR nps_fdm_gazebo fix camera, corrupt image in gazebo :/
* WIP ERROR zoom is not tuneable at runtime :/
* WIP fixed sensor resolution in gazebo
Since the zoom should be adjustable at runtime, the zoom factor
will need to be implemented in the image sampling routine,
it cannot be set beforehand in the bebop model.
* WIP include mt9f002.c and mt9v117.c in NPS
Added simple wrapper files to prevent overwriting the video_thread_nps.c ones.
* WIP enable runtime zoom and offset changes for mt9f002 in NPS!
Zoom and offset settings can now be adjusted at runtime just like
on the real drone. The mt9f002.c code handles the bounds checking
etc.
* WIP take out string comparison in read_image
* WIP ignore GCC errors that do not appear in compilation for ARM
Might be better to actually fix these errors, but I am not familiar
with that part of the code.
* WIP remove todo file
* FIX ardrone2_gazebo build error
linking error was caused by undefined reference to mt9f002 struct
(which is not used in the ardrone). Removing the NPS MT9F002 define
means that this struct is always linked, even though it may not be
used. To fix, I added an empty `__attribute__((weak))` struct that
prevents these linking errors, but could cause unexpected behavior
when a Bebop model or other model with mt9f002 camera is used
without the bebop_cam module.
* FIX naming conflict after merge
* FIX Allow arbitrary simulated sensor sizes for runtime improvement
The FDM can now handle arbitrary sizes for the camera sensor.
This allows the sensor size to be reduced from the real-world
4608x3288 to a lower resolution to reduce rendering times, at
the cost of lower-resolution images.
The downscaling of the sensor is controlled using the
`NPS_MT9F002_SENSOR_RES_DIVIDER` define.
* Update Bebop 2 gazebo models for new front- and bottom cam code
* [abi] Add timestamp to AGL and BARO_ABS
* [make] Add support for c++0x for all architectures
* [math] Add air density calculation
* [gps] Add horizontal and vertical position accuracy
* [boards] PX4FMU change default baudrate and add SBUS
* [ins] Add EKF2
* [tests] Add Bebop2 with EKF2
* [nps] Fix jsbsim simulator initialisation and GPS accuracy
- state interface is not updated directly, it should go through air_data
or eventually some INS filter
- NPS is updated as well
- tas_from_eas (air_data) takes at least the altitude into account (not
temperature) when direct measurements of P and T are not availble