1159 Commits

Author SHA1 Message Date
TSC21
e39e3b3418 events interface: chance uORB 'sequence' to 'event_sequence'
The reason is that sequence is an IDL reserved keyword, which results on failure when parsing with FastRTPSGen.
2021-07-09 13:24:13 +02:00
Beat Küng
e3972d563a cmake: ensure generated source files exist before extracting events
Only needed for Makefile-based builds:
gmake[3]: *** No rule to make target 'src/modules/flight_mode_manager/FlightTasks_generated.hpp', needed by 'events/px4.json'.  Stop.
2021-07-07 21:38:09 -04:00
Beat Küng
38f3b8d356 mavlink & system: add events interface
- sending protocol
- uorb event message & template methods for argument packing
- libevents submodule to send common events and handle json files
- cmake maintains a list of all (PX4) source files for the current build
  (PX4 modules + libs), which is used to extract event metadata and
  generate a json file
2021-07-07 21:38:09 -04:00
Daniel Agar
1b5e65df04
gyro_fft: change default length 1024 -> 512 to decrease latency
- change default FFT length (1024 -> 512)
      - this doubles the update rate because half the number of samples are required for each
 - decrease number of peaks (4 -> 3)
      - so far 3 seems to be sufficient on most vehicles
 - increase median filter window (3 -> 5)
 - decrease SNR requirement (likely needs to be configurable)
2021-07-06 21:54:18 -04:00
Daniel Agar
a5ee28883a gyro_fft: track FFT peaks and median filter frequency 2021-07-06 12:32:25 -04:00
Matthias Grob
b824f33ae9 battery: publish measured values also when battery not connected 2021-07-01 14:24:38 +02:00
Matthias Grob
9c0c85c9e2 battery_status: naming consistency current_filtered_a -> current_average_a 2021-07-01 14:24:38 +02:00
TSC21
4741ec25ce microRTPS: increase base message ID space to 179 2021-06-25 13:05:24 +02:00
TSC21
0c5f2d3b8c microRTPS: add missing header for PRIu32 and PRIu16 macros
Co-authored-by: squizz617 <seulbae@gatech.edu>
2021-06-21 16:36:44 +02:00
TSC21
084a992572 microRTPS: agent: only allow to whitelist the localhost when using FastDDS as the rmw 2021-06-21 16:36:44 +02:00
TSC21
79f7986715 apply ROS2 default memory management and publish mode QoS policies; make sure that SharedMemory is only used with FastDDS as the rmw 2021-06-21 16:36:44 +02:00
TSC21
d3a23cee40 microRTPS: agent: fix double free memory problem on SIGINT
It fixes also some minor issues when exiting the agent, including the printed stats
2021-06-21 16:36:44 +02:00
TSC21
6d5f12d2a2 microRTPS: client: add TX rate limiter 2021-06-21 16:36:44 +02:00
TSC21
ac2b38603c microRTPS: client: add missing "-p" option for the UART poll timeout and use microsecs for the send/rcv thread sleeps 2021-06-21 16:36:44 +02:00
TSC21
0cc79f3e48 microRTPS: client: show diagnostic of current bandwidth usage on the 'status' option 2021-06-21 16:36:44 +02:00
TSC21
d6ee15596d microRTPS: client: show diagnostic of average bandwidth usage on the 'status' option 2021-06-21 16:36:44 +02:00
TSC21
40462bfc1f microRTPS: client: reduce name set by pthread_setname_np since Linux requires names (with NUL) to fit in 16 chars, otherwise returns ERANGE (34) 2021-06-21 16:36:44 +02:00
TSC21
773d81f208 microRTPS: client: fix send per allocated topic 2021-06-21 16:36:44 +02:00
TSC21
f2fad6d966 microRTPS: by default, when FastDDS >= 2.0, enable Shared Memory transport for the agent participants when the localhost network is enabled 2021-06-21 16:36:44 +02:00
TSC21
320b414511 microRTPS: client: match the code style from the PX4 Firmware 2021-06-21 16:36:44 +02:00
TSC21
63571b3e3f microRTPS: agent: match the code style from the PX4 Firmware 2021-06-21 16:36:44 +02:00
TSC21
323ce797f8 microRTPS: allow communications only in the localhost network when ROS_LOCALHOST_ONLY env variable is set 2021-06-21 16:36:44 +02:00
TSC21
578e426e9e microRTPS: set trajectory_waypoint to be sent only, as this is outgoing data with vehicle_trajectory_waypoint_desired 2021-06-21 16:36:44 +02:00
David Sidrane
026d36dee8 microRTPS:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
64db89ab20 px_generate_uorb_topic_helper: Use inttypes 2021-06-16 17:07:47 +02:00
Julian Oes
e828ba4288
commander: send parachute command on termination (#17564)
* commander: send parachute command on termination

This sends the DO_PARACHUTE command to parachute component.

* commander: fix lying comments and printf

* commander: use one flag for termination triggered

This merges the duplicate flags _flight_termination_triggered and
_flight_flight_termination_printed.

* commander: correct variable name

* commander: always send tune with parachute

* commander: fix target_component for parachute cmd

The previous changes were wrong in that all commands were now sent to
the parachute component which doesn't make any sense. Of course only the
parachute command should be sent there.
2021-06-15 11:50:30 +02:00
bresch
514845592b en-/disable mc position controller using explicit control mode flag 2021-06-09 18:10:22 +02:00
RomanBapst
b06b46b224 log raw airspeed derivative, pitch setpoint and airspeed innovation for TECS
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-31 23:56:23 +02:00
Daniel Agar
2a792ca201 gyro_fft: add simple SNR requirement and reduce number of peaks 2021-05-31 10:26:45 -04:00
Nuno Marques
f9fe0e3746
ROS2/microRTPS: Add support for ROS2 Galactic and ROS2 Rolling (#17664)
microRTPS: generate_microRTPS_bridge: add support for ROS2 versions
* Galactic
* Rolling
2021-05-27 09:32:16 -07:00
Damien SIX
e4f235001b fix timesync for timestamp sample (including SFINAE detection) 2021-05-16 13:15:37 -04:00
RomanBapst
3b27864e53 vehicle_status: added field for geofence violation
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-10 10:46:49 +03:00
RomanBapst
269ce07cb5 land detector: log more states in order to facilitate debugging ground contact state
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-04 16:43:33 +02:00
Thomas
ab10e68a40 update Quadchute trigger from mavlink PR 1569 2021-05-03 21:44:27 +03:00
Thomas
bf9758247b add VEHICLE_VTOL_STATE_QC and remove hardcoding 2021-05-03 21:44:27 +03:00
Julian Oes
71bd35fcaa mavlink: keep track of seq for any component
Instead of only keeping track of the sequence ID of specific "supported"
components, we now keep track of any sysid/compid of an incoming
message. Before this change, unknown components (such as jMAVSim) would
completely screw up the mavlink message stats and create confusion (at
least in my case).

With this change we currently keep track of up to 8 other components.
Once we reach the limit, we will print a warning.
2021-05-02 13:45:39 -04:00
Claudio Micheli
371fa98579 Commander/preflight checks: Add monitoring to ESC failures
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-04-22 13:46:08 +02:00
Matthias Grob
29e07b1e52 MulticopterPositionControl: publish stricter tilt limit during takeoff 2021-04-20 18:18:21 +02:00
mcsauder
3b72f3b641 Create publish_status() method in the heater driver, add a status field to indicate if the temperature setpoint has been met within 2.5C, breakout update_params() method from the Heater::Run() method and simplify logic. 2021-04-16 08:09:51 -04:00
Barcis, Michal
7053919a9f fixed micrortps_agent usage description 2021-04-13 21:28:27 +02:00
CUAVmengxiao
45b9e18195
UAVCANv0: add CUAV smart battery support 2021-04-11 21:27:31 -04:00
Daniel Agar
39c96a8884 gps add device_id 2021-04-08 08:27:07 +02:00
Julian Kent
5c5ec1a0ea Receive telemetry_status, send vehicle_trajectory_waypoint_desired 2021-03-31 13:26:00 +02:00
Julian Kent
b5a64f957e Update RTPS messages to match what is needed for PX4/Avoidance 2021-03-31 13:26:00 +02:00
Julian Kent
c1cb964c2a RTPS timesync don't use MONOTONIC_RAW 2021-03-31 13:25:27 +02:00
Julian Kent
1011382098 Clamp RTPS -> uorb timestamps to system time 2021-03-31 13:25:27 +02:00
RomanBapst
5b08362ba3
position_controller_status message: added comments regarding NAN
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-03-31 11:23:33 +02:00
Daniel Agar
18be1bacdc state_machine_helper: automatically initialize to assist mode if using mavlink manual control 2021-03-30 17:56:28 +02:00
Michael Schaeuble
f9af1bbe2d PreFlightCheck: Check if SD card is present only once and store the result
statfs accesses the file-system and can be blocking for an extended period. Since the SD card check is part of the preflight checks in the main thread of commander, it could block its execution and cause various issues. The SD card is only mounted in rcS during boot so the state will not change after the first check.
2021-03-30 08:20:49 +02:00
Daniel Agar
e57aaaaa5e
rotate accel/gyro FIFO before publish and fix angular velocity filter resets
- rotates accel & gyro FIFO data before publication both to simplify downstream usage (including log review) and fix other issues
     - to best handle int16_t data rotations are now either performed with swaps if possible, otherwise promoted to float, rotated using the full rotation matrix, then rounded back to int16_t
 - fix sensors/vehicle_angular_velocity filter reset both with proper rotation and new calibration uncorrect helper
      - in FIFO case filtering is done before calibration is applied, but we need to handle a possible reset from a completely different sensor (vehicle body angular velocity -> sensor frame uncorrected data)
2021-03-22 12:01:12 -04:00