Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
60406be
feat: simulator-cli にibisバイナリプロトコルを移植
HansRobo Apr 7, 2026
8f45799
ci: ghcr.ioへのDocker imageパブリッシュワークフローを追加
HansRobo Apr 7, 2026
fac9f1d
ci: docker-publishのデフォルトブランチをibisに変更
HansRobo Apr 7, 2026
16ef746
ci: docker-publish CI のビルド時間を大幅短縮
HansRobo Apr 7, 2026
0d57982
feat: ibisフィードバック送信をタイマー駆動化してレート設定を追加
HansRobo Apr 7, 2026
ffdefe2
feat: ibisフィードバックの位置情報更新を200Hzのシミュレータ直結に変更
HansRobo Apr 9, 2026
6fee79a
refactor: simulator-cli Dockerイメージをcmake installで軽量化
HansRobo Apr 9, 2026
8b481b2
perf: シミュレータステップを200Hz→250Hzに変更
HansRobo Apr 9, 2026
1f91159
Set simulator to 125Hz and sync ibis feedback
HansRobo Apr 13, 2026
813b259
fix: simulator-cliのドリブラーをperfectDribblerモードに切り替えてボール保持を修正
HansRobo Apr 20, 2026
a9fb9b5
feat(simulator): ibis指令のcontrol_modeを解釈しロボット側位置制御構成に対応
HansRobo Sep 12, 2026
ee2e6b4
docs: feedbackポート衝突・終端速度の意味・A/B注入点を仕様へ追記
HansRobo Sep 12, 2026
050b0ce
Merge pull request #3 from ibis-ssl/feature/robot-side-position-control
HansRobo Sep 12, 2026
e4c1c33
fix(simulator): ibis feedbackのレイアウトを実機STM32へ整合
HansRobo Sep 12, 2026
9dd35ef
Merge pull request #4 from ibis-ssl/fix/feedback-layout-match-real-ha…
HansRobo Sep 12, 2026
d9e2f23
feat(simulator): ibisチーム色を明示指定する--ibis-team-colorを追加
HansRobo Sep 12, 2026
7ec8836
Merge pull request #5 from ibis-ssl/feat/ibis-team-color
HansRobo Sep 13, 2026
df266a9
fix(simulator): 実機G474と同じvision喪失時の停止条件を再現
HansRobo Sep 13, 2026
a28dd8d
Merge pull request #6 from ibis-ssl/fix/honor-vision-availability
HansRobo Sep 13, 2026
6f01e99
feat(simulator): 位置照合の失敗で指令を破棄したことを警告する
HansRobo Sep 13, 2026
2f4dc54
Merge pull request #7 from ibis-ssl/feat/warn-position-mismatch
HansRobo Sep 13, 2026
489643b
fix(simulator): ログを自前で行バッファリングし異常時に消えないようにする
HansRobo Sep 13, 2026
8628a44
Merge pull request #8 from ibis-ssl/fix/line-buffered-logs
HansRobo Sep 13, 2026
533daf9
fix(simulator): stderrへのsetvbufをやめ既定のバッファ無しに戻す
HansRobo Sep 13, 2026
29681b8
Merge pull request #9 from ibis-ssl/fix/stderr-keep-unbuffered
HansRobo Sep 13, 2026
1006a45
fix: 指令破棄時の停止挙動を実測に合わせて訂正し忠実度ギャップを追記
HansRobo Sep 13, 2026
5641db4
fix(simulator): 安全停止を実機と同じ惰走にする
HansRobo Sep 13, 2026
ce5f767
Merge pull request #10 from ibis-ssl/fix/drop-stop-fidelity
HansRobo Sep 13, 2026
f15d749
fix(docs): 停止距離の実測値を測り直して訂正し、測定スクリプトを追加
HansRobo Sep 13, 2026
95d4883
Merge pull request #11 from ibis-ssl/fix/stop-distance-remeasure
HansRobo Sep 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Build and Push Docker Image

on:
push:
branches:
- ibis
tags:
- 'v*.*.*'
pull_request:
branches:
- ibis
paths:
- 'data/docker/Dockerfile.simulatorcli'
- 'data/docker/simulatorcli_entrypoint.bash'
- '.github/workflows/docker-publish.yaml'
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ibis-ssl/framework-simulatorcli

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=,format=short
type=ref,event=pr

- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
file: ./data/docker/Dockerfile.simulatorcli
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: true
sbom: true

- name: Generate artifact attestation
if: github.event_name != 'pull_request'
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ find_package(V8 10.5.7)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
add_subdirectory(src)

install(DIRECTORY config/ DESTINATION config FILES_MATCHING PATTERN "*.txt")

