From f94dc1889cc945a671374766940cfb9b22b87df7 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:10:47 +0900
Subject: [PATCH 01/19] Revert "translated index.html to English"
This reverts commit b177741ce1212c0dfa381135c6339f62d74fb481.
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index b3a65e9..ab39002 100644
--- a/index.html
+++ b/index.html
@@ -5,4 +5,4 @@
layout: home
---

- How our robot looks like right now
+ 現在のロボットの様子
From d95e13e9dc645b10443e466d889193aa410a7c96 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:10:49 +0900
Subject: [PATCH 02/19] Revert "translated 2024-07-09-self-introduction.md to
English"
This reverts commit 709c9ced9a9f60ebca1a3fddeee749190ead8ad8.
---
_posts/2024-07-09-self-introduction.md | 44 ++++++++++++--------------
1 file changed, 21 insertions(+), 23 deletions(-)
diff --git a/_posts/2024-07-09-self-introduction.md b/_posts/2024-07-09-self-introduction.md
index 2232d14..ba1597e 100644
--- a/_posts/2024-07-09-self-introduction.md
+++ b/_posts/2024-07-09-self-introduction.md
@@ -1,45 +1,43 @@
---
layout: post
-title: "We started our blog"
+title: "ブログを始めました"
date: 2024-07-08 07:00:00 +0900
tag: [free-talk, rotarymars's article]
thumbnail-img: "/assets/images/thumb.png"
author: "rotarymars"
---
-Hello. I'm rotarymars from TECHNO.
-
-Today, I'd like to introduce our team members and myself to celebrate the launch of our blog.
-
-I would like to introduce our team members.
+こんにちは。TECHNOの rotarymars です。
+今日は、ブログの開設を記念して、グループメンバの紹介と、自己紹介をしていきたいと思います。
# ROTARYMARS
-### Main responsibilities
-- Sensor-related programming
-- Circuit design
+### 主な担当
+- センサー周りのプログラム
+- 回路
-### Brief self-introduction
-I'm ROTARYMARS, who will be responsible for programming and circuit design in this team.
-I'm currently learning about circuits, and I'm looking for good sites to learn from.
+### 軽めな自己紹介
+このチームでプログラムや回路を今後担当していく予定のROTARYMARSです。
+回路についての知識が全く無いので、今勉強に励んでいるところです。
+勉強に良いサイトなどがあれば絶賛募集中です!
# NISHIKAZU
-### Main responsibilities
-- Main body programming
+### 主な担当
+- 本体のプログラム
-I'm NISHIKAZU, who will be responsible for software-related tasks in this team.
+NISHIKAZU です。主にプログラミングなどのソフトウェア系を担当しています。
-I'm a night owl, so I'm active at night. I'm a type of programmer who writes and runs programs first.
+夜型で朝は苦手なので、夜に色々と活動しています。プログラムはとりあえず書いて動かしてみるタイプです。
-I'm better at science than math.
+数学より理科です。
# ALPAKA
-### Main responsibilities
-- Hardware design
+### 主な担当
+- ハード作り
-I'm ALPAKA, who will be responsible for hardware design in this team.
+ハード担当のALPAKAです。
-I'm currently learning about circuits, and I'm looking for good sites to learn from.
+回路を勉強している最中で、
-I believe that the number of trials is the most important for hardware design and circuit learning.
+ハード作りや回路の勉強は試行回数が一番大事だと信じています。
-I'm sure that I have a natural talent for music.
+あと、音感は天性の才能だと確信しています
From d499b18cff5df6718a903ef9ad90455af8b8b861 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:10:50 +0900
Subject: [PATCH 03/19] Revert "translated 2024-07-23-ev3_ssh.md to English"
This reverts commit 6fb0888cc0f5a827958687886fd181ea0dcae1a3.
---
_posts/2024-07-23-ev3_ssh.md | 48 +++++++++++++++++++-----------------
1 file changed, 26 insertions(+), 22 deletions(-)
diff --git a/_posts/2024-07-23-ev3_ssh.md b/_posts/2024-07-23-ev3_ssh.md
index b4398e8..736f408 100644
--- a/_posts/2024-07-23-ev3_ssh.md
+++ b/_posts/2024-07-23-ev3_ssh.md
@@ -1,54 +1,55 @@
---
layout: post
-title: "SSH to EV3"
+title: "SSHでEV3"
date: 2024-07-23 12:00:00 +0900
tag: [robot, EV3, rotarymars's article]
thumbnail-img: "/assets/images/ssh.png"
author: "rotarymars"
---
-# Overview
-Let's code EV3 on a low-spec computer!
+# この記事の概要
+スペックの遅いパソコンでもサクサクEV3のコーディングしよう!
-# Prerequisites
+# 前提
-- The EV3 has a microPython image installed on the SD card, and the SD card is inserted into the EV3.
+- EV3にmicropythonのイメージをSDCardにインストールされていて、SDCardがEV3に刺さっている。
-- The EV3 is connected to the computer via Bluetooth or a cable.
+- bluetoothまたは有線でEV3とつながっている。
-- The command to communicate via ssh is installed (e.g. `ssh` on Linux/FreeBSD).
+- sshで通信するためのコマンドがインストールされている。
-# What is SSH?
-According to [wikipedia](https://ja.wikipedia.org/wiki/Secure_Shell), it is a system that allows you to safely communicate with the other side's shell.
+# SSHとは?
+[wikipedia](https://ja.wikipedia.org/wiki/Secure_Shell)によると、とにかく、相手側のShellに安全に通信して操作できる仕組みのことのようです。
-# Let's try it
+# 実際にやってみよう
-Open the shell, you can enter by typing the following command.
+各OSのシェルを開いて、
```bash
ssh username@IPADDRESS
```
-By default, you can enter by
+で入れます。
+
+デフォルトでは、
```bash
ssh robot@IPADDRESS
```
+でできます。
-An IP address is displayed in the upper left corner of the picture below.
+IPADDRESSは下の写真のように左上に表示されます。

-In this case,
+この場合、
```bash
ssh robot@169.254.80.244
```
-
-You will be asked for a password. Enter `maker` (the default password).
-
+です。すると、下のようになって、パスワードを聞かれるので、makerと入力しましょう(デフォルトの場合)。
```bash
ssh robot@169.254.80.244
@@ -65,17 +66,20 @@ Last login: Wed Apr 15 10:24:02 2020 from 169.254.68.188
robot@hexagon:~$
```
+これでつながります。
-You are connected by this way.
+ここで、viなどで、pythonファイルを作ります。
-# How to run
+# 実行方法
```bash
brickrun /usr/bin/pybricks-micropython /path/to/main.py
```
-# Conclusion
+これで実行できます。
+
+# 結論
-Now you can run it even if you don't have vscode.
+これでvscodeが使えない状況でも実行できるので、試してみてください。
-※The thumbnail is copyrighted by Freepik.
+※サムネイルの著作権はFreepikにあります。
From 17dbf9faea9ebac5c19d1fe617ec96f0d718cef0 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:10:52 +0900
Subject: [PATCH 04/19] Revert "translated 2024-08-07-python-OS.md to English"
This reverts commit fd2724d6bfbe63771c7b70e7cb741a0b4966e429.
---
_posts/2024-08-07-python-OS.md | 130 +++++++++++++++++----------------
1 file changed, 66 insertions(+), 64 deletions(-)
diff --git a/_posts/2024-08-07-python-OS.md b/_posts/2024-08-07-python-OS.md
index bf2a3fa..c9ef62f 100644
--- a/_posts/2024-08-07-python-OS.md
+++ b/_posts/2024-08-07-python-OS.md
@@ -1,60 +1,58 @@
---
layout: post
-title: "Python Command Line"
+title: "Pythonでコマンドライン"
date: 2024-08-07 12:00:00 +0900
tag: [python, free-talk, nishikazu's article]
thumbnail-img: "/assets/images/PythonOS.png"
author: "nishikazu"
---
-# Overview
-__This is a article for free talk.__
+# この記事の概要
+__今回は雑談回です。__
-I've created a command line like prompt in Python, so I'd like to introduce it.
+Pythonでコマンドプロンプトもどきを作ったので、それを紹介していきたいと思います。
-(__For more information about the command line, please read [this](https://qiita.com/momo1010/items/adcef12d0c631785499f).__
+(__コマンドラインについては、[こちら](https://qiita.com/momo1010/items/adcef12d0c631785499f)をお読みください。__
)
-# Environment
+# 使用環境
* * *
- -Windows11
-- (It also works on Windows10.)
+- (Windows10でも動きます。)
- -Python3.12.4
-- Latest version
+- 最新版
* * *
-It is tested on the above environment.
+上記の環境ではテストしています。
-# Modules to use
-These are the modules needed to create the command line.
+# 使っていくモジュール
+今回のコマンドラインを作っていく上で必要なモジュールです。
-__For more information about `tkinter`, please read [this](https://ja.wikipedia.org/wiki/Tkinter).__
+__tkinterについては、[こちら](https://ja.wikipedia.org/wiki/Tkinter)をお読みください。__
-__In Windows, `tkinter` is installed by default, but if you want to run it on other systems, please install it separately from Python.__
-
-For Debian-based systems, you can install it with the following command(You would like need a `sudo` because you are usually not a root user).
+__Windowsの場合、tkinterはデフォルトでインストールされますが、例えばDebian系で動かしたい場合は次のコマンドでPythonとは別にインストールして下さい。__
```
apt install python3-tk
```
-| |__module name__|__purpose__|
+| |__モジュール名__|__使う目的__|
|:--:|:-------------:|:---------:|
-| 1 | tkinter | To create a window and insert a text box.|
-| 2 | OS | To be able to move directories in the command line.|
-| 3 | sys | To handle information about the computer's execution environment.|
-| 4 | shutil | To use when copying files.|
-| 5 | webbrowser | To open URLs.|
+| 1 | tkinter | pythonでウィンドウを作り、テキストボックスを挿入するため。|
+| 2 | OS | コマンドラインに必要なディレクトリの移動などをできるようにするため。|
+| 3 | sys | パソコンの実行環境についての情報を扱うため。|
+| 4 | shutil | ファイルをコピーするときに使うため。|
+| 5 | webbrowser | URLを開けるようにするため。|
-# Window settings
-### Create a window with tkinter
-First, let's create a place to input commands and a place to output the results.
+# ウィンドウの設定
+### tkinterでウィンドウを作る
+まずは、コマンドを入力するところと出力するところを作ります。
```python
import tkinter as tk
@@ -77,57 +75,59 @@ output_text.pack(pady=10)
root.mainloop()
```
-
-tkinter includes scrolledtext and messagebox, so we use them.
+tkinterに付随してscrolledtextとmessageboxをインポートして使っています。
-Then, we create a window with ```root = tk.Tk()```.
+そして、__root = tk.Tk()__ を使って```root```という名前のウィンドウを作り、
-We create a frame with ```frame = tk.Frame(root)```.
+```frame = tk.Frame(root)```でフレームを作っています。
-`entry` is the input field for commands, and `output_text` is a text box with a scroll bar for the command output.
+entryはコマンド入力欄、output_textはコマンド出力欄のためのスクロールバー付きのテキストボックスです。
-### Point
-In tkinter, the last line of
+### ポイント
+tkinterでは、最後の行の
```
root.mainloop()
```
-displays the window. `root` is the name of the window we set up this time.
+の命令でウィンドウを表示します。rootとは、今回設定したこのウィンドウの名前です。
-### Output
+### 出力結果
-# Command implementation
+# コマンドの実装
-## List of commands to implement
+## 実装するコマンド一覧
-The commands we will implement this time are as follows.
+今回実装していくコマンドは次の通りです。
-* ls - Display files in the directory(folder)
-* cd - Change directory(folder)
-* cat - Display the contents on the command line
-* touch - Create a new file
-* rm - Delete a file
-* mkdir - Create a new directory(folder)
-* cp - Copy a file
-* openurl - Open URL in browser
-* shutdown [--now] - Shutdown the system
-* help - Show help
-* exit - Exit the command line
-* clear - Clear the command line
+* ls - ディレクトリの中のファイルを表示するfrom tkinter import scrolledtext, messagebox
+* cd - ディレクトリを変更する
+* cat - コンテンツをコマンドライン上に表示する
+* touch - 新しいファイルを作る
+* rm - ファイルを削除する
+* mkdir - 新しいフォルダを作る
+* cp - ファイルをコピーする
+* openurl - URLをブラウザで開く
+* shutdown [--now] - パソコンをシャットダウンする
+* help - ヘルプを表示する
+* exit - コマンドラインを終了する
+* clear - コマンドラインの中身をクリアする
-We also allow the command to be sent by the Enter key and the Execute button.
+また、コマンドの送信はEnterキーと、Executeボタンでも行えるようにします。
-## Command acceptance mechanism
-First, let's create a function to be executed when each command is used.
+## コマンドを受け付ける仕組み
+まず最初に、各コマンドが使われたときに実行する関数を作っておきます。
**def list_files():、def change_directory(path):**
+などです。
-The command is passed to the function **execute_command()** as an argument, and the program determines which function to call by If statement.
+コマンドは、コマンドを受け付ける関数
+**execute_command()**
+に引数として入力欄の文字列を渡し、If文でどの関数を呼び出すかプログラムしています。
-# Actual program
+# 実際のプログラム
-Here is the program with the command integrated.
+それでは、こちらが実際にコマンドを組み込んだプログラムになります。
```python
import os
@@ -306,17 +306,19 @@ output_text.tag_config('error', foreground='red')
root.mainloop()
```
-It is a little long, but
-* Display the path of the current folder when the command is executed.
-* Display error messages in red.
-* Add an option to immediately shut down the program.
-* Add a hidden command to display ASCII art when "python" is entered.
+少し長いプログラムになっていますが、
+* コマンドの実行時に今いるフォルダのパスを表示する
+* エラーメッセージは赤色で表示する
+* シャットダウンのプログラムに即座に行うかどうかのオプションを追加する
+* 隠しコマンドとして"python"と打つとアスキーアートが出てくるようにする
-We have added these elements.
+などの要素を加えています。
-Finally, save this program in the folder **C:\Users\**, and create a shortcut on the desktop, so the program will start in the same directory as the command prompt.
+最後にこのプログラムを、
+**C:\Users\<ユーザーネーム>**
+のフォルダに保存して、デスクトップにショートカットを作れば、プログラムの起動時にコマンドプロンプトと同じディレクトリから始められます。
-# Conclusion
-You can do things that are directly related to the system even in Python. I was also surprised that you could specify the file path and move the directory.
+# 結論
+pythonでも意外とシステムに直結した部分をいじることができました。また、ファイルのパスを指定できたり、ディレクトリの移動ができることには正直驚きました。
-Please try PythonOS if you'd like!
+PythonOS、ぜひ使ってみてください。
From a2c6af225e472644b593e864f6dba57db6ed728c Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:10:53 +0900
Subject: [PATCH 05/19] Revert "translated 2024-08-22-rubber_band_gun.md to
English"
This reverts commit 7bda6815e0f2d5ce1421e944d128896fe3559e67.
---
_posts/2024-08-22-rubber_band_gun.md | 30 ++++++++++++++--------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/_posts/2024-08-22-rubber_band_gun.md b/_posts/2024-08-22-rubber_band_gun.md
index 4d42d5f..6a2099f 100644
--- a/_posts/2024-08-22-rubber_band_gun.md
+++ b/_posts/2024-08-22-rubber_band_gun.md
@@ -1,27 +1,27 @@
---
layout: post
-title: "A rubber band gun using LEGO"
+title: "レゴのゴム鉄砲"
date: 2024-08-22 12:00:00 +0900
tag: [free-talk, ALPAKA's article]
thumbnail-img: "/assets/images/2024-08-22-4.jpg"
author: "ALPAKA"
---
-# Overview
-This is a article for free talk.
-I have created a rubber band gun using disposable chopsticks, and since it was easy to make, it didn't fly far and broke easily, so I'd like to create a more durable and holdable rubber band gun using 100 yen shop's rubber and a little bit of LEGO.
-
-# What is a rubber band gun?
-A rubber band gun is a device that uses the force of a rubber band to shoot a projectile.
-
-# Let's try it!
-1. Stretch the rubber to the maximum length, and make a LEGO shaft of the same length.
+# この記事の概要
+今回も雑談回です。
+割りばしゴム鉄砲を造ったのですが、簡単に作れるからか、遠くまで飛ばなかったり、割りばしが良く折れたり等、もっと高みを目指したくさせるものでした。なので、今回は100均のゴムと少しのレゴを使い、簡単に作れて、まあまあの飛距離で、頑丈でホールドのできるゴム鉄砲を作っていきたいと思います。
+# ゴム鉄砲とは?
+輪ゴムの縮むときの勢いを使い、とても速い輪ゴムを打ち出すものです。
+中には、連射や速射、同時発射ができるものもありますが、今回作るものではそれらはできないので悪しからず。
+# 実際に作ってみよう!
+1. 100均で買ったゴムを最大まで伸ばし、それと同じくらいの長さのレゴの軸を作ります。

-1. Create a protrusion in the front side of the shaft, and make a trigger on the opposite side as shown in the photo.
+2. フロンサイトを片側の端1マス開けて突起して作り、反対の端に写真のようなト
+リガーを作ります。

-1. If you hang the rubber band as shown in the photo, the rubber band gun is complete. You can shoot even if you pull the trigger in this state.
+3. 写真のように輪ゴムを掛けたら、ゴム鉄砲の原型の出来上がりです。この状態でもトリガーを引っ張ったら打ち出せます。

-1. Finally, if you add a handle for easy holding, it will be completed.
+4. 最後に持ちやすいように持ち手を付ければ完成です。
-# Conclusion
-I was able to create a rubber band gun with decent performance. However, I would like to create a more aesthetically pleasing rubber band gun next time.
+# 結論
+それなりに性能のいいゴム鉄砲を作ることができました。しかし、見た目があまりよくないので、また作る時は見た目の良いゴム鉄砲を作っていきたいです。
From 558e908d6154ea2aa2e6def5039b321fd8870645 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:10:54 +0900
Subject: [PATCH 06/19] Revert "translated
2024-08-28-tensorflow-machinelearning.md to English"
This reverts commit d846b70140858b9f4e97da90032ae104980dc5a8.
---
.../2024-08-28-tensorflow-machinelearning.md | 159 +++++++++---------
1 file changed, 80 insertions(+), 79 deletions(-)
diff --git a/_posts/2024-08-28-tensorflow-machinelearning.md b/_posts/2024-08-28-tensorflow-machinelearning.md
index ec601bf..0deb2bc 100644
--- a/_posts/2024-08-28-tensorflow-machinelearning.md
+++ b/_posts/2024-08-28-tensorflow-machinelearning.md
@@ -1,61 +1,61 @@
---
layout: post
-title: "Machine learning with tensorflow"
+title: "tensorflowで簡単に機械学習"
date: 2024-08-28 10:00:00 +0900
tag: [machine learning, rotarymars's article]
thumbnail-img: "https://upload.wikimedia.org/wikipedia/commons/a/ab/TensorFlow_logo.svg"
author: "rotarymars"
---
-# Overview
-In the modern AI era, let's implement machine learning simply by ourselves.
+# 記事の概要
+現代のAIの時代において、自分たちでシンプルに機械学習を実装してみよう。
-# Machine learning
-In this machine learning, we will classify images.
-Let's see an example.
+# 今回の機械学習の内容
+今回の機械学習では、画像のクラス分けをします。
+例を見てみましょう。

-You can probably tell that this number is "2" at a glance.
+皆さんはこの数字を瞬時に"2"と判断できるかと思います。
-If a machine can correctly determine that this number is "2" in the same way, wouldn't that be great?
+このように、機械が同じように"2"と正しく判定することができたら、素晴らしいと思いませんか?
-~~ALPAKA: I don't think so~~
+~~ALPAKA: 思いません~~
-Why can we tell that this number is "2" in the same way?
+どうして、僕たちはこのように数字を判断することができるのでしょうか。
-It's because we've always known that "something like this is 2".
+それは、今まで「このような形をしたものが2」と知っているからです。
-Similarly, if we teach the computer, it will learn by itself.
+同じように、コンピュータにも教えてあげれば、自分で学んでくれます。
-That's machine learning.
+それが機械学習です。
-This time, we'll create a program that recognizes the numbers we wrote ourselves.
+今回は、自分たちが手書きした数字を認識してくれるプログラムを作っていきます。
-# Before we start
-I'm not very familiar with machine learning, so there may be mistakes in what I'm saying here.
+# 始める前に
+僕自身があまり機械学習について詳しくなく、ここで述べられているものは間違っている場合があります。
-If there are mistakes, please let me know via the email address of my github account.
+間違いがあればgithubアカウントのEmailより、教えてくださると助かります。
-# Before we start
-This time, we'll use python for machine learning.
+# 始める前の準備
+今回は機械学習にpythonを用います。
-Also, this article was implemented on Ubuntu on wsl.
+また、今回の記事はwsl上のUbuntuでの実装をしました。
-I also tested it with docker.
+一応、dockerでのテストもしました。
-Let's install python.
+それでは、pythonをインストールしましょう。
-If you don't use a version management tool,
+特にバージョン管理ツールを使用するのでなければ、
```bash
apt update
apt -y upgrade
apt install python3 pip
```
-You may need to add `sudo` to the command since usually we do not run commands as root.
+となります。
-At least in my environment, when installing python3, I was asked for the region.
+少なくとも僕の環境では、python3を入れるときにリージョンを聞かれました。
-Let's check if python3 and pip are installed.
+python3とpipが入ったことを確認しましょう。
```bash
$ python3 --version
Python 3.12.3
@@ -63,23 +63,23 @@ $ pip --version
pip 24.0 from /usr/lib/python3/dist-packages/pip (python 3.12)
```
-Let's install the necessary packages.
+それでは、必要なパッケージをインストールしていきます。
```bash
pip install opencv-python tqdm numpy matplotlib tensorflow
```
-opencv is used for image reading, tqdm is used for progress bar display, numpy is used for array creation, matplotlib is used for image display, and tensorflow is used for machine learning model creation.
+opencvは画像の読み込み、tqdmはプログレスバーの表示、numpyは配列の作成、matplotlibは画像の表示、tensorflowは機械学習のモデル作成に使用します。
-This is the environment we need.
+これで必要な環境は揃いました。
-# Creating handwritten digit data
-The handwritten digit data is included in the module, but this time we will create the data ourselves without using it.
+# 手書き数字データの作成
+手書き数字のデータは、モジュールに含まれていますが、今回はそれを使わずに自分でデータを作ってみます。
-I used the standard app "Paint" on windows to write the number in 28px by 28px.
+僕は、windowsの標準アプリ「ペイント」を用いて、縦横28pxに数字を書き込みました。
-In this program, we will assume that there is a directory called data under the same directory as the python file for learning, and that there is a directory for each number under the directory.
+今回のプログラムでは、学習用のpythonファイルと同じ階層にdataという名のディレクトリの下に、数字ごとのディレクトリの下に対応する数字があるということを前提に勧めていきます。
-That is,
+つまり、
```
.
`-- data
@@ -104,14 +104,15 @@ That is,
`-- 9
`-- 1.png
```
+ということです。
-Also, we will proceed with the assumption that the image is black and white this time.
-# Program creation
-Let's create a program using your favorite editor.
+また、今回は画像が黒白であることを前提に進めていこうと思います。
+# プログラムの作成
+好きなエディタを用いてプログラムを作成していきましょう。
-I named the program train.py.
+僕はプログラムの名前をtrain.pyにしました。
-First, let's import the necessary modules.
+まず、必要なモジュールをインポートします。
```python
import cv2 as cv
import random
@@ -122,7 +123,7 @@ import matplotlib.pyplot as plt
import tensorflow as tf
```
-Next, let's create the model.
+次に、モデルの作成をします。
```python
model = tf.keras.models.Sequential()
model.add(tf.keras.layers.Flatten(input_shape=(28,28)))
@@ -131,11 +132,11 @@ model.add(tf.keras.layers.Dense(units=100, activation=tf.nn.relu))
model.add(tf.keras.layers.Dense(units=10, activation=tf.nn.softmax))
model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
```
-Here, we declare the model in the first line, add layers from the second to the fifth line, and compile it in the last line.
+ここでしているのは、1行目でモデルの宣言、2から5行目で層の追加、最後の行でそれをコンパイルしています。
-I'll talk about what layers are in the next article.
+層とはなんぞや、ということについては次回の記事で話そうと思います。
-Next, let's read the photos we want to learn from the directory.
+次に、ディレクトリから今回学習対象の写真を読み込みましょう。
```python
files = []
@@ -146,18 +147,18 @@ for i in range(0, 10):
files = files + tmpfiles
random.shuffle(files)
```
-The reason we shuffle randomly at the end is to make the model generated every time different.
+最後にランダムでシャッフルしているのは、学習する順番をランダムにすることで、毎回生成されるモデルが変わるようにするためです。
-Let's make the machine learn.
+それでは、実際に学習させましょう。
-This time, we won't read all the pictures at once, but we'll read them little by little when we need them.
+今回は、最初に画像を全て読み込むのではなく、少しずつ、必要なときに読み込んでいきます。
-It's because we don't want to load all the pictures into memory if we can't.
+それは、仮に全ての写真をメモリ上に乗せられなくても良いようにするためです。
```python
-MAX_PICTURE = 100000 # How many pictures to load into memory at once
-EPOCH = 100 # How many times to learn the pictures
-nowindex = 0 # What index we've reached
+MAX_PICTURE = 100000 # 何枚の画像を同時にメモリに配置するか
+EPOCH = 100 # 何回画像を学習させるか
+nowindex = 0 # どこのインデックスまで行ったか
for i in tqdm.tqdm(range(EPOCH)):
nowindex = 0
train_x = []
@@ -166,40 +167,40 @@ for i in tqdm.tqdm(range(EPOCH)):
filepath = files[nowindex]
img = cv.imread(filepath)[:, :, 0]
img = np.invert(img)
- train_x.append(img) # Add the image to the array
- train_y.append(int(filepath[7])) # Add the number to the array
+ train_x.append(img) # 画像を配列に追加
+ train_y.append(int(filepath[7])) # なんの数字か配列に追加
nowindex += 1
if len(train_x) >= MAX_PICTURE or nowindex >= len(files):
- train_x = np.array(train_x) # Convert to numpy array
- train_y = np.array(train_y) # Same as above
- model.train_on_batch(train_x, train_y) # Learn
+ train_x = np.array(train_x) # numpyの配列に変換
+ train_y = np.array(train_y) # 同上
+ model.train_on_batch(train_x, train_y) # 学習させる✏
train_x = []
train_y = []
if nowindex >= len(files):
break
-model.save("model.h5") # Save the created model
+model.save("model.h5") # 作成したモデルを保存
```
-It's a bit long, but it's like this.
+長いですが、こんな感じのコードです。
-I used tqdm, which displays a progress bar, because if we just loop, we can't see the progress.
+ただループを回すと経過を見ることができないので、tqdmというプログレスバーを表示してくれるものを使いました。
-The last line saves the completed model.
+最後の行では、出来上がったモデルを保存しています。
-This is train.py.
+ここまでがtrain.pyです。
-Let's run it here for now.
+さて、一旦ここで動かして見ましょう。
```bash
python3 train.py
```
-My environment has a GPU driver, so it took about 30 seconds.
+僕の環境はGPUのドライバが入っているので、30秒前後で終わりました。
-Next, let's check how accurate this model is.
+次に、このモデルがどれくらいの精度であるか、確かめてみましょう。
-Personally, I think it's good if it exceeds 95%.
+個人的に、95%を超えてこればいいのかなという感じです。
-I assume that the test data is arranged as follows.
+テスト用のデータは、以下のように配置されていることを想定しています。
```bash
test
├── 0-0.png
@@ -223,9 +224,8 @@ I assume that the test data is arranged as follows.
├── 9-0.png
├── 9-1.png
```
-The number before the hyphen is what is actually written, and the number after is just to avoid name conflicts.
-
-Let's implement it.
+ハイフンの前の数字が実際に何が書かれているか、あとの数字は名前が被らないようにしているだけです。
+それでは実装します。
```python
import cv2 as cv
import numpy as np
@@ -233,7 +233,7 @@ importatplotlib.pyplot as plt
import tensorflow as tf
import os
-model = tf.keras.models.load_model('model.h5', custom_objects={'softmax_v2': tf.nn.softmax}) # Load the model
+model = tf.keras.models.load_model('model.h5', custom_objects={'softmax_v2': tf.nn.softmax}) # モデルの読み込み
test_x = []
test_y = []
@@ -248,9 +248,9 @@ print("loss: ", loss)
print("accuracy: ". accuracy)
```
-This is how we can check the accuracy.
+このような感じで精度を判定できます。
-Now, let's have the machine predict the number we wrote.
+ここで、今度は自分の書いた数字を予測してもらいましょう。
```python
model = tf.keras.models.load_model('model.h5', custom_objects={'softmax_v2': tf.nn.softmax})
img = cv.imread(path)[:, :, 0]
@@ -258,21 +258,22 @@ img = np.invert(np.array([img]))
prediction = model.predict(img)
print(prediction)
```
-This is how we can display the probability of each number.
+これで、どれくらいの確率でどの数字かを表示できます。
-If you want to display only the number with the highest probability, execute
+もし、一番確率の大きいもののみを表示したい場合は、
```python
print(np.argmax(prediction))
```
+としてください。
-# Let's try it
-I also tried it.
+# 実際に動かしてみる
+僕も実際に動かしてみました。
-The result was about 92%.
+結果、92%程度です。
-I didn't get as much accuracy as I thought, but since the learning data is less this time, I'll leave it at this.
+思ったほど精度は出ませんでしたが、学習用データが今回は少ないので、今回はこれで良しとしようと思います。
-Next time, I'll write an article about the neurons.
+それでは、次回はニューロン周りのことについて記事を書こうと思います。
-[This time's program](https://github.com/rotarymars/handwritten-digit-recognition)
+[今回のプログラム](https://github.com/rotarymars/handwritten-digit-recognition)
From 9b762eba8117df5f94be2dbe85476053dd880909 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:10:55 +0900
Subject: [PATCH 07/19] Revert "translated 2024-09-07-robot_introduction.md to
English"
This reverts commit 38705016875dc6281f115c03585f17ae014c47af.
---
_posts/2024-09-07-robot_introduction.md | 109 ++++++++++++------------
1 file changed, 56 insertions(+), 53 deletions(-)
diff --git a/_posts/2024-09-07-robot_introduction.md b/_posts/2024-09-07-robot_introduction.md
index d2998fa..08158cd 100644
--- a/_posts/2024-09-07-robot_introduction.md
+++ b/_posts/2024-09-07-robot_introduction.md
@@ -1,109 +1,112 @@
---
layout: post
-title: "Robot introduction"
+title: "文化祭でロボット展示"
date: 2024-09-07 12:00:00 +0900
tag: [robot,EV3, nishikazu's article]
thumbnail-img: "/assets/images/robot.jpg"
author: "nishikazu"
---
-# Overview
+# 記事の概要
-This time, we have been invited to exhibit our robot at the school's cultural festival.
-So, I'd like to introduce the functions of our robot again.
+このたび、私たちのロボットが学校の文化祭で展示されることになりました。
+そこで、改めて私たちのロボットの機能の紹介などをしていきたいと思います。
-# Self introduction
-We are all members of **Physics Club**.
-We are in the **Robot Group** and make robots every day.
-We are making a robot that can line trace to participate in the large robot competition called the RoboCup.
+# 改めて自己紹介
+私たちは3人とも、**物理研究会**に所属しています。
+**ロボット班**所属で、普段からロボットを作っています。
+そして、ロボカップという大きなロボット大会にに出るためにライントレースのできるロボットを作っています。
-Please read about [robocup rescue](https://drive.google.com/file/d/1REmoiyymxDDJaxguL8DYB3JC_gSHJxsU/view) here.
+[ロボカップレスキュー](https://drive.google.com/file/d/1REmoiyymxDDJaxguL8DYB3JC_gSHJxsU/view)についてはこちらをお読みください。
-RoboCup is a large robot competition organized by the RJC RoboCup Japan Committee.
+簡単に説明すると、ロボカップとは、RJCロボカップ日本委員会主催の、大規模なロボットの大会です。
-We are participating in the Rescue Line, where we line trace to pick up balls (victims) and compete for points.
+私たちが出場予定なのは、レスキュー部門という、ライントレースをしてボール(被災者ということ)を拾い上げるレスキューを行い、ポイントを競う競技です。
-# Explanation of the robot's mechanism
+# ロボットの仕組みの解説
-## Explanation of the robot's movement
+## ロボットの移動の仕組み
-**The basic of line tracing is the difference in the strength of the reflected light of the left and right color sensors.**
+**ロボットのライントレースの、移動の基本中の基本は、「左右のカラーセンサーの反射光の強さの差」です。**
-Currently, we are using the [EV3 color sensor](https://ev3-help-online.api.education.lego.com/Retail/ja-jp/page.html?Path=editor%2FUsingSensors_Color.html) that is built in to the EV3.
-We are using an Arduino to make a custom color sensor because the EV3 color sensor is no longer available. (I think it's not necessary to scrap it.)
+今回のロボットでは、今の時点では[EV3純正のカラーセンサー](https://ev3-help-online.api.education.lego.com/Retail/ja-jp/page.html?Path=editor%2FUsingSensors_Color.html)を使用しています。
+このセンサー、現在は廃版なのでArduinoを使って自作カラーセンサーを組んでいます。((普通に廃版にしなくていいと思う
-With this sensor, we can get the strength of the reflected light of the sensor as a value from 0 (dark) to 100 (bright).
+このセンサーで、センサーの反射光の強さを0(暗い)から100(明るい)の値で知ることができます。
-For example,
+例えば、
-| | ① : Straight line | ② : Left turn | ③ : Off track |
+| | ① : 直線のとき | ② : 左に曲がるとき | ③ : ずれたとき |
|:-----------------:|:--------------------------:|:------------------------:|:---------------------:|
-| Left color sensor | White (close to 100) | Black (close to 0) | Gray (about 50) |
-| Right color sensor | White (close to 100) | White (close to 100) | White (close to 100) |
-| Angle to move | 100-100 = 0 degree | 0-100 = -100 degree (left 100 degree)| 50-100 = -50 (left 50 degree) |
-| Note | 0 degree means straight ahead. | Black means turn to the direction of black. | If the color is subtle, the turn will be slightly less. |
+| 左のカラーセンサー | 白(100に近い) | 黒(0に近い) | 灰色(50程度) |
+| 右のカラーセンサー | 白(100に近い) | 白(100に近い) | 白(100に近い) |
+| 進む角度 | 100-100 = 0度 | 0-100 = -100度(左に100度)| 50-100 = -50(左に50度) |
+| 備考 | 0度なので、まっすぐ進みます。 | 黒がある方向に曲がります。 | 微妙な色だと、曲がり具合が少しになります。 |
-This way, we can control the robot approximately by determining the angle to move according to the difference in brightness of the left and right sensors.
-However, there is a limit in terms of accuracy. So, we came up with the idea of PID control.
+このように、左右の明るさの差に応じて進む角度を決めることで、おおよそ制御をすることができます。
+しかし、これではどうしても精度の面で限界があります。そこで考え出されたのが、
-**PID control** is a control method that is widely used in industry and other fields.
+**PID制御**と呼ばれる実際にも産業面などで広く使われている制御手法です。
```
-1. P is Proportion, which is the control method we introduced above. Our robot also moves basically with this.
+1. PはProportion、「比例制御」のことで、うえで紹介した制御方法のことです。私たちのロボットも基本はこれで動いています。
-2. I is Integral, which is a control method that keeps the robot as close as possible to the target angle. We save the data of the color sensor for several times in the past and use it to calculate the integral, and then add the value to the P control value.
+2. IはIntegral、「積分制御」のことで、簡単に言うと、この場合できるだけロボットの目標の角度に近づくように制御し続ける制御方法です。過去何回か分のカラーセンサーのデータを保存しておき、それを使って積分をして、P制御の値に足し合わせる値を決めます。
-3. D is Differential, which is a control method for changing the amount of change, such as when changing to a right angle. We add a value proportional to the amount of change to make the robot turn more when the change is large.
+3. DはDifferential、「微分制御」のことで、PI制御だと対応できないような変化の具合、例えば直角などのときに、変化の大きさに比例した値を足し合わせて、変化が大きいほどよく曲がるようにするための制御方法です。
```
-We call this PID control by combining these three.
+これら3つを組み合わせてPID制御と呼びます。
-[Wikipedia - PID control](https://ja.wikipedia.org/wiki/PID%E5%88%B6%E5%BE%A1)
+(詳しくはこちら)[Wikipedia - PID制御](https://ja.wikipedia.org/wiki/PID%E5%88%B6%E5%BE%A1)
-## Explanation of the robot's green detection mechanism
+## ロボットの緑色検知の仕組み
-The EV3 color sensor can get data of three values of R, G, and B. This is a method of representing color by how much the three primary colors of light, Red, Blue, and Green, are mixed.
+EV3のカラーセンサーは、R, G, B の3つの値のデータを取得できます。これは、光の三原色であるRed,Blue,Greenの3つがどのくらい混ざっているかで色を表す方法です。
-We can use the values as they are, but we use hue and saturation from HSV to detect green more accurately and without malfunction.
+単純にその値をそのまま使ってもよいのですが、より正確に、誤作動なく緑色を検知できるようにするためにHSVから色相、彩度を使って判定していきます。
-Have you ever seen this color circle?
+次の画像のような色相環を見たことはないでしょうか。

-(Source : https://hirotama.blogspot.com/ フリー素材【色相環】Hue circle, 2021)
+(出典 : https://hirotama.blogspot.com/ フリー素材【色相環】Hue circle, 2021)
-The method of specifying color by the angle of where it is on the color circle and the saturation, which is the vividness of the color,
+そして、この色相のどの位置にいるかの角度と、色の鮮やかさである彩度と、色の明るさである明度で色を指定する方法がHSV、Hue-Saturation-Valueです。
-The red on the color circle is 0 degrees, the green is 120 degrees, and the blue is 240 degrees. This allows us to determine if it is green just by specifying the angle.
+色相環の赤色を0度として、緑色は120度、青色は240度の位置になります。これにより、角度の指定だけで緑色かどうか判定することができます。
-Also, to avoid mistaking the black line for a dark green, we add a judgment of the brightness of the color, so that it is not judged as green unless it is somewhat bright.
+また、黒い線を濃い緑色だと勘違いしてしまわないように、色の明度の判定を加えて、ある程度明るくないと緑と判定されないようにしています。
-For reference, I'll leave the formula for deriving HSV from the values of R, G, and B. (This time, we used hue and brightness for the judgment.)
+参考までに、R、G、Bの値からHSVを導き出す式をのせておきます。(今回判定に使ったのは色相と明度です。)
```
-Let MAX be the largest value among R, G, and B, and MIN be the smallest value.
+R、G、Bのうち、最も大きな値をMAX、最も小さな値をMINとする。
- If R is MAX, then hue H = 60 × ((G - B) ÷ (MAX - MIN))
+ RがMAXならば、色相 H = 60 × ((G - B) ÷ (MAX - MIN))
- If G is MAX, then hue H = 60 × ((B - R) ÷ (MAX - MIN)) +120
+ GがMAXならば、色相 H = 60 × ((B - R) ÷ (MAX - MIN)) +120
- If B is MAX, then hue H = 60 × ((R - G) ÷ (MAX - MIN)) +240
+ BがMAXならば、色相 H = 60 × ((R - G) ÷ (MAX - MIN)) +240
- If R, G, and B are all the same value, then hue H = 0
+ R、G、Bがすべて同じ値ならば、色相 H = 0
-If the hue H is a negative number, add 360 to the hue H.
+色相Hが負の数ならば、色相Hに360を足す。
------
-Saturation S = (MAX - MIN) ÷ MAX
+
+彩度S = (MAX - MIN) ÷ MAX
------
-Brightness V = MAX
+
+明度V = MAX
```
-# The future of the robot
-・ As I mentioned earlier, we will complete the circuit of the custom color sensor and install it on the robot.
+# これからのロボットの展望
+・ 先ほども少し書いたように、自作のカラーセンサーの回路を完成させて、ロボットに搭載する
+
+・ ロボカップでは、黒い線の奥に緑色があっても、手前にある時のように曲がってはいけないというルールや、両側が緑色ならばUターンして引き返さなければならないというルールなどがあるため、それらに対応したプログラムを作る。
-・ In the RoboCup, there are rules such as not being able to turn when there is a green line behind the black line, and not being able to turn when both sides are green, so we will make a program that corresponds to those rules.
+などなど、11月のロボカップに向けて頑張ります!
-We will work hard for the RoboCup in November!
-Thank you for reading.
+読んでいただきありがとうございました。
From c5ea478e1b62ee71c66b1c23769374ae93b03ab5 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:10:56 +0900
Subject: [PATCH 08/19] Revert "translated
2024-09-13-culture_festival_time_table.md to English"
This reverts commit 7e0de9e8df0a5ee32a9ab0d404d3a9b697456054.
---
.../2024-09-13-culture_festival_time_table.md | 50 +++++++++----------
1 file changed, 24 insertions(+), 26 deletions(-)
diff --git a/_posts/2024-09-13-culture_festival_time_table.md b/_posts/2024-09-13-culture_festival_time_table.md
index f803cc3..6c55efb 100644
--- a/_posts/2024-09-13-culture_festival_time_table.md
+++ b/_posts/2024-09-13-culture_festival_time_table.md
@@ -1,58 +1,56 @@
---
layout: post
-title: "About the performance time of the cultural festival"
+title: "文化祭の実演時間について"
date: 2024-09-13 22:00:00 +0900
tag: [robot, school, ALPAKA's article]
thumbnail-img: "/assets/images/robot.jpg"
author: "ALPAKA"
---
-Hello. I'm ALPAKA.
+こんにちは。ALPAKAです。
-Today, I'd like to talk about the performance time of the cultural festival that will be held tomorrow.
+今日は、明日から開催される僕たちの学校の文化祭について、僕たちの活動時間について話したいと思います。
## 場所
-3rd floor Physics Room
+3階 物理室
## 時間
### 9/14(土)
-| Time | Person |
+| 時間 | 人 |
| --- | --- |
-| 8:45~10:05 | rotarymars and ALPAKA
-| 12:30~13:50 | rotarymars and ALPAKA
-| 13:50~15:20 | ALPAKA and nishikazu
+| 8時45分~10時5分 | rotarymarsとALPAKA
+| 12時30分~13時50分 | rotarymarsとALPAKA
+| 13時50分~15時20分 | ALPAKAとnishikazu
### 9/15(日)
-| Time | Person |
+| 時間 | 人 |
| --- | --- |
-| 8:45~10:05 | nishikazu and rotarymars
-| 10:05~11:35 | ALPAKA and nishikazu
-| 13:50~15:20 | rotarymars and nishikazu
+| 8時45分~10時5分 | nishikazuとrotarymars
+| 10時5分~11時35分 | ALPAKAとnishikazu
+| 13時50分~15時20分 | rotarymarsとnishikazu
-The members will be present during the above time slots.
+上記の時間帯でメンバーの人がいる予定です。
-## Performance time
+## 実演時間
-We will actually move the robot during the following time slots.
+以下の時間帯で、ロボットを実際に動かそうと思います。
### 9/14(土)
-- 9:05~
-- 12:50~
-- 14:20~
+- 9時5分~
+- 12時50分~
+- 14時20分~
### 9/15(日)
-- 9:05~
-- 10:35~
-- 14:20~
+- 9時5分~
+- 10時35分~
+- 14時20分~
-We will perform during these time slots.
+この時間で実演をしたいと思います。
-In addition, if the members are present during the time slots, we will move if you call us.
+その他にも、メンバーがいる時間帯であれば、声をかけてくれれば動かそうと思います。
-I'm looking forward to tomorrow.
-
-Thanks for reading!
\ No newline at end of file
+それでは明日を楽しみにしています。
From 297cd9bce6dd896035d2ca96c39bd6620730c107 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:10:57 +0900
Subject: [PATCH 09/19] Revert "translated 2024-09-18-about_deep_learning.md to
English"
This reverts commit 9d6bdd409fba8494e98a8f6356847143b884a8fc.
---
_posts/2024-09-18-about_deep_learning.md | 91 ++++++++++++------------
1 file changed, 47 insertions(+), 44 deletions(-)
diff --git a/_posts/2024-09-18-about_deep_learning.md b/_posts/2024-09-18-about_deep_learning.md
index da26357..bfdfb90 100644
--- a/_posts/2024-09-18-about_deep_learning.md
+++ b/_posts/2024-09-18-about_deep_learning.md
@@ -1,80 +1,83 @@
---
layout: post
-title: "About deep learning"
+title: "機械学習の仕組み ~ディープラーニング~"
date: 2024-09-18 11:00:00 +0900
tag: [robot, machine learning, rotarymars's article]
thumbnail-img: "/assets/images/2024-09-18-thumbnail.jpeg"
author: "rotarymars"
---
-Hello. I'm rotarymars.
-Last week, we had a cultural festival at our school, and many people came to see our robot exhibition at the Physics Research Club. Thank you for coming in the hot weather.
+こんにちは。rotarymarsです。
+先日、僕たちの学校では文化祭があり、僕たちのロボットを展示している物理研究会に、たくさんの人が見に来てくださいました。
+暑い中足を運んでくださり、ありがとうございます。
-Just during the robot exhibition, I introduced the handwritten digit recognition that I wrote in [the previous article](/2024/08/28/tensorflow-machinelearning.html) to some people.
+ちょうど、ロボットの展示をしている間、[先日の記事](/2024/08/28/tensorflow-machinelearning.html)で紹介した手書き数字認識を、一部の人に体験してもらいました。
-*I made the test cases myself, and the accuracy is 98%, so it should be fine.*
+*自分で作成したテストケースも98%精度が出るようになったし、大丈夫だろう。*
-I thought so, and I let many people try it at the cultural festival.
+そう思って、文化祭で、いろいろな人に触ってみてもらいました。
-However, surprisingly, it didn't recognize the digits correctly at all.
-I was curious about the reason, so I thought about it.
+しかし、恐ろしいことに、全く正しく認識してくれません。
+内心不思議に思いながら、その原因を考えてみました。
-# After the cultural festival
-After the cultural festival, I let my friends try it.
-In the case of the first friend, he recognized the digits easily.
-However, when I let the second friend try it, he didn't recognize the digits correctly.
+# 文化祭が終わった後のお話
+文化祭が終わった後、友達にも実際に使ってみてもらいました。
+一人目の友達の場合、とくに難なく数字を認識してくれました。
+しかし、もう一人別の友達に使ってみてもらったところ、なかなか正しく認識してくれませんでした。
-I thought about the reason, and I realized that I was too shallow.
+そこで、考察の結果と呼ぶには浅はかですが、気づきました。
-The characteristics of the digits are different for each person.
+人によって字の特徴が異なる。
-So, the friend who was interested in this asked me to create learning images of each digit, about 30 images in total, and test images of each digit, one image in total.
+そこで、その友達はこれに興味を示してくれたので、各数字3枚ほど、計30枚ほどの学習用画像、各数字1枚のテスト画像を作ってくれました。
-I had about 120 images of my handwritten digits, so I let my friend's images be 40 times more than my images to learn, and I made a model.
+自分の手書き数字は120枚ほどあったので、友達の画像を僕の画像の40倍多く学習させて、モデルを作ってみました。
-Then, my digits didn't change much, and my friend's digits were recognized with higher accuracy than before.
+すると、僕の数字は特に変化なく、友達の数字は前よりは高い精度で認識するようになりました。
-# Why does increasing the number of images improve accuracy?
-This is a continuation of the previous article, but I'd like to talk about the overview of the machine learning this time.
-Before that, there is a possibility that there is a mistake, so please contact me via email if you find any mistakes.
+# なぜ画像を増やすだけで精度が向上するのだろう
+先週の記事の続きではありますが、今回の機械学習の概要を話したいと思います。
+その前に、前回と同様、間違っていることがある可能性があります。
+間違いは、気付き次第修正していくので、Emailで連絡してくださると助かります。
-# Inside the computer
-
+# 今回の機械学習のパソコンの中
+
-As you can see, in the computer, the circles are stacked in multiple layers, and machine learning starts.
-This time, for the sake of the picture, I set the parameters (information) to 8 and the class to 2.
+このように、パソコンの中では、丸が何層にもなっている状態で、機械学習が始まります。
+今回は、絵の都合上、パラメーター(情報)を8個、クラスは2にしました。
-For example, let's consider the following scenario.
-You are given 8 numbers (price, durability, warranty period, etc.) about a certain product.
-The quality of the product is judged by these 8 numbers only.
+例えば、次のようなシナリオを考えます。
+貴方は、ある商品について、8個の数字(値段、耐久性、保証期間等)が与えられます。
+商品の良し悪しは、この8個の数字だけで判断します。
-You are given 8 numbers and the quality of the product.
-Based on that information, please create a program that can judge the quality of the product only by machine.
+8個の数字と、その商品の良し悪しが与えられます。
+それらの情報を元に、今度は機械だけで商品の良し悪しを判断できるものを作って下さい。
-Normally, you would program a program that would branch based on the numbers given in advance, and then judge the quality of the product.
+普通であれば、事前に与えられた数字を元に、人間が数字を見て、条件分岐をして、、、
+というプログラムになると思います。
-However, with machine learning, you don't have to do that, and it will learn by itself.
+しかし、機械学習では、そのようなことをしなくても、自分で学習してくれます。
-Let's see how it works.
+仕組みを見ていきましょう。
-8 numbers are given to the circle on the far left.
+8個の数字は、それぞれ一番左にある丸に一つの数字が一つずつ与えられます。
-Then, the number is passed to the circle connected by the line.
+その後、その丸で、その数字を元に、何らかの数式によって得られた数字を、次の線で繋がれている丸に渡します。
-Finally, the last two circles determine the probability of good or bad based on which number is larger.
+最終的に、最後の2つの丸で、どちらが大きい数字かによってどれくらいの確率で良い、あるいは悪いか判定する。
-This is how it works.
+このような感じになっています。
-In machine learning, the "some number" is passed to the next circle, and the probability of reaching the last circle correctly is determined by randomly operating it.
+機械学習では、この「何らかの数字」を「どれくらい」次の丸に渡すと、最後の丸に正しく行き着くか、というのをランダムに操作し続けることで、正しく判定できるものを作っています。
-# Back to handwritten digits
-The handwritten digit data has 784 circles of 28px each on the left, and the last layer on the far right has 10 circles.
+# 手書き数字に戻ろう
+手書き数字データは、縦横28pxの計784個の丸が左側にあり、最終的に一番右側の層が10個になるようになっています。
-If my digits have a feature, the machine learning will progress based on that number, and it will not work well with other people's digits.
+僕の数字にもし特徴があれば、その数字を元に機械学習が進んでしまい、他の人の数字ではうまく動かないことになります。
-In that sense, not only is it necessary to collect more data to learn, but it is also necessary to collect data with various widths.
+そういう意味でも、単に学習するデータが多いだけではなく、いろいろな幅のあるデータ集めが必要になっていきます。
-# How to use it in the robot
-In the rescue we are participating in, there is a zone called the rescue zone, where we pick up balls.
+# ロボットでの今後の活かし方
+僕たちの出場するレスキューでは、レスキューゾーンと呼ばれる、ボールを拾うゾーンがあります。
-I would like to recognize the position of the ball by recognizing the ball with the camera through machine learning.
+このゾーン内に存在するボールを、機械学習によって、カメラで認識させてボールの位置を認識できればと思っています。
From 94306c0a5cc1e2206a2089ec55dafc48c11d2bbc Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:10:58 +0900
Subject: [PATCH 10/19] Revert "translated 2024-12-13-results_report.md to
English"
This reverts commit 96ed360b747c1492b85360c6153afd84ef13f76b.
---
_posts/2024-12-13-results_report.md | 42 ++++++++++++++---------------
1 file changed, 20 insertions(+), 22 deletions(-)
diff --git a/_posts/2024-12-13-results_report.md b/_posts/2024-12-13-results_report.md
index 0154a9a..376f749 100644
--- a/_posts/2024-12-13-results_report.md
+++ b/_posts/2024-12-13-results_report.md
@@ -1,42 +1,40 @@
---
layout: post
-title: "Results report"
+title: "東関東ノードの結果と関東大会に向けて"
date: 2024-12-12 21:00:00 +0900
tag: [robot, rotarymars's article]
thumbnail-img: "/assets/images/2024-12-12-thumbnail.png"
author: "rotarymars"
---
-Hello. I'm rotarymars.
+こんにちは。rotarymarsです。
-I've been busy with the competition and the competition, and it's been a long time since my last post.
+色々と大会までと、大会のあと忙しく、久しぶりの投稿となってしまいました。
-This time, I'd like to briefly summarize the results of the East Tokyo Node, the lessons learned, and the plans for the East Tokyo competition.
+今回は、東関東ノードの結果、反省と、関東大会に向けての予定を手短にまとめていきたいと思います。
-# !!Results!!
-This year's East Tokyo Node competition was 7th place.
+# !!結果!!
+今年の東関東ノード大会は、 7位 でした。
-Last year, we were able to achieve a much higher score than last year by having a more stable line tracing machine and program.
+去年より安定してライントレースができる機体やプログラムができて、去年に比べかなり高い得点を取ることができました。
-# Lessons learned
-Last year, we were able to achieve a much higher score than last year by having a more stable line tracing machine and program.
-However, the number of false detections of green detection was not significantly reduced, and it was also a cause of time loss and deviation from the line.
+# 反省点
+去年より遥かに安定してライントレースができていましたが、やはり緑検知の誤作動の数はあまり大きく減らせず、
+それによる時間のロスだけでなく、ラインから脱線する原因にもなってしまったなと思っています。
-# Plans for the future
-Currently, we plan to replace all sensors except the touch sensor with cameras.
+# 今後の予定
+現段階では、タッチセンサーを除くその他のセンサーはすべてカメラで置き換えていく予定です。
-Specifically,
+具体的に、
-- Line tracing is done by obtaining an image from the camera and tracing the line based on the brightness, just like the color sensor in the past.
+ライントレースはカメラから画像を取得して、明るさをもとに今までのカラーセンサーのようにライントレースをする。
-- In the rescue, we will use the camera and yolo to determine the position of the ball, pick it up, and drop it in the correct zone.
+レスキューではカメラとyolo用いて位置を特定し、ボールを拾う&正しいゾーンに落とす、
-We are aiming for this.
+ということを目指しています。
-Currently, we plan to connect two camera modules to a raspberry pi.
+今の時点では、raspberyy pi にカメラモジュールを2つつなげて行う予定です。
-# Finally
-I think that line tracing that is not affected by the material (can be used on a surface that is easy to reflect) can be done by using a camera.
+# 最後に
+カメラにすることで材質の影響を受けにくい(つるつるしていて反射しやすい表面にも対応できる)ライントレースができるようになるのではないのかなと思っています。
-I'll work hard to achieve good results in the East Tokyo competition.
-
-Thanks for reading!
+関東大会で十分な成果を発揮できるように頑張りたいと思います。
From 0b4b4d1c48ed32d069156d452591191bc15cf632 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:10:58 +0900
Subject: [PATCH 11/19] Revert "translated 2025-01-26-result_kanto.md to
English"
This reverts commit da8e3236ee7eec91c5ca0f6c936e3d85f231de99.
---
_posts/2025-01-26-result_kanto.md | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/_posts/2025-01-26-result_kanto.md b/_posts/2025-01-26-result_kanto.md
index dd1cf58..bef0b93 100644
--- a/_posts/2025-01-26-result_kanto.md
+++ b/_posts/2025-01-26-result_kanto.md
@@ -1,30 +1,30 @@
---
layout: post
-title: "Results of the Kanto competition and plans for next year"
+title: "関東大会の結果と来年に向けて"
date: 2025-01-26 10:00:00 +0900
tag: [robot, rotarymars's article]
thumbnail-img: "/assets/images/2025-1-26-thumbnail.jpg"
author: "rotarymars"
---
-Hello. I'm rotarymars.
+あけましておめでとうございます。rotarymarsです。
-This time, I'd like to briefly summarize the results of the Kanto competition and the plans for next year.
+今回の記事では、は、関東大会での結果について振り返っていこうと思っています。
-# Results
-This time, we were 12th out of 14 teams, with a score of 215 points.
+# 結果
+今回は、14チーム中、12位、得点は215点でした。
-Last year, due to the sensor failure and the lack of preparation, we had a disastrous result, but this year, we were also caught off guard, and the result was not good (especially in the first run).
+昨年では、直前のセンサーの不調や、準備不足によって悲惨な結果になってしまったのですが、今年も思わぬ事態に陥ってしまい、(特に一走目では)結果が振るいませんでした。
-# Lessons learned
-This year, we were able to reduce the sensor error to the extreme, and we were able to finish the robot in a state where we could even rescue, so we were looking forward to the competition, but (probably) due to the weight of the robot, the tires, and the compatibility with the tiles of the competition, the robot could not rotate at all.
+# 反省点
+今年はセンサーの誤作動を極限まで減らすことができ、さらにレスキューもできる状態にまで機体を仕上げることができたので、かなり期待して本番を迎えたのですが、(おそらく)ロボットの重量とタイヤ、そして本番のタイルとの相性が悪く、機体がまったく回転することができない状態でした。
-Finally, by giving up the rescue mechanism, we were able to reduce the weight of the robot and run in the second run.
+最終的にはレスキュー機構を捨てることで、機体の重量を減らし、二走目ではなんとか走ることができました。
-# Plans for the future
-Currently, we plan to graduate from Lego and move on to Raspberry Pi & ESP32.
+# 今後の予定
+今のところ、来年からはレゴ機から卒業し、Raspberry Pi & ESP32 の組み合わせで行こうと思っています。
-I'll continue to keep the repository public, so please keep an eye on it.
+今後もリポジトリはパブリックにしていくつもりなので、ぜひ見続けて欲しいと思います。
-I'll update the article in about a month.
+次は一ヶ月後ほどで記事を更新したいと思います。
-Thanks for reading!
+それでは。
From 21c53ddda911a35afe606078d072369487fcf77d Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:10:59 +0900
Subject: [PATCH 12/19] Revert "translated 2025-02-24-yolo_machine_learning.md
to English"
This reverts commit 26d352aff137a9be9fc7fe0f4f8bdb17f058ec4f.
---
_posts/2025-02-24-yolo_machine_learning.md | 171 ++++++++++-----------
1 file changed, 85 insertions(+), 86 deletions(-)
diff --git a/_posts/2025-02-24-yolo_machine_learning.md b/_posts/2025-02-24-yolo_machine_learning.md
index dacc7db..8ea4e96 100644
--- a/_posts/2025-02-24-yolo_machine_learning.md
+++ b/_posts/2025-02-24-yolo_machine_learning.md
@@ -1,66 +1,66 @@
---
layout: post
-title: "Machine learning using YOLO~Object detection and its application in RoboCup~"
+title: "YOLOで機械学習~物体検知とロボカップでの応用~"
date: 2025-02-24 10:00:00 +0900
tag: [robot, rotarymars's article, machine learning]
thumbnail-img: "/assets/images/2025-1-26-thumbnail.jpg"
author: "rotarymars"
---
-Hello. I'm rotarymars.
+こんにちは。rotarymarsです。
-I'm feeling like I'm writing a blog again after a long time.
+久しぶりにブログを書いている気分です。
-This time, I'd like to write about something different from the machine learning I wrote last time, which is called "object detection".
+今回は前回出した機械学習とは少し違う、いわゆる「物体検出」と呼ばれるものの類を書いていこうと思います。
-# What I want to achieve this time
-- Detecting "faces" from images I've never seen before and surrounding them with a square
+# 今回目指すもの
+- 今まで見たことのない画像から、「顔」を検知し、四角で囲む
-I'd like to make it possible to do this.
+これができるようにしていきたいと思います。
-# Preparation
-This time, I'll talk about the following conditions.
-- python (I'm using 3.11 this time. If you're worried, please fix the version with pyenv or asdf.)
-- docker (I'll use it to launch the labeling software.)
-- direnv (or virtualenv to launch a virtual environment.)
+# 準備
+今回は以下の条件が揃っている前提で話をしていきます。
+- python (今回は3.11系で作っています。もし心配であればpyenvやasdfなどでバージョンを固定してください。)
+- docker(ラベリングのソフトを立ち上げるために使用します。)
+- direnv(もしくはvirtualenvなどで仮想環境を立ち上げます。)
-# Procedure
-First, let's create a working directory.
+# 手順
+まず作業ディレクトリを作成しましょう。
```bash
mkdir ball_detection && cd $_
```
-Next, create a .envrc file with the following contents.
+次に、以下の内容の.envrcファイルを作成します。
```bash
layout python
```
-Now, execute the following command as needed.
+これで、必要に応じて以下のコマンドを実行します。
```bash
direnv allow
```
-Here, the virtual environment should have been created. Check it.
+ここで仮想環境が出来上がっているはずです。確認しましょう。
```bash
which python
# /home/rotarymars/projects/***/ball_detection/.direnv/python-3.12.6/bin/python
```
-Next, install the packages you need.
-Create a requirements.txt with the following contents.
+次に、必要になるパッケージをインストールします。
+以下のrequirements.txtを作成しましょう。
```
ultralytics==8.3.32
```
-Then, execute it as follows.
+そして、次のように実行します。
```bash
pip install -r requirements.txt
```
-After a while, the installation should be complete.
+しばらく待つと、インストールが完了するはずです。
-Next, let's prepare for the software needed for labeling.
+次に、ラベリングに必要なソフトを立ち上げるための準備をしましょう。
-We'll use label studio to label.
+label studioというものを使ってラベリングしていきます。
-Create a label_studio directory under the current directory.
+現在のディレクトリの下にlabel_studioというディレクトリを作成します。
```bash
mkdir label_studio && pushd $_
```
-Create a docker-compose.yml with the following contents.
+次のようなdocker-compose.ymlを作成します。
```yaml
version: "3.9"
@@ -75,81 +75,82 @@ services:
volumes:
label-studio-data:
```
-After creating it, launch the container.
+作成後、そのコンテナを立ち上げます。
```bash
docker compose up -d
```
-The first time it is launched, it will take a while due to the download of the container, but the second time and later should start faster.
+初回時はコンテナのダウンロードにより起動に時間がかかりますが、2回目以降はより早く起動するはずです。
-If you want to stop the container,
+もしコンテナを止めたいことがあれば、
```bash
docker compose down
```
-Do it.
+とします。
-Then, go to the previous directory.
+それでは、一つ前のディレクトリに進みます。
```bash
popd
```
-Next, access [localhost:8080](localhost:8080).
+次に、[localhost:8080](localhost:8080)にアクセスします。
-You should see a screen like this.
+次のような画面が出るはずです。

-Login and proceed.
+ログインして、先に進みます。
-Next, create a project.
+次に、プロジェクトを作成しましょう。

-Select Create project in the middle, decide on a project name, and enter it.
+真ん中にあるCreate projectを選択し、プロジェクト名を決めて入力します。
-Next, select labeling setup at the top and select "object detection with bounding boxes".
+次に、上部のlabeling setupを選択し、"object detection with bounding boxes"を選択します。

-Add the item you want to label.
+ラベリングしたい項目を追加します。

-Delete the existing label with the X button and add a new label called "face".
+既存のラベルをバツボタンで削除し、新たに"face"というラベルを追加します。
-After these operations are complete, press the "save" button in the upper right and save it.
+これらの操作が終わったら、右上の"save"ボタンを押して、保存します。
-Collect images to be used for learning.
+学習に使用する画像を集めます。
-I'll download images from [irasutoya](https://www.irasutoya.com/) (please make sure the total number of faces is about 20).
+ぼくは、いらすとやから画像をダウンロードします(合計して顔の数が20個ほどになるようにしてください)。
-After downloading, press the go to import in the middle of label studio and import it.
+ダウンロードし終えたら、label studioの真ん中にあるgo to importを押して、インポートします。

-Press the import button and end the operation.
+importボタンを押して、操作を終えます。
-It's finally time for labeling.
+いよいよラベリングの時間です。
-Press the blue button "label all tasks" at the top of the screen.
+画面上部にある"label all tasks"という青いボタンを押します。
-Label as shown in the following video.
+以下の動画のようにラベリングしましょう。
-Press the submit button and the next image will appear, so continue until it's done.
+submitボタンを押すと、次の画像が出てくるので、終わるまで続けましょう。
-When it's done, next is export.
+終わったら、次はエクスポートします。
-Go to the first screen of the project and press Export.
+プロジェクトの最初ん画面に行きExportを押します。

-Select YOLO Format and press Export.
+YOLO Formatを選択して、Exportを押します。
-Unzip the downloaded zip file.
+ダウンロードされたzipファイルを展開します。
-Go back to the root of the working directory and execute the following command.
+作業ディレクトリのルートに戻って、
```bash
mkdir data
```
+とします。
-Then, move the expanded zip file to data/exported_data.
+そして、展開したzipファイルを、data/exported_dataに移動します。
-It should look like this.
+つまり、こうなるべきです。
```
data
└── exported_data
@@ -191,23 +192,23 @@ data
└── notes.json
```
-The names of the images are not important.
+画像等の名前は違って問題ありません。
-It's finally time to prepare for learning.
+いよいよ学習のための準備が始まります。
-Create a data/dataset.yml. This time, since there is only one type of thing to label, it's not a problem, but if there are multiple types, please write in the same order as data/exported_data/classes.txt.
+data/dataset.ymlを作成します。このとき、今回はラベリングするものの種類が1種類なので、問題ありませんが、複数種類ある場合はdata/exported_data/classes.txtと同じ順番で書くようにしましょう。
```yaml
train: train/
val: valid/
-# Number of classes (number of types of labeling)
+# クラスの個数(ラベリングの種類の個数)
nc: 1
names: ["face"]
```
-Create a data/random_copy.py. This is used to separate the images for learning and the images used to evaluate the accuracy of the learning process.
+data/random_copy.pyを作成します。これは、学習用の画像と学習過程の精度を評価するために使用する画像を分けます。
```python
#!/usr/bin/env python
import os
@@ -240,35 +241,35 @@ os.system(f"cp {data_dir}/../classes.txt {train_data_dir}/classes.txt")
os.system(f"cp {data_dir}/../classes.txt {test_data_dir}/classes.txt")
os.system(f"cp {data_dir}/../classes.txt {test_data_dir}/classes.txt")
```
-Give it execution permission.
+実行権限を与えます。
```bash
chmod u+x data/random_copy.py
```
-Create the necessary directories.
+必要なディレクトリを作成します。
-Move to the root of the working directory and execute the following command.
+作業ディレクトリのルートに移動して、
```bash
mkdir -p data/{train,valid}/{images,labels}
```
-Execute the following command.
+を実行して、その後data/random_copy.pyを実行します(cwdがdata/で実行します)。
```bash
./random_copy.py
```
-Next, download the model to be used for learning to data/.
+次に、学習に使用するモデルをdata/にダウンロードします。
```bash
curl -L -o {model_name}.pt "https://github.com/ultralytics/assets/releases/download/v8.3.0/{model_name}.pt"
```
-model_name is [here](https://github.com/ultralytics/ultralytics?tab=readme-ov-file), so please select it after referring to it.
+model_nameの部分は[こちら](https://github.com/ultralytics/ultralytics?tab=readme-ov-file)参照の上で選んでください。
-This time, we'll use yolo11n.
+今回は、yolo11nを使用します
```bash
curl -L -o yolo11n.pt https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt
```
-Specify the directory to be executed.
+実行するディレクトリを指定します。
-Create a setup_dirs.py under the root directory of the project.
+プロジェクトのルートディレクトリの下に、setup_dirs.pyを作成します。
```python
#!/usr/bin/env python
import os
@@ -280,12 +281,12 @@ runs_dir = os.path.join(dirname, "runs")
print(f'set up runs_dir to {runs_dir}')
settings.update({'runs_dir': runs_dir})
```
-Give it execution permission again and execute it.
+再び実行権限を付与して実行します。
```bash
chmod u+x setup_dirs.py
./setup_dirs.py
```
-It's finally time to learn.
+いよいよ学習させていきます。
```bash
cd data
yolo detect train \
@@ -293,30 +294,28 @@ yolo detect train \
model=./yolo11n.pt \
epochs=300 imgsz=640 device="cpu"
```
-This time, we'll learn 300 times. If the learning accuracy doesn't go up, it should be stopped in the middle.
+今回は300回学習させます。途中で学習の精度が上がらなくなれば、途中で中止されるはずです。
-Please wait patiently.
+気長に待ちましょう。
-By the way, the reason why I am using cpu to learn it is because my NVIDIA cuda driver is broken:)
-
-When it's done, you should see something like this at the end of the output.
+さて、終わったら、出力の最後の方に以下のように書かれたものがあると思います。
```
Results saved to /home/***/ball_detection/runs/detect/train
```
-Go to this directory.
+このディレクトリに移動します。
```bash
cd /home/***/ball_detection/runs/detect/train
cd weights
```
-There is learning data in the current directory (best.pt).
-Copy it to the root.
+今いるディレクトリに学習データが入っています(best.pt)
+これをルートにコピーします。
```bash
cp best.pt ../../../../best.pt
```
-Let's actually check the accuracy.
+実際に精度を確かめてみましょう。
-Create a python script (predict.py).
+次のpythonスクリプトを作成します。(predict.py)
```python
import os
import sys
@@ -346,20 +345,20 @@ print(results[0].names)
```

-Let's try it with this image.
+この画像で試してみましょう。
```
python predict.py testpic.png
```
-You should see the following output in the output.
+出力された数行の中で、以下の出力がありました。
```
Results saved to /home/***/ball_detection/runs/predict/ball
```
-Let's see it.
+見てみましょう

-It's displayed very accurately. It's amazing.
+とても正しく表示されています。すごいですね。
-# Conclusion
-It's very difficult to understand the insides of object detection, but if you just touch it, it can be done quickly, so I hope you can feel it more closely.
\ No newline at end of file
+# まとめ
+物体検出の中身まで理解しようとするととても大変ですが、触りだけであればすぐにできるのでより身近に感じてもらえればと思います。
\ No newline at end of file
From 56b99cf3687deae485fd6f8cb0e17c471a2ac408 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:11:00 +0900
Subject: [PATCH 13/19] Revert "translated 2025-04-18-progress.md"
This reverts commit 0fbdc09eff91b48b59f76ef14a5d4e83b0f26eb9.
---
_posts/2025-04-18-progress.md | 50 +++++++++++++++++------------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/_posts/2025-04-18-progress.md b/_posts/2025-04-18-progress.md
index fd6e25e..ae4a507 100644
--- a/_posts/2025-04-18-progress.md
+++ b/_posts/2025-04-18-progress.md
@@ -1,49 +1,49 @@
---
layout: post
-title: "Recent progress"
+title: "最近の進捗"
date: 2025-04-18 10:00:00 +0900
tag: [robot, K10-K10's article, free-talk]
thumbnail-img: "/assets/images/techno-robocup-icon.jpg"
author: "K10-K10"
---
-Hello. I'm K10-K10.
+はじめまして。新しく参加したK10-K10です。
+今回は関東大会からこれまでの進捗と今後の展望をまとめました。
-This time, I'd like to summarize the progress and future plans from the Kanto competition.
+# 進捗&展望
-# Progress & future plans
+### 機体
-### Robot
+これからはロボットの機体はLEGOで作るのではなく、3Dプリンターで自作していきます。
+そのために3DデータをALPAKAが作っています。(まだ5割ほど)
-From now on, the robot will be made not with LEGO but with a 3D printer.
-For that, ALPAKA is creating 3D data (about 50% is done).
+### モーター
-### Motor
+自作機にするにあたって、"FEETECHサーボ FB5311M-360"を使用します。
+レスキューのアームにも使用する予定です。
+ただし、モーターの出力軸のギアとタイヤにかますギアが見つかっていません。
-For the self-made robot, we will use "FEETECH servo FB5311M-360".
-We will also use it for the rescue arm.
-However, the gear for the output shaft of the motor and the gear for the tire have not been found yet.
+### センサー
-### Sensor
+壁との接地を確認する方法をタッチセンサーから超音波センサーに変えます。
+センサーそのものは手元にありますが、まだ触っていません。
-We will change the method of confirming the contact with the wall from the touch sensor to the ultrasonic sensor.
-The sensor itself is in my hand, but I haven't touched it yet.
+ライントレース、レスキューに関しては引き続きカメラです。
+機械学習も引き続き"YOLO"を使用します、がカメラの高さなどもあるのでそこもやらないと...
+[YOLOについてはこちら](/2025/02/24/yolo_machine_learning.html){:target="_blank"}
-For line tracing and rescue, we will continue to use the camera.
-Machine learning will also continue to use "YOLO", but since there is also the height of the camera, we need to do that too...
-For YOLO, please see [here](/2025/02/24/yolo_machine_learning.html){:target="_blank"}.
+### その他
+EV3から自作機になるのでRaspberry Pi & ESP32というマイコンを使います。
+2つのデータのやり取りはi2c通信という方法でおこないます(基礎はできたのであとはフォーマットを作る)。
+超音波センサーの値やモーターの値の変更などを行えるようにします。
-### Other
-Since the robot is no longer made with EV3, we will use Raspberry Pi & ESP32 as the microcontroller.
-We will use i2c communication to exchange data between the two microcontrollers (the basic format is already done, so we just need to make the format).
-We will also be able to change the values of the ultrasonic sensor and the motor.
+# 今後の予定
-# Future plans
+機体がないことには始まりません。
+早急に3Dデータの完成と、ギアの問題を解決したいです。
+今年こそは全国大会に行けるようにがんばりますので、応援よろしくおねがいします。
-The robot cannot start without a robot.
-I want to quickly complete the 3D data and solve the problem of the gear.
-I will work hard this year to be able to go to the Japan competition, so please look forward to us.
Thank you for reading~
From b45bf95ca3c95825feb25acd13c1dd11b71f2ce0 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:11:01 +0900
Subject: [PATCH 14/19] Revert "translated 2025-05-11-linetrace_program.md to
English"
This reverts commit 7019f52d55e7cd240db53bb91b459efb4852dac2.
---
_posts/2025-05-11-linetrace_program.md | 155 ++++++++++++-------------
1 file changed, 77 insertions(+), 78 deletions(-)
diff --git a/_posts/2025-05-11-linetrace_program.md b/_posts/2025-05-11-linetrace_program.md
index 5c987cb..e16c57d 100644
--- a/_posts/2025-05-11-linetrace_program.md
+++ b/_posts/2025-05-11-linetrace_program.md
@@ -1,38 +1,37 @@
---
layout: post
-title: "Line tracing program"
+title: "ライントレースのプログラム"
date: 2025-05-11 10:00:00 +0900
tag: [robot, rotarymars's article, line-trace, program]
thumbnail-img: "/assets/images/robot-02.jpg"
author: "rotarymars"
---
-Hello. I'm rotarymars.
+こんにちは。rotarymarsです。
-First of all, I'd like to announce the update frequency of the blog again.
+最初は余談になってしまいますが、ブログの更新頻度を改めて決定したのでお伝えしたいと思います。
-| ALPAKA | The remainder when the month is divided by 3 is 0 or 1 |
-| K10-K10 | The remainder when the month is divided by 3 is 0 or 2 |
-| rotarymars | The remainder when the month is divided by 3 is 1 or 2 |
+| ALPAKA | その月を3で割ったあまりが0もしくは1 |
+| K10-K10 | その月を3で割ったあまりが0もしくは2 |
+| rotarymars | その月を3で割ったあまりが1もしくは2 |
-We will update the article once a month in these months, so please look forward to us.
+これらの月に1度は記事を更新するようにしていきたいと思いますので、よろしくおねがいします。
-# About the content of this article
-This time, I'd like to write about the line tracing program that we are currently considering.
+# 今回の記事の内容について
+今回は、私達が現在検討しているライントレースプログラムについて書いていきたいと思っています。
-The program is about [this point](https://github.com/techno-robocup/robocup2025_raspberrypi_program/tree/2aa6a78f848aa399d7de8e9522e22457549cda2c).
+プログラムは、[この時点](https://github.com/techno-robocup/robocup2025_raspberrypi_program/tree/2aa6a78f848aa399d7de8e9522e22457549cda2c)でのものについて解説していきたいと思いますので、よろしくおねがいします。
-# First, what will we use to do line tracing?
-We want to continue to use the camera for line tracing this year.
+# まず何を使ってライントレースをするのか
+私達は、昨年に引き続き、カメラを用いたライントレースを実行したいと考えています。
-Specifically, we want to connect a camera like [this](https://www.marutsu.co.jp/pc/i/2582866/?srsltid=AfmBOopbmXQJaQxBT3iPoE_9YWJHDGGlkC7d1VmHUMrUX68OTDen-XPl) to the Raspberrypi and get the image to do line tracing.
+具体的には、Raspberrypiに[このような](https://www.marutsu.co.jp/pc/i/2582866/?srsltid=AfmBOopbmXQJaQxBT3iPoE_9YWJHDGGlkC7d1VmHUMrUX68OTDen-XPl)カメラを接続し、画像を取得してライントレースをしていきたいと考えています。
-I just want to let you know that we haven't been able to test the actual run because the robot hasn't been completed yet.
+まだ機体が出来上がっていないので実際にテスト走行はできていないということだけお伝えしておきたいと思います。
-# Actual program
-The program is quite long, so I'll paste it step by step.
-Also, it's very ugly, so it may be difficult to read (I want to make a class someday, but I haven't done anything yet).
+# 実際のプログラム
+かなり長々としたプログラムになってしまったので段階的に貼り付けていきたいと思います。また、とてもきたないので、読みにくいかもしれません(いつかクラスにしたいと思いながら何もしていません)。
-By the way, this time, we'll look at modules/settings.py, which is particularly related to line tracing.
+なお、今回は特にライントレースに関係しているmodules/settings.pyを見ていきます。
```python
from libcamera import controls
@@ -100,131 +99,131 @@ def Linetrace_Camera_Pre_callback(request):
if DEBUG_MODE:
print(f"Error in line tracing: {e}")
```
-Let's look at it step by step.
+とりあえず順に見ていきましょう。
## Line 1 ~ 6
-As you can see, we're including the necessary libraries (in Python, they're called modules) and importing them.
+見てのとおりですね。必要なライブラリ(Pythonではモデュールというらしいですが)をインクルード(Pythonではインポートというらしいですが)しています。
## Line 8 ~
-It's finally time for the explanation.
+いよいよ解説らしいものができます。
-First, let's explain what precallback is.
+まずprecallbackとは何なのか、解説したいと思います。
-In Raspberrypi, you can preview the camera image by using the `rpicam-hello` command (the command name may be different).
+Raspberrypiでは、`rpicam-hello`というコマンドを用いることでカメラ画像のプレビューが可能になっています(コマンド名が違うかもしれません)。
-The command is a program that sends an image acquisition request and then displays the image.
+そのコマンドは、画像の取得リクエストを投げ、その後画像を表示するということをしているプログラムです。
-The thing used at that time is the `picamera2` library (module).
+その時に使われている物が、`picamera2`というライブラリ(モジュール)です。
-Specifically, you can specify a `precallback function` when generating the camera object.
+具体的には、カメラオブジェクトを生成する時点で、`precallback function`というものを指定できるようになっています。
-It is `None` by default, and there is no hook when the image is acquired.
+それは、デフォルトでは`None`になっていて、画像を取得した時のフックが何もない状態になっています。
-However, by registering a function here, the object is passed to the first argument of the function (in this case, `request`).
+しかし、ここに関数を登録することによって、その関数の第一引数(この場合は`request`)にオブジェクトが渡されます。
-By doing this, the image data stored in `request` can be obtained as a `numpy` array, `lores` quality.
+これを`MappedArray(request, "lores").array`とすることによって、`request`に格納されている画像データが`numpy`の配列、`lores`画質で取得できます。
-This way, we can avoid capturing the image every time it is needed, and we can get the image faster (the processing inside the function is heavy, so I don't know how to say it, but if we don't do anything, we can get it at about 20msec/frame).
+これによって画像が必要になるたびに`capture`することを回避でき、高速に画像を取得することができます(中身の処理が重いと関数自体の処理速度が下がるので何とも言えませんが、何もしなければ20msec/frameくらいで取得できます)。
-However, if there is an operation that consumes a lot of CPU resources in that function, if the camera is not stopped when it is not in use, it will consume a lot of power.
+ただし、万が一その関数にCPUリソースを大きく消費する操作などが含まれている場合、使っていないときにカメラを停止しなければ、大きく電力を消費することになります。
-Therefore, the camera should be started and stopped separately when it is in use and not in use.
+そのため、使うとき、使わないときで分けてカメラをスタート、ストップするべきです。
### Line 9 ~ 10
-As you can see, when DEBUG_MODE is enabled, the UNIX TIME when the function is called is printed.
+見てのとおりです。DEBUG_MODEが有効な時に関数が呼ばれたUNIX TIMEをprintしています。
### Line 12
-Global variables are declared.
+グローバル変数を宣言しています。
-Let's talk about the variables used here.
+ここで使われている変数について話しておきます。
-| Variable name | Usage |
+| 変数名 | 使用用途 |
| --- | --- |
-| lastblackline | The center coordinate of the previous black line |
-| slope | The slope of the black line |
+| lastblackline | 前回の黒線の中心座標 |
+| slope | 黒線の傾き |
-By making these global variables, we can access them from the main process.
+これらをグローバル変数にすることで、mainプロセスからもアクセスできるようにしています。
### Line 14 ~ 22
-Let's ignore all exceptions for now.
+とりあえずいったんすべての例外を無視します。
-The image is stored in the variable `image` as a numpy array.
+画像を変数`image`にnumpy配列として格納します。
-`camera_x` and `camera_y` store the vertical and horizontal number of pixels of the camera.
+`camera_x`と`camera_y`にカメラの縦横の画素数を格納します。
-And when DEBUG_MODE is enabled, the original image is saved.
+そして、DEBUG_MODEが有効な時には、生画像を保存します。
### Line 24 ~ 30
-The image is converted to grayscale. This is because we want to binarize the image later.
+画像をいったんグレースケールに変換します。これは画像をその後二値化したいためです。
-In line 26, the image binarized with `Black_White_Threshold` as the threshold is stored in `binary_image`. The ones that are close to black become white, and the ones that are close to white become black.
+26行目で、binary_imageに`Black_White_Threshold`を閾値として二値化した画像を格納します。黒に近いものがが白色、白に近いものが黒色になります。
-Here's a side note, but the reason for converting to grayscale is that we can't binarize a color image directly into black and white. If we apply it directly to the function, each color (r, g, b) will be binarized as each threshold, and a highly saturated (?) image will be created (I recommend actually seeing it for explanation).
+ここで余談にはなりますが、グレースケールに変換する理由として、カラー画像をそのまま白黒に二値化することができないためです。そのまま関数にかけてしまうと、それぞれの色(r, g, b)がそれぞれの閾値として二値化されてしまい、彩度の高い(?)画像が出来上がってしまいます(言葉で説明することは難しいので実際に見てみることをお勧めします)。
-And when `DEBUG_MODE` is enabled, the binarized image is saved.
+そして、二値化した画像を`DEBUG_MODE`が有効な時は保存します。
### Line 32 ~ 35
-Here, we remove the noise contained in the binarized image.
+ここでは、二値化した画像に含まれているノイズを除去します。
-Let's explain how each function is doing.
+具体的にそれぞれの関数がどのようなことをしているのか解説します。
#### kernel = np.ones((3, 3), np.uint8)
-This creates a 3x3 `numpy` two-dimensional array. All elements are `1`.
+これは、3x3の`numpy`二次元配列を生成します。要素はすべて`1`です。
#### binary_image = cv2.erode(binary_image, kernel, iterations=2)
-Using the `kernel` we just created, we remove the noise from `binary_image`. Specifically, if one of the pixels in the range of `kernel` is black (0), the center pixel is converted to black (0).
+先ほど作成した`kernel`を用いて、binary_imageのノイズを除去します。具体的に、`kernel`が画像全体を移動し、もし`kernel`の範囲内に含まれるピクセルのうち一つでも黒色(0)であれば、その中心のピクセルを黒色(0)に変換します。
-This way, the white blocks become smaller and the noise is removed.
+これによって、白色の塊が小さくなり、ノイズが除去されます。
-By the way, the black and white determination is made by whether the number of each element of `kernel` is below or above.
+なお、黒、白の判定は`kernel`の各要素の数字を下回るか否かをもって判断されます。
-Since `iterations=2`, this is executed twice.
+`iterations=2`なので、これを2回実行します。
#### binary_image = cv2.dilate(binary_image, kernel, iterations=3)
-This is the opposite of `erode`. That is, the black blocks become larger.
+これは、`erode`の逆の操作を行います。つまり、黒色の塊が大きくなります。
-Specifically, if one of the pixels in the range of `kernel` is white (1), the center pixel is converted to white (1).
+具体的には、一つでも白色(1)が含まれている場合、その中心のピクセルを白色(1)に変換します。
-Since `iterations=3`, this is executed three times.
+`iterations=3`なので、これを3回実行します。
### Line 36
-Here, we recognize the green marks, and perform the relative position determination. I'll explain the function later.
+ここでは、緑色のマークを認識、相対的な位置の判定を実行しています。あとで関数を解説します。
### Line 37 ~ 45
-`contours` is recognized using the cv2 function.
+`contours`にcv2の関数を用いて白と黒の境界線を認識しています。
-Then, using the `find_best_contour` function we created ourselves, we get the most appropriate contour and store it in `best_contour`.
+その後、自分で作成した`find_best_contour`関数を用いて、最も適切な輪郭を取得し、`best_contour`に格納します。
### Line 47 ~ 50
-Here, we get the center coordinates of `best_contour`.
+ここでは、`best_contour`の中心座標を取得しています。
-If `best_contour` is not found, the process is ended as is.
+best_contourがない場合はそのまま処理を終えています。
### Line 53 ~ 56
-Here, we update `lastblackline` and `slope`.
+ここでは、`lastblackline`と`slope`を更新しています。
-`lastblackline` represents the x-coordinate of `blackline`, and is used to find `best_contour`.
+`lastblackline`とは、`blackline`のx座標を表しており、`best_contour`を探すのに用いています。
-`slope` is the slope of the black line.
+`slope`は黒線の傾きを出しています。
-Specifically, the slope from the center of the bottom of the image to the center of `best_contour` is calculated.
+具体的には、画像の最も下の中心から`best_contour`の中心までの傾きを出しています。
-By the way, `with ..._LOCK:` is locking the `..._LOCK` object.
+ちなみに、`with ..._LOCK:`は、`..._LOCK`というオブジェクトをロックしています。
-Locking is a mechanism to prevent other processes from using a variable when a certain process is using it.
+ロックとは、あるプロセスがある変数を使用している時、他のプロセスがその変数を使用することを防ぐためのものです。
-This way, the writing to this variable becomes atomic (exclusive) (it is guaranteed that it will not become strange if it is edited at the same time. It is also necessary to set it when reading).
+これによって、この変数への書き込みがアトミック(排他的)になります(同時編集されておかしなことにならないことが保証される。読み取り時にも設定する必要がある。)。
-※I'm not very familiar with it, but I think it's probably an OS-level operation, so it's better not to use it too much to be able to process faster.
+※あまり詳しくないですが、おそらくOSレベルでの操作になるため、あまり乱用しないほうが高速に処理できると思います。
### Line 57 ~
-When `DEBUG_MODE` is enabled, the image is saved.
+`DEBUG_MODE`が有効な時は画像を保存してくれます。
-And then, we're handling exceptions. It's simple, isn't it?
+あとは、例外を処理しています。簡単ですね。
-# Finally
-I hope you understand how the program is working. I want to fix the part where the image passed as an argument to the function that detects the green mark is directly overwritten as soon as possible.
+# 最後に
+おおよそプログラムがどのように動いているのか理解していただけたら幸いです。緑マークを検出する関数で引数で渡された画像を直接書き換えてしまっているところだけ早めに治したいと思っています。
-This time, I haven't been able to explain all the functions (because I didn't have much time), but I hope you understand what I'm doing.
+今回はすべての関数の解説は(時間があまりなかったので)書けていませんが、おおよそやっていることがわかっていただければ嬉しいです。
-I want the team members to read this blog and understand the contents of the program.
+チームメンバーにもこのブログを読んでプログラムの内容について理解してほしいなと思っています。
-Thank you.
+ありがとうございました。
-↑↑I also want to follow K10-K10, so I'll add it at the end.↑↑
+↑↑僕もK10-K10に見習い最後につけてみようと思いました。↑↑
From 34d016ea669b9bf131a98ca581c13d7bd92a06a3 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:11:02 +0900
Subject: [PATCH 15/19] Revert "translated 2025-05-31-parts.md to English"
This reverts commit 0de26b775ca6d6c8e0eac69b9fa232cb4087d3e8.
---
_posts/2025-05-31-parts.md | 69 +++++++++++++++++++-------------------
1 file changed, 35 insertions(+), 34 deletions(-)
diff --git a/_posts/2025-05-31-parts.md b/_posts/2025-05-31-parts.md
index b0be002..552dd39 100644
--- a/_posts/2025-05-31-parts.md
+++ b/_posts/2025-05-31-parts.md
@@ -1,80 +1,81 @@
---
layout: post
-title: "Parts used in the robot"
+title: "機体部品について"
date: 2025-05-31 10:00:00 +0900
tag: [robot, K10-K10's article]
thumbnail-img: "/assets/images/techno-robocup-icon.jpg"
author: "K10-K10"
---
-Hello. I'm K10-K10.
-This time, I'd like to summarize the parts used in the robot.
+K10-K10です。
+今回はロボットの機体で使用する部品についてまとめます。
-# Progress from last time
+# 前回からの進捗
-The 3D data of the robot is complete, and the order and arrival have been completed.
-The gear that will be sandwiched between the motor and the tire will be handled by 3D printing, and the one that was tested and printed fits perfectly.
+機体の3Dデータは完成し、発注・到着まで完了しました。
+モーターとタイヤの間に挟むギアは3Dプリントで対応することにし、テスト印刷したものはぴったりはまりました。
# 一覧
-## Microcontroller
+## マイコン
### [Raspberry Pi 5](https://www.marutsu.co.jp/pc/i/2782704/?srsltid=AfmBOoqydk9tS5XraCsqQw-dVpBfnG6gvRwokrS1R8Ei0NoOtyqtM-ZE)
-Used for image processing.
+画像処理用として使用します。
### [ラズパイ用ヒートシンク](https://www.marutsu.co.jp/GoodsDetail.jsp?q=%E3%82%BF%E3%82%AB%E3%83%81%E9%9B%BB%E6%A9%9F%E5%B7%A5%E6%A5%AD%205%E7%94%A8%E3%83%95%E3%82%A1%E3%83%B3%E4%BB%98%20%E3%83%92%E3%83%BC%E3%83%88%E3%82%B7%E3%83%B3%E3%82%AF%E3%82%B1%E3%83%BC%E3%82%B9&salesGoodsCode=2839645&shopNo=3)
-Used for heat dissipation of Raspberry Pi.
+Raspberry Piの熱対策として使用します。
### [ESP32-DevKitC-32E](https://akizukidenshi.com/catalog/g/g117073/)
-It communicates with the Raspberry Pi to control the motor and process the sensor.
-There may be a shortage of pins;)
+Raspberry Piと通信させて、モーター制御やセンサー処理を行います。
+ピン数が不足する可能性があります。
-## Motor
+## モーター類
### [FEETECH サーボ FB5311M-360](https://akizukidenshi.com/catalog/g/g116309/)
-Used to move the robot body. Four are planned to be installed.
-The gear will be sandwiched between the tire and the motor.
-One more will be installed on the top of the robot for the arm up and down.
+ロボット本体を動かすために使用します。4つ搭載予定です。
+タイヤとモーターの間にギアを挟んで取り付けます。
+追加で1つ、アームの上下用に機体上部に設置予定です。
### [マイクロサーボ 9g SG-90](https://akizukidenshi.com/catalog/g/g108761/)
-Used to pull the string in the arm.
-The string is held by pulling the string while the string is loosened, and the ball is grabbed.
-We will test whether it works well later.
+アーム部分の糸を引くために使用します。
+糸を緩めた状態でボールを掴み、糸を引くことで保持する仕組みです。
+うまく動作するかは今後テストします。
-## Camera
+## カメラ
### [Raspberry Pi Camera Module 3(広角)](https://www.marutsu.co.jp/pc/i/2582864/)
-Used for line tracing.
+ライントレース用に使用します。
### [Raspberry Pi Camera Module 3(標準画角)](https://www.marutsu.co.jp/pc/i/2582866/)
-Used for rescue.
-## Power supply
+レスキュー用の広い視野確保に使用します。
+
+## 電源
### [Kypom K6 7.4V 1300mAh 30C60C リポバッテリー](https://www.amazon.co.jp/Kypom-7-4V-1300mAh-30C60C-%E3%83%90%E3%83%83%E3%83%86%E3%83%AA%E3%83%BC/dp/B017VOKS4U)
-Used for the motor.
+モーター用電源です。
### Anker製モバイルバッテリー(型番不明)
-Used for Raspberry Pi.
-By separating the motor power, we can avoid the influence of noise.
+Raspberry Pi用に使用予定です。
+モーター電源と分けることでノイズの影響を避けます。
-## Others
+## その他
### [超音波距離センサー HC-SR04](https://akizukidenshi.com/catalog/g/g111009/)
-Used to measure the distance to the wall.
+壁との距離を測定します。
### [赤色7セグメントLED表示器 カソードコモン OSL10391-LRA](https://akizukidenshi.com/catalog/g/g130319/)
-Used for the robot's status display.
-There may be a shortage of pins on the ESP32 side.
+ロボットの状態表示用に使用します。
+ESP32側のピン数が足りなくなる可能性があります。
### [波動スイッチ DS-850K-S-ON](https://akizukidenshi.com/catalog/g/g115740/)
-Used for the start and stop switch.
+スタート、ストップ用のスイッチです。
-# Future plans
+# 今後の予定
-The 3D printed robot parts have arrived, so we will start assembly.
-Next, we will continue to advance the red detection program and the efficiency of the control system.
+3Dプリントされた機体パーツが届いたので、組み立てに入ります。
+次は赤色検知プログラムの動作テストと、制御系の効率化を進める予定です。
-Addition: I think it's better not to use the insert nut.
+追記: インサートナットは使わないほうがいいと思います。
Thank you for reading~
From 41f3e0724c3eb32126e35076f0240b7313d05047 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:11:03 +0900
Subject: [PATCH 16/19] Revert "translated 2025-06-19-RedMask.md to English"
This reverts commit 6d1baeadc7472fe195d9aff0b09ff39aa0a5763a.
---
_posts/2025-06-19-RedMask.md | 57 ++++++++++++++++++------------------
1 file changed, 29 insertions(+), 28 deletions(-)
diff --git a/_posts/2025-06-19-RedMask.md b/_posts/2025-06-19-RedMask.md
index d670a0a..455e553 100644
--- a/_posts/2025-06-19-RedMask.md
+++ b/_posts/2025-06-19-RedMask.md
@@ -1,18 +1,19 @@
---
layout: post
-title: "Red detection and 7-segment LED"
+title: "赤色検知と7セグ"
date: 2025-06-20 10:00:00 +0900
tag: [robot, K10-K10's article, line-trace, program]
thumbnail-img: "/assets/images/techno-robocup-icon.jpg"
author: "K10-K10"
---
-Hello. I'm K10-K10.
-This time, I'd like to summarize the program for detecting red and the 7-segment LED for judging the status of the robot.
+こんにちはK10-K10です。
+今回は赤色を検知するプログラムができたということで、その解説と、
+機体の状況判断用の7セグLEDの使い方をまとめたいと思います。
-# Program
+# プログラム
-The function for detecting red.
+赤色検知をする関数です。
```python
def detect_red_marks(orig_image, blackline_image):
@@ -63,9 +64,9 @@ def detect_red_marks(orig_image, blackline_image):
cv2.circle(image, (center_x, center_y), 5, (0, 0, 255), -1)
```
-The noise removal and the mark on the image are the same as the green in [the previous article](/2025/05/11/linetrace_program.html){:target="_blank"}.
+後半のノイズ除去と、画像へのマークは [前回](/2025/05/11/linetrace_program.html){:target="_blank"}の緑色と同じです。
-## Explanation
+## 解説
```python
lower_red1 = np.array([0, 40, 0])
@@ -75,9 +76,9 @@ The noise removal and the mark on the image are the same as the green in [the pr
upper_red2 = np.array([180, 255, 255])
```
-The red HSV (hue) is divided into 0-60 degrees and 300-360 degrees.
-When converted to OpenCV (0~180), it becomes 0-30 150-180 degrees.
-The values are different, but we will adjust them from now on.
+赤のHSV(色相)は0~60度、300~360度に分かれています。
+この値をOpenCV(0~180)に直すと、0~30 150~180度 となります。
+数値は違いますが、これから調整していきます。
```python
red_mask1 = cv2.inRange(hsv, lower_red1, upper_red1)
@@ -86,12 +87,12 @@ The values are different, but we will adjust them from now on.
red_mask = cv2.bitwise_or(red_mask1, red_mask2)
```
-We filter with the color value range we just mentioned.
-`red_mask1` is the one with the lower color value
-`red_mask2` is the one with the higher color value.
-This way, the red is white, and the others are black.
-We apply `bitwise_or` to the two images, and get the final `red_mask`.
-`bitwise_or` returns the same result as the logical operator `or` to the image.
+先程の色値の範囲でフィルターをかけます。
+`red_mask1`が色値が下のもの
+`red_mask2`が色値が上のものです。
+これで赤色は白、その他は黒の画像が出来上がります。
+この2つの画像を`bitwise_or`にかけ、最終的な`red_mask`を得ます。
+`bitwise_or`は論理演算子`or`と同じ結果を画像に返します。
|画像1|画像2|出力|
|:---:|:---:|:---:|
@@ -100,15 +101,15 @@ We apply `bitwise_or` to the two images, and get the final `red_mask`.
|白 |黒 |白 |
|白 |白 |白 |
-This way, the red is white, and the others are black.
-This way, we can perform mask processing even with red with two color values.
+これで赤色は白、その他は黒の画像が出来上がります。
+これで色値が2箇所ある赤色でも、マスク処理を行うことができます。
-# 7-segment LED
+# 7セグLED
-I want to be able to judge the operation of the robot with the LED lamp, so I introduced it.
-I didn't know which pin corresponds to which (the one that comes up in the search was different from the one I was using), so I left a note here.
+機体が行っている動作をLEDのランプで判断できるようにしたいと思い、導入しました。
+どのピンがどこと対応しているかわからなかった(検索で出てくるものとは違っていた)ので、ここにメモを残しておきます
-### Pin
+### ピン
1------|------5
2------|------6
@@ -130,13 +131,13 @@ GND-|-GND
---4--- 8 (dot)
-# Finally
+# 終わりに
-I wanted to show the image that could be detected, but I forgot to take it.
-Also, the camera's field of view for line tracing is too narrow in the current robot, so we need to fix it.
-The base error was also found, so I'm worried about whether it will be fixed in time.
+検知できている画像を載せようと思ったのですが、取り忘れました。
+また、今の機体では、ライントレース用のカメラの視野が狭すぎるので、修正しないといけません。
+基盤のミスも見つかったので、間に合うか心配です。
-Also, when connecting the stabilized power supply, please make sure to check the decimal point position.
-**Please don't flow 33v thinking it's 3.3v.**
+あと、安定化電源をつなぐときは、小数点の位置を必ず確認しましょう
+**3.3v だと思って33vを流さないようにしましょう。**
Thank you for reading~
From 9da6ba3d28d62a7168d8b6f544e8a11357939c67 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:11:04 +0900
Subject: [PATCH 17/19] Revert "translated 2025-07-09-robot.hardware.md to
English"
This reverts commit a6b7d2c68e5bec66c98b8e9477c6ff4d1c4bb968.
---
_posts/2025-07-09-robot.hardware.md | 60 ++++++++++++++---------------
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/_posts/2025-07-09-robot.hardware.md b/_posts/2025-07-09-robot.hardware.md
index a0800b4..2156614 100644
--- a/_posts/2025-07-09-robot.hardware.md
+++ b/_posts/2025-07-09-robot.hardware.md
@@ -1,22 +1,22 @@
---
layout: post
-title: "Robot introduction"
+title: "ポチ 機体紹介"
date: 2025-07-09 10:00:00 +0900
tag: [robot, ALPAKA's article, hardware]
thumbnail-img: "/assets/images/2025-07-10-flont.png"
author: "ALPAKA"
---
-Hello. I'm ALPAKA.
-I've made the robot, so I'd like to introduce it in the trial stage.
+ALPAKAです。
+機体を作ったので、試作段階ですが紹介していきたいとおもいます。
---
-### Robot name : Pochi
+### 機体名 : ポチ
---
-# Appearance
+# 外観

@@ -25,60 +25,60 @@ I've made the robot, so I'd like to introduce it in the trial stage.
---
-# First step
+# 一段目

-The first step is to place the tires, the mobile battery, two cameras, and the ultrasonic sensor for seeing forward on the 5mm board.
-Since this robot uses raspberry pi, we decided to place both the circuit and raspberry pi in the second step in order to make the maintenance easy and to keep them close to each other.
-Also, since we are aiming for low center of gravity, we made the first step as compact as possible.
+一段目は5mmの板の上にタイヤ周り、モバイルバッテリー、二つのカメラ、前方を見る用の超音波センサーを置きました。
+この機体はraspberry piを使うのでメンテナンス性を意識して、回路とraspberry piを近い距離にするために、両方とも二段目に置くことにしました。
+そして、低重心も目指しているので、嵩張るものが少ない一段目はなるべく低くつくりました。
---
-# Second step
+# 二段目

-The second step is to place the raspberry pi, the circuit, the mobile battery, the rescue arm, and the ultrasonic sensors on the left and right.
-Since the raspberry pi has a screw hole in the heat sink, we fixed it using that.
-The ultrasonic sensor is friction-fixed at a slightly higher position so as not to interfere with the tire.
-The second step is also made as compact as possible.
+二段目にはraspberry pi、回路、リポバッテリー、レスキューアーム、そして左右に超音波センサーをおきました。
+raspberry piはヒートシンクにねじ穴がついていたので、そこを使って固定しました。
+超音波センサーはタイヤに干渉しないように少し高い位置で摩擦固定しています。
+二段目もなるべく低くなるようにコンパクトにつくりました。
---
-# Features
+# 特徴
-This time, the robot is a self-made machine, not made with LEGO. We made this robot with stability in mind. And, there are three main features:
+今回はLEGOではなく、3Dプリンターなどを使った自作機になります。この機体は安定性を意識してつくりました。そして、特徴は大きく3つあって
-**「Low center of gravity」「AI-based driving」「Latest rescue**
+**「低重心」「AIを使った走行」「最新のレスキュー」**
-
+ です。
-### Low center of gravity
+### 低重心
-The rescue line has a height limit of 25cm, but this robot has almost all of its upper half used, and the lower half is almost all used. And, since we put a rather heavy mobile battery in the first step, the center of gravity could be placed at a place 5~6cm from the floor.
+レスキューラインは高さ制限が25cmなのですが、この機体は上半分をほとんど使わずに下から10cm位にほとんどをまとめました。そして、モバイルバッテリーというかなり重たいものを一段目においたため、重心は床から5~6cm位の場所にすることができました。
-### AI-based driving
+### AIを使った走行
-Since the rescue, the cage detection, and the line tracing in this robot are done with AI, we use a raspberry pi and a dedicated camera. Therefore, we have set up a place for two cameras (one for line tracing and one for rescue).
-However, since the camera for line tracing is placed at a place 2~3cm from the floor, the field of view is too narrow, so it seems that it needs to be placed at a place 6cm from the floor.
+この機体のレスキュー時の被災者、かご発見と、ライントレースはAIを使うので、raspberry piと専用のカメラを使います。そのため、この機体には2つ(ライントレース用、レスキュー用)のカメラを置く場所を設置しました。
+ただ、ライントレース用のカメラを床から2~3cm位の場所に置いたのですが、画角が狭すぎたので、床から6cm位の場所に置く必要がありそうです。
-### Latest rescue
+### 最新式のレスキュー
-In addition to using AI for rescue, we also made a rescue arm.
+この機体でのレスキューはAIを使って行うこと以外に、レスキューアームも工夫しました。

-This is based on the mechanism of [EvB Robocup](https://www.youtube.com/@evbrobocup).
+これは[EvB Robocup](https://www.youtube.com/@evbrobocup)さんのを機構を参考にしてつくりました。
-This arm has a string attached to it, and when the string is loosened, the ball can be placed, and when pulled, the string is stretched and the ball does not come out.
+このアームはついている糸を緩めるとボールを入れられる状態になって、引っ張ると糸が張り、ボールが外に出ないようになっています。
-While we cannot carry multiple balls at the same time, we can pick up balls near the wall, so we will aim for a full score of rescue using this.
+同時に複数個運ぶことはできませんが、その分、壁際にいるボールもとれるので、これを使ってレスキュー満点を目指します。
---
-# Finally
+# 終わりに
-Until now, we were doing it with LEGO, but now we are making a self-made robot, so there is a little worry about not being able to change the robot quickly and not knowing if it will move. I want to work hard to be able to run.
+いままではLEGOでやっていたのが、自作機になるということで、ロボットをすぐに変えられないということや動くのかどうかがわからないことなどで少し不安がありますが、走れるように頑張っていきたいと思っています。
*thank you for reading*
From d1385df28c3eef5a15b1290819da3c470c2fbed4 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:11:05 +0900
Subject: [PATCH 18/19] Revert "translated 2025-07-21-introducing.md to
English"
This reverts commit 919f2590bff5f2071f475e8a74e91100e4b7f7c2.
---
_posts/2025-07-21-introducing.md | 65 ++++++++++++++++++--------------
1 file changed, 37 insertions(+), 28 deletions(-)
diff --git a/_posts/2025-07-21-introducing.md b/_posts/2025-07-21-introducing.md
index 3997ae5..08ec376 100644
--- a/_posts/2025-07-21-introducing.md
+++ b/_posts/2025-07-21-introducing.md
@@ -1,66 +1,75 @@
---
layout: post
-title: "Development system"
+title: "開発体制"
date: 2025-07-21 10:00:00 +0900
tag: [robot, rotarymars's article, software]
thumbnail-img: "/assets/images/2025-07-21-introducing.png"
author: "rotarymars"
---
-Hello. I'm rotarymars.
+こんにちは。rotarymarsです。
-Recently, I've been writing a lot of articles related to the robot, so this time, I'd like to write about our team's development system.
+最近は機体に関連する記事ばっかりだったので、今回は雰囲気を変えて私達のチームの開発体制について書きたいと思っています。
-# Team structure
+# チームの構成
-Our team is structured as follows.
+私達のチームは以下のような構成になっています。
-| Role | Number (Total) | Who |
+| 役割 | 人数(延べ) | 誰 |
| --- | --- | -- |
| 機体 | 1 | ALPAKA |
| 回路 | 2 | K10-K10, rotarymars |
| ソフトウェア | 2 | K10-K10, rotarymars |
| ブログ | 3 | ALPAKA, K10-K10, rotarymars |
-It's like this.
+という感じになっています。
-This means that on average, each member is responsible for `2.5` roles (we are looking for members).
+これを見ると平均してメンバー一人あたり`2個半`の役割を担っていることになっています(メンバー募集中です)。
-# Development system for the robot
-Since there is only one person involved in the development of the robot, we are working in the most convenient system for one person.
+# 機体の開発体制
+機体の開発に携わっている人が一人なため、幸か不幸か、一人で最もやりやすい体制で作業をしているようです。
-I'd like to be able to participate more in the future, but it seems difficult to edit the robot at the same time due to various data.
+今後はもう少し自分も関わっていけたら良いなとは思いつつも、機体を同時に編集するというのは色々とデータの都合上難しいのかなというところです。
-# Development system for the circuit
-Since we are doing it with two people, we are trying to make it possible to communicate with each other.
+# 回路の開発体制
+回路は二人でやっているので、二人の間で意思疎通できるようにしています。
-We use [kicad](https://www.kicad.org/) to design the circuit, so we upload the data to [github](https://github.com/).
+私達は[kicad](https://www.kicad.org/)を使って回路を設計しているため、そのデータを[github](https://github.com/)にアップロードしています。
-This way, the data that the two people worked on is reflected when pulled.
+これによってプルするだけで二人が作業したデータが反映されるようになっています。
-Personally, I'm not satisfied with the fact that I can't see where the edit was made in [kicad](https://www.kicad.org/) visually.
+個人的に残念なのは、[kicad](https://www.kicad.org/)だとどこが編集されたのかvisualで確認できないのが不満なところです。
-# Development system for the software
-The software is also done with [github](https://github.com/), so we can communicate with each other.
+余談ではありますが、機体の作成に使っている[freecad](https://www.freecad.org/index.php)だと[BIM Diff](https://wiki.freecad.org/BIM_Diff/en)と呼ばれるもので視覚的なdiffが見られるようです。
-Since the software is written in text, it is easier to see the diff than other development.
+# ソフトウェアの開発体制
+ソフトウェアも同様、二人の間で意思疎通ができるように[github](https://github.com/)を使っています。
-# Development system for the blog
-The blog is also managed with [github](https://github.com/).
+ソフトウェアは文字で書いているため、diffも見やすくなっていて他の開発よりもやりやすいです。
-We use [jekyll](https://jekyllrb.com/) to create the blog.
+ここでも余談ではありますが、[delta](https://github.com/dandavison/delta)コマンドを用いると、[github](https://github.com/)と同様にキャラクターごとのdiffを見ることができるようになります。

-# Development system for the team
+こんな感じのものがローカルで見られると、便利ですよね。
-We use [atlassian](https://www.atlassian.com/) for task management.
+# ブログの開発体制
+ブログも、[github](https://github.com/)で内容を管理しています。
-This is a task management tool for realizing [agile software development](https://ja.wikipedia.org/wiki/%E3%82%A2%E3%82%B8%E3%83%A3%E3%82%A4%E3%83%AB%E3%82%BD%E3%83%95%E3%83%88%E3%82%A6%E3%82%A7%E3%82%A2%E9%96%8B%E7%99%BA), which lists tasks to be done by the team and makes it easier to estimate how much can be done within the deadline.
+私の周りには一から`html`と`CSS`を書いてとてもきれいなサイトを仕上げる人もいますが、私達は[jekyll](https://jekyllrb.com/)という静的サイトジェネレーターでブログを作成しています。
+確かにセットアップは面倒ですが、その後の便利さを考えると、考える余地のあるものだと思っています。
-# Conclusion
+# チームのタスク管理
+開発体制と言うと、使っているものよりもこれが最も重要なのではないでしょうか?
-This time, I've written a short article, but I think the task management for the team is not well known, so I hope you'll try it if you're interested.
+私達は、[atlassian](https://www.atlassian.com/)の[jira](https://www.atlassian.com/software/jira)を使ってタスク管理をしています。
-Thank you for reading.
\ No newline at end of file
+これは、[アジャイルソフトウェア開発](https://ja.wikipedia.org/wiki/%E3%82%A2%E3%82%B8%E3%83%A3%E3%82%A4%E3%83%AB%E3%82%BD%E3%83%95%E3%83%88%E3%82%A6%E3%82%A7%E3%82%A2%E9%96%8B%E7%99%BA)を実現するためのタスク管理ツールで、チームでやるべきタスクをリストアップしつつ期限内にどれだけ終えられるかの見積もりを行いやすくするものになっています。
+
+これによってチーム内で期限を決めてタスクを細分化するところさえすれば、一週間でこなせるタスクの見積もりをしやすくなり、目指すものが期限内に終えられるかどうかの見積もりをしやすくしています。
+
+# まとめ
+今回は手短な記事にはなってしまいましたが、特に最後のチームでのタスク管理はあまり知られていないものだと思うので、ぜひ興味があれば試してほしいと思います。
+
+ありがとうございました。
\ No newline at end of file
From 0f88a41b53656941b63dcf19d0256878255bea11 Mon Sep 17 00:00:00 2001
From: rotarymars
Date: Sat, 16 Aug 2025 18:11:06 +0900
Subject: [PATCH 19/19] Revert "Replace Japanese text with English translation
in diagram"
This reverts commit 358b229b43a412178dd535dd517a11d7ee1856c3.
---
_posts/2025-06-19-RedMask.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/_posts/2025-06-19-RedMask.md b/_posts/2025-06-19-RedMask.md
index 455e553..01e1b21 100644
--- a/_posts/2025-06-19-RedMask.md
+++ b/_posts/2025-06-19-RedMask.md
@@ -128,7 +128,7 @@ GND-|-GND
| |
3 7
| |
- ---4--- 8 (dot)
+ ---4--- 8 (ドット)
# 終わりに