-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
SENS: SF45: Scale the measured distance with pitch and roll #24142
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about extracting this function to a library so we don't have 2 times the exact same implementation?
This would be an option, in the long run, i would move away from publishing the obstacle_distance from the sensor, and just publish each measurement with its orientation set as the quaternion, but for this we need a callback based collision prevention map logic, which it is currently not. If its worth it for the time inbetween i cant say, there you would probably know better. |
@bresch, what do you think? |
Now I see where all the hassle is coming from and I agree with you the driver should only publish data and there needs to be a central instance like an obstacle distance manager in CollisionPrevention taking care of maintaining fusion of different sensors, maintaining timeouts and similar. Let's go in steps. |
…e assumption that the measured obstacles are vertical walls,
2b50b61
to
673d58d
Compare
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 96 byte (0 %)]
px4_fmu-v6x [Total VM Diff: 104 byte (0.01 %)]
Updated: 2025-01-08T15:45:11 |
src/drivers/distance_sensor/lightware_sf45_serial/lightware_sf45_serial.cpp
Outdated
Show resolved
Hide resolved
77aea02
to
eab8e56
Compare
eab8e56
to
c850532
Compare
To prevent oscillations caused by the coupling of pitch and roll, which increase the sensor's measured distance, we account for these effects by introducing scaling based on pitch and roll into the measurements. This adjustment ensures accurate collision prevention.
Issue was solved inside of collision prevention by @mahimayoga in #24107, whereby this implementation is aequivalent.
Pitch
Roll
Solution
Pitch
Roll
Test coverage