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

PositionSmoothing: fix getMaxZSpeed calculation #24227

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

bresch
Copy link
Member

@bresch bresch commented Jan 17, 2025

Solved Problem

We cannot first take the norm and then subtract without considering the Pythagorean theorem.

fixes #24223

Solution

Compute xy norm after computing the 3D vectors relative to the target position.

Test coverage

not tested yet

We cannot first take the norm and then subtract without considering the
Pythagorean theorem.
@Luka-Filipovic
Copy link

This was also my first attempt to fix the issue 😄
I think this is still a fundamentally wrong approach. Here are the counter example where this logic doesn't work:

  1. start point (0, 0, -10), target (0, 0, 0), next (10, 0, 0): this results in a 90 deg turn angle and makes the arrival_z_speed > 0 even tho it needs to be 0
  2. start point (0, 0, -10), target (0, 0, 0), next (0, 0, 0.1): this results in a 180 deg turn angle and gives the maximum arrival_z_speed even tho it needs to be able to fully stop at the next waypoint (we don't know if it's the last waypoint or where the path goes after)

The logic needs to account for the speed constraints the trajectory will have once the target is reached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants