Commit Graph

41089 Commits

Author SHA1 Message Date
Daniel Agar 5dd1e5a018 delete systemcmds/mixer 2022-09-09 09:14:09 -04:00
Daniel Agar cac9c51ac8 ROMFS: purge old mixing system
- SYS_USE_IO is now off by default (enabled by default per board)
2022-09-09 09:14:09 -04:00
Julian Oes ed10146e9f fmu-v6: disable Rev 0, Rev 1 for HB Mini, and CM4
As I understand it, only Rev 3 and Rev 4 were shipped by HB for Mini and
CM4, and are likely to be used for it.

It would be nice to have all combinations but it requires quite some
flash in the current implementation.
2022-09-08 20:54:19 -04:00
Julian Oes f05fccebb7 fmu-v5x: disable rev0 for HB Mini and CM4 base
As I understand it, only Rev 1 and Rev 2 were shipped by HB, and likely
to be used for the Mini and CM4.
2022-09-08 20:54:19 -04:00
Julian Oes 6bd020e848 platforms: decrease flash usage by type for bus id
My assumption is that the bus are numbered < 127.
This saves about 100 bytes of flash.
2022-09-08 20:54:19 -04:00
vincentpoont2 4fe90322db update fmu-v6x rc.board_sensors, add V6X004003 2022-09-08 20:54:19 -04:00
vincentpoont2 167c3da99d update fmuv5x rc.board_sensors with V5X004000 2022-09-08 20:54:19 -04:00
Vincent Poon 70321ed610 update v5x rc.board_sensors
add V5X004002
2022-09-08 20:54:19 -04:00
Vincentpoont2 f476ebdcbf Correct BOARD_NUM_SPI_CFG_HW_VERSIONS at board_config.h 2022-09-08 20:54:19 -04:00
Vincentpoont2 9d5adf8bab Fix Error on manifest.c 2022-09-08 20:54:19 -04:00
Vincentpoont2 e91295e5db Fix Error on board_config.h Define on FMUv5X & FMUv6X 2022-09-08 20:54:19 -04:00
Vincentpoont2 b16a53018d Add Holybro Pixhawk Pi CM4 Baseboard Support 2022-09-08 20:54:19 -04:00
Don Gagne 0987bb2e8e Fix bug with yaw only reposition
Fix formatting
2022-09-08 17:55:30 -04:00
Matthias Grob da01dd9eeb mission_block: explicitly (re)set the acceptance radius to default for takeoff items
otherwise a previously adjusted or uninitialized radius from the last flight
can cause problems during the new takeoff
2022-09-08 14:49:32 +02:00
Matthias Grob b825b61a20 mission_block: minimal acceptance radius of 1mm
to avoid float rounding errors leading to tiny acceptance radii
getting considered
2022-09-08 14:49:32 +02:00
Ville Juven 9c204774f1 px4_userspace_init: Fix NULL dereference for px4_spi_buses in user space
For targets that define the SPI buses via px4_spi_buses_all_hw, a call
to px4_set_spi_buses_from_hw_version() is needed. Otherwise a NULL
de-reference will occur when trying to access px4_spi_buses.

Fixes a system crash in px4_fmu-v5_protected:
up_assert: Assertion failed at file:armv7-m/arm_memfault.c line: 101 task: wq:lp_default
2022-09-08 07:05:11 +02:00
Justin 88bf1030b5 Update CI to use the main branches. 2022-09-07 20:03:19 -04:00
Ville Juven d4cce452cf modules/dataman: Increase stack size by 100B
Fixes:
WARN  [load_mon] dataman low on stack! (276 bytes left)

Seen on px4_fmu-v5_protected target.
2022-09-07 20:02:26 -04:00
Junwoo Hwang 2542b1bb26 Implement Pacakge delivery via Gripper during mission
This feature allows user to use a Gripper type pacakge delivery
mechanism on a drone to trigger the delivery during a mission via the
mission item `DO_GRIPPER`.

