-
Notifications
You must be signed in to change notification settings - Fork 98
Moved the snapping extractor out of the RapidHeightMapManager and to a higher level closer to where its used #796
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
Conversation
…eightMapData and the TerrainMapData individually
# Conflicts: # ihmc-footstep-planning/src/main/java/us/ihmc/footstepPlanning/FootstepPlannerRequest.java
…a higher level closer to where its used
# Conflicts: # ihmc-perception/src/main/java/us/ihmc/perception/gpuHeightMap/RapidHeightMapExtractorCUDA.java # ihmc-perception/src/main/java/us/ihmc/perception/gpuHeightMap/RapidHeightMapManager.java
# Conflicts: # ihmc-high-level-behaviors/src/main/java/us/ihmc/behaviors/activeMapping/ContinuousHikingProcess.java
activeMappingParameterToolBox = new ActiveMappingParameterToolBox(ros2Node, robotModel, "ForContinuousWalking"); | ||
environmentHandler = new EnvironmentHandler(); |
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.
Both of these are happening at the highest level now
@@ -94,14 +94,6 @@ public HeightMapData getLatestHeightMapData() | |||
} | |||
} | |||
|
|||
public TerrainMapData getLatestTerrainMapData() |
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.
Not coming from the height map thread anymore
@@ -96,11 +95,6 @@ public HeightMapData getLatestHeightMapData() | |||
return rapidHeightMapThread.getLatestHeightMapData(); | |||
} | |||
|
|||
public TerrainMapData getLatestTerrainMapData() |
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.
Not happening in the realsense process anymore
@@ -117,8 +114,7 @@ public RapidHeightMapExtractorCUDA(int mode, HeightMapParameters heightMapParame | |||
globalHeightMapImage = new GpuMat(globalCellsPerAxis, globalCellsPerAxis, opencv_core.CV_16UC1); | |||
terrainCostImage = new GpuMat(globalCellsPerAxis, globalCellsPerAxis, opencv_core.CV_8UC1); | |||
contactMapImage = new GpuMat(globalCellsPerAxis, globalCellsPerAxis, opencv_core.CV_8UC1); | |||
sensorCroppedHeightMapImage = new GpuMat(cellsPerAxisCropped, cellsPerAxisCropped, opencv_core.CV_16UC1); |
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.
This name was confusing
@@ -149,9 +145,6 @@ private void recomputeDerivedParameters() | |||
globalCenterIndex = HeightMapTools.computeCenterIndex(heightMapParameters.getInternalGlobalWidthInMeters(), heightMapParameters.getCellSizeInMeters()); | |||
globalCellsPerAxis = 2 * globalCenterIndex + 1; | |||
|
|||
terrainCenterIndex = HeightMapTools.computeCenterIndex(heightMapParameters.getTerrainWidthInMeters(), heightMapParameters.getCellSizeInMeters()); |
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.
There is no concept of a terrain map anymore, its just the cropped map
@@ -449,13 +438,8 @@ public int getSequenceNumber() | |||
return sequenceNumber; | |||
} | |||
|
|||
public GpuMat getTerrainHeightMapImage() |
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.
Not happening in here any more
@@ -6,14 +6,16 @@ | |||
import org.bytedeco.opencv.global.opencv_core; | |||
import org.bytedeco.opencv.opencv_core.GpuMat; | |||
import org.bytedeco.opencv.opencv_core.Mat; | |||
import us.ihmc.euclid.tuple3D.Point3D; |
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.
We only need the center of the height map which is a 2D point
@@ -74,13 +74,8 @@ | |||
"lowerBound": 1.0, | |||
"upperBound": 4.5 | |||
}, | |||
"Terrain width in meters": { |
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.
Got rid of this
@@ -21,13 +24,27 @@ public void testSnappingTerrainKernelRuns() | |||
HeightMapParameters heightMapParameters = new HeightMapParameters(); | |||
SnappingTerrainExtractor snappingTerrainExtractor = new SnappingTerrainExtractor(heightMapParameters); | |||
|
|||
GpuMat fakeHeightMap = new GpuMat(500, 500, opencv_core.CV_16UC1); | |||
GpuMat fakeHeightMap = new GpuMat(401, 401, opencv_core.CV_16UC1); |
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.
A little test to make sure the extractor runs
@@ -453,32 +451,6 @@ extern "C" __global__ void croppingKernel(unsigned short *inputMap, size_t pitch | |||
unsigned short *croppedRow = (unsigned short *)((char *)croppedMap + xIndex * pitchCropped); | |||
croppedRow[yIndex] = 0; // Assign 0 for out-of-bounds cells | |||
} | |||
|
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.
Only keepin the cropped map now
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.
So can we still run whatever requires the snapping kernel from the autonomy process?
(float) heightMapParameters.getCellSizeInMeters(), | ||
heightMapParameters); | ||
heightMap.close(); |
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 only thing that requires the snapping kernel is the footstep planner. But in the way the autonomy process use's the planner its probably not using the snapping kernel. |
No description provided.