Commit Graph

77 Commits

Author SHA1 Message Date
Silvan Fuhrer 563fd8427a boards: increase init stack size by 100B
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-10-02 09:37:06 +02:00
Igor Mišić c1dbe177b8
boards: move FRAM emulated sector size to the 32-byte granularity (#21204) 2023-09-20 16:50:36 -04:00
Beat Küng c95539e8ce boards: increase init stack size by 150B
External airframes need a bit more stack due to nested configs.
2023-06-09 21:11:11 -04:00
Daniel Agar bb0f2875a9 ekf2: disable multi-EKF across mags by default (H7 & SITL) for now
- re-enable once the estimator selector respects configured mag
priority (at least initially) or is otherwise able to automatically
prefer an external mag over internal
 - for SITL disabled because the full matrix of esitmator instances
(IMUs X mags) was too many topics for logger currently
2023-05-19 18:35:57 -06:00
Daniel Agar 635daeed8a NuttX push jlink-nuttx into cmake and enable CONFIG_DEBUG_TCBINFO by default 2023-01-12 09:05:26 -05:00
PX4 BuildBot e6c4416250 update all px4board kconfig 2023-01-07 21:53:01 -05:00
Daniel Agar dc5ce9b0ce
boards: NuttX increase default CONFIG_ARCH_INTERRUPTSTACK 512->768 bytes
- during casual testing on default configs the stack was penetration was reaching ~90% which is a bit too close for comfort
 - increasing by 50% to be conservative
2023-01-07 12:07:35 -05:00
JaeyoungLim 21e88f64b4
Add new fixed wing rate control module (fw_rate_control)
* Fixedwing rate control into a separate module
* Start fw_rate_control for vtol
* Move over airspeed related parameters to fw_rate_control

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2023-01-04 11:14:00 -05:00
Daniel Agar 40e3503c39 boards: fix all NuttX configs (CONFIG_SMALL NuttX upgrade migration) 2022-12-29 12:50:37 -05:00
Daniel Agar c2f15f5957 boards: update all px4boards (make all_px4_savedefconfig) 2022-12-29 12:50:37 -05:00
Daniel Agar 2cb4ef0629
NuttX 10.3+ upgrade (#20190)
Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com>
Co-authored-by: David Sidrane <David.Sidrane@NscDg.com>
Co-authored-by: alexklimaj <alex@arkelectron.com>
2022-11-20 20:28:07 -05:00
Daniel Agar 8f25acd428 sih remove gps and use standalone sensor_gps_sim 2022-09-09 18:00:50 -04:00
Daniel Agar bfe0d71a21 sih remove baro and use standalone sensor_baro_sim 2022-09-09 18:00:50 -04:00
Daniel Agar c5336abba2 sih remove mag and use standalone sensor_mag_sim 2022-09-09 18:00:50 -04:00
Daniel Agar bcdd2203d3 delete systemcmds/motor_test and msg/test_motor.msg 2022-09-09 09:14:09 -04:00
Daniel Agar 5dd1e5a018 delete systemcmds/mixer 2022-09-09 09:14:09 -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
Daniel Agar 4040e4cdf2 simulation organization and cleanup
- new modules/simulation directory to collect all simulators and related modules
 - new Tools/simulation directory to collect and organize scattered simulation submodules, scripts, etc
 - simulation module renamed to simulator_mavlink
 - sih renamed to simulator_sih (not a great name, but I wanted to be clear it was a simulator)
 - ignition_simulator renamed to simulator_ignition_bridge
 - large sitl_target.cmake split by simulation option and in some cases pushed to appropriate modules
 - sitl targets broken down to what's actually available (eg jmavsim only has 1 model and 1 world)
 - new Gazebo consistently referred to as Ignition for now (probably the least confusing thing until we fully drop Gazebo classic support someday)
2022-08-25 09:10:03 -04:00
Junwoo Hwang 0c218e6628 atl/mantis-edu: enable mavlink ftp 2022-08-12 09:43:12 +02:00
Beat Küng f454dcef6b ROMFS: set control allocation parameters for airframes
Removes some airframes:
- 1000_rc_fw_easystar.hil
- 10015_tbs_discovery
- 10016_3dr_iris
- 10018_tbs_endurance
- 13001_caipirinha_vtol
- 13002_firefly6
- 13003_quad_tailsitter
- 13004_quad+_tailsitter
- 13005_vtol_AAERT_quad
- 13006_vtol_standard_delta
- 13007_vtol_AAVVT_quad
- 13008_QuadRanger
- 13009_vtol_spt_ranger
- 13012_convergence
- 13050_generic_vtol_octo
- 14001_tri_y_yaw+
- 14002_tri_y_yaw-
- 15001_coax_heli
- 2105_maja
- 2200_mini_talon
- 3031_phantom
- 3032_skywalker_x5
- 3033_wingwing
- 3036_pigeon
- 3100_tbs_caipirinha
- 4003_qavr5
- 4009_qav250
- 4019_x500_v2
- 4030_3dr_solo
- 4031_3dr_quad
- 4051_s250aq
- 4072_draco
- 4080_zmr250
- 4090_nanomind
- 4100_tiltquadrotor
- 50003_aion_robotics_r1_rover
2022-08-12 09:43:12 +02:00
Igor Mišić 4b503c310e Merge PR #19575 (changes to pr-extendend_hw_ver_rev_format)
- 4096 of 3 hex digits each for rev and ver is enough.
    #defines used in SPI versions do not be long format, use use the macro
 - Board provides a prefix and the formatting is sized and built in
 - No need for funky board_get_base_eeprom_mtd_manifest interface
    Original mft is used where the abstraction is done with the MFT interface

Co-authored-by: David Sidrane <David.Sidrane@Nscdg.com>
2022-07-05 09:29:26 +02:00
Igor Mišić ec1614d156 boards: update id string from V5X{0-a}{0-a} to V5X{xxxx}{xxxx}
boards: new format for hwtypecmp string
boards: update manifest.c to follow the new hw_ver_rev format
2022-07-05 09:29:26 +02:00
Daniel Agar 5b6e5a0968 boards: NuttX update all boards to preallocated sem holder list
- CONFIG_SEM_PREALLOCHOLDERS=32
 - CONFIG_SEM_NNESTPRIO=16 (default)
2022-05-31 01:41:07 -07:00
Julian Oes 490a0c473b Rename vmount to gimbal 2022-02-07 19:21:15 -05:00
Julian Oes 6ed48ad0c0 ROMFS: Remove now unused variable 2022-01-10 23:04:10 -05:00
Julian Oes 38439256e5 Mantis: move MIXER vars to airframe init
The two were actually conflicting and are now consolidated.
2022-01-10 23:04:10 -05:00
Julian Oes 14fb019821 Mantis: move SYS_DM_BACKEND to board_defaults
Otherwise it is set too late and not used during startup.
2022-01-10 23:04:10 -05:00
Julian Oes feb2987fa8 Mantis: remove unused transition script
When coming from the previous stack there are no params anywhere, so
this will not execute anyway.
2022-01-10 23:04:10 -05:00
Julian Oes b3d830dd11 Mantis: move power off tune to commander
This way we don't allocate inside the interrupt context.
2022-01-10 23:04:10 -05:00
Julian Oes 372a0da987 Mantis: move upload.sh into boards/atl/mantis-edu 2022-01-10 23:04:10 -05:00
Julian Oes 0ffdccbd60 Mantis: Add MPC2520 again 2022-01-10 23:04:10 -05:00
Julian Oes b44f5b49ca Mantis: add tap_esc to Kconfig 2022-01-10 23:04:10 -05:00
Julian Oes 8331339927 atl_mantis: update bootloader binary again
This includes the fix which disables the UART overrun.
2022-01-10 23:04:10 -05:00
Julian Oes b92aa92bec Mantis: fix mixer loading
The ordering before did not work out, and without the sleep it fails.
2022-01-10 23:04:10 -05:00
Julian Oes 06b5b58b3b Mantis: increase Tx buffer to with gimbal->camera
This way log streaming works with much less drops.
2022-01-10 23:04:10 -05:00
Julian Oes 11b60904c3 Mantis: use lower log streaming rate 2022-01-10 23:04:10 -05:00
Julian Oes f3a278dce5 Mantis: add comment about boot order.
The boot order is now:
1. The PX4 bootloader boots, and starts the camera.
2. The camera starts and sends the boot command to the PX4 bootloader.
3. PX4 starts.
2022-01-10 23:04:10 -05:00
Julian Oes ecfc7cc24f Mantis: set bootloader timeout to 180 seconds
The first byte 0xb4 is 180. This number is read by the bootloader.
2022-01-10 23:04:10 -05:00
Julian Oes e15cbc3a6b Mantis: move tap_esc to extras
This way we work around an issue where tap_esc got stuck during bootup
in a cold boot.
2022-01-10 23:04:10 -05:00
Julian Oes e4763f15f6 Mantis: add RC hacks
This changes the way RC is handled for the Mantis:
- The RC values are re-written when arriving over MAVLink. They are
  rescaled from 0..4095 to 1000..2000 and the channel bits added to
  separate channels. This makes the downstream handling easier.
- Gimbal pitch is moved from Aux1 to Aux2 as that should be the default.
- Aux3 and Aux4 are used for the photo and video trigger.
- The speed button is used as the FLTMODE channel and set to switch
  between POSCTL and ALTCTL.
2022-01-10 23:04:10 -05:00
Julian Oes 1754e25920 vmount: add param to use RC input for angular rate
Until now RC input was translated to angles only. I added the param
MNT_RC_IN_MODE which allows the RC input to be used for angular rate.
2022-01-10 23:04:10 -05:00
Julian Oes f03990f015 Mantis: prevent output setup from running
This is not required as we start tap_esc directly and load the mixer.
2022-01-10 23:04:10 -05:00
Julian Oes cb15728536 Mantis: save mission in RAM
This is using a reduced number of mission items of 1000 instead of 2000
in order to fit in RAM.
2022-01-10 23:04:10 -05:00
Julian Oes a50f7af3b1 Mantis: update bootloader and SYS_AUTOSTART
This adds a check for the previous SYS_AUTOSTART id. If it is still the
old/previous SYS_AUTOSTART id, it will flash the new bootloader as well
as set the proper SYS_AUTOSTART id.
2022-01-10 23:04:10 -05:00
Julian Oes 4a43155e69 Mantis: remove duplicate define 2022-01-10 23:04:10 -05:00
Julian Oes 7759ffb00e Mantis: reduce power button hold time
This is more intuitive and matches the tune.
Hopefully, it's still long enough to prevent any false positives.
2022-01-10 23:04:10 -05:00
Julian Oes 6960600c28 Mantis: play power off tune
To play a power off tune, I needed to convert the file to C++, so that I
could use the uORB::Publication.

The current implementation starts playing the power off sound but then
stops it as soon as the button is released.

The problem is mostly that we only get an interrupt when the button is
pressed or released but we don't seem to be able to poll it, at least
not in the current state.
2022-01-10 23:04:10 -05:00
Julian Oes de1849167d Mantis: Add upload_wifi target to upload firmware 2022-01-10 23:04:10 -05:00
Daniel Agar d077ca15fb delete PWM_SERVO_SET, PWM_SERVO_SET_MODE, systemcmds/motor_ramp, and pwm_out test 2022-01-10 09:51:11 -05:00
Daniel Agar daa925137c boards: move default battery calibration defines to parameter defaults 2022-01-10 09:49:36 -05:00