Skip to content
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

Collision prevention: account for the time since range data arrived #12945

Merged
merged 2 commits into from
Sep 11, 2019

Conversation

jkflying
Copy link
Contributor

@jkflying jkflying commented Sep 11, 2019

Describe problem solved by the proposed pull request
Data from external systems (eg. SLAM systems, or PX4/Avoidance) is received at lower frequencies than the position controller runs at. This creates a step response that the collision prevention tries to follow when getting closer to an obstacle.

Test data / coverage
Tested in SITL. See screenshots of ulogs

Describe your preferred solution
We already account for latency in the system conservatively by subtracting the existing velocity multiplied by said latency from the desired stopping distance. The new feature piggybacks on this by increasing the latency by the time since the mavlink message was received as well.

@jkflying jkflying requested a review from baumanta September 11, 2019 14:02
@baumanta
Copy link
Contributor

adapted setpoint in current master contains steps
time_compensation_before

with this PR it is smooth
time_compensation_after

@dagar dagar merged commit 39451b8 into master Sep 11, 2019
@dagar dagar deleted the pr-smoother-colprev branch September 11, 2019 16:35
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