検索結果

Gazebo turtlebot3 Burger Depth Camera Navigation 草刈りロボット です。

Gazebo turtlebot3 Burger Depth Camera Navigation Python Program. で、大体動きが把握できたので、
今回は、バーガーを草刈りロボットに見立てて、部屋の中を隈無く移動させるプログラムを考えてみます。

開発環境
OS: Ubuntu Mate 18.04
言語: Python2.7 ROS: melodic
開発ツール: Visual Studio Code
Gazebo/Turtlebot3 burger
注) burger には、Depth Camera プラグインを追加します。
条件:
1) バーガーを草刈りロボットとみなします。
  サイズ:178 x 178 [mm]
2) 部屋を畑とみなします。
3) センサーは、Depth Camera プラグインを使います。
  屋外の、実際の畑では、ちょっと無理だと考えますが、今回は、畑を隈無く移動させるプログラムの試験なので、割愛します。
4) SLAM で、畑 (部屋) のマップファイルが作成済とします。

Gazebo turtlebot3 Burger Depth Camera Navigation Python Program です 。
Gazebo turtlebot3 waffle Depth Camera Slam and real time Mapping. で、Gazebo turtlebot3 Burger の
Depth カメラ でのナビゲーションが確認できたので、こんかいは、 Python でバーガーを動かしてみようとおもいます。

グーグルで検索していたら、下記ページがあったので、そのまま使ってみます。
multi_goals.py

開発環境
OS: Ubuntu Mate 18.04
ROS: melodic
開発ツール: Visual Studio Code
Gazebo/Turtlebot3 burger
注) burger には、Depth Camera プラグインを追加します。

Gazebo turtlebot3 waffle Depth Camera SLAM

Gazebo turtlebot3 waffle Depth Camera SLAM(Simultaneous Localization And Mapping) です。

グーグルで検索していたら、
wiki.ros.org/depthimage_to_laserscan を見つけました。
どうやら、 Depth Camera (sensor_msgs/PointCloud2) から、 LaserScan (sensor_msgs/LaserScan ) に変更できる、
プログラムみたいです。

こちらを使えば、従来の turtlebot3_slam.launch でマップ作成ができそうです。
PCへの負荷は、
Gazebo turtlebot3 waffle Depth Camera Slam and real time Mapping. に比べて少ないだろうか?
だとしたら、こちらも選択肢としては、あると思うのだが!!

Gazebo turtlebot3 waffle Depth Camera Slam and real time Mapping です。

Gazebo turtlebot3 burger Depth Camera plugin で、 Depth カメラ プラグインが使えるようになったので、
Slam and Mapping ができないかグーグルで検索していたら、
http://wiki.ros.org/rtabmap_ros が在ったので、試してみました。

それに続いて、出来上がったMap を使って、
Depth Camera (Rgb-d Camera) による、Navigation にもチャレンジしてみました!!

開発環境
OS: Ubuntu Mate 18.04
ROS: melodic
開発ツール: Visual Studio Code
Gazebo/Turtlebot3 waffle
注) waffle には、最初から Depth Camera プラグインが、入っていました。

上記 wiki ページを読みながらパッケージ導入、起動へと進みます。

Gazebo turtlebot3 burger Depth Camera Program

Gazebo turtlebot3 burger Depth Camera Program です。

Gazebo turtlebot3 burger Depth Camera plugin で、Depth Camera (rgbd camera) が使えるようになったので、
サンプルプログラムを作ってみます。

開発環境
OS: Ubuntu Mate 18.04
ROS: melodic
開発ツール: Visual Studio Code

1. 概要
rgbd データは、 /camera/depth/points に出てきます。
$ rostopic type /camera/depth/points
sensor_msgs/PointCloud2

さて、sensor_msgs/PointCloud2 とは、何じゃろかいから始めないといけません。
グーグルでググると、
ROSのsensor_msgs:PointCloud2データの構造と扱い方 があって、参考にさせてもらいました。ふむふむ。

Gazebo turtlebot3 burger another House world

Gazebo turtlebot3 burger another House world!

Gazebo Turtlebot3 バーガーで、別の家のワールドを使ってみます。

使うのは、下記の、nav_lecture/worlds/test1.world です。
https://qiita.com/srs/items/b07a22425548c41bfd04

https://github.com/project-srs/ros_lecture の
nav_lecture を、~/catkin_ws/src の配置して
$ cd ~/ctakin_ws
$ catkin_make
で使えると思います。

Gazebo turtlebot3 burger Depth Camera plugin

Gazebo turtlebot3 burger Depth Camera plugin

Gazebo シュミレータの Turtlebot3 バーガーに、Depthカメラ のプラグインを導入します。
参考にしたのは、下記ページです。
http://gazebosim.org/tutorials?tut=ros_gzplugins の Depth Camera / Openni Kinect
http://gazebosim.org/tutorials/?tut=ros_depth_camera

開発環境
OS: Ubuntu Mate 18.04
ROS: melodic
開発ツール: Visual Studio Code

ファイルの設置場所、ファイル名称は、Gazebo turtlebot3 burger stereo camera plugin を参照してください。

Gazebo turtlebot3 burger stereo camera plugin

Gazebo Turtlebot3 Burger stereo camera plugin

Gazebo シュミレータの Turtlebot3 バーガーに、モノカメラ、マルチカメラ(ステレオカメラ)のプラグインを導入します。

参考にしたのは、下記ページです。
プラグインをマクロで記述するのは、下記ページが参考になります。
ROS講座67 車輪ロボットを作る7(カメラのシミュレーション)

開発環境
OS: Ubuntu Mate 18.04
ROS: melodic
開発ツール: Visual Studio Code

ubuntu mate 18.04 ros melodic で orb_slam_2_ros を試してみました。#2
です。

前回は、モノカメラで試してみて、あまり認識が良くないのかったので、
今回は、Gazebo/Turtlebot3 Burger にマルチカメラをつけて試してみました。

Burger にマルチカメラをつける作業は、改めて掲載します。
Gazebo turtlebot3 burger stereo camera plugin

Burger にマルチカメラをつける作業が終わったことを前提に書きます。

ubuntu mate 18.04 ros melodic で orb_slam_2_ros を試してみました。

インストールの参考にしたのは、下記ページです。
https://www.hackadda.com/post/2020/5/17/using-orb-slam-ros-to-map-the-world/
ただし、kinetic は、 melodic に書き換えてインストールします。

テストに関しては、gazebo turtlebot3 のシュミレーションで行っていますが、
説明の様には、全てがうまくは行きませんでした。

rviz の確認で、どうしても中央のスクリーンに、Pointcloud2 が表示されませんでした。

ESP-EYE Simple HTTPD Server with MIC / MIC stream server

ESP-EYE Simple HTTPD Server with MIC / MIC stream server

ESP-EYE オンボードマイクの音はどんなのか知りたくて、
ブラウザーから聴けるようにしてみました。

概要は、オンボードMIC 入力信号を I2S で取り込んで、WAV フォーマットに変換して、
本、Simple Server にアクセスした、ブラウザーへ、'audio/wav' httpデータとして送ります。

WAVデータ
16bit Mono 16k sampling

開発環境
Windows 10
esp-idf.py v4.0  Getting Started Guide for ESP-IDF v4.0
python3.7
MSYS2: make のみ利用
Git: Windows版とMSYS2 版を適宜に使用

あったら便利なツール
eclipse C/C++ 2020-06
(open java 64bit : OpenJDK11U-jdk_x64_windows_hotspot_11.0.8_10)
idf-eclipse-plugin : https://github.com/espressif/idf-eclipse-plugin

HTTP サーバーのベースは、esp-idf のサンプルプログラムの、
https://github.com/espressif/esp-idf/tree/master/examples/protocols/http_server/simple
です。

上記プログラムをベースに MIC 入力部分、WAVデータへの変換、を加えて行きます。

Browser Based ESP32-EYE Spectrum Analyzer の試し。

Browser Based ESP32-EYE Spectrum Analyzer と言うのが公開されていたので、
試してみました。

上記ページに記載されているように、ソース(.ino) を github からダウンロードして、Arduino の
ライブラリマネージャで、2つライブラリをダウンロードしたら、簡単にビルドできました。

開発環境
Winddows10
Arduino IDE
ボード: ESP-EYE

但し、実行させてみると、スペクトグラムの表示が、うんともすんとも動きません。

ESP-EYE の esp-idf で、tensorflow lite microcontrollers  examples/person_deetection を試してみました。

https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/micro/examples/person_detection

今回は、Build 、 Run の時のトラブルとその対処方を纏めてみました。
手順は、ESP-EYE tensorflow lite microcontrollers examples/micro_speech とほとんど同じです。

開発環境
Windows 10
esp-idf.py v4.0  Getting Started Guide for ESP-IDF v4.0
python3.7
MSYS2: make のみ利用
Git: Windows版とMSYS2 版を適宜に使用

あったら便利なツール
eclipse C/C++ 2020-06
(open java 64bit : OpenJDK11U-jdk_x64_windows_hotspot_11.0.8_10)
idf-eclipse-plugin : https://github.com/espressif/idf-eclipse-plugin

前提、
esp-idf v4.x 、 python3.7、 MSYS2 、Git はインストール済とします。

要領は、、ESP-EYE tensorflow lite microcontrollers examples/micro_speech とほとんど同じです。

1. tensorflow の clone も同じです。

ESP-EYE ESP-WHO detection_with_web(cat face detection)

ESP-EYE  ESP-WHO detection_with_web(cat face detection) を試してみました。

esp-who のサンプルプログラム
detection_with_web を試してみました。

開発環境
Windows 10
esp-idf.py v4.0  Getting Started Guide for ESP-IDF v4.0
python3.7
MSYS2: make のみ利用
Git: Windows版とMSYS2 版を適宜に使用

あったら便利なツール
eclipse C/C++ 2020-06
(open java 64bit : OpenJDK11U-jdk_x64_windows_hotspot_11.0.8_10)
idf-eclipse-plugin : https://github.com/espressif/idf-eclipse-plugin

前提、
esp-idf v4.x 、 python3.7、 MSYS2 、Git はインストール済とします。

要領は、esp-who ページの流れに従って行います。

ESP-EYE の esp-idf で、tensorflow lite microcontrollers  examples/micro_speech を試してみました。

https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/micro/examples/micro_speech

今回は、Build 、 Run の時のトラブルとその対処方を纏めてみました。

開発環境
Windows 10
esp-idf.py v4.0  Getting Started Guide for ESP-IDF v4.0
python3.7
MSYS2: make のみ利用
Git: Windows版とMSYS2 版を適宜に使用

あったら便利なツール
eclipse C/C++ 2020-06
(open java 64bit : OpenJDK11U-jdk_x64_windows_hotspot_11.0.8_10)
idf-eclipse-plugin : https://github.com/espressif/idf-eclipse-plugin

前提、
esp-idf v4.x 、 python3.7、 MSYS2 、Git はインストール済とします。

要領は、上記ページの Deploy to ESP32 の流れに従って行います。

1. tensorflow の clone
clone 先は、 E:\local\tensorflow とします。

MSYS2 ターミナルで、
$ cd /e/local
$ git clone https://github.com/tensorflow/tensorflow.git
$ cd tensorflow

Coral Edge TPU USB のサンプルの Object Detection が公開されていたので、
試してみました。の#3 です。

https://github.com/google-coral/examples-camera

テスト環境
Raspberry Pi 3B+
Coral Edge TPU USB
Python3.7
Tensorflow 1.15.0
Raspi カメラ

前回のプログラムでは、Raspi で実行させると、発声のタイミングで、Stream バッファに画像が貯まるので、声が出た後の画像が、
実際のカメラの前の映像と一致しない問題が出ました。

OpenCV でのStream バッファのクリア自体は用意されていなくて、代替手段として、cap.read() または、 cap.grab() を5回繰り返して、
受け捨てする方法が、Web に出ていたので試してみました。が、

結論としては、余り良くないので、 picamera stream to OpenCV が出来ないか、Webで検索していたら、
丁度良いサンプルが在ったので、それを取り入れてみました。

Accessing the Raspberry Pi Camera with OpenCV and Python

結局は、下記、が元ネタみたいです。
色々な使い方が、出来るようです。

https://picamera.readthedocs.io/en/release-1.13/recipes2.html

Coral Edge TPU USB のサンプルの Object Detection が公開されていたので、
試してみました。の#2 です。

https://github.com/google-coral/examples-camera

テスト環境
Windows10
Python3.6
Tensorflow 1.15.0 GPU
USB カメラ

coco学習データのまま、Windows10 の USBカメラで自分を映していたら、コーヒーカップにも反応するので、
少し応用を考えてみました。

コーヒーカップを検出で来たら、スピーカに "コップ" と出せないかとGoogle で、Pythonでの音の作成を探していたら、

PythonでWindows 10の音声合成を使用する

が出ていたので、早速取り入れて、 wav ファアイルを作成して試してみました。

Coral Edge TPU USB のサンプルの Object Detection が公開されていたので、
試してみました。

https://github.com/google-coral/examples-camera

テスト環境
Windows10
Python3.6
Tensorflow 1.15.0 GPU
USB カメラ

 試したのは、上記プログラムの、opencv です。
上記ページと、opencv の README.md に従って、必要な環境を揃えます。
注) サンプルは、Linux環境なので、適宜 Windows10環境に合わせて用意します。

今回は、Keras YOLO v3 学習済モデルを、Tensorflow Lite に変換して動かす所迄、試してみます。

Keras YOLO v3 は、下記になります。
https://github.com/qqwweee/keras-yolo3

開発環境
OS: Windwos10
GPU: GeForece GTX 1070 8GB
Anaconda
Python3.6
TensorFlow 1.15.0 GPU
Keras 2.3.1

注1) 今回は、TensorFlow 1.15.0 を使いました。
TensorFlow 1.14.0 では、Tensoflow Liteへの変換が上手く行きませんでした。
注2)  Keras は、オリジナルを使っています。
tensorflow.keras を敢えて使っていません。但し、Tensorflow Lite へ変換するには、
基本は、tensorflow.keras の様ですが?

Keras CNN Sound Classify #7

Keras CNN で 音の分類 #7

ディープラーニングで音声分類 のサンプルが出ていたので、試してみましたの #7です。
前回の #6 に続いて、Inception V3 学習済モデルを Tensorflow Lite に変換して、Coral Edge TPU USB で使えるように、
Quantization 化を試してみました。

開発環境
OS: Windwos10
GPU: GeForece GTX 1070 8GB
Anaconda
Python3.6
TensorFlow 1.15.0 GPU
Keras 2.3.1

注1) 今回は、TensorFlow 1.15.0 を使いました。
TensorFlow 1.14.0 では、Tensoflow Liteへの変換が上手く行きませんでした。
また、こちらの方が、Tensorflow Lite の実行速度が速いきがします。
注2)  Keras は、オリジナルを使っています。
tensorflow.python.keras を敢えて使っていません。

参考は、下記ページをさせて頂きました。
nb.oの日記:Edge TPUで独自モデルを作る(その2)
https://coral.ai/docs/edgetpu/models-intro/#quantization
   → Retrain a classification model using post-training quantization (for TensorFlow 1 and 2)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。

カテゴリ

ウェブページ

サイトナビ