Commit Graph

56 Commits

Author SHA1 Message Date
Daniel Agar
0eca583ecf sensors: move baro aggregation to new sensors/vehicle_air_data 2020-03-12 19:06:34 -04:00
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
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
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
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
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
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
Fabian Schilling
d139bc5a7c Use bc to support floating point PX4_SIM_SPEED_FACTOR 2019-07-03 16:54:29 +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
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
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
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
Julian Oes
63ee101c51 rcS: fix exit value
Shellcheck complained about returning -1 because that's essentially 255.
2018-12-19 07:36:43 +00:00
Beat Küng
dc49e259b3 logger: add separate profile for vision/avoidance
Keeps things more modular.
2018-12-07 11:51:59 +01:00
Daniel Agar
3a036021ba ROMFS defaults drop floating point decimal 2018-12-04 22:57:53 -05:00
bresch
4f668c0c2d SITL - update default velocity PID gains 2018-11-06 22:17:00 +01:00
Beat Küng
09563c94ce rcS: fix typhoon_h480
The typhoon has a 6011_typhoon_h480.post script that got matched as well.
Now we exclude all files that contain a dot (apparently it's not so easy
to do generic pattern matching in a portable way, but this works).
2018-10-04 09:38:59 +02:00
Beat Küng
b972651a06 posix shell: use /bin/sh instead of bash
This uses the systems default shell:
- Ubuntu: dash
- Fedora: bash

Since bash is invoked via /bin/sh, it operates in POSIX mode:
  https://tiswww.case.edu/php/chet/bash/POSIX

- remove '# Ignore the expand_aliases command in zshell.'
  Not needed because the shell operates in POSIX mode
- [[ is bashism -> use [
- autostart_files=( $autostart_file_match )
  is not supported in dash, so use 'ls'
- shellcheck runs the dash flavor, since dash is a minimalistic shell.

Tested on dash & bash.
2018-09-27 23:39:20 +02:00
Kunal Shah
7f016b5fd4 ROS multi-vehicle simulation: fixed udp port overlap issues 2018-09-21 09:01:47 +02:00
Daniel Agar
c7e572d2c2 commander preflight check sensors via uORB instead of IOCTL
- remove all platform defines
2018-09-18 22:24:03 +02:00
mcsauder
0c08b7035b Edit the init.d-posix files to set MAV_TYPE script variables, and alphabetize lists in a few places. 2018-09-04 10:23:27 +02:00
Matthias Grob
0c6bffb66a commander: make auto disarm timeout float
such that fractions of a second are configurable
2018-08-30 08:05:13 +02:00
Daniel Agar
52e1b59e60 cmake add nuttx shellcheck helper 2018-08-25 20:12:29 +02:00
Daniel Agar
096c41b041 init.d-posix/rcS replace bashism 'source' with '.' 2018-08-25 20:12:29 +02:00
Daniel Agar
642aff9786 init.d-posix replace bashism '==' with '=' 2018-08-25 20:12:29 +02:00
Daniel Agar
72792cef43 posix-configs shell scripts use /bin/sh to maximize compatibility (#10292)
- fix ocpoc line endings
2018-08-25 11:02:37 -04:00
Beat Küng
b3a25bb2bb posix rcS: use sed instead of grep -P
The -P argument seems not to be supported on OSX
2018-08-15 10:13:06 -04:00
Beat Küng
923f6239e1 posix rcS: automatically find the requested model instead of explicitly enumerating them 2018-08-13 21:50:14 -04:00
Beat Küng
4e860e357c Tools: add run-shellcheck.sh to statically analyze startup scripts
Use './Tools/run-shellcheck.sh ROMFS/px4fmu_common' to run it.
2018-08-13 21:50:14 -04:00
Beat Küng
273988c124 SITL: move all models to unified rcS startup and remove old scripts 2018-08-13 21:50:14 -04:00