-
Notifications
You must be signed in to change notification settings - Fork 15.7k
feat(commander): external modes setpoint types & reliability #27683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+558
−207
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
69ac9a5
chore(msg): remove unused VehicleAngularAccelerationSetpoint.msg
bkueng 5469402
fix(commander): add config_overrides_confirm topic
bkueng 426667d
fix(navigator): resend mode_completed when mode is completed
bkueng 30bf3d0
feat(commander): add setpoint types
bkueng 2e55b89
chore(VehicleControlMode): remove unused flag_control_acceleration_en…
bkueng 545b14f
chore: use setpoint_config in mc_raptor and mc_nn_control
bkueng df468e7
chore(commander): remove unused flag_control_termination_enabled flag
bkueng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Setpoint configuration message | ||
| # | ||
| # Published by external modes and PX4 will respond with SetpointConfigReply. | ||
|
|
||
| uint32 MESSAGE_VERSION = 0 | ||
|
|
||
| uint64 timestamp # [us] Time since system start | ||
|
|
||
| uint16 TYPE_INVALID = 0 | ||
| uint16 TYPE_DIRECT_ACTUATORS = 1 # ActuatorMotors and ActuatorServos | ||
| uint16 TYPE_MULTICOPTER_GOTO = 2 # GotoSetpoint | ||
| uint16 TYPE_FIXEDWING_LATERAL_LONGITUDINAL = 3 # FixedWingLateralSetpoint and FixedWingLongitudinalSetpoint | ||
| uint16 TYPE_TRAJECTORY = 4 # TrajectorySetpoint | ||
| uint16 TYPE_RATES = 5 # VehicleRatesSetpoint | ||
| uint16 TYPE_ATTITUDE = 6 # VehicleAttitudeSetpoint | ||
| uint16 TYPE_ROVER_POSITION = 7 # RoverPositionSetpoint | ||
| uint16 TYPE_ROVER_SPEED_ATTITUDE = 8 # RoverSpeedSetpoint and RoverAttitudeSetpoint | ||
| uint16 TYPE_ROVER_SPEED_RATE = 9 # RoverSpeedSetpoint and RoverRateSetpoint | ||
| uint16 TYPE_ROVER_SPEED_STEERING = 10 # RoverSpeedSetpoint and RoverSteeringSetpoint | ||
| uint16 TYPE_ROVER_THROTTLE_ATTITUDE = 11 # RoverThrottleSetpoint and RoverAttitudeSetpoint | ||
| uint16 TYPE_ROVER_THROTTLE_RATE = 12 # RoverThrottleSetpoint and RoverRateSetpoint | ||
| uint16 TYPE_ROVER_THROTTLE_STEERING = 13 # RoverThrottleSetpoint and RoverSteeringSetpoint | ||
| uint16 TYPE_TRAJECTORY_6DOF = 14 # TrajectorySetpoint6dof | ||
| uint16 TYPE_THRUST_AND_TORQUE = 15 # VehicleThrustSetpoint and VehicleTorqueSetpoint | ||
| uint16 TYPE_POSITION_TRIPLET = 16 # PositionSetpointTriplet | ||
|
|
||
| uint16 type # [@enum TYPE] setpoint type (corresponding to one or more setpoint messages) | ||
|
|
||
| uint8 source_id # nav_state of the mode | ||
|
|
||
| bool should_apply # if true: apply as current setpoint configuration (mode should be active). If false: setpoint configuration is not changed (can be used to check if a setpoint can be used with the current vehicle configuration). | ||
|
|
||
| uint16 timeout_ms # Configure setpoint timeout. If no setpoint received for this time, PX4 triggers a failsafe. 0 disables the timeout (unresponsive modes still trigger a timeout through arming checks). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # Reply to SetpointConfig | ||
|
|
||
| uint32 MESSAGE_VERSION = 0 | ||
|
|
||
| uint64 timestamp # [us] Time since system start | ||
|
|
||
| uint16 type # See SetpointConfig::TYPE_* | ||
|
|
||
| uint8 source_id # nav_state of the mode that sent the SetpointConfig | ||
|
|
||
| uint8 RESULT_SUCCESS = 0 | ||
| uint8 RESULT_FAILURE_OTHER = 1 | ||
| uint8 RESULT_UNSUPPORTED = 2 # Setpoint type is unsupported for the current vehicle | ||
| uint8 RESULT_UNKNOWN_SETPOINT_TYPE = 3 # The setpoint type is not known | ||
| uint8 result # [@enum RESULT] | ||
|
|
||
| # Mode requirements for using the given setpoint type. A mode will use these and apply them to the arming check reply (PX4 does not do that itself). | ||
| # Certain setpoint types can be used in a reduced way, for example a TrajectorySetpoint without position control. In that case PX4 still sets all requirement flags, and the mode will then ignore mode_req_local_position. | ||
| bool mode_req_angular_velocity | ||
| bool mode_req_attitude | ||
| bool mode_req_local_alt | ||
| bool mode_req_local_position |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.