-
Notifications
You must be signed in to change notification settings - Fork 860
Add OpenCL GPU implementation #1504
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
base: humble-devel
Are you sure you want to change the base?
Conversation
corelib/src/MarkerDetector.cpp
Outdated
float d3 = util2d::getDepth(depth, corners[i][2].x*rgbToDepthFactorX, corners[i][2].y*rgbToDepthFactorY, true, 0.02f, true); | ||
float d4 = util2d::getDepth(depth, corners[i][3].x*rgbToDepthFactorX, corners[i][3].y*rgbToDepthFactorY, true, 0.02f, true); | ||
cv::Mat depthMat; | ||
depth.copyTo(depthMat); |
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.
depth.copyTo(depthMat); | |
depthMat = depth.getMat(cv::ACCESS_READ); | |
copy only if needed
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.
The depthMat = depth.getMat(cv::ACCESS_READ);
caused some lifecycle issues for me earlier, so I wouldn't trust it. The reason for that is the original object that we create a shallow copy from gets deleted, so the depthMat
gets deleted also.
package.xml
Outdated
@@ -22,7 +21,7 @@ | |||
<!-- <depend>libproj-dev</depend> needed due to error in vtk6 (kinetic)--> | |||
<depend>libsqlite3-dev</depend> | |||
<depend>liboctomap-dev</depend> | |||
<!-- <depend>grid_map_core</depend> --> <!-- till this PR is released https://github.com/ANYbotics/grid_map/pull/499 --> | |||
<depend>grid_map_core</depend> <!-- till this PR is released https://github.com/ANYbotics/grid_map/pull/499 --> |
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 think we still need to wait for ANYbotics/grid_map#519 to be released, we may change the comment to
<depend>grid_map_core</depend> <!-- till this PR is released https://github.com/ANYbotics/grid_map/pull/499 --> | |
<!-- <depend>grid_map_core</depend> --> <!-- till this PR is released https://github.com/ANYbotics/grid_map/pull/519 --> |
Note that dependency in package.xml
is useful only if you use rosdep to install dependencies, the workaround if you want grid_map_core
support locally is to install explicitly grid_map_core
and cmake should be able to find it.
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 created a PR to fix grid_map_core
here: ANYbotics/grid_map#521, but it didn't get reviewed yet. Though I think you can apply these fixes yourself if you want to test everything properly.
I kinda forgot about |
Thanks for your feedback. I fixed the errors and removed unnecessary logs now, let me know if anything else is needed. |
Hello! Any update on this? |
I didn't have time to test the impact of these changes. In the mean time, if you can rebase this MR on |
grid_map_core
;humble-devel
;This will automatically use OpenCL GPU if it is available.