This is a minimal change that is intended to have simplest pacakge
delivery feature on PX4, however the future scope would extend this
feature out of Navigator, and rather move towards a federated PX4
(flight-mode flexibility) architecture. But until then, this will serve
the purpose.

Update Tools/sitl_gazebo submodule to remove sdf file overwrite error

- There was an error happening due to .sdf file being overwritten, it
was caused by a wrongfully added. sdf file.
- This update pulls in the PR commit: https://github.com/Auterion/sitl_gazebo/pull/147

Initial cut on supporing PAYLOAD_PLACE mission item

Tidy and comment on navigation.h to clarify mission item definition

- Convert vehicle command ack subscription data type to
SubscriptionData, to not care about having a dedicated struct for
copying the latest data
- Tidy and comment on navigation.h to clarify the definition of
mission_item_s, which is confusing as it is an intergration of MAVLink
Standard into PX4's internal Mission Item structure

Rename mission_block's mission item reached function & cleanup navigator

- Isolated Handle Vehicle Commands function inside the Navigator
- Rename mission_block's mission item reached function to 'reached or
completed', as the navigation command can also be an action (e.g.
DO_SET_SERVO, which doesn't make sense to refer to as 'reached' when we
have successfully done executed the command)

Include MAVLink PR commit to include payload_drop message

More changes to add payload_drop MAVLink message support

- Comitting for testing purposes

Add mission item payload_drop to vehicle command payload drop link

- Now with a mission item with the nav_cmd set to 'payload drop', the
appropriate 'payload drop' vehicle command will be issued

Make Payload drop executable via Mission Plan

Implement payload_drop module to simulate payload delivery

- Simple module that acknowledges the payload drop vehicle command after
certain time, to simulate a successful delivery

Additional changes - payload drop module not working yet

