17270 Commits

Author SHA1 Message Date
Daniel Agar
0c0b761c87 mavlink update POSITION_TARGET_GLOBAL_INT publish
- publish continuously in position control mode when there's a valid
   setpoint
 - optionally fill in the velocity and acceleration setpoints when
   available
 - fixes #9841
2018-07-13 15:30:25 +02:00
Daniel Agar
1ea63e4955 mavlink MOUNT_ORIENTATION use math::degrees 2018-07-13 15:30:06 +02:00
Daniel Agar
f26c3ac014 mavlink properly wrap heading fields
- fixes #9867
2018-07-13 15:30:06 +02:00
Beat Küng
5e3e486527 px4_posix.h: avoid defining PX4_F_RDONLY as O_RDONLY
- There is an assumption un uORB that PX4_F_RDONLY is not 0.
- But O_RDONLY is 0 on Linux. orb_exists passes 0 to px4_open, which in
  uORB::DeviceNode::open leads to an unnecessary allocation of
  SubscriberData()
- PX4_F_RDONLY is only used in combination with px4_open, never with open()

However even if it was wrong/unexpected, it did not cause any problems,
just the unnecessary allocation.
2018-07-13 11:30:23 +02:00
Daniel Agar
8537863848 delete sdlog2 2018-07-13 09:02:59 +02:00
Nuno Marques
83fd5a5fd1 Update micro-CDR to latest and fix API usage (#9651)
* uorb_microcdr: msg.cpp.template: update API for how the buffer length is obtained
* micrortps_bridge: CMakeLists: temporarily deactivate check endianness option
2018-07-12 18:04:15 -04:00
Martina
84d22fe0c6 logger: trajectory_waypoint -> vehicle_trajectory_waypoint 2018-07-12 16:36:11 -04:00
Martina
e7cf2c5675 remove unused trajectory_bezier message 2018-07-12 16:36:11 -04:00
Martina
5cd0da95cc mc_pos_control_params: add type boolean to MPC_OBS_AVOID parameter 2018-07-12 16:36:11 -04:00
Martina
064a6dd2fd mc_pos_control: fix rebase mistake 2018-07-12 16:36:11 -04:00
Martina
d6ea735b18 make format 2018-07-12 16:36:11 -04:00
Martina
492e40a139 mc_pos_control: enable obstacle avoidance only in mission and rtl 2018-07-12 16:36:11 -04:00
Martina
f42095af8f mavlink_messages: refactor to use vehicle_trajectory_waypoint instead of trajectory_waypoint message 2018-07-12 16:36:11 -04:00
Martina
da2df5708b mc_pos_control: refactor to use vehicle_trajectory_waypoint 2018-07-12 16:36:11 -04:00
Martina
2a40d001de mavlink_receiver: refatcor to use vehicle_trajectory_waypoint 2018-07-12 16:36:11 -04:00
Martina
87cd110044 mavlink_receiver: make format 2018-07-12 16:36:11 -04:00
Martina
33b1b13432 mc_pos_control: replace define with parameter to enable/disable obstacle
avoidance
2018-07-12 16:36:11 -04:00
Martina
6cceca6fe5 mc_pos_control_params: add parameter to enable and disable obstacle
avoidance
2018-07-12 16:36:11 -04:00
Martina
8662c71d82 logger: enable trajectory_waypoint and trajectory_waypoint_desired logging 2018-07-12 16:36:11 -04:00
Martina
1144b66a70 mc_pos_control: temporary solution to enable and disable the execution of
obstacle avoidance waypoints
2018-07-12 16:36:11 -04:00
Martina
c5d62b5524 mc_pos_control: use local frame position setpoint from triplets calculated
in the pos_control and not coming from navigator. Refactor method
update_avoidance_waypoint_desired since all waypoints have the same type
2018-07-12 16:36:11 -04:00
Martina
26ca09f824 mc_pos_control: fix typo 2018-07-12 16:36:11 -04:00
Martina
59c7fc5d96 mc_pos_control: use one method to wrap yaw speed instead of triplicate
code
2018-07-12 16:36:11 -04:00
Martina
8b20c66cfc mc_pos_control: use desired velocity to calculate vel_sp_along_track_prev
if obstacle avoidance is running
2018-07-12 16:36:11 -04:00
Martina
d39b969e72 mc_pos_control: refactor the update of the desired waypoints for avoidance
to eliminate duplicated code
2018-07-12 16:36:11 -04:00
Martina
9bdc9aada2 mc_pos_control: use defines for point size and number of points in
trajectory_waypoint
2018-07-12 16:36:11 -04:00
Martina
a11c6235fe mc_pos_control: uses consistent naming for desired waypoints 2018-07-12 16:36:11 -04:00
Martina
272d7ca4cd mc_pos_control: use consistent naming for position waypoints 2018-07-12 16:36:11 -04:00
Martina
3fa094cb6b mc_pos_control: use same notation for velocity waypoints 2018-07-12 16:36:11 -04:00
Martina
31d675fd95 mc_pos_control: add interface to send desired position and velocity
waypoint to the obstacle avoidance module
2018-07-12 16:36:11 -04:00
Martina
b33a708215 mc_pos_control: add vel_sp_desired to send desired velocity to the
obstacle avoidance
2018-07-12 16:36:11 -04:00
Martina
47f2db67b6 mc_pos_control: execute yaw or yaw speed of the obstacle avoidance
waypoint
2018-07-12 16:36:11 -04:00
Martina
df19610e69 mc_pos_control: add execution of position waypoint coming from the
obstacle avoidance
2018-07-12 16:36:11 -04:00
Martina
5d6771753d mc_pos_control: add execution of velocity waypoint coming from the
obstacle avoidance module
2018-07-12 16:36:11 -04:00
Martina
f511d3a399 mc_pos_control: add method to constrain velocity setpoint 2018-07-12 16:36:11 -04:00
Martina
14444af38c mc_pos_control: subscribe to trajectory_waypoint message 2018-07-12 16:36:11 -04:00
Martina
f3ce7be1e3 mavlink_messages: stream TRAJECTORY mavlink message with data from
uORB trajectory_waypoint as input path to a obstacle avoidance node
2018-07-12 16:36:11 -04:00
Martina
5ef26dd862 mavlink_receiver: decode mavlink message TRAJECTORY in uORB msgs
trajectory_waypoint or trajectory_bezier depending on the mav trajectory
representation type
2018-07-12 16:36:11 -04:00
Beat Küng
e1a7472738 MavlinkOrbSubscription::update: improve performance & fix corner case
- reorders operations, such that the most expensive one (orb_copy) is done
  only when really needed.
- corner case: when the topic was not advertised yet, orb_stat() would fail
  and then update() was called, which succeeds for the first advertisement.
  In that case the timestamp was incorrectly set to 0 and true was
  returned.
  The next call would again return true, because the timestamp was updated,
  but the topic data was still the same.

Reduces CPU load by ~2% on a Pixracer.
2018-07-12 21:31:38 +02:00
Beat Küng
060b130128 mavlink: add optional disable_sharing flag to add_orb_subscription
This is a more generic solution for 532a97041, and also enables it for
vehicle_command_ack's.

In addition it avoids using a timestamp for subscription update checking,
because it does not work well together with orb queuing.
2018-07-12 21:31:38 +02:00
Daniel Agar
21cc34befb GPS driver increase stack 2018-07-12 08:12:05 +02:00
Thomas Stastny
8a7919bcb6 fw att+pos ctrl: use enum for flaps configs 2018-07-11 08:08:13 +02:00
Thomas Stastny
0c3399433d fw att+pos ctrl: add takeoff flaps setting 2018-07-11 08:08:13 +02:00
Beat Küng
3f0a398a25 Omnibus F4 SD: fix UART4
- do not configure RSSI GPIO pin
- disable serial console on UART4
2018-07-10 19:39:50 +02:00
Beat Küng
93da0416fa frsky_telemetry: add a '-m <mode>' CLI param
Can be used to avoid auto-detection.

Strangely on the Omnibus via UART4, the auto-detection for single-wire
S.Port did not work when connecting via battery (it works via USB) -
S.Port got detected instead.
Might be a board-specific issue.
2018-07-10 19:39:50 +02:00
mcsauder
cf7dd383b1 Update ADC voltage calculation instances to avoid divide by integer. 2018-07-09 07:51:15 +02:00
Daniel Agar
850b1ad6a7 EKF2 split output predictor and publish attitude immediately (#9832)
* EKF2 split output predictor and publish attitude immediately

* ecl: incorporate magic number tidy up
2018-07-09 08:11:24 +10:00
Beat Küng
58c8c50174 frsky_telemetry: add scanning timeout parameter, and set it to 15s
This frees unused RAM in case frsky telemetry is not connected.
2018-07-08 23:24:17 +02:00
Beat Küng
f3292c7741 frsky_telemetry: add S.Port single-wire support
If S.Port is connected via external inverter or an uninverted signal is
used, the UART needs to be put into half-duplex mode.

This can be used to get uninverted S.Port:
https://oscarliang.com/uninverted-sbus-smart-port-frsky-receivers/

It is not needed for the Pixracer FrSky port.
2018-07-08 23:24:17 +02:00
Beat Küng
1feccfcc81 frsky_telemetry: increase stack size by 52 bytes
As indicated in previous logs (268 bytes left).
2018-07-08 23:24:17 +02:00