Skip to content

Conversation

bkueng
Copy link
Member

@bkueng bkueng commented May 26, 2025

Previously, when switching from a goto setpoint into a mode that publishes trajectory_setpoint, the previous goto setpoint was still used for 500ms, which then caused a setpoint jump.
This change makes sure that when a trajectory_setpoint is received, any existing goto setpoint is marked as invalid immediately.

Tested in SITL and on a quad.
Before:
https://logs.px4.io/plot_app?log=f52fe94d-087d-489c-8ab9-412cd32c63c5
goto_setpoint_before_fix

After:
https://logs.px4.io/plot_app?log=f09140a0-3ada-4e65-817c-a3d6189c8c72
goto_setpoint_after_fix

…g trajectory_setpoint

Previously, when switching from a goto setpoint into a mode that publishes
trajectory_setpoint, the previous goto setpoint was still used for 500ms,
which then caused a setpoint jump.
This change makes sure that when a trajectory_setpoint is received, any
existing goto setpoint is marked as invalid immediately.
@bkueng bkueng requested a review from MaEtUgR May 26, 2025 13:56
@github-actions github-actions bot added the stale label Jun 26, 2025
Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @bkueng for fixing this.

Sorry for taking exorbitantly long! I got caught up in looking for a simpler way than setting the timestamp to 0 based on a parameter flag and then it fell through the cracks 🤦‍♂️

It's all correct in my eyes and we can look into a simpler implementation later on when adding tests and PX4 internal goto setpoint use 👍

@sfuhrer sfuhrer merged commit 80febaf into main Jul 16, 2025
69 of 71 checks passed
@sfuhrer sfuhrer deleted the goto_setpoint_fix branch July 16, 2025 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants