Enable Offboard support for Rover position control #12765
Merged
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.
Describe problem solved by the proposed pull request
When streaming position setpoints with
SET_POSITION_TARGET_LOCAL_NED
to the rover, the rover is able to enter offboard mode but is not able to track the setpoint. This is because the rover position controller did not support offboard mode.This Fixes #10936
Test data / coverage
The following log shows the log of testing in SITL by sending setpoints of [200m, 200m] in local coordinates.
https://review.px4.io/plot_app?log=4860d7a3-1366-4614-aee1-72f8dff95037
Describe your preferred solution
As the rover position controller runs on global coordinates, we need to convert the local offboard setpoints to global coordinates. This is done similar to the fixed wing support for offboard position setpoints in #12532
Additional context
Offboard control is useful for prototyping advanced features from the companion computer. Added support for position control will enable applications running on the companion computer to rely on the firmware position controller rather than controlling the inputs directly. Other offboard setpoints such as velocity is not supported.