2021 Commits

Author SHA1 Message Date
bresch
8cc2a7018e VelocitySmoothing - Re-enable time stretch, integrate dt to get local time.
Also split a few functions into smaller ones for readability, fix
formatting, use geters to get the current state of the trajectory
instead of return arguments.
2019-09-17 09:27:00 +02:00
bresch
c7696488fe VelocitySmoothing - Improve computation of the direction of the trajectory by predicting the velocity at zero acceleration instead of the current velocity
This helps when the current velocity is smaller than the target but that
the acceleration is too large such that the velocity will overshoot.
Without this check, the algorithm increases the acceleration which leads
to an even larger overshoot.
2019-09-17 09:27:00 +02:00
bresch
052932fa95 VelocitySmoothingTest - Update unit test to use the same parameters ordering (time, setpoint) as the VelocitySmoothing class 2019-09-17 09:27:00 +02:00
bresch
c13499e64b test_velocity_smothing - Update test script to use new polynomial evaluation algorithm 2019-09-17 09:27:00 +02:00
bresch
a03cc495ce VelocitySmoothing - Refactor class to use polynomial evaluation instead of numerical integration
This solves many numerical issues when the trajectory is close to the
primary NE axes (small velocities). It is also more robust when dt is
large and has some jitter.
2019-09-17 09:27:00 +02:00
Matthias Grob
d4f984fea5 FlightTaskAutoLineSmooth: Fix comment to be style compliant 2019-09-13 18:10:05 +02:00
bresch
47401d1177 AutoLineSmoothVel - Replace min/max absolute constraints with a function named constrainAbs
This function constrain the absolute value of some value but keeps the original sign.
2019-09-13 17:46:01 +02:00
bresch
3c5b24037a AutoLineSmoothVel - Improve virtual pilot logic that provides velocity setpoints to the trajectory generator.
Constrain the generated velocities in the NE inertial frame rather than
just constraining the norm.
2019-09-13 17:46:01 +02:00
bresch
59f54a7fd8 mathlib - Add FLT_EPSILON deadzone in sign computation 2019-09-13 17:46:01 +02:00
Martina Rivizzigno
78279f6587 Unit tests for Obstacle Avoidance interface (#12816)
* FlighTask: remove legacy definition of empty_trajectory_wapoint

* add unit tests for the ObstacleAvoidance interface
2019-09-12 14:37:31 +02:00
Julian Kent
39451b811a Do syscall for time once, outside of loop 2019-09-11 12:34:59 -04:00
Julian Kent
b27d6a958a Account for the time since range data arrived 2019-09-11 12:34:59 -04:00
Hamish Willee
94ef585f76 Link to missing params docs 2019-09-11 09:17:00 -04:00
Julian Kent
a8fbe6bba2
Remove references to pow(x,0.5), use sqrt instead (#12928)
* Remove references to pow(x,0.5), use sqrt instead

* Update matrix library
2019-09-10 13:29:39 +02:00
mcsauder
ddd9a97d42 Modify the LeddarOne driver class to utilize the PX4RangeFinder library. 2019-09-06 11:59:29 +02:00
Tanja Baumann
f3c5ca6015 Collision Prevention: support multiple sensors and frames (#12883)
* build internal sensor map

* Extend testing coverage

* Update matrix library
2019-09-06 08:38:56 +02:00
Julien Lecoeur
7bea81f02c Add board orientation ROLL_90_YAW_270 2019-09-05 20:41:32 -07:00
Daniel Agar
c75954fef8 lib/led: temporarily ignore implicit fallthrough warning 2019-09-04 20:03:02 -07:00
PX4 Build Bot
69475a172b Update submodule ecl to latest Wed Sep 4 08:37:31 EDT 2019
- ecl in PX4/Firmware (da6970329175df98ff46b2d9ddfa467ba438bb2e): 62fa464e4d
    - ecl current upstream: 3b32ee4166
    - Changes: 62fa464e4d...3b32ee4166

    3b32ee4 2019-09-02 bresch - Flow aiding - Reset state when flow is enabled only if it is the only position/velocity aiding sensor. Until now, it was alway resetting if the vehicle does not have gps or external vision. This caused a reset/glitch at every stop (when range data gets valid)
be368f3 2019-08-28 kamilritz - Update comment
c5abfe6 2019-08-28 kamilritz - remove canonicalize and adapt comments
67512d8 2019-08-22 kamilritz - Update matrix library for CI
a2ff415 2019-08-22 kamilritz - Fix get frame aligning quaternion function
53eac6e 2019-08-21 kamilritz - Canonicalize alignment quaternion
933c32c 2019-08-20 kamilritz - Enable local frame alignment also without using it
ea352a6 2019-08-20 kamilritz - Dont use mag suffix for magnitude
05196db 2019-08-20 kamilritz - Fix alignment of local frame
2019-09-04 08:09:36 -07:00
Julian Oes
5e9cae11f8 controllib: fix for undefined sanitizer 2019-09-03 11:54:09 -05:00
Daniel Agar
4d9f2bf776
add IMU_GYRO_RATEMAX to optionally limit gyro control publication rate 2019-09-02 20:06:50 -04:00
Daniel Agar
b0f82ee8ac
CollisionPrevention: update orb_publish to uORB::Publication<> 2019-09-02 15:35:34 -04:00
Julian Kent
bc58bed960 Add test for jerk reduction 2019-09-02 14:51:18 +02:00
Julian Kent
865157228f Add collision prevention velocity limitations also based on max accel/jerk 2019-09-02 14:51:18 +02:00
Beat Küng
f0ee0b5d49 MixingOutput: make scheduling configurable
And make sure fmu calls MixingOutput::updateSubscriptions on startup even
if no mixer is loaded, so that it gets scheduled.
2019-08-31 10:05:00 -04:00
Beat Küng
a2ebbe9066 pwm_limit: rename to output_limit
As there is nothing pwm-specific about it.
2019-08-31 10:05:00 -04:00
Beat Küng
1bee984bb0 MC_AIRMODE: move parameter definition to mixer_module
Makes sure that the parameter is included for the builds that need it.
2019-08-31 10:05:00 -04:00
Beat Küng
077b229655 MixingOutput: make mixer loading thread-safe 2019-08-31 10:05:00 -04:00
Beat Küng
d3fb610fde mixer_module: create MixingOutput library and use in fmu
This should be a pure refactoring, no functional change.
2019-08-31 10:05:00 -04:00
Matthias Grob
d3c7d06288 FlightTaskOrbit: don't apply yaw feed forward in circle approach
The yaw pointing towards the center makes sense since that's the approach
direction anyways. But with the yaw feed forward results in a weird looking
bias when not orbiting yet.
2019-08-31 14:25:39 +02:00
Matthias Grob
7774b150a9 FlightTaskOrbit: only reapproach circle if center changed
The condition that the vehicle is more than 3m away from the circle line
was too sloppy. That often happens when the radius is changed by sticks.
A reapproach is only necessary when the center is moved and that's only
possible through the orbit command.
2019-08-31 14:25:39 +02:00
Matthias Grob
cca7596bcd FlightTaskOrbit: use StraightLine library to approach circle
The initial approach to the circle to orbit on was very agressive since
it was just the controller trying to stay on the circle reaching the
limits. Now there's first an approach phase in which the vehicle reaches
the circle trajeectory in a smooth perpendicular line before starting the
orbit execution.
2019-08-31 14:25:39 +02:00
Matthias Grob
345ad06d7e StraightLine: rewrite old implementation
Before it was:
- not used anywhere
- copied from an old mission implementation version
- didn't plan in advance
- had a lot of broken cases
- dependent on a lot of parameters

I'm starting with a new relatively simple implementation that works as
expected for a minimum viable implementation and can be improved over time.
The first version is used to approach the circle path in Orbit mode to
verify the interface and get testing such that it gets eventually used
everywhere.
2019-08-31 14:25:39 +02:00
Beat Küng
43fdcd7876 px4_middleware: remove that header and move px4::init to px4_init.h
delete include:
for i in $(grep -rl 'px4_middleware.h' src platforms); do sed -i '/#include <px4_middleware.h/d' $i; done
2019-08-30 07:59:44 +02:00
Beat Küng
f32abe8534 src/platforms: move remaining source files to platforms/common 2019-08-30 07:59:44 +02:00
Beat Küng
f8e0441e7b src/platforms/common: move to platforms/common
Script to update include paths:
for i in $(grep -rl 'include <px4_work_queue' src platforms); do sed -i 's/#include <px4_work_queue/#include <px4_platform_common\/px4_work_queue/' $i; done
2019-08-30 07:59:44 +02:00
Beat Küng
3bdfd8ce8d ToneAlarmInterface: move to drivers/drv_tone_alarm
It belongs there since it's not a library providing the implementation, but
just declaring the interface.
2019-08-30 07:59:44 +02:00
bresch
fe73cef224 TestVelocitySmoothing - Split time synchronization and final state checks into two different test functions
Also improve the comments
2019-08-29 15:20:53 +02:00
bresch
94d15931f2 TestVelocitySmoothing - Remove useless function override, use ceil instead of ceilf and remove line duplicate 2019-08-29 15:20:53 +02:00
bresch
5b82fa3a0f TestVelocitySmoothing - add check for time synchronization and final acceleration 2019-08-29 15:20:53 +02:00
bresch
f40d571858 VelocitySmoothing - add zero setpoint test 2019-08-29 15:20:53 +02:00
bresch
c59bcc686c VelocitySmothing - Add gtest script 2019-08-29 15:20:53 +02:00
roangel
1e510f5a44 [FlightTasks] Added class enum for FlightTasks errors (#12822) 2019-08-29 14:48:52 +02:00
PX4 Build Bot
511438d6ef Update submodule matrix to latest Thu Aug 29 00:42:01 UTC 2019
- matrix in PX4/Firmware (341c0ae739753db98dcd0711e91f621c1666b16d): 56b069956d
    - matrix current upstream: cc084e0791
    - Changes: 56b069956d...cc084e0791

    cc084e0 2019-08-26 Martina Rivizzigno - matrix: add method to check all values are nan (#82)
84b3da2 2019-08-22 kritz - Canonical Quaternion with tests (#81)
2019-08-28 21:45:09 -04:00
Julian Oes
3fa3cbd28a version: add beta tag
This adds the "beta" tag and adds a dash before "rc" or "beta".
2019-08-23 13:18:52 +02:00
Julian Oes
68078795c0 px_update_git_header.py: allow -beta/-rc in tag
This changes two things:
- This adds "-beta" as a valid tag suffix.
- This changes "rc" without "-" to "-rc". "rc" without is now described
  as deprecated and with "-rc" is preferred.
2019-08-22 18:45:50 +02:00
bresch
f4b40865af SmoothVel - Fix altitude lock logic.
It was broken because _velocity_setpoint is used for input and output
and was assumed to be the input at a place where it was already overwitten
To clarify this, the input setpoint is renamed "target"
2019-08-22 16:43:41 +02:00
Julian Kent
5c68880b56 Reset parameters in test setup, not teardown 2019-08-21 14:53:41 +02:00
Julian Kent
63140f1d61 Do a single setup of uORB/Parameters instead of once every test 2019-08-21 14:53:41 +02:00
Silvan Fuhrer
ab28f1e4f7 Navigator: VTOL: disable weather vane during yaw aligning before front transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-21 10:08:04 +02:00