> ## Documentation Index
> Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# PointPillars 

The `PointPillars` implements a wrapper for the PointPillars model, which detects objects in point cloud data and optionally projects them onto images based on calibration.

<Warning>
  The PointPillars model requires a session with LiDAR data collection capabilities. You can find the sensor configuration options when launching a GRID session.
</Warning>

<ResponseField name="class PointPillars()">
  <ResponseField name="use_local" type="boolean" default>
    If True, inference call is run on the local VM, else offloaded onto GRID-Cortex. Defaults to True.
  </ResponseField>
</ResponseField>

<ResponseField name="def run()">
  <ResponseField name="pc" type="np.ndarray" required="True">
    Expects a list of point cloud data. Each point cloud data is a list of 3D coordinates ($[x0,y0,z0,x1,y1,z1...]$), len(point\_cloud) = 3 $*$ NumberOfPoints.
  </ResponseField>

  <ResponseField name="calibration" type="np.ndarray" required="True">
    The calibration matrix of shape $(3, 4)$.
  </ResponseField>

  <ResponseField name="Returns" type="np.ndarray">
    The predicted output.
  </ResponseField>
</ResponseField>

<RequestExample>
  ```python Inference Call theme={null}
  from grid.model.perception.detection.pointpillars import PointPillars
  car = AirGenCar()

  # We will be capturing an image from the AirGen simulator 
  # and run model inference on it.

  img =  car.getImage("front_center", "rgb").data

  model = PointPillars(use_local = False)
  result = model.run(rgbimage=img)
  print(result.shape)
  ```
</RequestExample>

<Tabs>
  <Tab title="License">
    This code is licensed under the MIT License.
  </Tab>

  <Tab title="Source">
    [https://github.com/zhulf0804/PointPillars](https://github.com/zhulf0804/PointPillars)
  </Tab>
</Tabs>


## Related topics

- [Point](/robot-api/reference/sim/zenoh/ros2_types/Point.md)
- [PointCloud](/robot-api/reference/base/types/pointcloud/PointCloud.md)
- [PointCloud2](/robot-api/reference/sim/zenoh/ros2_types/PointCloud2.md)
- [PointField](/robot-api/reference/sim/zenoh/ros2_types/PointField.md)
- [Depth to Point Cloud](/simulation/airgen/examples/depth-to-point.md)
