Skip to content

Commit a5d240c

Browse files
committed
update README
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
1 parent ce23fdf commit a5d240c

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

simulator/autoware_carla_interface/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,36 @@ The combined view shows all 6 cameras with labels: FL (Front-Left), F (Front), F
102102
<!-- <node pkg="autoware_carla_interface" exec="multi_camera_combiner" output="screen"/> -->
103103
```
104104

105+
### Following the Ego Vehicle with the CARLA Spectator Camera
106+
107+
The `spectator_follow` script locks the CARLA spectator (free) camera to the ego vehicle, so the in-simulator view chases the car automatically instead of having to pan manually. It connects to the running CARLA server, looks up the ego actor by its `role_name`, and updates the spectator transform at a fixed rate.
108+
109+
Run it in a separate terminal while CARLA and the Autoware bridge are running:
110+
111+
```bash
112+
ros2 run autoware_carla_interface spectator_follow
113+
```
114+
115+
Common options (all optional):
116+
117+
| Flag | Default | Description |
118+
| ------------ | ------------- | ------------------------------------------------------------------ |
119+
| `--host` | `localhost` | CARLA server host |
120+
| `--port` | `2000` | CARLA server RPC port |
121+
| `--role` | `ego_vehicle` | `role_name` attribute of the ego actor to follow |
122+
| `--distance` | `8.0` | Meters behind the ego vehicle (use `0` for a top-down view) |
123+
| `--height` | `4.0` | Meters above the ego vehicle |
124+
| `--pitch` | `-15.0` | Camera pitch in degrees (negative looks down) |
125+
| `--rate` | `30.0` | Update rate in Hz |
126+
127+
For a top-down view directly above the ego vehicle:
128+
129+
```bash
130+
ros2 run autoware_carla_interface spectator_follow --distance 0 --height 30 --pitch -90
131+
```
132+
133+
Press `Ctrl+C` to stop the script. It will keep retrying if the ego actor is not yet spawned, and re-acquire it if it is removed and respawned.
134+
105135
## Inner-workings / Algorithms
106136

107137
The `InitializeInterface` class is key to setting up both the CARLA world and the ego vehicle. It fetches configuration parameters through the `autoware_carla_interface.launch.xml`.

0 commit comments

Comments
 (0)