Commit Graph

13526 Commits

Author SHA1 Message Date
Daniel Agar 40e42a677b NuttX cmake support optional compressed defconfigs 2019-01-30 10:54:53 -05:00
Beat Küng 481bfc6308 px4_module: use px4_atomic_t 2019-01-30 10:24:06 -05:00
Matthias Grob cdb6aca6bd mc_pos_control: refactor spoolup time naming 2019-01-29 10:02:48 +01:00
Matthias Grob 43fb84a63b mc_pos_control: make sure task gets started after idle delay 2019-01-29 10:02:48 +01:00
mcsauder dc5f18bdcd ToneAlarm class refactoring to implement an interface for hardware specific methods and a single ToneAlarm class. 2019-01-28 18:58:04 -08:00
Alessandro Simovic 6e5bd1ad70 commander: remove duplicate includes 2019-01-28 12:05:36 +01:00
Daniel Agar 739a02022b position_estimator_inav: move to examples (start deprecation) 2019-01-27 22:15:39 +01:00
Matthias Grob 573dd89cbf PositionControl: addess @bkueng 's comment in #11056 2019-01-26 14:53:15 +01:00
Matthias Grob f9ec0cd5ea LandDetector: use vertical velocity estimate for threshold
instead of the derivative of the vertical position which is
not the same value when using the ekf2 estimation.

Using the position derivative resulted in delayed landing because
the value for some reason often bumped over the theshold before
slowly converging towards zero while the velocity was within expected
accuary in all these cases.
2019-01-26 14:53:15 +01:00
Matthias Grob d5903853df mc_pos_control: shut down vertical thrust with ground contact 2019-01-26 14:53:15 +01:00
PX4 Build Bot 98148aad34 Update submodule micro-CDR to latest Sat Jan 26 00:38:18 UTC 2019
- micro-CDR in PX4/Firmware (e0680ffe2280620b81d415328f109dc8decaa1b8): https://github.com/eProsima/micro-CDR/commit/7a76880f90dfe702f4fa1723e22d1dcb491d7b9e
    - micro-CDR current upstream: https://github.com/eProsima/micro-CDR/commit/62d95c870eafb0cccc7bf70bb8a0cbb86f125a0e
    - Changes: https://github.com/eProsima/micro-CDR/compare/7a76880f90dfe702f4fa1723e22d1dcb491d7b9e...62d95c870eafb0cccc7bf70bb8a0cbb86f125a0e

    62d95c8 2019-01-24 Luis Enrique Muñoz Martín - Refs #4438. Modified the configuration of machine endianness. (#31)
2019-01-26 08:46:19 +00:00
Matthias Grob 504372f551 MAVLink: RC_CHANNELS_OVERRIDE generate correct RC channel count (#11219)
* mavlink_receiver: generate rc channel count
* mavlink_receiver: zero out ignored rc channels, add comments
2019-01-25 12:15:01 -05:00
Alessandro Simovic 5bcd7c0a0d Capitalizing/improving warning messages 2019-01-25 11:58:17 -05:00
Alessandro Simovic 0bb5345306 removed unnecessary new-lines 2019-01-25 11:58:17 -05:00
Alessandro Simovic 0c129274af Fixing a few headers 2019-01-25 11:58:17 -05:00
Alessandro Simovic 4ead3b20e5 Fixing some typos 2019-01-25 11:58:17 -05:00
Daniel Agar d49f6a3aca mavlink increase STACK_MAIN and STACK_MAX
- needed if NuttX networking enabled
2019-01-25 06:32:37 -08:00
David Sidrane 8f308efa88 upstram NuttX CONFIG_EXAMPLES_NSH_CXXINITIALIZE->CONFIG_SYSTEM_NSH_CXXINITIALIZE 2019-01-25 06:32:37 -08:00
David Sidrane f007c93785 mc_pos_control_main:Use discret init of poll struct
Suport upstream change in nuttx.
2019-01-25 06:32:37 -08:00
David Sidrane f00d633196 flashfs:Upstream renamed up_progmem_erasepage to up_progmem_eraseblock 2019-01-25 06:32:37 -08:00
Beat Küng 3859bbb3b0 px4io mixer: fix atomic access to system_state.fmu_data_received_time
system_state.fmu_data_received_time can be set from an IRQ handler, thus
we need to ensure every read access to it in mixer_tick is atomic.
So we read it once and copy it into a local variable.
2019-01-25 07:53:37 +01:00
Daniel Agar 2ffb49b734 delete px4_includes.h header and update boards/ to use syslog 2019-01-23 18:25:18 -05:00
Matthias Grob be108a33f8 mission_params: remove MIS_YAWMODE reference
This parameter was removed in d704a2d675 and should
not be referenced anymore.
2019-01-23 22:08:32 +01:00
Daniel Agar 6feee70570 move SYS_STCK_EN to src/modules/load_mon 2019-01-23 08:23:03 +01:00
Daniel Agar 843443248e move modules/systemlib to lib/systemlib 2019-01-23 08:23:03 +01:00
Lorenz Meier 3a7deefe6e IO firmware: Run critical timing operations as atomic
This is required as we might be in interrupt context on this bare-metal target.
2019-01-22 23:52:57 +01:00
Lorenz Meier ec0a9806a8 uORB test: Retain atomic operation 2019-01-22 23:52:57 +01:00
Julian Oes e1472818dc mavlink_mission: round lat/lon
This avoids casting errors. An alternative to `std::round` would be to
add 0.5 before casting for positive values and subtract 0.5 before
casting for negative values.
2019-01-22 09:49:24 -05:00
Daniel Agar ce5fbc7751 mavlink simple analyzer remove <limits> usage
- <limits> isn't available in the NuttX c++ standard library
2019-01-21 09:27:10 -05:00
Daniel Agar edeb59a8c3 move logger array.h -> containers/Array.hpp 2019-01-20 12:03:53 +01:00
Beat Küng ef54bff4ed vmount: avoid reading uninitialized value
matrix::Quatf() calls sinf(), which caused a valgrind warning
2019-01-17 09:39:30 +01:00
Beat Küng 85e59c210d mc_pos_control: fix uninitialized member _old_landing_gear_position 2019-01-17 09:39:30 +01:00
Matthias Grob 7b9cfac767 mc_pos_control: change use avoidance to handle data loss during mission
There were accidents because when missions lead through an obstacle
and it should be avoided but the setpoints from the external obstacle
avoidance module are suddenly missing the mission is continued into the
obstacle which results in a crash.
2019-01-16 19:13:05 +01:00
Matthias Grob a563092742 mc_pos_control: add Loiter/Hold mode to possible failsafe commands 2019-01-16 19:13:05 +01:00
Matthias Grob b018a6088d mc_pos_control: refactor OA setpoints out of PositionControl calls 2019-01-16 19:13:05 +01:00
Daniel Agar 63097bd8a1 mavlink sort message defaults and float literal consistency 2019-01-14 14:46:13 -05:00
Matthias Grob 1e14b10dee simulator_mavlink: take care of battery percentage rounding errors
In 5bb9babc20 I made MAVLink send a
rounded up integer instead of rounded down. This makes sense in practice
because the low battery reactions happen exactly when the reported number
switches in the UI. But here we want to provoke an exact 50% in the UI so
we stop counting at 49.9%, it get's rounded up and we see the expected
result.
2019-01-14 19:30:36 +01:00
Matthias Grob a89e550f3c simulator_mavlink: switch battery max and min to fix simultion
In 3e6e1f5c2b the simulated battery
percentage was reversed. I'm assuming because of the possibly
missleading variable name. Now I'm fixing it by switching the
maximum and minimum voltage such that the name is not misleading anymore
but it still works as expected.
2019-01-14 19:30:36 +01:00
Daniel Agar 45d7165eb3 fw_pos_control_l1 skip wind > max airspeed logic if airspeed invalid
- cleanup airspeed validity check logic
2019-01-12 14:19:53 +01:00
Beat Küng c2f82b5996 logger: disable mission log by default (SDLOG_MISSION=0)
- I enabled it by default mostly for testing purposes
- Disabling it reduces resource usage as most setups don't need it
2019-01-09 08:59:29 -05:00
Dennis Mannhart 5887a2393c PositionControl: skip controller only if adjusted thrust setpoint are not finite
PositionControl: update comment about the order of thrust and position

mc_pos_control: reset setpoints to NAN if required

MulticopterLandDetector: consider to be landed if vehicle is not armed

mc_pos_control: initialize landing struct with landed

mc-pos-ctrl: adjust thrust-setpoint and yaw during ground-contact/maybe-landed without capturing
that information within vehicle-local-position-setpoint topic because that information
does not belong to user intention

PositionControl: set local position/velocity setpoint to NAN if not used in the control pipeline

mc-pos-ctrl: Fill vehicle_local_position_setpoint_s structure as follow:
The message contains setpoints where each type of setpoint is either the input to the PositionController
or was generated by the PositionController and therefore corresponds to the PositioControl internal states (states that were generated by P-PID).
Example:
If the desired setpoint is position-setpoint, _local_pos_sp will contain
position-, velocity- and thrust-setpoint where the velocity- and thrust-setpoint were generated by the PositionControlller.
If the desired setpoint has a velocity-setpoint only, then _local_pos_sp will contain valid velocity- and thrust-setpoint, but the position-setpoint
will remain NAN. Given that the PositionController cannot generate a position-setpoint, this type of setpoint is always equal to the input to the
PositionController.

mc_pos_control: switch to designated initializer for landed

It's less error prone because it produces an error on every discrepancy.
2019-01-08 15:36:30 +01:00
Daniel Agar 60f2a92e3d replace <cfloat> with <float.h>
- <cfloat> isn't available in the NuttX c++ library
2019-01-06 19:20:57 -05:00
Daniel Agar c0b464e9e2 replace <cinttypes> with <inttypes.h>
- <cinttypes> isn't available in the NuttX c++ library
2019-01-06 19:20:57 -05:00
TSC21 3c246ce170 microRTPS: improve verbosity with the usage of px4_log types 2019-01-02 00:14:18 +00:00
Daniel Agar 8c88aa6416 mavlink move simple getters to header and mark const 2019-01-01 22:21:02 +00:00
Daniel Agar f60bfd0020 mavlink add tx loop interval perf counter 2019-01-01 22:21:02 +00:00
Daniel Agar 55e3f80bab mavlink handle MAV_ODOM_LP parameter in main
- fixes #11125
2019-01-01 22:21:02 +00:00
bazooka joe 1560364c04 fix home position timestamp to be the timestamp that the home was set and not when the message was sent 2018-12-27 11:04:24 -05:00
bazooka joe f6cf95cee0 mavlink: fix uninitialized messages fields
zeroed uninitialized fields on home_position, mavlink_rc_channels_override, mavlink_mission_item, mavlink_mission_item_int
2018-12-27 11:04:24 -05:00
Daniel Agar 3cd3856d32 commander set home position timestamp properly 2018-12-27 10:52:01 -05:00