Commit Graph

82 Commits

Author SHA1 Message Date
Julian Oes
874c6f385b commander: unify offboard timeouts
The implementation before this change had two timeouts, a hard-coded
timeout of 0.5 seconds as well as a by param configurable timeout with
certain failsafe actions set.

This change aims to fix two problems:
1. The hard-coded offboard timeout can be triggered easily with sped up
   lockstep simulation. Since i t is hard-coded it can't be adapted to
   the speed factor.
2. The offboard signal can time out but no action will be taken just
   yet. This means we end up in an in-between stage where no warning or
   failsafe action has happened yet, even though certain flags are set
   to a timeout state.

This patch aims to fix this by unifying the two timeouts to the existing
configurable param. The convoluted double timeout logic is replaced by a
simple hysteresis.

For anyone that has previously not changed the default timeout param (0),
the param will now be changed to 0.5 seconds which reflects the
previously hardcoded time. For anyone with a specific timeout
configured, the behaviour should remain the same.

Also, going forward, timeouts lower than 0.5 seconds should be possible.
2020-03-04 09:35:14 +01:00
Julian Oes
43a1257843 ROMFS: prevent auto-disarm before takeoff in CI
Sometimes in CI for VTOL we saw disarms before the spoolup and ramp were
over and the takeoff would actually happen. By raising the auto-disarm
time we should be able to work around this and get CI less flaky.
2020-02-21 09:58:21 -05:00
JaeyoungLim
e0d6f94318 Add boat(usv) sitl target 2020-02-21 00:30:15 -08:00
JaeyoungLim
c89766c8ab Fix gcs udp port to support more vehicles in multivehicle sitl
Limit remote udp port to 14549


Fix


Cleanup port handling


Fix bash syntax