- Need to do more thread stuff to make it work :(

Fix Payload Drop enum mismatch in vehicle_command enums

- First functional Payload Drop Implementation MVP
- Simple Ack & resuming mission from Navigator tested successfully

Hold the position while executing payload drop mission item

- Still the position hold is not solid, maybe I am missing something in
the position setpoint part and all the internal implications of
Navigator :(

Add DO_WINCH command support

Some fixes after rebase on develop branch

- Some missed brackets
- Some comment edits, etc

Add DO_WINCH command support

- Still has a problem of flying away from the waypoint while the
DO_WINCH is being executed, probably position setpoint related stuff :(

Apply braking of the vehicle for DO_WINCH command

- Copies the behavior of NAV_CMD_DELAY, which executes a smooth, braking
behavior when executing the delay because of the braking condition in
`set_mission_items` function
- This will not apply to Fixed wings
- The payload deploy getting triggered may be too early, as right now as
soon as the vehicle approaches the waypoint within the acceptance
threshold, the payload gets deployed

Add DO_GRIPPER support

Implement Gripper actual Hardware triggering support

- Currently not working, possibly in the mixer there's a bug
- Implemented the publishing of actuator_controls_1 uORB topic
- Implemented the test command for the payload_drop module, to test the
grpiper functionality
- Edited px4board file to include the payload_drop module
- Added Holybro X500 V2 airframe file, to enable testing on X500 V2
- Created new Quad X Payload Delivery mixer, which maps the actuator
controls 1 topic's data into the MAIN pin 5 output

Make Payload Drop Gripper Work

- Initialization of the Gripper position to CLOSED on Constructor of the
payload_drop module
- Setting the OPEN and CLOSED value to the appropriate actuator controls
input

Set vehicle_command_ack message's timestamp correctly

- By not setting the timestamp, the ack commands were not correctly
graphed in PlotJuggler!

Rename payload drop module to payload deliverer

- I think it's a more complex name (harder to type), but more generic

Add Gripper class (WIP)

Add Gripper class functionalities

- Add gripper uORB message
- Add gripper state machine

Use Gripper class as main interface in payload_deliverer

- Utilizes Gripper class functions for doing Gripper functionality

Remove mixer based package delivery trigger logic

- Remove custom mixer files that mapped actuator controls to outputs
statically

Additional improvements of the payload_deliverer

Fix payload_deliverer module not starting

- _task_id wasn't geting set appropriately in task_spawn function, which
led to runtime failure

Add Gripper Function to mixer_module

- Still not showing up as function mapping in QGC, needs fix

Add parameters to control gripper behavior

- Now user can enable / disable gripper
- Also select which type of gripper to use

Applying review from nuno

Remove timeout fetching from mission item and use gripper's timeout

- Previously, it was planned to use a custom DO_GRIPPER and DO_WINCH
MAVLink message definitions with information on timeout, but since now
we are using original message definition, only relevant timeout
information is defined in the payload_deliverer class

- This change brings in the timeout parameter to the Navigator, which
then sets the timeout in the mission_block class level, which then
processes the timeout logic

Make payload deployment work for Allmend test :P

Support gripper open/close test commands in payload_deliverer

Move enum definition for GRIPPER_ACTION to vehicle_command.msg

Remove double call for ` ${R}etc/init.d/rc.vehicle_setup`

- Was introduced during the rebase
- Was causing module already running & uORB topic can't be advertised
errors

Fix format via `make format` command

Modify S500 airframe file to use for control allocation usage

- Added Control allocation related parameters as default to not have it
reset every time the airframe is selected

Implement mission specific payload deploy timeout and more changes

Switch payload_deliverer to run on work queue

Remove unnecessary files

- Airframe changes from enabling control allocation are removed

Address review comments

- Remove debug messages
- Remove unnecessary or verbose comments & code
- Properly call parameter_update() function

Switch payload_deliverer to scheduled interval work item & refactor

- Switch to Schedeuled on Interval Work Item, as previous vehicle
command subscription callback based behavior led to vehicle comamnd ack
not being sent accordingly (since the Run() wouldn't be called unless
there's a new vehicle command), leading to ack command not being sent
out
- Also, old vehicle commands were getting fetched due to the
subscription callback as well, which was removed with this patch
- Fix the wrong population of floating point param2 field of vehicle
command by int8_t type gripper action by creating dedicated function
- Refactor and add comments to increase readability

Add gripper::grabbing() method and handle this in parameter update

- Previously, the intermediate state 'grabbing' was not considered, and
when the parameter update was called after the first initialization of
the gripper, the grab() function was being called again, which would
produce unnecessary duplicate vehicle command.
- Also replaced direct .grab() access to sending vehicle comamnd, which
unifies the gripper actuation mechanism through vehicle commands.

Navigator: Change SubscriptionData to Subscription to reduce memory usage

- Also removed unused vehicle command ack sub

PayloadDeliverer: Remove unnecessary changes & Bring back vehicle_command sub cb
2022-09-07 08:11:52 +02:00
Matthias Grob e115095f70
Functions: correct interpolate function for N points 2022-09-07 08:00:27 +02:00
Beat Küng 4087c27e84
control_allocator: handle saturation flags for helicopters 2022-09-07 08:00:27 +02:00
alexklimaj aa8d594e9b
Add heli servo trim 2022-09-07 08:00:27 +02:00
Matthias Grob 667e99be81
Helicopter: fix unit test after default throttle curve was changed 2022-09-07 08:00:27 +02:00
Matthias Grob 115cf4d572
Helicopter: More intuitive yaw direction configuration for the common cases 2022-09-07 08:00:27 +02:00
Matthias Grob f233f2167e
generic_250, px4vision: remove zero manual thrust without airmode
When hitting zero thrust by stick there is 0 torque authority
without airmode. So 0% minimum manual thrust should never be the default
without airmode.
2022-09-07 08:00:27 +02:00
Matthias Grob 8a25d06ed7
heli_defaults: comment and spacing 2022-09-07 08:00:26 +02:00
Beat Küng cecef7e3f6
control_allocator: update heli throttle + collective curve defaults 2022-09-07 08:00:26 +02:00
Beat Küng d38c02fd6a
commander: increase maximum COM_SPOOLUP_TIME to 30s (for helis) 2022-09-07 08:00:26 +02:00
Beat Küng 2635e2c386
airframes: replace blade with generic helicopter 2022-09-07 08:00:26 +02:00
Beat Küng 7e75b497ae
helicopter: add switch to engage main motor
For helicopters it's useful (e.g. during bringup) to be able to disable
the main rotor while the tail is still controlled to safely land.
2022-09-07 08:00:26 +02:00
Matthias Grob f32d931117
helicopter: add yaw sign parameter & expose settings in UI 2022-09-07 08:00:26 +02:00
Matthias Grob 349f152601
Helicopter: throttle spoolup upon arming
Uses COM_SPOOLUP_TIME to slowly ramp the throttle and allow the
tailrotor to compensate in a coordinated way based on the yaw
compesation from throttle, see CA_HELI_YAW_TH_S.

This coordinated spoolup is necessary to avoid unsafe yaw twitches
because of the heli rotating until the correct compensation kicks in
through the feedback controller.
2022-09-07 08:00:26 +02:00
Matthias Grob 7bf62373ae
Helicopter: refactor complicated throttle curve logic 2022-09-07 08:00:26 +02:00
Matthias Grob 2edb35b1b5
Functions: add gradual function with arbitrary number of corner points 2022-09-07 08:00:26 +02:00
Matthias Grob 6a9a049f1e
Helicopter: add unit testing for throttle curve 2022-09-07 08:00:26 +02:00
Matthias Grob 9ba6f4efb7
Helicopter: add yaw compensation from throttle CA_HELI_YAW_TH_S 2022-09-07 08:00:26 +02:00
Matthias Grob 554d965a2d
Helicopter: use absolute value for yaw compensation from collective pitch 2022-09-07 08:00:26 +02:00
Beat Küng 608ab9ff9c
control_allocator: extend description for CA_SP0_ANGx 2022-09-07 08:00:25 +02:00
Beat Küng e346190e63
helicopter: use tail motor & add CA_HELI_YAW_CP_S 2022-09-07 08:00:25 +02:00
Julian Oes 5ece24cdc4 setup: attempt to fix macOS CI
Somehow the wheel install of pymavlink fails without future, let's try
to work around that.
2022-09-07 13:49:37 +12:00
Peter van der Perk 8f0c2f4146 UCANS32K1 Enable some sensors by default 2022-09-06 09:43:11 -04:00
bresch 92fbd86b46 ekf2: add gps altitude drift test 2022-09-05 10:28:37 -04:00
bresch a2a5093881 ekf2: relax zero velocity update
The ZVU is too strong and prevents the EKF from following variations in
the height aiding sources, creating large innovations.
2022-09-05 10:28:37 -04:00
Daniel Agar d996af4647 ekf2: pass gpsSample around where required
- this minimizes potential misuse accessing _gps_sample_delayed and
makes the dependency clear
2022-09-05 10:27:19 -04:00
RomanBapst 0c860fa227 airspeed_selector: don't declare wind estimate valid if estmator is not initialised
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-09-05 10:21:38 -04:00
Ville Juven 9ed35debec board_ctrl: Clean up usage of VBUS, nARMED from user/kernelspace
Move logic implemented in the header files to source files, this way
it will be simpler to define which is compiled to kernel space and
which to user space

Also allows to remove some headers that pull in half the universe
from the board definitions (which should just be pin definitions and
no functionality)
2022-09-05 07:37:28 +02:00
Benjamin Perseghetti a56f654651
Multi-Vehicle Ignition Gazebo Simulation (#20154) 2022-09-04 21:10:29 -04:00
Daniel Agar 7bbdc220f5 ekf2: initialiseFilter() simplify mag heading init and resetQuatStateYaw
- most of resetQuatStateYaw doesn't apply to initial heading init, so
removing the special case keeps it simple
2022-09-02 08:46:10 -04:00
Ville Juven e467d11990 boards/px4/fmu-v5/toc: The RD certificate signature points to the wrong place
The signature end address is incorrect
2022-09-02 08:00:27 +02:00
Daniel Agar 5dfd2f39ef boards/cubepilot/cubeorange: initialize all I2C pins immediately 2022-09-01 20:46:09 -04:00