forked from PX4/PX4-Autopilot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ObstacleDistance publishing from downsampled depth camera point…
…cloud to test CollisionPrevention in gz-sim. In this example the FOV of the camera is 73 degrees, the width is 640 and height is 480. I've downsampled this by 8 to get a width of 80 points. I use the middle row from the downsampled point cloud as the input to the ObstacleDistance.distances[] array. Unfortunately CollisionPrevention in PX4 uses 5 degree sectors, so therefore we can only get 14 points from the 73 degree FOV (73 / 5 = 14.6). Over the width of 80 points I chose to leave off the first and last 5 points such that we can take the 70 points and divide them evenly by 14 (70/14 = 5). So our down sampled points end up being from -35 degrees to +35 degrees FOV at 5 degree increments. To use: make px4_sitl gz_x500_depth Co-authored-by: Andrew Wilkins <andrew.wilkins@ascendengineer.com>
- Loading branch information
Showing
2 changed files
with
126 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters