-
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: Improved Datahandling and fixes #23918
base: main
Are you sure you want to change the base?
Conversation
acac357
to
7622b2a
Compare
@dirksavage88 Would be nice if you could also do a quick review. |
src/drivers/distance_sensor/lightware_sf45_serial/lightware_sf45_serial.cpp
Show resolved
Hide resolved
src/drivers/distance_sensor/lightware_sf45_serial/lightware_sf45_serial.cpp
Outdated
Show resolved
Hide resolved
2682f41
to
db67751
Compare
db67751
to
45ec537
Compare
src/drivers/distance_sensor/lightware_sf45_serial/lightware_sf45_serial.cpp
Outdated
Show resolved
Hide resolved
0: Rotation upward | ||
1: Rotation downward | ||
24: Rotation upward | ||
25: Rotation downward |
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.
I never actually had the chance to test these on the bench. The non-standard Yaw cfg as well.
@dirksavage88 |
1f97fe4
to
1e9801d
Compare
FLASH Analysispx4_fmu-v5x
px4_fmu-v6x
Updated: 2024-11-29T12:44:31 |
@Claudio-Chies these changes look good, but I have not had a chance to test on the sensor. Also I am not an approving reviewer. Maybe @alexcekay would be willing to since he has looked through this code before. |
another issue i found, which i'll fix in the next commit.
|
Screencast.from.11-22-2024.11.25.34.AM.webmAttached we can see a replay of a log, with low and high angle set to -130, 130 respectively, and at 100hz. |
5151174
to
7f7a4c5
Compare
FLASH Analysispx4_fmu-v5x
px4_fmu-v6x
|
src/drivers/distance_sensor/lightware_sf45_serial/lightware_sf45_serial.cpp
Outdated
Show resolved
Hide resolved
src/drivers/distance_sensor/lightware_sf45_serial/lightware_sf45_serial.cpp
Show resolved
Hide resolved
} | ||
|
||
if (start <= end) { | ||
for (uint8_t i = start; i <= end; i++) {_obstacle_map_msg.distances[i] = _current_bin_dist;} |
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.
Looks like you covered all the edge cases here. Eventually setting the cycle delay can be done in PX4, but getting it working with default settings is probably best. Lightware studio should really be used once to set the scan angle and enable scanning at first, and then not touched again unless debugging.
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.
Yes, but usually you wouldn't change the cycle delay after the initial setup, no?
For the UAS use case, the lowest cycle delay is probably the most suited? Or I don't know a need for a slower one from the top of my head.
7f7a4c5
to
9b40da5
Compare
… to a publishing per sector design. other minor improvements
9b40da5
to
1d4dcbf
Compare
…ential out-of-bound access
1d4dcbf
to
457e67c
Compare
Changes:
Moved to the MAV_SENSOR_ORIENTATION ENUM to be consistent with the orientations used in DistanceSensor.msg
Removed the publishing to distance_sensor.
The data in each bin is now the smallest measured value, and not the last measured value.
Added
obstacle_distance_fused
anddistance_sensor
to the loggedvision and avoidance
topicsChangelog Entry
For release notes:
Alternatives
for the distance sensor, we could also calculate a quaternion for each measurement, and then set the orientation quaternion, via that. Then we could remove the obstacle_distance publishing.
This would add some complexity in the driver here, but offload all data handling to Collision prevention.
As the obstacle_distance publishing was already in place, i opted to stay with this approach.
Relevant PR's
Test coverage