Commit Graph

18647 Commits

Author SHA1 Message Date
Jake Dahl 1699c577c3 Fixed an issue with a local variable that should have been a member variable. Increased the P term to reduce rise time. Removed feedforward as it was not neccessary. Removed some custom commands that didn't serve much of a purpose. 2019-01-08 22:36:09 +01:00
AnnaDaiZH 3b3752b753 pmw3901 increase publish rate and max_ground_distance (#11066)
* increase pmw3901 publish rate and max_ground_distance
* set work queue to high priority
2019-01-08 14:25:39 -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
Hamish Willee 541b962654 CameraTrigger: Feedback fixes 2019-01-08 08:18:24 +01:00
Hamish Willee 68148c5fb4 Add camera trigger pwm params
Fix math::constrain usage

Fix second constraint
2019-01-08 08:18:24 +01:00
Beat Küng eda45b4df2 sbus: add time-based hardening (only for IO and NuttX)
Since SBUS does not have CRC, we can use timing information to improve
parsing reliability and reject unexpected bytes.
2019-01-07 10:17:37 +01:00
Beat Küng 4cd8fe0a30 sbus: simplify logic 2019-01-07 10:17:37 +01:00
Beat Küng 9ebd052ac7 sbus: remove unused variables & improve some comments 2019-01-07 10:17:37 +01:00
Daniel Agar 2251150875 uavcan include cstdint for fixed width integer types 2019-01-06 19:20:57 -05: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
Alessandro Simovic aa74aa2b80 CollisionPrevention: curly brace inits 2019-01-04 15:39:40 +01:00
Alessandro Simovic e1dcc46578 CollisionPrevention: consistent var init 2019-01-04 15:39:40 +01:00
Alessandro Simovic ae6ae47bed CollisionPrevention: unused var 2019-01-04 15:39:40 +01:00
Daniel Agar caf26c78e3 rgbled_ncp5623c set main stack 1500 2019-01-03 10:32:49 -05:00
Jacob Dahl a492d1cfdb MPU9250 driver fix to preserve bus+device plug-and-play capabilities (#11020) 2019-01-03 08:10:23 -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
Julian Oes 29bfdb0c88 platforms: fix linking for qurt (#11115) 2018-12-29 16:21:52 -05:00
Matthias Grob 36248cb12e PWMSim: publish disarmed value when not armed 2018-12-29 00:18:05 +01:00
Matthias Grob 05e45c2867 PWMSim: refactor only use one output number variable 2018-12-29 00:18:05 +01:00
Matthias Grob 986e6c96b5 PWMSim: refactor unused output loop 2018-12-29 00:18:05 +01:00
Matthias Grob c22dbe130b PWMSim: refactor to use math constrain 2018-12-29 00:18:05 +01: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
Julian 3e87013936 simulator: fix TCP on Cygwin-Windows
It turns out that `sendto` does not work for TCP on Cygwin-Windows,
instead we need to use `send`. This required some refactoring since we
need to have the internet protocol and the port stored as a member
variable.

This should fix that lockstep SITL simulation was not working on
Windows.
2018-12-27 07:49:12 +01:00
PX4 Build Bot 03c0760e4b Update submodule micro-CDR to latest Sun Dec 23 21:17:02 UTC 2018
- micro-CDR in PX4/Firmware (b043cfac5e8635d9017ad6a13f45795ad6fda6fb): https://github.com/eProsima/micro-CDR/commit/8b3546e8848e4c07c16ec55730d3ad1aa94396ab
    - micro-CDR current upstream: https://github.com/eProsima/micro-CDR/commit/7a76880f90dfe702f4fa1723e22d1dcb491d7b9e
    - Changes: https://github.com/eProsima/micro-CDR/compare/8b3546e8848e4c07c16ec55730d3ad1aa94396ab...7a76880f90dfe702f4fa1723e22d1dcb491d7b9e

    7a76880 2018-12-11 Julián Bermúdez Ortega - Badges (#24)
2018-12-23 21:25:09 +00:00
Beat Küng 5b4a77a67b params: add possibility to access files if flash-based params are enabled
- the flash-backend is selected by specifying nullptr as file or -1 as fd
- the default file is nullptr, and thus the FLASH
- 'param select' has no effect, FLASH is always the default

Thus there should be no functional change to existing setups.
2018-12-23 15:49:37 -05:00
Julian Oes 73ed9deac5 mixer: add missing include 2018-12-22 10:32:18 +01:00
Julian Oes ea87bcb5a2 DriverFramework: update submodule
Now that the lockstep changes are merged to master.
2018-12-22 10:32:18 +01:00
Julian Oes a1fc44d1f0 simulator: fix noise in airspeed
It turns out the noise of the airspeed depends on the least significant
bit of time which is now always 0 because time is quite regular with
lockstep. Therefore, we need a better source for the randomness. I chose
to use the sign of the y-gyro and it seems to work.
2018-12-22 10:32:18 +01:00
Julian Oes aac7b8d7eb platforms: fix NuttX build 2018-12-22 10:32:18 +01:00
Julian Oes 14e5ebbbbc platforms: fix clock build for macOS (yet again) 2018-12-22 10:32:18 +01:00
Julian Oes 06c5037025 platforms: use CLOCK_MONOTONIC
For the non-lockstep case we want to use CLOCK_MONOTONIC if possible.
2018-12-22 10:32:18 +01:00
Julian Oes 547dd8511b platforms: use define for lockstep scheduler
Instead of using the define __PX4_POSIX_SITL it makes more sense to have
a define just to determine if the lockstep scheduler should be used.
2018-12-22 10:32:18 +01: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 d0251581d3 samv7: fix include 2018-12-22 10:32:18 +01:00
Julian Oes 1b685de70d simulator: raise timeout
This is not suposed to ever trigger anyway.
2018-12-22 10:32:18 +01:00
Julian Oes 8b2c47523f simulator: set socket options after opening socket 2018-12-22 10:32:18 +01:00
Julian Oes e4af97b11b simulator: fix printf format 2018-12-22 10:32:18 +01:00
Julian Oes 564cae86b5 simulator: remove doubled tcgetattr call 2018-12-22 10:32:18 +01:00
Julian Oes 8a5e0558e4 simulator: improve a couple of error messages 2018-12-22 10:32:18 +01:00
Julian Oes 1165739a56 sensors: check other gyros on timeout
@bkueng reviewed this and found that it is dangerous to continue on
timeout because we don't update other gyro sensors in the timeout case.
2018-12-22 10:32:18 +01:00
Julian Oes 8e4296d000 parameters: remove unneeded usleep
According to @bkueng this was to schedule other processes but can now be
removed.
2018-12-22 10:32:18 +01:00
Julian Oes 4efe4b0d15 platforms: reorg after rebase on new board config
The new board config changed everything, so I needed to move the
lockstep_scheduler repo.
2018-12-22 10:32:18 +01:00
Julian Oes b4382d4a71 DriverFramework: updated submodule 2018-12-22 10:32:18 +01:00
Julian Oes 185ddb2ab6 lockstep_scheduler: format to PX4 style
Consistency over taste :(.
2018-12-22 10:32:18 +01:00