12080 Commits

Author SHA1 Message Date
Beat Küng
e6aa035209 hotfix for logger: use '%i' instead of '%zu'
Work-around for https://github.com/PX4/Firmware/issues/12485.

This can be reverted after the root-cause is fixed.
2019-07-16 13:11:41 +02:00
bresch
d24c415fd7 PID rate controller - Add controller gain to support Ideal PID form (ISA standard) 2019-07-16 10:24:19 +02:00
Timothy Scott
7c05073044 Fixed overflowing tslc. 2019-07-16 09:43:58 +02:00
Timothy Scott
e25ad348e8 Added message handler for UTM_GLOBAL_POSITION 2019-07-16 09:43:58 +02:00
Martina Rivizzigno
8aad105265 mc_pos_control: increase stack size by 100 bytes 2019-07-15 10:58:00 +02:00
Martina Rivizzigno
0ee770e853 logger: log obstacle_distance_fused instead of obstacle_distance 2019-07-15 10:58:00 +02:00
Martina Rivizzigno
ff6a4d9e71 stream mavlink message OBSTACLE DISTANCE 2019-07-15 10:58:00 +02:00
Martina Rivizzigno
09bfb00c88 Obstacle_distance: use only one increment in float directly
CollisionPrevention: rename a few variables to make the code more readable
2019-07-15 10:58:00 +02:00
Martina Rivizzigno
aff131774e simulator mavlink: add horizontal and vertical fov + quaterion orientation
to distance sensor
2019-07-15 10:58:00 +02:00
bresch
15ec73629b MPC auto - Add MPC_YAW_MODE: towards waypoint (yaw first) mode. This mode ensures that
the vehicle yaws towards the next waypoint before accelerating. This is
required for drones with front vision and aerodynamic multicopters such
as standard vtol planes or highspeed multirotors.
2019-07-11 17:46:44 +02:00
Timothy Scott
2ed00c9cb6 Rover: Rewrote gnd_pos_control and removed gnd_att_control (#12239) 2019-07-11 09:39:13 -04:00
Hamish Willee
27ef1899c7 Fix up MAV_X_RATE as html tag doesn't render (#12449)
* Fix up MAV_X_RATE as html tag doesn't render

* Update src/modules/mavlink/module.yaml

Co-Authored-By: Beat Küng <beat-kueng@gmx.net>
2019-07-11 08:07:20 +02:00
Beat Küng
aa86bf5f92 landdetector flight time: fix cast to 64 bits
`_param_total_flight_time_low.get()` is an int32_t and gets sign-extended
if cast directly to uint64_t. To avoid that we first cast to uint32_t.
2019-07-09 20:26:40 -04:00
Matej Frančeškin
2aa05e3914 Mavlink FTP - process only messages that have our component id 2019-07-09 20:21:15 +02:00
Jacob Dahl
59c555aec3 Multicopter Auto: Adjustable land speed via RC (#12220) 2019-07-08 23:55:21 -04:00
Mathieu Bresciani
e54075abe8 MC pos control - Force cruise and manual speeds below max speed. (#12404)
- Force hover thrust between min and max thrust
2019-07-05 15:40:28 -04:00
RomanBapst
7c8fa82e76 rtl cone angle: expose a few values to the user
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-07-05 18:05:09 +02:00
RomanBapst
81ee40eac8 rtl: implemented RTL based on cone shape
- user defines a cone half angle which defines the RTL altitude behavior
- if vehicle is outside the cone it will climb until it intersects the cone
and then return at this altitude.
- if vehicle is inside the cone or above the predefined return altitude (RTL_RETURN_ALT)
then it will return at the current altitude

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-07-05 18:05:09 +02:00
Nicolas de Palezieux
2f1cfa60f4 precland: store result of _target_pose_sub.update() for later use
- Fixes #12391
2019-07-04 11:02:14 -04:00
BazookaJoe1900
72a449490a Mavlink: Use MAV_BROADCAST only in context of ethernet 2019-07-03 14:02:37 -04:00
Timothy Scott
dce1dda871 Fixed incorrect timestamps 2019-07-03 14:39:59 +02:00
Beat Küng
a2471fb539 logger: handle 'char' type in messages
Fixes errors like:
ERROR [logger] No definition for topic char[10] key;uint8_t[2] _padding0; found
when the Debug logging profile is selected.
2019-07-03 10:43:59 +02:00
alessandro
fecb32f88d
Parameter for virtual battery in SITL (#12299)
* New parameter for virtual battery in SITL

* Update src/modules/simulator/simulator_mavlink.cpp

Co-Authored-By: Beat Küng <beat-kueng@gmx.net>

* Updated description for parameter SIM_BAT_MIN_PCT
2019-07-02 15:53:18 +02:00
Daniel Agar
6ef61e5c19 landing_target_estimator: update to uORB Subscription and Publication 2019-07-01 10:35:41 -04:00
Daniel Agar
c165a6f71b attitude_estimator_q: move most orb subscriptions to uORB::Subscription 2019-06-29 15:51:49 -04:00
Daniel Agar
4b778fd0c2
navigator: fix vehicle_status update (#12364) 2019-06-28 21:35:29 -04:00
Daniele Pettenuzzo
55b5e7552c mavlink: add new extvisionmin mode (#12279)
Signed-off-by: DanielePettenuzzo <daniele@px4.io>
2019-06-28 10:44:22 -04:00
Mark Sauder
c22ed9397e land_detector: Implement ModuleParams inheritance in the FixedwingLandDetector class. 2019-06-28 10:26:59 -04:00
RomanBapst
0b2af5c519 FixedWingAttitudeControl: don't lock integrator during transition
- airframes that are not well trimmed rely on the integrator to learn
the offset. This change can help improve altitude hold during transitions

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-06-28 09:54:40 -04:00
RomanBapst
afd95b14cf vtol_att_control: use VT_MOT_ID instead of VT_MOT_COUNT
- VT_MOT_COUNT assumed that motors were always the first outputs. This
does not have to be true always. VT_MOT_ID allows to specify precisely how
many motors we have for hovering and to which channel they are connected.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-06-27 20:14:10 +02:00
RomanBapst
2c74216028 ekf2: fixed calculation of static pressure error
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-06-27 18:11:53 +02:00
Mark Sauder
1466d11acc land_detector: cleanup actuator_armed and battery_status naming
* Rename _arming -> _actuator_armed
 * Rename _battery -> _battery_status in the MulticopterLandDetector class.
2019-06-27 12:02:14 -04:00
Mathieu Bresciani
c5deba53a2 mc_pos_control: Explicitly convert tilt variables to radians during check and assignments 2019-06-27 11:38:21 -04:00
David Sidrane
6fcc4cc6a2 WIP Digital PM Support 2019-06-26 14:34:02 -04:00
mcsauder
6e9f706b12 Standardize remaining class member variable naming convention in the MulticopterLandDetector class. 2019-06-26 14:06:56 -04:00
mcsauder
df662245a2 Standardize class member variable naming convention in the LandDetector class. 2019-06-26 14:06:56 -04:00
mcsauder
6b6d82447e Standardize class member variable naming convention in the MulticopterLandDetector class. 2019-06-26 14:06:56 -04:00
mcsauder
3f0159d784 Standardize class member variable naming convention in the VtolLandDetector class. 2019-06-26 14:06:56 -04:00
mcsauder
2b9ad179a2 Standardize class member variable naming convention in the FixedWingLandDetector class. 2019-06-26 14:06:56 -04:00
Lorenz Meier
7ba658d573 MAVLink module: Add additional IMUs as default outputs
This simplifies setup and verification of systems, as all three sensors can be looked at in a graph view.
2019-06-26 10:24:16 -04:00
mcsauder
d7cfebe0a3 Add check_params(true) call to the LandDetector start() method. Break out _update_total_flight_time() method in the LandDetector class. 2019-06-26 09:23:02 +02:00
mcsauder
f783982edb Revert changes to the check_params(const bool force) declaration/definition to match current PX4:master. 2019-06-26 09:23:02 +02:00
mcsauder
0ec7efcfc4 Delete _measure_interval and redundant parentheses in LandDetector.h. 2019-06-26 09:23:02 +02:00
mcsauder
faa3c3dc6f Refactor the LandDetector class to
- Reduce duplicate code in LandDetector _check_params() method.
 - Standardize naming cases.
 - Implement DEFINE_PARAMETERS() macro.
2019-06-26 09:23:02 +02:00
Daniel Agar
6d9bf18ca6 Revert "VTOL: add parameter to prevent flight if roll direction was not checked"
This reverts commit 5f06c6a1aa1f29f37f373c679a1a02c07412f811.
2019-06-25 09:26:20 +02:00
Matthias Grob
5002b13bda mc_att_control: Increase default rate integral gain
@bkueang and me realized that on every frame we tune the integral gain for
the roll and pitch rate controller is much too low. Usually it needs to be
increased to 0.3 or even 0.4 to have better "locked in" flight performance
and 0.2 seems like a good compromise for a safe default.
2019-06-24 18:26:27 +02:00
Beat Küng
ea31f34d09 mc rate controller: add I term reduction factor
Reduce the I gain for high rate errors to reduce bounce-back effects after
flips. Up to 200 degrees the gain is almost not reduced (<25%), so this
will only take noticeable effects for large errors (setpoint changes),
where we actually want to have an effect.

This allows to increase the MC_*RATE_I parameters w/o negative effects
when doing flips (i.e. bounce-back after flips).

The 400 degrees limit and the x^2 are empirical.

The better the rate tracking in general (high P gain), the less this is
required (because of the lower tracking error). At the same time it also
does not harm, as the i_factor will always be close to 1.
2019-06-22 13:23:19 +02:00
JaeyoungLim
4c4bcc5fdb Mavlink: Fill in thrust field correctly for offboard rates setpoints on fixed wing (#12311)
* Fill in thrust field for rates sp
2019-06-20 17:17:32 +02:00
SalimTerryLi
e0f3fc8d00 Mavlink receiver SET_ATTITUDE_TARGET fill the correct throttle field by checking its frametype in offboard mode (#12149) 2019-06-18 02:06:41 +02:00
alessandro
2deab6c607 commander: refactored state-machine strings
- Follow-up changes to https://github.com/PX4/Firmware/pull/11796
2019-06-17 20:09:05 +02:00