# Point Cloud Configuration¶

The default point cloud configuration file is installed under the /usr/share/slamcore/presets/point_cloud.json path. When following the ROS1 Navigation Stack Integration or Nav2 Integration tutorial, you may add some additional parameters to your SLAM Configuration file, which will allow you to trim the local point cloud (used for obstacle avoidance) for greater flexibility with your setup.

Parameters

Default Value

Type

LocalPointCloud.DepthSource.DepthNearThreshold

0.25

Float

LocalPointCloud.DepthSource.DepthFarThreshold

4.0

Float

LocalPointCloud.LowerBound

-∞

Float

LocalPointCloud.UpperBound

∞

Float

## Point Cloud Trimming¶

Point cloud trimming increases the usability of the point cloud for obstacle avoidance on ground robots, as for example, we can remove the ground points and avoid them being marked as an obstacle.

### Vertical Height Trimming¶

The point cloud may be trimmed by specifying the height below and above the camera position that you want to include, using the LowerBound and UpperBound parameters respectively.

Fig. 25 Example upper and lower bounds to trim the point cloud vertically

• LowerBound
• Type: Float

• Default: -1e30 (-∞)

• Description: Vertical distance which specifies the lower bounds of the point cloud volume to trim relative to the camera height.

• UpperBound
• Type: Float

• Default: 1e30 (∞)

• Description: Vertical distance which specifies the upper bounds of the point cloud volume to trim relative to the camera height.

The bounds are anchored to the camera position and world-axis aligned (Z axis is vertical even when camera is tilted). For example, if the camera on the robot was 23cm above the floor and we wanted to trim the ground points of the point cloud, we could set LowerBound to -0.22 (slightly less than the distance from the camera to the floor) to filter out the ground points from the point cloud.

The resulting point cloud that is published excludes any points outside the bounds defined above.

Fig. 27 Left, original point cloud. Right, vertically-trimmed point cloud.

Note

If you would prefer to keep the original point cloud as is, you can reproduce a similar behaviour without modifying the point cloud by using the min_obstacle_height ROS parameter, as explained in our ROS1 Navigation Stack Tutorial Obstacle Avoidance section and our Nav2 Integration Tutorial Nav2 Configuration section.

### Depth Trimming¶

The point cloud may also be trimmed in depth by specifying the range of depth values you want to include, using the DepthNearThreshold and DepthFarThreshold parameters of the DepthSource respectively.

• DepthSource.DepthNearThreshold
• Type: Float

• Default: 0.25

• Description: Specifies the minimum depth from the camera position (in metres).

• DepthSource.DepthFarThreshold
• Type: Float

• Default: 4.0

• Description: Specifies the maximum depth from the camera position (in metres).

The resulting point cloud that is published excludes any points outside the defined depth range.

Fig. 28 Left, original point cloud. Right, depth-trimmed point cloud.