- naming consistency (estimator prefix as "namespace")
- only publish if baro is available and bias is changing as a small logging optimization
- avoid unnecessary copying (get const reference to status directly)
- trivial code style fixes
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.
- 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
* msg: Add estinator information and warning events message (estimator_event_flags)
* ekf2: publish information and warning events
* logger: log estimator_event_flags
* update ecl submodule to latest
Co-authored-by: Daniel Agar <daniel@agar.ca>
- publish wind estimate only from EKF, and wind speeds from airspeed selector to new separate topic (airspeed_wind)
- rename message wind_estimate to wind
- publish wind from currently used ekf instance (ekf2selector)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
- add command to request a message
- add gimbal attitude message
mavlink_receiver handle GIMBAL_MANAGER_SET_ATTITUDE
first implementation of new vmount input MavlinkGimbalV2
- setup class
- decode gimbal_manager_set_attitude in ControlData
add gimbal information message
add gimbal manager information and vehicle command ack
mavlink messages: add stream for GIMBAL_MANAGER_INFORMATION
mavlink_receiver: handle GIMBAL_DEVICE_INFORMATION
remove mavlink cmd handling from vmount input MavlinkGimbalV2
complete gimbal manager:
- send out fake gimbal_device_information for dummy gimbals
- complete ROI handling with nudging
small fixes
fix typos
cleanup
- gimbal device information
- flags lock
- check sanity of string
add support for CMD_DO_GIMBAL_MANAGER_ATTITUDE
stream GimbalDeviceAttitudeStatus for dummy gimbals
- add uROB gimbal_attitude_status
- fill status in vmount output_rc for dummy gimbals not able to send the
status themselves
- stream mavlink GimbalDeviceAttitudeStatus
better handle the request for gimbal infomation request
clean up
bring gimbal information back on vmount init
add new gimbal message to mavlink normal stream
fix publication of gimbal device information
rename gimbal_attitude_status to gimbal_device_attitude_status
stream gimbal_manager_status at 5Hz
mavlink: send information only on request
Sending the information message once on request should now work and we
don't need to keep publishing it.
mavlink: debug output for now
make sure to copy over control data
mavlink: add missing copyright header, pragma once
mavlink: address review comments
mavlink: handle stream not updated
Our answer does not just depend on whether the stream was found but
whether we actually were able to send out an update.
mavlink: remove outdated comment
vmount: add option for yaw stabilization only
The stabilize flag is used for gimbals which do not have an internal IMU
and need the autopilot's attitude in order to do stabilization. These
gimbals are probably quite rare by now but it makes sense to keep the
functionality given it can e.g. be used by simple servo gimbals for
sensors other than highres cameras.
The stabilize flag can also be re-used for gimbals which are capable of
stabilizing pitch and roll but not absolute yaw (e.g. locked to North).
For such gimbals we can now set the param MNT_DO_STAB to 2.
We still support configuring which axes are stabilized by the
MAVLink command DO_MOUNT_CONFIGURE, however, this is generally not
recommended anymore.
vmount: fix incorrect check for bit flag
mavlink_messages: remove debug message
Signed-off-by: Claudio Micheli <claudio@auterion.com>
use device id
remove debug print
gimbal attitude fix mistake
clang tidy fix
split:
- gimbal_attitude -> gimbal_device_set_attitude, gimbal_manager_set_attitude
- gimbal_information -> gimbal_device_informatio, gimbal_manager_information
add gimbal protocol messages to rtps msg ids
support set attitude for gimbal directly speaking mavlink
clean up gimbal urob messages
vmount: address a few small review comments
vmount: split output into v1 and v2 protocol
This way we can continue to support the MAVLink v1 protocol. Also, we
don't send the old vehicle commands when actually using the new v2
protocol.
vmount: config via ctor instead of duplicate param
vmount: use loop to poll all topics
Otherwise we might give up too soon and miss some data, or run too fast
based on commands that have nothing to do with the gimbal.
typhoon_h480: use gimbal v2 protocol, use yaw stab
Let's by default use the v2 protocol with typhoon_h480 and enable yaw
lock mode by stabilizing yaw.
- new heater_status logging message
- run continously at low rate until configured sensor is found
- fix px4io fd bugs (fd open/close/ioctl must be same thread)
- control allocation module with multirotor, VTOL standard, and tiltrotor support
- angular_velocity_controller
- See https://github.com/PX4/PX4-Autopilot/pull/13351 for details
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Roman Bapst <bapstroman@gmail.com>
- log all estimator (ekf2) flags as separate booleans in a new dedicated low rate message (only publishes at 1 Hz or immediately on any change)
- this is a bit verbose, but it avoids the duplicate bit definitions we currently have across PX4 msgs, ecl analysis script, flight review, and many other custom tools and it's much easier for casual log review in FlightPlot, PlotJuggler, csv, etc
- for compatibility I've left estimator_status filter_fault_flags, innovation_check_flags, and solution_status_flags in place, but they can gradually be removed as tooling is updated
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
- split out switches from manual_control_setpoint into new message manual_control_switches
- manual_control_switches published at minimal rate (~ 1 Hz) or immediately on change
- simple switch debounce in rc_update (2 consecutive identical decodes required)
- manual_control_switches logged at full rate rather than sampled at (5-10% of messages logged)
- manual_control_setpoint publish at minimal rate unless changing
- commander handle landing gear switch for manual modes
- processing of mode_slot and mode_switch is now split so we only do one or the other (not both)
- a future step will be to finally drop mode_switch and accompanying switches entirely
Co-authored-by: Matthias Grob <maetugr@gmail.com>
- ekf2 can now run in multi-instance mode (currently up to 9 instances)
- in multi mode all estimates are published to alternate topics (eg estimator_attitude instead of vehicle_attitude)
- new ekf2 selector runs in multi-instance mode to monitor and compare all instances, selecting a primary (eg N x estimator_attitude => vehicle_attitude)
- sensors module accel & gyro inconsistency checks are now relative to the mean of all instances, rather than the current primary (when active ekf2 selector is responsible for choosing primary accel & gyro)
- existing consumers of estimator_status must check estimator_selector_status to select current primary instance status
- ekf2 single instance mode is still fully supported and the default
Co-authored-by: Paul Riseborough <gncsolns@gmail.com>
- mavlink messages DEBUG/DEBUG_FLOAT_ARRAY/DEBUG_VECT/NAMED_VALUE_FLOAT move to separate stream headers and don't include if CONSTRAINED_FLASH
- mavlink receiver DEBUG/DEBUG_FLOAT_ARRAY/DEBUG_VECT/NAMED_VALUE_FLOAT handling excluded if CONSTRAINED_FLASH
- msg: skip debug_array.msg, debug_key_value.msg, debug_value.msg, debug_vect.msg if CONSTRAINED_FLASH
- new sensors work item that subscribes to N x sensor_gps and publishes vehicle_gps_position
- blending is now configurable with SENS_GPS_MASK and SENS_GPS_TAU
Co-authored-by: Jacob Crabill <jacob@volans-i.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
- inconsistency checks now run continuously instead of only preflight
- keep inconsistencies for all sensors
- add per sensor data validator state as overall health flag
- IMU integration move from drivers (PX4Accelerometer/PX4Gyroscope) to sensors/vehicle_imu
- sensors: voted_sensors_update now consumes vehicle_imu
- delete sensor_accel_integrated, sensor_gyro_integrated
- merge sensor_accel_status/sensor_gyro_status into vehicle_imu_status
- sensors status output minor improvements (ordering, whitespace, show selected sensor device id and instance)
* msg: Add EKF-GSF yaw estimator logging data
* ecl: update to version with EKF-GSF yaw estimator
* ekf2: Add param control and logging for EKF-GSF yaw estimator
* logger: Add logging for EKF-GSF yaw esimtator
with measurement noise auto-tuning
The purpose of this estimator is to improve land detection and vertical
velocity feedforward
Recovery strategy:
This is required when the setpoint suddenly changes in air or that the
EKF is diverging. A lowpassed test ratio is used as a trigger for the recovery logic
Also, a lowpassed residual is used to estimate the steady-state value
and remove it when estimating the accel noise to avoid increasing the
accel noise when the redisual is caused by an offset.
- introduces parameter IMU_DGYRO_CUTOFF to configure the angular acceleration low pass filter
- the angular acceleration is computed by differentiating angular velocity after the notch filter (IMU_GYRO_NF_FREQ & IMU_GYRO_NF_BW) is applied
Co-authored-by: Julien Lecoeur <jlecoeur@users.noreply.github.com>
- split out integrated data into new standalone messages (sensor_accel_integrated and sensor_gyro_integrated)
- publish sensor_gyro at full rate and remove sensor_gyro_control
- limit sensor status publications to 10 Hz
- remove unused accel/gyro raw ADC fields
- add device IDs to sensor_bias and sensor_correction
- vehicle_angular_velocity/vehicle_acceleration: check device ids before using bias and corrections
This new airspeed module does:
-runns an airspeed validator for every airspeed sensor present, which checks measurement validity and estimates an airspeed scale
-selects another airspeed sensor if for the current one a failure is detected
-estimates airspeed with groundspeed-windspeed if no valid airspeed sensor is present
-outputs airspeed_validated topic
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
squashed & rebased version, not including:
- listener changes
- src/firmware renaming
Commits:
tag_to_version.py: fix Python3 error
subprocess.communicate returns bytes instead of a str which is not the
same for Python3. Therefore, we need to decode the bytes.
cmake: remove folder src/firmware
The folder src/firmware was not intuitive. Why would the binaries for
SITL be inside a src and why even inside a src/firmware folder. Also,
the rootfs was put there which made it even more confusing.
The CMakeLists.txt files are moved into cmake/ and get now called from
the main CMakeLists.txt.
qshell: support for return value
Instead of just sending commands, qshell will now also wait until
the command has finished on QURT and sent back a return value. This will
allow all modules on the DSP side to be spawned from the Linux side
meaning that we only need one config/startup file instead of two.
adb_upload: create folders before pushing
Previously the script failed if the folder on the destination was not
already existing. This therefore makes pushing easier.
posix: spawn PX4 modules in bash
This adds the possibility to spawn PX4 modules out of bash. Basically,
the main executable can now be started as a server/daemon or as a
client.
The server replaces the existing functionality of the main exe with
the pxh shell, however, it also opens a pipe that clients can talk to.
Clients can run or spawn PX4 modules or commands by connecting to the
server over the pipe. They clients will get the stdout and return value
of their commands via a client specific pipe back.
This work will allow to start all modules using a bash script similar to
the way it is done in NuttX where the NuttShell scripts the startup
scripts and starts the modules.
SITL: use new client shell in SITL
This is a first step to use the new shell capabilities for SITL.
The new startup bash script rcS merges (and therefore replaces) the two
existing scripts rcS_gazebo_iris and rcS_jmavsim_iris.
More cleanup will be necessary for the rest of the SITL startup scripts.
Snapdragon: use new shell to start all modules
Instead of different mainapp.config and px4.config files, we can now use
a unified rcS bash script which starts all the modules based on
parameters, mainly the SYS_AUTOSTART param.
Snapdragon: fix the airframe description
pxh: argv needs to end with a nullptr
The comment was wrong that argv needs an additional 0 termination.
Instead it needs a nullptr at the end.
px4_posix_tasks: variable cleanup
The px4_task_spawn_cmd function got a cleanup while debugging, however,
no functional changes.
Snapdragon: move some drivers to 4100 config
These drivers are supported by the community, so they go into the 4100
config.
Snapdragon: update 210qc platform
px4_daemon: use doxygen comments
apps.h_in: fix string printf: use .c_str()
px4_daemon: \b -> \n in printf
px4_daemon: handle error in generate_uuid (close the file on error)
posix main: some clarifications in comment (it's the symlinks not the script aliases)
cmake: remove new install command again
This one was probably wrong and untested. Installing needs revisiting.
POSIX: remove argument USES_TERMINAL
POSIX: copy init and mixer files for SITL
Instead of using non-working install commands, the mixer and startup
files are now copied as part of the build in cmake.
adb_upload.sh: remove leftover commented printf
POSIX main: just the pointer instead of memmove
POSIX main: remove chroot
chroot is removed because it hasn't been used anywhere and seems
untested.
px4_daemon: remove client pipe when cleaning up
px4_daemon: fail if the client pipe already exists
The client pipe is supposed to be specific (by UUID), so the path
shouldn't exist already.
history: limit the number of history entries
This is a protection to avoid filling the memory if we are entering a
lot of commands (e.g. auto-generated).
px4_daemon: add a threadsafe map and use it
px4_daemon: whitespace
px4_daemon: fix client parsing
Sometimes the client ends up reading more than one packet in one read.
The parsing is not made for this and would require a (ring)buffer for
it.
The solution of this commit just reads as much as needed from the pipe
which avoids having to do buffering and parsing.
posix: changes sitl_run.sh and main.cpp cleanup
This changes the paths in sitl_run.sh quite a bit to allow the px4
binary to run in the rootfs directory which should make it convenient
and very close to the NuttX variant.
Also main.cpp got a big cleanup after the big rebase with some
conflicts. Quite some functionality was removed but it has yet to be
seen if it needs to be re-added.
px4_log: cleanup log levels, now they make sense
Before DEBUG and INFO log levels where inverted which didn't make much
sense in my eyes.
dataman: fix path for bash shell
logger: fix paths for bash shell
mavlink: fix paths for bash shell
param: fix path for bash shell
inav: fix paths for bash shell
sdlog2: fix paths for bash shell
ROMFS: add forgotten mixer to list
SITL init: more models, more options
- Support for different models using the unified startup
script rcS.
- Support to choose the estimator by setting the environment variable
PX4_ESTIMATOR.
- Support to choose the logger by setting the environment variable
PX4_LOGGER.
rcS: fix string comparison
listener: use template file
Instead of having all of the C++ code inside the Python file it is
nicer to have a separate template file with the C++ headers, etc.
px4_log: add PX4_INFO_RAW for raw printfs
This allows to do custom formatting but is still transported over
sockets to clients.
topic_listener: use PX4_INFO_RAW instead of printf
commander: use PX4_INFO_RAW for status
listener: rewrite to classes and factory
posix: fix some argument warnings
generate_listener.py: by accident changed shebang
listener: big refactor of the generator
Hopefully this makes it easier to read and change in the future.
rcS: manually take over rebase changes
listener: remove leftover try
listener: properly clean up topic instance
rcS: take over some vehicle specific changes
posix-configs: vehicle specifics to separate files
posix-configs: remove leftover lines
uORBDevices: new PX4_INFO_RAW instead of printf
px4_log: just use printf on NuttX
listener: use less binary space, strip on NuttX
generate_listener.py: remove commented code
cmake: fix syntax error from merge
px4_daemon: fixes after rebase of apps.h/cpp fix
px4_daemon: namespace missing
posix: only create stub for fsync on QURT
unitests: reduce dependencies of param test
This makes the unit test compile and link again after the bash changes.
QURT: some compile fixes after a rebase
SITL: arg change for sitl_run.sh to use rcS_test
This allows to use a custom startup file for testing.
SITL: add the folder test_data
SITL: implement shutdown command as systemcmd
The shutdown command needs to be a proper systemcmd, otherwise the alias
and symlink generation doesn't work and we end up calling shutdown of
the host computer which is to be avoided.
px4fmu_test: same IO_pass mixer as px4fmu_default
px4fmu_test: use normal quad x mixer
There is no good reason to use a specific test mixer, except more cmake
code around it. Therefore just use the same mixer as default, and at
some point px4fmu_test and px4fmu_default can get merged
POSIX: cleanup, dir and symlink fixes
This cleans up the logic behind the symlinking and creating directories.
POSIX: correct arg order in usage info
tests: fix paths for SITL tests
POSIX: printf fix
sitl_run.sh: try to make this run on Mac as well
cmake: try to make jenkins happier
Path cleanup, the bin is no longer in src/firmware
POSIX: fix symlink logic
SITL: prefix all exported env variables
cmake: fix path for ROS tests
integrationtests: fix log path
launch: try to make tets with ROS working again
px4_defines: fix after wrong merge deconflicting
px4_defines: get paths for POSIX correct
cmake: fix cmake arguments
This was fine with cmake 3.6 but did not work with cmake 3.2.2
cmake: use cp instead of cmake -E copy
cmake -E copy does not support copying multiple files with versions <
3.5. Therefore, just use cp for now.
ROMFS: fix build error after rebase
cmake: fix paths in configs
launch: use `spawn_model` again
cmake: various fixes after big rebase
param: path fixes after rebase
posix platform: fixes after rebase
test_mixer: fix screwed up rebase
If the EXTERNAL_MODULES_LOCATION variable has been set, and the
EXTERNAL_MODULES_LOCATION/msg/ directory exists containing a
CMakeLists.txt file with the following format:
set(config_msg_list_external
message1.msg
message2.msg
message3.msg
...
PARENT_SCOPE
)
then the messages defined in config_msg_list_external are added to the
msg_files list in Firmware/msg/CMakeLists.txt and are used to generate uORB
message headers. The generate uORB message headers are generated in the same
location as the normal uORB message headers in the build directory, namely,
<build_dir>/uORB/topics. The uORB topic sources are generated in
<build_dir>/msg/topics_sources.