448 Commits

Author SHA1 Message Date
Junwoo Hwang
32ae00fd44
Move Vehicle Command Result Enum defs to Vehicle Command Ack (#19729)
- As it is always only used for the vehicle command ack message
- It was a duplicate, hence making it error prone for maintainment
- The uORB message comments were updated to make the relationship with
the MAVLink message / enum definitions clear
2022-07-07 16:15:11 +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
Silvan Fuhrer
4dbe6f0a1c simulator_mavlink: fix MAV_TYPE_VTOL_TAILSITTER case
This type (23) doesn't specify a motor number, so it can't be properly handled.
There are duo (19) and quad (20) tailsitter types that still work in simulation.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-24 17:58:44 -04:00
Alessandro Simovic
4640f395d7 simulator_mavlink: Add ESC telemetry 2022-05-12 07:58:56 +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
Daniel Agar
d1d15a6f6d differential pressure remove filters from drivers and average in sensors/airspeed 2022-04-26 08:39:19 -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
RomanBapst
18074dec5a simulator: fix conversion from hPa to Pa
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-03-29 17:41:54 +03:00
Daniel Agar
0c31f63896 sensors: add baro calibration and cleanup
- sensor_baro.msg use SI (pressure in Pascals)
 - update all barometer drivers to publish directly and remove PX4Barometer helper
 - introduce baro cal (offset) mainly as a mechanism to adjust
relative priority
 - commander: add simple baro cal that sets baro offsets to align with
GPS altitude (if available)
 - create new sensors_status.msg to generalize sensor reporting
2022-03-26 16:08:41 -04:00
Beat Küng
9b629a9e95 hitl,sitl,sih: use separate actuator_outputs_sim for SYS_CTRL_ALLOC==1
- removes the need to do type-specific rescaling of pwm to normalized values
- allows to run physical output drivers alongside HIL/SIH
2022-02-25 08:30:58 +01:00
Jukka Laitinen
9449ed6e66 Add support for protected build in drivers, systemcmds and modules Kconfig
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-18 07:58:58 +01:00
Matthias Grob
52a9040c62 BatterySimulator: recharge battery upon disarming 2022-01-31 20:27:06 -05:00
Daniel Agar
90358f078f add odometry reset counter (ekf2, mavlink, etc) 2022-01-31 09:19:36 -05:00
Daniel Agar
e731fcdbc0
sensors (accel/gyro/mag) determine if external with device id 2022-01-10 10:31:07 -05:00
Julian Oes
a6431ab8f0 simulator: fix implicit-const-int-float-conversion 2021-12-20 10:56:24 -05:00
Daniel Agar
167edcc77b simulator: add standalone sensor_gps_sim module 2021-12-11 15:03:15 -05:00
Daniel Agar
95b961c622 simulator: add standalone sensor_baro_sim module 2021-12-11 15:03:15 -05:00
Daniel Agar
4edfb4799f simulator: add standalone sensor_mag_sim module 2021-12-11 15:03:15 -05:00
Beat Küng
a4ca298ee9 simulator_mavlink: handle MAV_TYPE_VTOL_RESERVED3 2021-12-10 09:03:08 -05:00
Matthias Grob
fdc40880d0 battery: separate out publishing from updating
to allow smart battery drivers to use the battery class and
filling in additional information in case it makes sense.
2021-12-07 21:06:51 +01:00
Matthias Grob
e70d70468a battery: pass voltage and current by setter 2021-12-07 21:06:51 +01:00
Matthias Grob
39641494da battery: pass connected flag in by setter 2021-12-07 21:06:51 +01:00
Matthias Grob
38d23f5345 battery: pass priority in by setter 2021-12-07 21:06:51 +01:00
Matthias Grob
f9fc9a9af6 battery: pass source in by constructor 2021-12-07 21:06:51 +01:00
Matthias Grob
b965923c08 battery: fetch throttle value inside of class 2021-12-07 21:06:51 +01:00
Matthias Grob
10ceea2fe6 geo: refactoring on comments and usage 2021-12-06 14:30:14 +01:00
Thomas Debrunner
8db7a6225b geo: Moved the map_projection_* functions and state into a self-contained C++ class 2021-12-06 14:30:14 +01:00
wangwwno1
7a1a4ea7a6 Format fix & Remove redundant lines 2021-11-20 16:13:46 +01:00
wangwwno1
51ce8306ee Remove redundant code out of hil_lpos 2021-11-20 16:13:46 +01:00
wangwwno1
b2c5919d29 Update src/modules/simulator/simulator_mavlink.cpp
Co-authored-by: JaeyoungLim <jalim@ethz.ch>
2021-11-20 16:13:46 +01:00
wangwwno1
160fec5f25 Update simulator_mavlink.cpp 2021-11-20 16:13:46 +01:00
wangwwno1
6e2060ddb6 Add accel to vehicle_local_position_groundtruth
Related Issue: #18527 
According to [this doc](92b1a43468/common/mavlink_msg_hil_state_quaternion.h (L102)), the *acc value are mili-Gee, so multiply the value with `CONSTANT_ONE_G/1000.0f` would get the acceleration in `m/s`.
2021-11-20 16:13:46 +01:00
Jacob Crabill
5969508fa7
mavlink: cmake generate mavlink headers at build time
- mavlink/mavlink is now directly included as a submodule instead of the generated mavlink/c_library_v2
 - this also switches to mavlink development.xml by default
2021-11-05 23:01:38 -04:00
Peter van der Perk
d5e3e9a7bc [Kconfig] Decompose Kconfig, now each module has its own Kconfig
Which is better for versioning and decomposability
2021-10-07 10:09:01 -04:00
Daniel Agar
089c962d92 px4io: moving mixing to FMU side
Using mixers on the IO side had a remote benefit of being able to
override all control surfaces with a radio remote on a fixed wing.
This ended up not being used that much and since the original design
10 years ago (2011) we have been able to convince ourselves that the
overall system stability is at a level where this marginal benefit,
which is not present on multicopters, is not worth the hazzle.

Co-authored-by: Beat Küng <beat-kueng@gmx.net>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-09-25 19:15:05 -04:00
Daniel Agar
65745a3676 purge broken qurt support and atlflight boards 2021-07-16 08:53:36 -04:00
Daniel Agar
883624d915 lib/geo: move from ecl 2021-07-15 10:38:24 -04:00
Daniel Agar
dbaed99626
cmake remove git_ecl target 2021-07-13 10:03:06 -04:00
Matthias Grob
f41c294028 BatterySimulator: No need to explicitly mention throttle being set to zero 2021-07-01 14:24:38 +02:00
Daniel Agar
39c96a8884 gps add device_id 2021-04-08 08:27:07 +02:00
obicons
a7e920d276 Updated MavlinkReceiver::handle_message_landing_target to warn users when they provide a landing target with an unsupported coordinate frame.
Updated Simulator::handle_message_landing_target to warn users when they provide a landing target that is not relative to a captured image.
2021-04-06 16:02:54 -04:00
Daniel Agar
4189eb11f5 simulator: GPS populate all sensor_gps fields (alt_ellipsoid, etc) 2021-04-06 09:44:18 -04:00
Chris Lovett
292a66ce41
Add support for simulators running on a different host than the PX4 instance 2021-03-31 20:56:38 -04:00
Beat Küng
629f7ba15b params: ensure short description is only a single line
So a UI can display it properly
2021-03-23 12:55:11 -04:00
David Jablonski
063bb75891 simulator: fix lidar sensors 2021-03-08 21:27:39 -05:00
Daniel Agar
263b00b65f
ekf2 support SET_GPS_GLOBAL_ORIGIN and remove globallocalconverter usage
- vehicle_command cmd extended from uint16 to support PX4 internal commands that don't map to mavlink
2021-03-05 18:25:14 -05:00
Daniel Agar
9d47f7ecda simulator: make first accel/gyro simulated FIFO 2021-02-26 18:40:37 -05:00
Peter Blom
a4745c6825 Simulator: Fix for arg count increase breaking remote host option.
The number of arguments was increased by one, see: 1719ff9892

Because the above commit was merged before https://github.com/PX4/PX4-Autopilot/pull/15443 . It broke support for the remote host option.

This has been fixed in this commit by increasing all argv's by one.

Signed-off-by: Peter Blom <peterblom.mail@gmail.com>
2021-01-28 08:32:14 +01:00
JacobCrabill
e49717513c simulator: Fix distance sensor device_id
Also add DRV_DIST_DEVTYPE_SIM
2021-01-27 17:02:20 -05:00
Daniel Duecker
f9e07337f8
fix submarine sitl: indicate motor channel range 0..1 or -1..1 in simulation_mavlink.cpp (#16637)
change motor_count variable to 'pos_thrust_motor_count'
This is more specific to what is actually happening in the code.
'pos_thrust_motors_count' indicates number of motor channels which are configured with 0..1 range (positive thrust) all other motors are configured for -1..1 range

submarine only have motors with -1..1 range.
Thus, pos_thrust_motor_count = 0

Co-authored-by: Thies Lennart Alff <33184858+lennartalff@users.noreply.github.com>
2021-01-25 14:17:24 +01:00