Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
Signed-off-by: Oguz Ozturk <[email protected]>
  • Loading branch information
oguzkaganozt committed Feb 10, 2025
1 parent 8199db0 commit c90a7fd
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 31 deletions.
28 changes: 0 additions & 28 deletions .github/actions/docker-build-and-push-tools/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,34 +31,6 @@ runs:
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Restore ccache
uses: actions/cache/restore@v4
with:
path: |
root-ccache
key: ccache-${{ inputs.platform }}-${{ hashFiles('src/**/*.cpp') }}
restore-keys: |
ccache-${{ inputs.platform }}-
- name: Restore apt-get
uses: actions/cache/restore@v4
with:
path: |
var-cache-apt
key: apt-get-${{ inputs.platform }}-${{ hashFiles('src/**/package.xml') }}
restore-keys: |
apt-get-${{ inputs.platform }}-
- name: Inject cache into docker
uses: reproducible-containers/[email protected]
with:
cache-map: |
{
"root-ccache": "/root/.ccache",
"var-cache-apt": "/var/cache/apt"
}
skip-extraction: true

- name: Get current date
id: date
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
Expand Down
30 changes: 30 additions & 0 deletions docker/tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Open AD Kit Tools

This directory offers tools for [Open AD Kit](https://autoware.org/open-ad-kit/) containers to make deployment and simulation easier.

- `scenario-simulator`: a container that can visualize the Autoware and scenario simulation on RViz.

## Scenario Simulator

### Run

```bash
docker run --rm --name openadkit-scenario-simulator ghcr.io/autowarefoundation/autoware-tools:scenario-simulator
```

### Settings

The following environment variables can be configured for the scenario simulator container:

| Variable | Default Value | Possible Values | Description |
|----------|--------------|-----------------|-------------|
| `SCENARIO` | [`scenario_test_runner/scenario/sample.yaml`](https://github.com/tier4/scenario_simulator_v2/blob/master/test_runner/scenario_test_runner/scenario/sample.yaml) | Any valid path | The full path to the scenario file inside the container |
| `ARCHITECTURE_TYPE` | `awf/universe/20240605` | Any valid architecture type | The architecture type to use for the scenario simulation |
| `SENSOR_MODEL` | `sample_sensor_kit` | Any valid sensor model | The sensor model to use for the scenario simulation |
| `VEHICLE_MODEL` | `sample_vehicle` | Any valid vehicle model | The vehicle model to use for the scenario simulation |
| `INITIALIZE_DURATION` | `90` | Any positive integer | The duration to initialize the scenario simulation |
| `GLOBAL_FRAME_RATE` | `30` | Any positive integer | The frame rate of the scenario simulation |
| `GLOBAL_TIMEOUT` | `120` | Any positive integer | The timeout of the scenario simulation |
| `OUTPUT_DIRECTORY` | `/autoware/scenario-sim/output` | Any valid path | The directory to save the simulation results |
| `USE_SIM_TIME` | `false` | `true`, `false` | Whether to use simulation time instead of system time |
| `RECORD` | `false` | `true`, `false` | Whether to record the scenario simulation rosbag |
4 changes: 2 additions & 2 deletions docker/tools/scenario-simulator/Dockerfile.scenario-simulator
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ RUN --mount=type=ssh \
&& rm -rf /var/lib/apt/lists/* "$HOME"/.cache

# Extract rosdep dependencies for simulator
RUN /autoware/resolve_rosdep_keys.sh /autoware/src/simulator ${ROS_DISTRO} \
RUN /autoware/resolve_rosdep_keys.sh /autoware/src/simulator ${ROS_DISTRO} --dependency-types=exec \
> /rosdep-simulator-depend-packages.txt \
&& cat /rosdep-simulator-depend-packages.txt

### Scenario Simulator
FROM ghcr.io/autowarefoundation/autoware:universe-visualization AS scenario-simulator
FROM ghcr.io/autowarefoundation/autoware:core AS scenario-simulator
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand Down
2 changes: 1 addition & 1 deletion docker/tools/scenario-simulator/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ run_scenario_simulator() {
SENSOR_MODEL=${SENSOR_MODEL:-sample_sensor_kit}
VEHICLE_MODEL=${VEHICLE_MODEL:-sample_vehicle}
INITIALIZE_DURATION=${INITIALIZE_DURATION:-90}
GLOBAL_FRAME_RATE=${GLOBAL_FRAME_RATE:-20}
GLOBAL_FRAME_RATE=${GLOBAL_FRAME_RATE:-30}
OUTPUT_DIRECTORY=${OUTPUT_DIRECTORY:-/autoware/scenario-sim/output}
SCENARIO=${SCENARIO:-$(ros2 pkg prefix --share scenario_test_runner)/scenario/sample.yaml}
GLOBAL_TIMEOUT=${GLOBAL_TIMEOUT:-120}
Expand Down

0 comments on commit c90a7fd

Please sign in to comment.