---
title: "wendy cloud device ros2 lidar sample"
description: "Print bounded LiDAR summaries and XYZ samples as JSON lines"
---

## Syntax

```sh
wendy cloud device ros2 lidar sample <topic> [flags]
```

## Examples

```sh
wendy cloud device ros2 lidar sample --help
```

## Arguments

Argument notation from the CLI: `<topic>`. Angle brackets mark required values; square brackets mark optional values. See Details for command-specific validation.

## Flags

Flags below include inherited options. Types and defaults come from the CLI source. An empty default means no value is configured.

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--broker-url` | string | (empty) | Tunnel broker host:port (default: cloud :443 endpoint, otherwise &lt;cloud-host&gt;:50052) |
| `--cloud-grpc` | string | (empty) | Cloud gRPC endpoint (optional when a default session is set via 'wendy auth use') |
| `--count` | int | `1` | Number of summaries, 1..5 |
| `--device` | string | (empty) | Target device hostname; `wendy run` accepts a comma-separated list to deploy one build to several devices (needs a remote build host and --detach). Defaults to $WENDY_DEVICE, then the saved default device |
| `--domain` | int32 | `-1` | ROS_DOMAIN_ID override (default: app config, or 0 for the system graph) |
| `--duration` | int | `10` | Total observation deadline in seconds, 1..60 |
| `--json` | bool | `false` | Output in JSON format |
| `--max-points` | int | `200000` | Maximum decoded points per message, 100..1000000 |
| `--max-range` | float64 | `20` | Maximum output-frame range in metres |
| `--max-z` | float64 | `2` | Maximum output-frame Z in metres |
| `--message-type` | string | `sensor_msgs/msg/PointCloud2` | sensor_msgs/msg/PointCloud2 or sensor_msgs/msg/LaserScan |
| `--min-range` | float64 | `0.05` | Minimum output-frame range in metres |
| `--min-z` | float64 | `-1` | Minimum output-frame Z in metres |
| `--sample-points` | int | `32` | Number of output XYZ samples, 0..128 |
| `--scope` | string | `app` | Inspection graph: app or host |
| `--target-frame` | string | (empty) | Transform samples into this TF frame at capture time |
| `--use-sim-time` | bool | `false` | Use ROS simulation time for TF |

## Output

Output depends on the operation and selected target. Use the command help for additional guidance..

## JSON output

The global `--json` option requests machine-readable output. The CLI also selects JSON mode when no interactive terminal is attached. Support and payloads are command-specific; this flag does not guarantee a single JSON document for commands that stream logs or invoke build tools. Consult Details before parsing command output.

## Exit codes

The CLI entry point returns `0` on success and for its user-cancelled or default-cleared results. Other returned errors exit with `1` and print a diagnostic to stderr. Some operations may terminate through subprocess or signal handling; do not infer application health from the CLI exit code alone.

## Common errors

Check argument values and flag combinations against the synopsis above. For discovery, build, port, and readiness failures, see [deployment troubleshooting](../../../../../../../errors/). Command-specific constraints are in Details.

## See also

- [wendy cloud device ros2 lidar](../../../../../../../reference/cli/cloud/device/ros2/lidar/)
- [CLI conventions and configuration](../../../../../../../reference/)

## Details

Decode PointCloud2 or LaserScan on the device. Return point counts,
range sectors and bounded XYZ samples. Source timestamps and frames are retained.
Use ros2 bag record for full-resolution SLAM data. Missing data or TF is unknown.
The default scope follows the running app; --scope host requires --domain.

Use the command help for additional guidance.