if(UNIX AND NOT APPLE)
configure_file(data/pkg/ra.desktop.in ra.desktop)
configure_file(data/pkg/ra-logplayer.desktop.in ra-logplayer.desktop)
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,26 @@ The `simulator-cli` takes three command line arguments:
A `short_file_name` is just the filename without the path or the extension.
For example, to start the binary with no realism and 2018 setup, call `simulator-cli -g 2018 --realism None`

#### Robot-side position control (ibis)

The ibis command receiver emulates the robot's STM32 (G474) main board: it
accepts `POLAR_VELOCITY_TARGET` (control mode 3) only and does **not** close a
position loop. In the robot-side position control setup, `crane` sends
`POSITION_TARGET` (mode 4) commands that are consumed by the CM4 position
controller (`cm4_sim`) running between `crane` and the simulator:

```text
crane --mode 4--> cm4_sim --mode 3--> simulator-cli
^ |
+--- ibis feedback ---+
```

A mode 4 command arriving directly at the simulator means `cm4_sim` is missing
from the chain; the simulator stops that robot and logs why instead of
misreading the mode arguments. See
[docs/robot-side-position-control.md](docs/robot-side-position-control.md) for
the packet contract and port assignment.

### Other utilities
This repo also contains various utilities:
- `amun-cli` - run an AI script from the command line.
Expand Down
21 changes: 21 additions & 0 deletions config/simulator-realism/Ibis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
stddev_ball_p: 0.0014
stddev_robot_p: 0.0013
stddev_robot_phi: 0.01
stddev_ball_area: 6.5
enable_invisible_ball: true
ball_visibility_threshold: 0.4
camera_overlap: 1
dribbler_ball_detections: 0.05
camera_position_error: 0.1
robot_command_loss: 0.03
robot_response_loss: 0.1
missing_ball_detections: 0.05
vision_delay: 35000000
vision_processing_time: 10000000
simulate_dribbling: false
object_position_offset: 0.02
missing_robot_detections: 0.02
command_delay: 3000000
robot_rotation_error: 0.5
rotated_robot_detections_start: 0.001
rotated_robot_detections_stop: 0.3
24 changes: 10 additions & 14 deletions data/docker/Dockerfile.simulatorcli
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ RUN set -xe; \
apt-get install --no-install-recommends -y \
cmake make g++ libssl-dev patch \
protobuf-compiler libprotobuf-dev \
qt6-base-dev libqt6opengl6-dev \
qtbase5-dev libqt5opengl5-dev; \
qt6-base-dev libqt6opengl6-dev; \
apt-get clean -y; \
rm -rf /var/lib/apt/lists/*;

Expand All @@ -22,9 +21,9 @@ COPY . .
RUN set -xe; \
mkdir build; \
cd build; \
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..; \
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DRELATIVE_DATA_DIRS=ON ..; \
make simulator-cli -j $(nproc); \
find . -maxdepth 1 ! -name 'bin' -exec rm -r {} \; ;
cmake --install . --prefix /home/default/install;

#
# Run stage
Expand All @@ -37,25 +36,22 @@ ARG DEBIAN_FRONTEND=noninteractive
RUN set -xe; \
apt-get update; \
apt-get install --no-install-recommends -y \
qt6-base-dev libqt6opengl6-dev \
qtbase5-dev libqt5opengl5-dev \
libprotobuf-dev tini; \
libqt6core6t64 libqt6gui6t64 libqt6network6t64 libqt6opengl6t64 \
libprotobuf32t64 tini; \
apt-get clean -y; \
rm -rf /var/lib/apt/lists/*;

RUN useradd --create-home --shell /bin/bash default
USER default
WORKDIR /home/default

COPY --chown=default:default /data/docker/simulatorcli_entrypoint.bash .
ENTRYPOINT ["tini", "--", "./simulatorcli_entrypoint.bash"]

COPY --chown=default:default --from=build-stage /home/default/COPYING .
COPY --chown=default:default --from=build-stage /home/default/COPYING.GPL .
COPY --chown=default:default --from=build-stage /home/default/config config
COPY --chown=default:default --from=build-stage /home/default/build build
COPY --chown=default:default --from=build-stage /home/default/install/bin/simulator-cli bin/simulator-cli
COPY --chown=default:default --from=build-stage /home/default/install/config config

# 10300: Control - Accepts simulator configuration commands
# 10301: Blue - Accepts robot commands by the blue team
# 10302: Yellow - Accepts robot commands by the yellow team
EXPOSE 10300 10301 10302

ENTRYPOINT ["tini", "--"]
CMD ["./bin/simulator-cli"]
1 change: 0 additions & 1 deletion data/docker/Dockerfile.simulatorcli.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
/strategy
/data
!/data/pkg
!/data/docker/simulatorcli_entrypoint.bash

# vim: filetype=gitignore
15 changes: 0 additions & 15 deletions data/docker/simulatorcli_entrypoint.bash

This file was deleted.

Loading
Loading