Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backend/auto_operation以下の構造を整理 #196

Merged
merged 11 commits into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/compile-protocol-buffer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ jobs:
mkdir -p $GITHUB_WORKSPACE/backend/external/spec
mkdir -p $GITHUB_WORKSPACE/backend/ats/spec
mkdir -p $GITHUB_WORKSPACE/backend/json2grpc/spec
mkdir -p $GITHUB_WORKSPACE/backend/auto_operation/central_controller/spec
mkdir -p $GITHUB_WORKSPACE/backend/auto_operation/spec
- name: prepare node protoc
run: |-
yarn install --frozen-lockfile
working-directory: backend/ats
- name: prepare python protoc
run: |-
pip3 install grpcio-tools
working-directory: backend/auto_operation/central_controller
working-directory: backend/auto_operation
- name: gen proto
run: |-
make pb
Expand Down
2 changes: 1 addition & 1 deletion backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ ats_go:
proto/ats.proto

ats_python:
cd auto_operation/central_controller && \
cd auto_operation && \
./protoc-gen.sh
Binary file removed backend/auto_operation/.DS_Store
Binary file not shown.
7 changes: 1 addition & 6 deletions backend/auto_operation/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# 自動運転プログラム
## 使い方
以下、auto_operation/central_controller の中を見る

### シミュレーションモードの設定
- main.py の中に、`operation.state.communication.setup(simulationMode=True)`と書いてある部分がある。simulationModeを`True` にすると、ESP32が接続されていなくても動く

Expand All @@ -13,17 +11,14 @@
- Communication.py の、`self.esp32Map[0] = serial.Serial("/dev/cu.ESP32-ESP32SPP", 115200)` と書いてある部分に各車両がつながっているポートを指定する

### 線路形状の確認
- auto_operation/central_controller/State.py の中に線路形状と列車の初期位置が書き込まれている。必要に応じて修正する
- State.py の中に線路形状と列車の初期位置が書き込まれている。必要に応じて修正する

### 実行
```
python3 main.py
```

## 中身
### central_controller
自動運転システム

- templates
- 運転体験ウェブページのCSSが入っている

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ mkdir -p ./spec
python3 -m grpc_tools.protoc \
--python_out=./spec \
--grpc_python_out=./spec \
-I ../../proto/ \
../../proto/*.proto
-I ../proto/ \
../proto/*.proto
23 changes: 0 additions & 23 deletions backend/auto_operation/visualizer/README.md

This file was deleted.

27 changes: 27 additions & 0 deletions debug/auto_operation_visualizer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 自動運転ビジュアライザ

自動運転プログラム (`/backend/auto_operation`) の各閉塞区間の状態をビジュアライズします。

![](docs/preview.png)

## 必要なもの

- Node.js, npm

## セットアップ

```bash
npm install
```

## 実行

まずローカル環境で `/backend/auto_operation` を起動してください。

その後

```bash
npm run dev
```

を実行し、ブラウザで [http://localhost:3000](http://localhost:3000) を開いてください。