Commit Graph

2509 Commits

Author SHA1 Message Date
Silvan Fuhrer 4be74befd2 VTOL: remove pusher reverse feature
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-03-06 14:00:02 +01:00
Beat Küng e129534a58 fix ROMFS: add rc.autostart_ext to cmake 2023-03-01 08:53:17 -05:00
Silvan Fuhrer 006321e278 Commander: remove unused param COM_POS_FS_EPV
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-24 13:32:38 +01:00
Alejandro Hernández Cordero ea6814d258
Simulation Gazebo: Use Gazebo Airpressure sensor (#21176)
* Simulation Gazebo: Use Gazebo Airpressure sensor

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

* Fixed build

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

* Added feedback

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

* make linters happy

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

---------

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
2023-02-22 19:32:25 +01:00
Jaeyoung Lim 5676cc32bc Optionally enable sensor simulations 2023-02-21 11:16:25 -05:00
Jaeyoung Lim 3f50bd051f Optionally enable airspeed sensor sim
Enable and disable sensor sim module with parameter
2023-02-15 01:37:32 +09:00
Beniamino Pozzan ea91dbb0f5 gazebo-classic_iris_vision: fix airframe include and default parameters
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2023-02-14 03:26:56 +09:00
Jaeyoung Lim 65c287781f Set prearm mode 2023-02-13 13:00:39 -05:00
Jaeyoung Lim df4083265f Add standard vtol airframe configs 2023-02-13 13:00:39 -05:00
Jaeyoung Lim d5ddb44241 Add sensor airspeed sim
This commit adds the airspeed sensor sim to simulate airspeed sensors
2023-02-13 13:00:39 -05:00
Konrad 6bdeb43e0d fw_path_navigation: Remove explicit L1 mentioning. 2023-02-09 17:51:55 +01:00
Konrad aa3af7f707 fw_pos_control: purge L1 controller 2023-02-09 17:51:55 +01:00
Beat Küng f05e8a699e
ROMFS: enable COM_LOW_BAT_ACT by default for SITL 2023-02-07 19:11:29 -05:00
JaeyoungLim 01c5b3934e
Tune GZ plane (rc_cessna) to fly nicely (#21077)
* Increase control surface joint controller gains

* Enable prearm mode and disable airpspeed checks for gz plane
2023-02-06 16:24:01 -05:00
Silvan Fuhrer e153d1defc ROMFS: fix PY asymmetry (motor 1 was wrongly placed twice as far from the CG as 0)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-04 16:08:40 +01:00
Silvan Fuhrer 9b3a28dff5 Commander: add local_position_accuracy_low flag, incl. warning and RTL
Set this flag to true if local position is valid but accuracy low, such that
the operator can be warned before system switches to position-failure failsafe.
Additionally, switch to RTL if currently in Mission or Loiter to try to reach home
or fly out of GNSS-denied area.

Set low accuracy threshold to 50m by default for FW and VTOL.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-01 16:47:11 +01:00
Silvan Fuhrer 3ca126cc46 Commander: improve description of COM_FS EPH, EPV, VEL_EVH params and increase FW and VTOL defaults
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-01 16:47:11 +01:00
Benjamin Perseghetti 684b4a4b8a
simulation/gz_bridge: rc_cessna plane model working, Gazebo Garden updates, and prepare for proper airspeed (#20989)
Co-authored-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
2023-01-24 19:01:45 -05:00
JaeyoungLim 644aeb9153
support fixed-wing in new Gazebo (gz or ignition gazebo) (#20939)
* Add gz plane airframe config

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2023-01-24 09:22:53 -05:00
Daniel Agar 3f842f01a0
simulator/gz_bridge: split actuator outputs for ESCs and servos (#20979)
- existing SIM_GZ outputs -> SIM_GZ_EC (ESCs)
 - new SIM_GZ_SV for servos (not fully implemented)
2023-01-21 14:44:09 -05:00
murata c054ca20cc logger: Add arm to shutdown 2023-01-18 07:47:36 +01:00
Daniel Agar 6991ac014c
rename 'gazebo' simulation to 'gazebo-classic' (#20936)
- use `gazebo-classic` everywhere consistently referring to the original Gazebo (eg version 9,10,11)
   - additional `gazebo_*` helper targets added for compatibility, but warn about deprecation and tell you the new target naming
 - use `gz` everywhere when referring to Gazebo (aka Ignition Gazebo or new Gazebo)
2023-01-15 11:36:12 -05:00
murata 82ecbccd85 distance_sensor: Add TF02 Pro I2C 2023-01-14 09:28:33 -05:00
Julian Oes 72d36fc874 sensors: Add param for VL53L0X to startup
It turns out there was no param to enable starting the VL53L0X at
startup.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-01-11 09:52:27 -05:00
Daniel Agar 618288cca9 SITL Gazebo classic make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar 97c8a60d67 SITL gz make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar ae4cb24100 SITL flightgear make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar 1abe35c220 SITL jsbsim make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar 75125da34c SITL sihsim make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar 95a6eba36c SITL jmavsim make airframes simulator specific
-cleanup and simplify jmavsim SITL launch and debug
2023-01-07 17:00:35 -05:00
Daniel Agar 34c57cc5b5 px4-rc.simulator shellcheck fixes 2023-01-04 17:35:41 -05:00
bresch 14bf04b9a4 SIH: add to px4_fmu-v5_default and auto start GPS sim driver
- add simulator kconfig dependencies
 - exclude SIH (+deps) where sufficient flash isn't available
2023-01-04 16:26:15 -05:00
Daniel Agar ca9ae80b10
px4-rc.simulator support launching new Gazebo Garden vs Fortress (#20864)
- "ign gazebo" command is now "gz sim" as of Gazebo Garden
2023-01-04 12:39:06 -05:00
JaeyoungLim 21e88f64b4
Add new fixed wing rate control module (fw_rate_control)
* Fixedwing rate control into a separate module
* Start fw_rate_control for vtol
* Move over airspeed related parameters to fw_rate_control

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2023-01-04 11:14:00 -05:00
Daniel Agar f2cd7667dc systemcmds/bsondump: new command line utility (extracted from parameters) 2022-12-21 10:14:00 -05:00
Beat Küng 5217bedd4b commander: make SYS_HAS_MAG a count param and ensure system has N calibrated + enabled mags 2022-12-14 07:55:04 +01:00
Daniel Agar 72cb4bee01
SITL gz fixes and init cleanup (#20725)
- remove broken gz version handling and remove x500-legacy
 - fix all shellcheck warnings
 - prepare for Gazebo Garden compatibility (needs more work)
2022-12-07 15:41:13 -05:00
Beniamino Pozzan f2c71a8874 microdds_client: added environment variable for defining namespace
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2022-12-07 14:36:23 -05:00
Beniamino Pozzan 5a2e41c4e4 microdds_client: add XRCE_DDS_KEY parameter
Multiple agents can connect to the same client

For sitl builds, if the intance number is different from zero,
  XRCE_DDS_KEY is set to the instance number and
  the microdds_client is automatically started
    with namespace
      px4_"instance_number"
    and udp port 8888
If the instance number is equal to zero
  XRCE_DDS_KEY is left untouched and
  the microdds_client is automatically started
    without namespace
    and udp port 8888

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2022-12-07 14:36:23 -05:00
Beniamino Pozzan a92897fb58 microdds_client: add namespace to partecipant name
The partecipant name is modified into
"client_namespace"/px4_micro_xrce_dds

For sitl builds the microdds_client is automatically started
with namespace
px4_"instance_number"
and udp port
8888+"intance_number"

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2022-12-07 14:36:23 -05:00
Silvan Fuhrer 2b8295e30f FW Position control: switch from L1 to NPFG guidance by default
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-12-06 12:54:58 -05:00
alexklimaj c7a8589afc Add ARK PAB Carrier
Add ARK_FMU_V6X to RCS netman

Remove arkv6x rc single wire

Fix arkv6x mtd

arkv6x bootloader init all pins to prevent power cycling peripherals on boot

arkv6x don't power cycle sd card on boot

arkv6x add UART4 Telem 4
2022-11-22 18:14:50 -05:00
Thomas Stastny 8157d83bfc ROMFS: remove deprecated runway takeoff param sets 2022-11-22 13:46:25 -05:00
Thomas Stastny 263a1884b1 fixed-wing: explicitly define landing airspeed
landing airspeed was previously defined by a scale factor multiplied by minimum airspeed. this commit changes this parameter to an explicit speed, and when unspecified, defaults to the minimum airspeed
2022-11-22 13:46:25 -05:00
Silvan Fuhrer 0941ae7579 Navigator: remove MIS_LTRMIN_ALT param, and use new param MIS_LND_ABRT_ALT for landing abort
MIS_LTRMIN_ALt was used to limit the go-to altitude of a LOITER_TO_ALT (not the exit altitude,
but the altitude that the vehicle went to to fly to WP), and during landing abort to climb to
at least this altitude. The min entry altitude of LOITER_TO_ALT I remove with this commit, while
for the min alt during abort I added the new parameter MIS_LND_ABRT_ALT.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-22 13:46:25 -05:00
Silvan Fuhrer 4cd7dfa162 MissionFeasibility: add combined takeoff/landing requirement check
Replace the existing check for the availability of a takeoff mission item with a combined
check for takeoff and landing item (or landing pattern). New param MIS_TKO_LAND_REQ
can be set to require only a takeoff, only a landing, both takeoff and landing, and
both or none. The latter is meant to be set if is e.g. deemed unsafe to start a flight
through a Takeoff WP without though defining a Landing - as then in case of a RTL the
vehicle doesn't follow a pre-defined path but instead only can do default RTL that especially
for FW and VTOL isn't always safe.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-21 18:03:21 +01:00
alexklimaj 054a549dae Move uavcan start to end of rcS to prevent sd card read lock 2022-11-14 09:32:10 -05:00
Daniel Agar 5239993c88 ekf2: move EV vel to new state machine, introduce EKF2_EV_CTRL param 2022-11-08 11:46:41 -05:00
JaeyoungLim a9542baf3c
Enable motor controls for tailsitter VTOLs in fixed wing mode (enable Quad Tailsitters) (#20511)
* Enable motor controls for fixed wing mode in tailsitters

This commit enable motor controls in fixed wing mode for tailsitters

This is needed for enabling quad tailsitters

* VTOL: differential thrust in FW: adapt params to be generic for all axes

Until now only suppoted on yaw axis. Not to be supported also on Roll and Pitch.

- VT_FW_DIFTHR_EN: make bitmask for all three axes independently. First bit is Yaw,
sucht that existing meaning of VT_FW_DIFTHR_EN doesn't change.
- VT_FW_DIFTHR_SC: rename to VT_FW_DIFTHR_S_Y and add same params for roll (_R) and
pitch (_P).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* Integrate differential control bits to three axis control

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-07 15:29:14 +01:00
benjinne c5c634be7f
lisXmdl: use I2CSPIDriverConfig (#20506)
- allows to configure the I2C address
- lis3mdl: add 2nd possible address to start
2022-11-01 07:42:27 +01:00
Daniel Agar cea185268e
msg ROS2 compatibility, microdds_client improvements (timesync, reduced code size, added topics, etc), fastrtps purge
- update all msgs to be directly compatible with ROS2
 - microdds_client improvements
   - timesync
   - reduced code size
   - add to most default builds if we can afford it
   - lots of other little changes
 - purge fastrtps (I tried to save this multiple times, but kept hitting roadblocks)
2022-10-19 19:36:47 -04:00
Beat Küng c09be0f0ac airframes: add r1 again
This was dropped in f454dcef6b
2022-10-12 07:35:35 +02:00
Beat Küng f79dad1e63 fix ROMFS: run camera trigger, capture and PPS before pwm_out
As they might need to reserve the pwm pins.
2022-10-05 09:13:35 -04:00
Matthias Grob b179427b4c Remove opinionated non-default MPC_TKO_SPEED from airframes 2022-10-04 11:36:57 -04:00
Benjamin Perseghetti aa2b47845a
new Gazebo simulation handle older gz versions (#20342) 2022-10-02 21:30:30 -04:00
Benjamin Perseghetti f9522e831c
Gazebo Simulation Enablement (#20319) 2022-09-29 13:49:31 -04:00
Silvan Fuhrer dd2e6bd416 ROMFS: SITL configs: enable airmode by default for all VTOLs
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-09-29 16:01:43 +02:00
Silvan Fuhrer fbc7e6a435 ROMFS: tiltrotor sitl config: use tilt for yaw in hover as opposed to differential thrust
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-09-29 16:01:43 +02:00
Karthik S 70d73c8690
Advanced Plane Airframe for SITL Advanced Lift-Drag Plugin (#20207)
* Changed sitl_gazebo to the advanced liftdrag plugin fork.

* Added advanced plane and its associated parameters to PX4. Also tweaked one of the plugins to fix a compilation error (upcasting from float to double).

* Switched gazebo back to main branch, to avoid merge conflicts.

* Change simulator bridge back to what it was in main branch

* Changed sitl_gazebo to match the PX4 main branch's (commit hash b968405)

* Changed SimulatorIgnitionBridge to match most recent main.
2022-09-27 23:09:27 +02:00
vincentpoont2 4951ce0ed7 Add PX4 vision v1.5 Airframe 2022-09-15 13:33:04 -04:00
Daniel Agar b8fb5dfa51
merge px4_sitl_ign into px4_sitl_default (#20188)
- for convenience merge px4_sitl_ign into px4_sitl_default, but allow simulator_ignition_bridge to quietly skip inclusion if ignition-transport isn't available
 - simulator_ignition_bridge only try setting the system clock in
lockstep builds
 - this simplifies usage and CI system dependencies
2022-09-10 16:18:02 -04:00
Daniel Agar 8f25acd428 sih remove gps and use standalone sensor_gps_sim 2022-09-09 18:00:50 -04:00
Daniel Agar bfe0d71a21 sih remove baro and use standalone sensor_baro_sim 2022-09-09 18:00:50 -04:00
Daniel Agar c5336abba2 sih remove mag and use standalone sensor_mag_sim 2022-09-09 18:00:50 -04:00
Daniel Agar 3f3a5f19f0 parameters: open export files O_TRUNC to discard previous data
- rcS parameter backup try to directly restore param (FRAM) from backup (in case SD card is removed before successful export)
 - rcS parameter backup logging rearrange to capture more logging output (param_import_fail.txt)
 - posix rcS try to keep param backup and restore roughly in sync with NuttX rcS
 - tinybson fix debug printf format
 - param_export_internal ensure file descriptor positioned at 0 (precaution)
2022-09-09 16:20:16 -04:00
Daniel Agar 55be169e18 delete remaining PWM_MAIN/PWM_AUX/PWM_EXTRA parameters 2022-09-09 09:14:09 -04:00
Daniel Agar ce337a3d80 delete unused PWM IOCTLs 2022-09-09 09:14:09 -04:00
Daniel Agar cac9c51ac8 ROMFS: purge old mixing system
- SYS_USE_IO is now off by default (enabled by default per board)
2022-09-09 09:14:09 -04:00
Junwoo Hwang 2542b1bb26 Implement Pacakge delivery via Gripper during mission
This feature allows user to use a Gripper type pacakge delivery
mechanism on a drone to trigger the delivery during a mission via the
mission item `DO_GRIPPER`.

This is a minimal change that is intended to have simplest pacakge
delivery feature on PX4, however the future scope would extend this
feature out of Navigator, and rather move towards a federated PX4
(flight-mode flexibility) architecture. But until then, this will serve
the purpose.

Update Tools/sitl_gazebo submodule to remove sdf file overwrite error

- There was an error happening due to .sdf file being overwritten, it
was caused by a wrongfully added. sdf file.
- This update pulls in the PR commit: https://github.com/Auterion/sitl_gazebo/pull/147

Initial cut on supporing PAYLOAD_PLACE mission item

Tidy and comment on navigation.h to clarify mission item definition

- Convert vehicle command ack subscription data type to
SubscriptionData, to not care about having a dedicated struct for
copying the latest data
- Tidy and comment on navigation.h to clarify the definition of
mission_item_s, which is confusing as it is an intergration of MAVLink
Standard into PX4's internal Mission Item structure

Rename mission_block's mission item reached function & cleanup navigator

- Isolated Handle Vehicle Commands function inside the Navigator
- Rename mission_block's mission item reached function to 'reached or
completed', as the navigation command can also be an action (e.g.
DO_SET_SERVO, which doesn't make sense to refer to as 'reached' when we
have successfully done executed the command)

Include MAVLink PR commit to include payload_drop message

More changes to add payload_drop MAVLink message support

- Comitting for testing purposes

Add mission item payload_drop to vehicle command payload drop link

- Now with a mission item with the nav_cmd set to 'payload drop', the
appropriate 'payload drop' vehicle command will be issued

Make Payload drop executable via Mission Plan

Implement payload_drop module to simulate payload delivery

- Simple module that acknowledges the payload drop vehicle command after
certain time, to simulate a successful delivery

Additional changes - payload drop module not working yet

- Need to do more thread stuff to make it work :(

Fix Payload Drop enum mismatch in vehicle_command enums

- First functional Payload Drop Implementation MVP
- Simple Ack & resuming mission from Navigator tested successfully

Hold the position while executing payload drop mission item

- Still the position hold is not solid, maybe I am missing something in
the position setpoint part and all the internal implications of
Navigator :(

Add DO_WINCH command support

Some fixes after rebase on develop branch

- Some missed brackets
- Some comment edits, etc

Add DO_WINCH command support

- Still has a problem of flying away from the waypoint while the
DO_WINCH is being executed, probably position setpoint related stuff :(

Apply braking of the vehicle for DO_WINCH command

- Copies the behavior of NAV_CMD_DELAY, which executes a smooth, braking
behavior when executing the delay because of the braking condition in
`set_mission_items` function
- This will not apply to Fixed wings
- The payload deploy getting triggered may be too early, as right now as
soon as the vehicle approaches the waypoint within the acceptance
threshold, the payload gets deployed

Add DO_GRIPPER support

Implement Gripper actual Hardware triggering support

- Currently not working, possibly in the mixer there's a bug
- Implemented the publishing of actuator_controls_1 uORB topic
- Implemented the test command for the payload_drop module, to test the
grpiper functionality
- Edited px4board file to include the payload_drop module
- Added Holybro X500 V2 airframe file, to enable testing on X500 V2
- Created new Quad X Payload Delivery mixer, which maps the actuator
controls 1 topic's data into the MAIN pin 5 output

Make Payload Drop Gripper Work

- Initialization of the Gripper position to CLOSED on Constructor of the
payload_drop module
- Setting the OPEN and CLOSED value to the appropriate actuator controls
input

Set vehicle_command_ack message's timestamp correctly

- By not setting the timestamp, the ack commands were not correctly
graphed in PlotJuggler!

Rename payload drop module to payload deliverer

- I think it's a more complex name (harder to type), but more generic

Add Gripper class (WIP)

Add Gripper class functionalities

- Add gripper uORB message
- Add gripper state machine

Use Gripper class as main interface in payload_deliverer

- Utilizes Gripper class functions for doing Gripper functionality

Remove mixer based package delivery trigger logic

- Remove custom mixer files that mapped actuator controls to outputs
statically

Additional improvements of the payload_deliverer

Fix payload_deliverer module not starting

- _task_id wasn't geting set appropriately in task_spawn function, which
led to runtime failure

Add Gripper Function to mixer_module

- Still not showing up as function mapping in QGC, needs fix

Add parameters to control gripper behavior

- Now user can enable / disable gripper
- Also select which type of gripper to use

Applying review from nuno

Remove timeout fetching from mission item and use gripper's timeout

- Previously, it was planned to use a custom DO_GRIPPER and DO_WINCH
MAVLink message definitions with information on timeout, but since now
we are using original message definition, only relevant timeout
information is defined in the payload_deliverer class

- This change brings in the timeout parameter to the Navigator, which
then sets the timeout in the mission_block class level, which then
processes the timeout logic

Make payload deployment work for Allmend test :P

Support gripper open/close test commands in payload_deliverer

Move enum definition for GRIPPER_ACTION to vehicle_command.msg

Remove double call for ` ${R}etc/init.d/rc.vehicle_setup`

- Was introduced during the rebase
- Was causing module already running & uORB topic can't be advertised
errors

Fix format via `make format` command

Modify S500 airframe file to use for control allocation usage

- Added Control allocation related parameters as default to not have it
reset every time the airframe is selected

Implement mission specific payload deploy timeout and more changes

Switch payload_deliverer to run on work queue

Remove unnecessary files

- Airframe changes from enabling control allocation are removed

Address review comments

- Remove debug messages
- Remove unnecessary or verbose comments & code
- Properly call parameter_update() function

Switch payload_deliverer to scheduled interval work item & refactor

- Switch to Schedeuled on Interval Work Item, as previous vehicle
command subscription callback based behavior led to vehicle comamnd ack
not being sent accordingly (since the Run() wouldn't be called unless
there's a new vehicle command), leading to ack command not being sent
out
- Also, old vehicle commands were getting fetched due to the
subscription callback as well, which was removed with this patch
- Fix the wrong population of floating point param2 field of vehicle
command by int8_t type gripper action by creating dedicated function
- Refactor and add comments to increase readability

Add gripper::grabbing() method and handle this in parameter update

- Previously, the intermediate state 'grabbing' was not considered, and
when the parameter update was called after the first initialization of
the gripper, the grab() function was being called again, which would
produce unnecessary duplicate vehicle command.
- Also replaced direct .grab() access to sending vehicle comamnd, which
unifies the gripper actuation mechanism through vehicle commands.

Navigator: Change SubscriptionData to Subscription to reduce memory usage

- Also removed unused vehicle command ack sub

PayloadDeliverer: Remove unnecessary changes & Bring back vehicle_command sub cb
2022-09-07 08:11:52 +02:00
Matthias Grob f233f2167e
generic_250, px4vision: remove zero manual thrust without airmode
When hitting zero thrust by stick there is 0 torque authority
without airmode. So 0% minimum manual thrust should never be the default
without airmode.
2022-09-07 08:00:27 +02:00
Matthias Grob 8a25d06ed7
heli_defaults: comment and spacing 2022-09-07 08:00:26 +02:00
Beat Küng 2635e2c386
airframes: replace blade with generic helicopter 2022-09-07 08:00:26 +02:00
Benjamin Perseghetti a56f654651
Multi-Vehicle Ignition Gazebo Simulation (#20154) 2022-09-04 21:10:29 -04:00
Beat Küng 715afd27f5 ROMFS: exclude mixers on v2 & disable mixer command
The dynamic mixing is now the default
2022-08-25 22:02:15 -04:00
Beat Küng b4a3597c7d posix rcS: set PWM_AUX_OUT
Prevents a shell error in rc.interface
2022-08-25 22:02:15 -04:00
Beat Küng 552d08176f posix rcS: set MAV_PROTO_VER to 2
For SITL it's important that the GCS receives the first events messages
that reset the sequence number, in case the user does not press 'Disconnect'
when restarting SITL.
2022-08-25 22:02:15 -04:00
Benjamin Perseghetti 0e8e38e698 Add x500 ignition (replaces x3) 2022-08-25 09:10:03 -04:00
Daniel Agar 4040e4cdf2 simulation organization and cleanup
- new modules/simulation directory to collect all simulators and related modules
 - new Tools/simulation directory to collect and organize scattered simulation submodules, scripts, etc
 - simulation module renamed to simulator_mavlink
 - sih renamed to simulator_sih (not a great name, but I wanted to be clear it was a simulator)
 - ignition_simulator renamed to simulator_ignition_bridge
 - large sitl_target.cmake split by simulation option and in some cases pushed to appropriate modules
 - sitl targets broken down to what's actually available (eg jmavsim only has 1 model and 1 world)
 - new Gazebo consistently referred to as Ignition for now (probably the least confusing thing until we fully drop Gazebo classic support someday)
2022-08-25 09:10:03 -04:00
FARHANG 8b4df8ceb2
airframes: re-add Holybro X500v2 with dynamic control allocation 2022-08-25 07:52:18 +02:00
bresch 6833c7e311 ekf2: adjust ekf2 aid parameters in configs 2022-08-24 09:16:11 -04:00
bresch 8962cf2d25 ekf2: GPS, baro and range finder control parameters
Also remove the legacy "range aid" than can be achieved by setting the
height reference to range finder and the range finder control parameter
to "conditional".

Conditional range aiding cal also be set when the height reference isn't
the range finder. This prevents the ratchetting effect due to switching
between references.
2022-08-24 09:16:11 -04:00
Daniel Agar cfc579542e
new Ignition Gazebo simulation interface architecture (#20057)
- much simpler direct interface using Ignition Transport 
 - in tree models and worlds
 - control allocation output configuration, no more magic actuator mapping to mavlink and back
 - currently requires no custom Gazebo plugins (keeping things as lightweight and simple as possible)

Co-authored-by: Jaeyoung-Lim <jalim@ethz.ch>
2022-08-22 10:58:19 -04:00
Silvan Fuhrer 70d7070307 ROMFS: plane airframe: make tuning tighter
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-19 09:40:48 +02:00
Silvan Fuhrer a7a8daaf4d ROMFS: tiltrotor sitl config: some small tuning improvements in hover
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-16 02:48:44 +02:00
Silvan Fuhrer 771dbf9395 ROMFS: tiltrotor sitl config: adapt CA params to new output indexes
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-16 02:48:44 +02:00
Silvan Fuhrer 9e18b351bc Allocation: add Single Channel Aileron to CS types
This is the control surface type for airframes that have only a
single aileron servo or have the ailerons on a single output channel.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-12 09:43:12 +02:00
Silvan Fuhrer c6d1b1f50f Allocation: add A-tail servo type
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-12 09:43:12 +02:00
Beat Küng f454dcef6b ROMFS: set control allocation parameters for airframes
Removes some airframes:
- 1000_rc_fw_easystar.hil
- 10015_tbs_discovery
- 10016_3dr_iris
- 10018_tbs_endurance
- 13001_caipirinha_vtol
- 13002_firefly6
- 13003_quad_tailsitter
- 13004_quad+_tailsitter
- 13005_vtol_AAERT_quad
- 13006_vtol_standard_delta
- 13007_vtol_AAVVT_quad
- 13008_QuadRanger
- 13009_vtol_spt_ranger
- 13012_convergence
- 13050_generic_vtol_octo
- 14001_tri_y_yaw+
- 14002_tri_y_yaw-
- 15001_coax_heli
- 2105_maja
- 2200_mini_talon
- 3031_phantom
- 3032_skywalker_x5
- 3033_wingwing
- 3036_pigeon
- 3100_tbs_caipirinha
- 4003_qavr5
- 4009_qav250
- 4019_x500_v2
- 4030_3dr_solo
- 4031_3dr_quad
- 4051_s250aq
- 4072_draco
- 4080_zmr250
- 4090_nanomind
- 4100_tiltquadrotor
- 50003_aion_robotics_r1_rover
2022-08-12 09:43:12 +02:00
Beat Küng 4d60fadc05 ROMFS: set control allocation parameters for sitl airframes
Removes some airframes:
- if750a
- solo
- iris_ctrlalloc
- typhoon_h480_ctrlalloc
2022-08-12 09:43:12 +02:00
Beat Küng 923a90d78b control_allocator: set default control surface type to (not set)
Before it was set to left aileron, but the torque values were all 0.
2022-08-12 09:43:12 +02:00
Beat Küng 720cf5a485 config: enable dynamic control allocation by default (SYS_CTRL_ALLOC=1) 2022-08-12 09:43:12 +02:00
Jaeyoung Lim ea5b1be2d4 Disable rear motors tilt for tiltrotor SITL airframe
This commit disables the rear motor tilt on the tiltrotor SITL airframe
2022-08-09 16:35:27 +02:00
Silvan Fuhrer 6ebc88fed7 ROMFS: vtol_defaults: reduce aggressiveness around roll and yaw axis
For most VTOLs the param defaults for the agressiveness of the MC attitude controller
are too high, as VTOLs usually have high intertia and lot af drag due to wings and
can thus not rotate as fast as MCs.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-05 14:11:59 +02:00
Silvan Fuhrer 45073f000a FW Position control: reduce defaults for max pitch
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-05 14:11:59 +02:00
Silvan Fuhrer d04f21aa16 FW attitude controller: reduce FW_MAN_P_MAX from 45 to 30
45° is a very large pitch angle, and for me 30° is much more reasonable for
a default value.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-05 14:11:59 +02:00
Silvan Fuhrer 828992adf7 increase default of MPC_Z_VEL_MAX_DN and MPC_Z_V_AUTO_DN from 1 to 1.5
I think most vehicle can safely decend with at least 1.5m/s, and having this
value too low makes Descents/Landings/RTLs unnecessary long.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-05 14:11:59 +02:00
Silvan Fuhrer c42667ac64 ROMFS: vtol_defaults: remvoe custom NAV_ACC_RAD, leave at param default (10)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-05 14:11:59 +02:00
Silvan Fuhrer 4614c1a0b4 ROMFS: vtol_defaults: increase default hover speeds
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-05 14:11:59 +02:00
Silvan Fuhrer 0d10491b89 ROMFS: vtol_defaults: remove MPC_TKO_SPEED from VTOL defaults
The VTOL default was set to 1, while the param default is 1.5.
I don't see why it shuold be a different default for VTOLs and thus remove it.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-05 14:11:59 +02:00
Hamish Willee 30e2490d5b
Docs are now in user guide and main (#19977)
* Fix links to docs in source to point to docs on main not master

* More docs and scripts that need to point to main
2022-08-01 11:39:39 +10:00
Hamish Willee e6eed43648
Spelling errors (#19935) 2022-07-27 14:33:16 +10:00
Silvan Fuhrer c9c62b860c ROMFS: add generic tiltrotor VTOL (13200)
Add geometry for a quad tiltrotor VTOL, with only front motors tiltable,
two ailerons and a V-tail.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-07-21 10:09:12 -04:00
Silvan Fuhrer 3ffc37d988 ROMFS: generic tailsitter VTOL: enable CA by default and remove legacy mixer
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-07-21 10:09:12 -04:00
Silvan Fuhrer ab58717313 ROMFS: standard VTOL: enable CA by default and remove legacy mixer
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-07-21 10:09:12 -04:00
Silvan Fuhrer 607c53e873 ROMFS: flying wing: enable CA by default and remove legacy mixer
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-07-21 10:09:12 -04:00
Silvan Fuhrer 4dabc8b7ed ROMFS: standard plane: enable CA by default and remove legacy mixer
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-07-21 10:09:12 -04:00
Thomas Stastny 87e09ad9f5 fw pos ctrl: auto landing refactor
- landing slope/curve library removed
- flare curve removed (the position setpoints will not be tracked during a flare, and were being ignored by open-loop maneuvers anyway)
- flare curve replaced by simply commanding a constant glide slope to the ground from the approach entrance, and commanding a sink rate once below flaring alt
- flare is now time-to-touchdown -based to account for differing descent rates (e.g. due to wind)
- flare pitch limits and height rate commands are ramped in from the previous iteration's values at flare onset to avoid jumpy commands
- TECS controls all aspects of the auto landing airspeed and altitude/height rate, and is only constrained by pitch and throttle limits (lessening unintuitive open loop manuever overrides)
- throttle is killed on flare
- flare is the singular point of no return during landing
- lateral manual nudging of the touchdown point is configurable via parameter, allowing the operator to nudge (via remote) either the touchdown point itself (adjusting approach vector) or shifting the entire approach path to the left or right. this helps when GCS map or GNSS uncertainties set the aircraft on a slightly offset approach"
2022-07-19 22:37:09 -04:00
Roman Dvořák ed14151734
Update Flight-gear bridge, Add support of TF-G2 autogyro flight-gear model (#19122)
* Add Transfer of RPM from FG to PX4,
	-switch FG_bridge module to ThudnderFlyaerospace

* Add TF-G2 flightgear sim target

* Add simulator support, fix astyle

* Update SITL TF-G2 airframe, update fg bridge

Co-authored-by: Vit Hanousek <vithanousek@seznam.cz>
2022-07-19 09:11:44 +02:00
Silvan Fuhrer 1e0235d87b ROMFS: remove outdated RWTO_MAX_ROLL from all configs
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-07-18 10:49:27 -04:00
RomanBapst 461d0561b8 replace FW_THR_CRUISE with FW_THR_TRIM
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-07-12 09:07:20 +02:00
Daniel Agar e1933f6ade ROMFS: execute rc.autostart (airframes) before starting dataman 2022-07-07 11:37:39 -04:00
Silvan Fuhrer b0490b9f6b ROMFS: assign all 4 tilts to motors to have them all tilt
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-07-06 09:04:52 +02:00
Igor Mišić 4b503c310e Merge PR #19575 (changes to pr-extendend_hw_ver_rev_format)
- 4096 of 3 hex digits each for rev and ver is enough.
    #defines used in SPI versions do not be long format, use use the macro
 - Board provides a prefix and the formatting is sized and built in
 - No need for funky board_get_base_eeprom_mtd_manifest interface
    Original mft is used where the abstraction is done with the MFT interface

Co-authored-by: David Sidrane <David.Sidrane@Nscdg.com>
2022-07-05 09:29:26 +02:00
Martina Rivizzigno 55563eba49 MPC_SPOOLUP_TIME -> COM_SPOOLUP_TIME 2022-06-24 19:44:43 +02:00
Daniel Agar d5839e2dd5 optical flow sensor pipeline overhaul
- all sources of optical flow publish sensor_optical_flow
 - sensor_optical_flow is aggregated by the sensors module, aligned with integrated gyro, and published as vehicle_optical_flow

Co-authored-by: alexklimaj <alex@arkelectron.com>
2022-06-20 20:56:56 -04:00
Alessandro Simovic de1fa11e96 New follow-me flight task
rename follow_me_status to follow_target_status

enable follow_target_estimator on skynode

implement the responsiveness parameter:
The responsiveness parameter should behave similarly to the previous
follow-me implementation in navigator. The difference here is that
there are now two separate gains for position and velocity fusion.
The previous implemenation in navigator had no velocity fusion.

Allow follow-me to be flown without RC

SITL tests for follow-me flight task

This includes:
- Testing the setting for the follow-me angle
- Testing that streaming position only or position
  and velocity measurements both work
- Testing that RC override works

Most of these tests are done with a simulated model
of a point object that moves on a straight line. So
nothing too spectacular. But it makes the test checks
much easier.

Since the estimator for the target actually checks new
measurements and compares them to old ones, I also added
random gausian noise to the measurements with a fixed seed
for deterministic randomness. So repeated runs produce
exactly the same results over and over.

Half of the angles are still missing in MAVSDK. Need to create
an upstream PR to add center left/right and rear left/right options.
These and the corresponding SITL tests need to be implemented
later.

sitl: Increase position tolerance during follow-me

Astro seems to barely exceed the current tolerance (4.3 !< 4.0)
causing CI to fail. The point of the CI test is not to check
the accuracy of the flight behaviour, but only the fact that the
drone is doing the expected thing. So the exact value of this
tolerance is not really important.

follow-me: gimbal control in follow-me

follow-me: create sub-routines in flight task class

follow-me: use ground-dist for emergency ascent

dist_bottom is only defined when a ground facing distance sensor exist.
It's therefore better to use dist_ground instead, which has the distance
to the home altitude if no distance sensor is available.

As a consequence it will only be possible to use follow-me in a valley
when the drone has a distance sensor.

follow-me: point gimbal to the ground in 2D mode

follow-me: another fuzzy msg handling for the estimator

follow-me: bugfix in acceleration saturation limit

follow-me: parameter for filter delay compensation

mantis: dont use flow for terrain estimation

follow-me: default responsiveness 0.5 -> 0.1

0.5 is way too jerky in real and simulated tests.

flight_task: clarify comments for bottom distance

follow-me: minor comment improvement

follow-me: [debug] log emergency_ascent

follow-me: [debug] log gimbal pitch

follow-me: [debug] status values for follow-me estimator

follow-me: setting for gimbal tracking mode

follow-me: release gimbal control at destruction

mavsdk: cosmetics 💄
2022-06-16 16:14:57 -04:00
Thomas Debrunner 46c9d1e288
SIH in SITL with lockstep (#19028)
* sih: Move sih out of work queue
This reverts commit bb7dd0cf00.

* sih-sim: Enable sih in sitl, together with lockstep

* sih-sim: new files for sih: quadx and airplane

* sih: Added tailsitter for sih-sitl simulation

* sitl_target: Added seperate target loop for sih

* jmavsim_run: Allow jmavsim to run in UDP mode

* lockstep: Post semaphore on last lockstep component removed

* sih-sim: Added display for effectively achieved speed

* sih: increase stack size

* sih-sim: Improved sleep time computation, fixes bug of running too fast

* sitl_target: place omnicopter in alphabethic order

Co-authored-by: romain-chiap <romain.chiap@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2022-06-09 09:52:34 +02:00
Beat Küng 8bf18e31be SITL: enable failure command (SYS_FAILURE_EN=1) 2022-06-04 07:40:29 +02:00
Jaeyoung-Lim bf68d3433e Add omnicopter SITL model
F
2022-06-04 07:40:29 +02:00
Mark Sauder a1fb9fb7c6
rcS: Keep Mag Cal with AUTOCONFIG param reset in rcS, deprecate rcS AUTOCNF param (#19693)
* Deprecate the rcS AUTOCNF script param and associated logic.

* Update posix rcS to match previous commit.
2022-05-23 20:35:22 -04:00
Julian Oes 47bcee70c4 ROMFS: disable UAVCAN in HITL
Without this, uavcan creates MixingOutput classes which then create
empty actuator_outputs publications. This then prevents the motor
output in HITL to be forwarded to the simulator via mavlink.
2022-05-21 17:53:20 -04:00
Silvan Fuhrer 635f64a2e5 Commander: remove permanent stabilization option for fixed-wing flight
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-18 10:01:04 +02:00
Alessandro Simovic 5c1932dcca disable engine failure detector for SITL VTOL
Tried increasing ESC timeout for VTOL first

VTOL sitl tests are failing because the ESC telemetry seems to be coming
in at 0.3 Hz
2022-05-12 07:58:56 +02:00
Alessandro Simovic 06f69cd469 Add SITL tests for control allocation 2022-05-12 07:58:56 +02:00
Silvan Fuhrer ea2c1095c2 ROMFS: SITL tiltrotor: enable control allocaton and only tilt front motors
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-11 10:19:37 +02:00
Daniel Agar a71d101869 ROMFS: delete 3037_parrot_disco_mod airframe 2022-05-10 16:23:20 -04:00
Daniel Agar 42d7fb0b66 ROMFS: delete 3035_viper airframe and mixer 2022-05-10 16:23:20 -04:00
Daniel Agar 61c5d11375 ROMFS: delete 3034_fx79 airframe 2022-05-10 16:23:20 -04:00
Daniel Agar f1a1ed4958 ROMFS: delete 3030_io_camflyer airframe 2022-05-10 16:23:20 -04:00
Daniel Agar b00d0720cd ROMFS: delete 13010_claire airframe 2022-05-10 16:23:20 -04:00
Daniel Agar 451cc5058d ROMFS: delete minimal DJI airframes 2022-05-10 16:23:20 -04:00
Daniel Agar fa1891ace2 ROMFS: delete steadidrone airframes 2022-05-10 16:23:20 -04:00
Peter van der Perk b1ad4e8864 Upgrade libcanard to 3.0 and rename uavcan_v1 to cyphal
Did some prep work for redundant interfaces by introducing CanardHandle class to decouple physical interfaces from cyphal.cpp
2022-05-10 09:46:18 -04:00
achim fc887a23af
boards: matek h743 mini 2022-05-06 10:09:14 -04:00
Silvan Fuhrer 20400cbb74 ROMFS: reduce FW_SPOILERS_LND to 0.4 to leave ailerons enough control authority
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-06 16:05:03 +02:00
Silvan Fuhrer 4b8f93de5c FW: rework spoiler/flap control logic
- remove separate flaperon controls input to mixer instead enable spoiler support
- add slew rate limiting on both flap and spoiler controls
- add spoiler configuration for Landing and Descend
- add trimming from spoiler deflection
- FW Attitude control: remove FW_FLAPS_SCL param -->
    The flap settings for takeoff and landing are now specified relative to full range.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-03 15:11:21 +02:00
Silvan Fuhrer 21a2892f47 use actuator_controls[8] for collective tilt for tiltrotor VTOL, instead of [4]
[4] is reserved for Flaps, so also having the tilt on it was preventing us from
using flaps on tiltrotors, and other ripple effects.
By using [8] the tilt is separated from all other channels - it requires to increase the size of
actuator_controls by 1 to 9.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-03 15:11:21 +02:00
Daniel Agar f390f52058 drivers/differential_pressure: remove lib/drivers/airspeed dependency and cleanup
- split ms4525_airspeed into separate ms4515 and ms4525 drivers
2022-04-26 08:39:19 -04:00
Silvan Fuhrer ae5725e71a ROMFS: fix typo in convergence and clair configs
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-04-23 10:29:57 -04:00
Daniel Agar 9073f3ccdf px4flow allow delayed background startup 2022-04-22 21:11:02 -04:00
Hamish Willee e1d3728208 13004_quad+_tailsitter - outputs mixed up 2022-04-22 07:34:05 +02:00
alexklimaj 6e0ac66c3c drivers/optical_flow: new PixArt PAA3905 optical flow driver 2022-04-14 16:47:53 -04:00
Daniel Agar 0a0987a6e0 ROMFS: move px4flow start to rc.sensors 2022-04-12 21:22:41 -04:00
Silvan Fuhrer 6096620828 ROMFS: remove duplicate setting of NAV_LOITER_RAD to 80
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-04-09 14:31:17 -04:00
Daniel Agar 98623f69a3 update mavlink submodule to latest
- update MAV_TYPE VTOL usage for current mavlink
2022-04-07 20:35:41 +02:00
alessandro 8af0eeae46
1011_iris_irlock: require precland (#19431) 2022-04-04 08:27:31 +02:00
Daniel Agar f4c3084c26 init adjustments to ensure used topics are advertised early (primarily for logging)
- multi-EKF create each instance as soon as IMU & mag are advertised (before device id populated)
2022-03-23 16:51:16 -04:00
Matthias Grob eee4aaee4f Commander: remove dynamic position velocity probation period 2022-03-23 15:04:48 -04:00
Daniel Agar 36e6527013 ROMFS: MAV_TYPE cleanup
- set MAV_TYPE as a parameter default per vehicle type, or airframe if necessary
 - cleanup MAV_TYPE param metadata and commander helper to only include
what's currently used in PX4
2022-03-17 09:28:10 -04:00
Ncerzzk cb23179c50
Add Goertek SPL06 barometer driver (#19229)
Signed-off-by: ncer <huangzzk@bupt.edu.cn>
2022-03-15 10:13:03 -04:00