Add OpenCL GPU implementation#1504
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.
| depth.copyTo(depthMat); | |
| depthMat = depth.getMat(cv::ACCESS_READ); | |
copy only if needed
There was a problem hiding this comment.
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
| <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.
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.
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.