Commit Graph

1658 Commits

Author SHA1 Message Date
Beat Küng 1e17a86a39 collisionprevention: fix typo in param description & minor code style 2018-11-20 14:14:13 +01:00
baumanta 053494c535 use only one parameter and enable parameter change in flight. clean up code 2018-11-20 14:11:33 +01:00
baumanta efa7e0ba77 clean up 2018-11-20 14:11:33 +01:00
baumanta f5369db245 Put parameters inside library. Get rid of unnecessary activation logic 2018-11-20 14:11:33 +01:00
baumanta dd45fa6541 change feature name from CollisionAvoidance to CollisionPrevention 2018-11-20 14:11:33 +01:00
baumanta f611eddadd unadvertise publishers in the destructor 2018-11-20 14:11:33 +01:00
Matthias Grob 81ec6c5b1e ColisionAvoidance: move instantiation to FlightTask 2018-11-20 14:11:33 +01:00
Matthias Grob 7e276bc163 CollisionAvoidance: move activation logic to library 2018-11-20 14:11:33 +01:00
baumanta 27dc60a419 Improve comments 2018-11-20 14:11:33 +01:00
baumanta db514fe441 Add a collision avoidance library which uses range data 2018-11-20 14:11:33 +01:00
Paul Riseborough 3ee596284d ecl: Magnetic declination use improvements
Fixes bugs causing learned or GEO lookup declination to not be used in some circumstances.

https://github.com/PX4/ecl/pull/518
https://github.com/PX4/ecl/pull/520
2018-11-16 10:25:59 -05:00
Beat Küng 330941c1fc FlightTaskManualAltitude: initialze yaw setpoint with NAN
Also update some comments.

In case we activate the task and don't have a locked yaw, we should
initialize the yaw setpoint with NAN to avoid any abrupt changes.
2018-11-13 09:30:18 +01:00
Beat Küng 2b7d3bd088 flight tasks: move weather vane yaw handler from Altitude to Position task 2018-11-13 09:30:18 +01:00
Beat Küng 36ee0297ee FlightTask.hpp: minor code cleanup 2018-11-13 09:30:18 +01:00
Beat Küng ca7acae904 mc stabilized mode: move from mc_pos_control to mc_att_control
- better in terms of dependencies:
  - the position controller code depended on position topics for yaw
  - mc_pos_control does not have to be run for Stabilized mode
- the code path is much simpler, and thus less error prone. This is
  especially important since Stabilized is often used as a fail-safe flight
  mode.