Fix
2020-02-19 14:23:17 +01:00
JaeyoungLim
7a1464d992 Revert port change (#14177)
Reverts #14126 and #14176 until CI failures can be resolved
2020-02-18 14:56:04 +01:00
JaeyoungLim
b365fbf1e9 Fix bash syntax 2020-02-18 13:55:24 +01:00
JaeyoungLim
30cc3a1243 Cleanup port handling 2020-02-18 13:06:46 +01:00
JaeyoungLim
fc61d1c43d Limit remote udp port to 14549
Fix
2020-02-18 13:06:46 +01:00
JaeyoungLim
2bcd8490ff Fix gcs udp port to support more vehicles in multivehicle sitl 2020-02-18 13:06:46 +01:00
Daniel Duecker
36f836be79 add support for unmanned underwater vehicles (#14079)
* add support for unmanned underwater vehicles:
* airframe uuv_generic + uuv_hippocammpus including mav_type = 12 for submarines
* mixer for UUVs with X-shaped thruster setup similar to quadcopter
* add module  uuv_att_control for underwater robot attitude control
* add rc.uuv_defaults/apps for autostarting e.g. ekf2 and uuv_att_control app
2020-02-04 23:24:37 -05:00
JaeyoungLim
6dc3cbbd95 SITL add catapult plane target for new gazebo model (plane_catapult) 2020-02-02 11:59:17 -05:00
kritz
92e75452f5 Flow mockup (#14054)
* Add optical flow mockup model

* Update Tools.sitl_gazebo
2020-01-29 14:06:46 +01:00
Julian Oes
735749e341 Revert "SITL shell: Do math using the shell"
This reverts commit be35c4857b.

This would only work for integer math, so for simulation speed-up. For
speeds slower than realtime we need floating point.
2020-01-17 10:32:21 +01:00
Daniel Agar
d32a80df3a simulator: replace gpssim with simple orb publication
- this is one of the last pieces of the system that still depend on DriverFramework
 - add new SIM_GPS_NOISE_X parameter for optionally increasing the GPS noise multiplier (was previously a gpssim command line option)
 - add SIM_x_BLOCK parameters to block sensor publication
   - SIM_GPS_BLOCK
   - SIM_ACCEL_BLOCK
   - SIM_GYRO_BLOCK
   - SIM_MAG_BLOCK
   - SIM_BARO_BLOCK
   - SIM_DPRES_BLOCK
2020-01-09 10:30:20 -05:00
Lorenz Meier
be35c4857b SITL shell: Do math using the shell
Bash or zsh from the last 10 years or so do math using the $((a + b)) syntax. This saves us from having bc as dependency.
2019-12-26 10:16:58 +01:00
Julian Oes
81809d8234 ROMFS: prevent high accel bias in SITL 2019-12-26 10:16:58 +01:00
RomanBapst
634e8d206a tiltrotor SITL config: increase transition time from 1.5 to 5 seconds
- avoids tilting the motors forward too fast

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-12-03 13:57:58 +03:00
Daniel Agar
bc182e94e6 sensors split rc_update into new standalone module 2019-11-24 13:25:11 -05:00
Matthias Grob
6589aa5f71 posix rcS: remove overwriting default altitude 2019-11-22 13:36:05 -05:00
Julien Lecoeur
053ede6ca5 SITL: create a parameter file for each airframe 2019-11-21 15:55:49 +00:00
Julien Lecoeur
be99064133 SITL: add SYS_AUTOCONFIG support 2019-11-21 15:55:49 +00:00
TSC21
d4ddabdf52 SITL: adds 'iris_rtps' target 2019-11-13 18:24:11 +00:00
JaeyoungLim
4c8f27cf57 Fix typhoon h480 parameter (#13263) 2019-10-25 10:46:27 +02:00
Jaeyoung-Lim
f7871ec9de Retune h480 2019-10-23 16:55:30 +01:00
BazookaJoe1900
02e861b16e enable silent compare of parameter (#12850)
Remove false errors after comparing parameters that doesn't exists.
as described in #12832
2019-10-07 09:50:11 +02:00
Daniel Agar
10ed88db57 VTOL airframes update legacy VT_MOT_COUNT parameter 2019-09-01 13:09:48 -04:00
Silvan Fuhrer
cedf14e2ba Airspeed Selector: repurpose wind estimator into an airspeed (selection, validation) module.
This new airspeed module does:
  -runns an airspeed validator for every airspeed sensor present, which checks measurement validity and estimates an airspeed scale
  -selects another airspeed sensor if for the current one a failure is detected
  -estimates airspeed with groundspeed-windspeed if no valid airspeed sensor is present
  -outputs airspeed_validated topic

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-09 10:55:05 +02:00
RomanBapst
cfba41d2f4 posix configs: set trigger interface to mavlink as it's the only one
supported on posix

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-08-06 08:08:56 +02:00
Daniel Agar
77694183b2 delete position_estimator_inav 2019-08-02 17:38:28 -04:00
Timothy Scott
2ed00c9cb6 Rover: Rewrote gnd_pos_control and removed gnd_att_control (#12239) 2019-07-11 09:39:13 -04:00
Fabian Schilling
d139bc5a7c Use bc to support floating point PX4_SIM_SPEED_FACTOR 2019-07-03 16:54:29 +02:00
Daniel Agar
6d9bf18ca6 Revert "VTOL: add parameter to prevent flight if roll direction was not checked"
This reverts commit 5f06c6a1aa.
2019-06-25 09:26:20 +02:00
Timothy Scott
21760a5856 Changed constant name to UNMANNED_GROUND_VEHICLE 2019-06-13 10:04:26 +02:00
Beat Küng
73102dc3c4 SYS_MC_EST_GROUP: add q estimator only option and activate on omnibus 2019-06-06 11:11:44 -04:00
Daniel Agar
43e3fc707d simulator move to PX4Accelerometer, PX4Gyroscope, PX4Magnetometer, PX4Barometer helpers (#12081) 2019-05-30 21:07:26 -04:00
Beat Küng
5d6cc7d033 ekf2: reduce GPS initialization time for SITL from 10s to 0.5s
Speeds up SITL startup.
2019-05-28 10:45:38 +02:00
Julian Oes
01fdd00c41 init.d-posix: $ is apparently not needed here 2019-05-14 11:04:04 +02:00
Julian Oes
ffeeedc310 init.d-posix: raise timeouts for fast SITL
When simulating with lockstep we can raise the speed by setting the env
variable `PX4_SIM_SPEED_FACTOR`. Some inputs like RC, MAVLink heartbeats
from a ground station, or offboard controls via MAVLink are still at the
normal speed which leads to timeouts getting detected in PX4.

To work around this issue we can automatically multiply the timeout
parameters by the speed factor.
2019-05-14 11:04:04 +02:00
Beat Küng
2448a84c36 SITL: add if750a model 2019-05-03 13:32:48 +02:00
Julian Oes
4ef59e0a59 standard_vtol: transition at airspeed of 16 m/s
This way we prevent a big dip due to TECS in altitude when the
transition happens at 10 m/s already. Apparently the rule of thumb
is to set this transition speed at the same as airspeed cruise speed.
2019-04-28 18:22:21 -04:00
Julian Oes
82682ac716 init.d-posix: re-use rc.logging
With this change the param SDLOG_MODE can be used for SITL as well.
2019-04-05 08:18:17 +02:00
Nico van Duijn
b7784a1439 Add MAVLink stream and cmake sitl target 2019-04-02 08:17:13 +02:00
Julien Lecoeur
5f06c6a1aa VTOL: add parameter to prevent flight if roll direction was not checked
Mark V19_VT_ROLLDIR @category system

Throttle down mavlink critical msg

Send 0 actuator_output for safety

VTOL: unset v1.9 roll direction safety check param for builtin airframes
2019-03-15 00:48:23 -04:00
Martina Rivizzigno
09b795161e Obstacle Avoidance testing in CI (#10780) 2019-03-15 00:37:23 -04:00
DanielePettenuzzo
6b65eb2225 camera feedback: remove CAM_FBACK_MODE param. CAM_CAP_FBACK from camera capture driver will be used instead. 2019-02-10 18:07:44 -05:00
Julien Lecoeur
fe83378db4 Tiltrotor: Do not lock elevons in multirotor mode
The behaviour is unchanged because VT_ELEV_MC_LOCK was not implemented for tiltrotors
2019-02-03 22:33:42 -05:00
Anthony Lamping
77ea5249a1 startup: add plane_cam 2019-02-03 22:32:24 -05:00
Daniel Agar
115c31451c SITL use EKF2_MAG_TYPE default value 2019-01-31 09:23:12 -05:00
Julian Oes
73578a593f simulator: bring -t argument back
The -t argument had been deleted because I didn't realize that it was
actually being used. Therefore, this brings it back and we now use -c
for TCP.
2018-12-22 10:32:18 +01:00
Julian Oes
b436f3dd56 ROMFS/Tools: switch to TCP connection for SITL
This switches from UDP to TCP to connect to jMAVSim.
2018-12-22 10:32:18 +01:00