2018-11-13 09:30:18 +01:00
Daniel Agar 4e2bf27da6 FlightTaskAuto set WaypointType from position setpoint types 2018-11-11 10:21:41 -05:00
Daniel Agar 246b879aea require MODULE_NAME 2018-11-10 13:52:34 -05:00
bresch 90cee2d5ea Manual Smoth Vel - Override reActivate to not reset Z axis (prevented takeoff) 2018-11-06 22:17:00 +01:00
bresch c3a4fff0cd Auto traj - generate heading from trajectory velocity vector if possible 2018-11-06 22:17:00 +01:00
bresch 7205e8f359 Auto traj - Add Trajectory logging
- move the update after the integration: a new computed jerk has an impact at the next epoch only
- add jerk reduction in case of too large integration time: when a jerk of "min_jerk" during dt is too much
- add jerk reduction if the integration time is larger than the predicted one and that integrating that jerk would lead to an acceleration overshoot
- rename some variables
2018-11-06 22:17:00 +01:00
bresch 2847ce20b8 Auto traj - Add parameter for gain of trajectory controller 2018-11-06 22:17:00 +01:00
bresch 2c63388fb7 Auto Traj - Disable reActivate "reset" function for AutoLineSmoothVel Flight Task 2018-11-06 22:17:00 +01:00
bresch 0209fa00bf Auto Smooth Vel - Add AutoMapper2 and AutoLineSmoothVel flight tasks 2018-11-06 22:17:00 +01:00
bresch 67c0846068 Vel smooth - Improve position lock/unlock detection 2018-11-06 22:17:00 +01:00
bresch d9edcfdc06 Trajectory - format style 2018-11-06 22:17:00 +01:00
bresch aa586ca327 Trajectory - Overload integrate function to allow for custom integration period 2018-11-06 22:17:00 +01:00
bresch 7073187a48 Trajectory - Add getters for current position and velocity. Move some getters to public section 2018-11-06 22:17:00 +01:00
bresch 6a7ce651bc Trajectory - Add position lock-unlock logic and proper initialization from controller feedback 2018-11-06 22:17:00 +01:00
bresch 84665672ad Vel smooth - Change jerk scheduling strategy 2018-11-06 22:17:00 +01:00
bresch ab7e4436b3 Vel smooth - Add Z trajectory 2018-11-06 22:17:00 +01:00
Beat Küng 787d82c9e6 VelocitySmoothing: simplify the API & fix style 2018-11-06 22:17:00 +01:00
Beat Küng d8cb6bb834 mc_pos_control_params: update jerk params (limits + defaults + description) 2018-11-06 22:17:00 +01:00
bresch 22780efcd0 Trajectory - Add time synchronization between trajectories. Split update(...) function into updateDurations(...) and integrate(...) to be able to insert time synchronization in between. 2018-11-06 22:17:00 +01:00
Beat Küng 86463e4ec7 Flight Tasks: add new trajectory smoothing flight task & library
Derivation by Mathieu Bresciani:
https://github.com/Auterion/trajectory_generator
2018-11-06 22:17:00 +01:00
James Goppert c642025339 vehicle_attitude only based yaw control fix (#10803)
* Add attitude sub to mc_pos_control for yaw usage.

* Initialize pos control _states struct.

* Remove unnecessary init for struct in mc pos ctrl.

* Only use att topic for yaw setting in FlightTask.
2018-11-06 12:03:13 -05:00
Roman 40884a9238 FlightTaskTransition: added missing override
Signed-off-by: Roman <bapstroman@gmail.com>
2018-11-07 00:13:43 +08:00
Roman fea309b606 added a flighttask for automatic vtol transitions
Signed-off-by: Roman <bapstroman@gmail.com>
2018-11-07 00:13:43 +08:00
Daniel Agar 7caf9803ed delete unimplemented SENSORIOCRESET IOCTL 2018-11-06 07:43:43 +08:00
Daniel Agar d2ed091a1d delete IOCTL SENSOR_POLLRATE_MAX
- only SENSOR_POLLRATE_DEFAULT is needed
2018-11-06 07:43:43 +08:00
Daniel Agar 556a9422b5 delete IOCTL SENSOR_POLLRATE_MANUAL
- only used in self tests
2018-11-06 07:43:43 +08:00
Daniel Agar 8dfd55fc9e delete unused IOCTL SENSORIOCGPOLLRATE 2018-11-06 07:43:43 +08:00
Daniel Agar 85c2b6307c delete unused IOCTL AIRSPEEDIOCGSCALE 2018-11-06 07:43:43 +08:00
Daniel Agar f59f0d4b2d delete unused IOCTL SENSOR_POLLRATE_EXTERNAL 2018-11-06 07:43:43 +08:00
Jake Dahl 7fb73ae2c0 made init() a public function in posix I2C 2018-11-01 10:49:26 -04:00
Jake Dahl d71fc31d8b added an SMBus base class 2018-11-01 10:49:26 -04:00
Lukas Woodtli a7d297ed57 Fix division by zero and cast of to big floats to int 2018-10-28 16:54:36 +01:00
Mara Bos 10c20b38ad Fix many format strings.
Fixes these invalid format strings:
- A `%d` for a pointer (replaced it by `%p`)
- A 0x%08x (and a 0x%0x8!) for a pointer (replaced by %p)
- 2 cases of `%d` for a `ssize_t` (replaced it by `%zi`)
- 1 case of a %u for an `int` (replaced by %i)
- 3 cases of %d for a `long` (replaced by %ld)
- 19 cases of `%d`, `%i`, `%u` or `%lu` for a `size_t` (replaced it by `%zu`)
- An unused formatting argument (removed it)
- A missing `%d` (added it)
- A missing `%s` (added it)
- 2 cases of `%llu` for a `uint64_t` (replaced it by `"%" PRIu64`)
- 6 cases of giving a string directly as format string (replaced it by `("%s", string)`)
- 2 cases of %*-s, which should probably have been %-*s.
  (Looks like NuttX accepts (the invalid) %*-s, but other platforms don't.)
- A %04x for a `uint32_t` (replaced by "%04" PRIx32)
2018-10-27 12:44:51 +02:00
Beat Küng 294af5daad LowPassFilter2p: fix _cutoff_freq <= 0 (disabled filter)
If the filter was disabled, the apply() would always return 0.
2018-10-24 20:43:42 +02:00
Daniel Agar 297c1b777b mathlib LowPassFilter2p sync with LowPassFilter2pVector3f 2018-10-20 10:34:02 -04:00
Daniel Agar ac85230700 mathlib: add Vector3f low pass filter 2018-10-20 10:34:02 -04:00