ラベル linux の投稿を表示しています。 すべての投稿を表示
ラベル linux の投稿を表示しています。 すべての投稿を表示

2015年8月28日金曜日

Drone Space Defense Game Development(English)

Hello! Recently, the Drone Space Defense development team have been separated after the Sillicon Valley Demonstration, so now also I'm going to taking part in game development!
Drone Space Defense Monitor Version 2D Prototype
Realtime 3D Mapping from Drone Camera in Facebook HeadQuarters


A.R. Drone PS3 Teleoperation from Computer

Before, I made the Drone Space Defense Main prototype(game) ,realtime 3d mapping system using ROS, image tracking drones with OpenCV, websocket server coding with node.js,  drone ps3 teleoperation server setup, drone image streaming mjpeg server setup, drone simulator setup for the Drone Space Defense development.

  
Currently I'm developing game in Unity Game Engine. I start working on game development, and this is my 12th day of game development.
Unity Ball Game Tutorial

Unity Survival Game Tutorial
Built Unity Survival Game in Unity Web Player

1-5th day:  I did the 2 Video Unity Tutorial, and the Web Unity tutorial using C#.

               Also, I studied multithread programming and asynchronous programming in C#.
 
6th day : I started working on Oculus Rift. Unfortunately, I'm using Windows 10, and Oculus Rift didn't work on windows10 because of GPU version, so I had to downgrade the Operating System
.
Cool image Processing assets of Unity. Unfortunately the asset dll crashes with oculus dll so I couldn't do Oculus integration.
Image Processing(Canny Edge) with OpenCvSharp. It can use C++/C like programming style.
Working on WebCamTexture and Oculus Rift.

Prototype/Mockup of Drone Space Defense Oculus Rift Version.
7th day : I started working on VR game development. I searched some useful asset in Unity, gathering information in Unity, and finding some useful image processing tool in C# for 12 hours.
And in the last 12 hours, I made the prototype of the Drone Space Defense Oculus Rift Version. I had little time to sleep this day, because tomorrow night I am going to do a booth in Oculus Rift Festival in Japan.
Booth of Drone Space Defense at Unreal Engine Japan Oculus Festival 2015
8th day : In noon, I went to the G-tune& AMD Japan OcuFes 2015 Summer and enjoyed Virtural Reality Applications. In night, I did a booth in the Unreal Engine Japan Oculus Festival 2015 with my new prototype(oculus supported) and the 2d monitor version prototype of Drone Space Defense. 2 prototypes.

Leap Motion arrived!

Gaming Set(actually, drone is added to the full game set)
I think this is great VR application using Leap Motion! VR Planetarium
9th day : Leap Motion arrived. I did some setups of leap motion and playing with leap motion. I feel great potential of Drone Space Defense using leap motion.
UnityChan, Japanese Otaku City and Oculus Rift




10-12th day : I had a report in the Unreal Engine booth that my Oculus Rift Prototype will get motion sick . I searched what causes the motion sick of Oculus Rift, and it was the delay. Looks like Oculus Rift prefers more than 75 fps.Solving my prototype motion sickness was not so hard, because I have few objects in that protype. But I want to get the skill to solve this problem generally. This time I used Unity-chan animation character and ZENRIN japanese otaku city assets which both have enormous amount of polygon and meshes, texture. I checked the Unity reference to do optimization.
1. I did all checks in Unity Optimization Build Options. I got around 20 FPS.
2. I used bake lights, baked skyboxes, forward light rendering, 0 light pixeling. The FPS seems to be unchanged.
Working on Occulusion Culling of Japanese Otaku City

3. I tried to do Occulusion Culling of Japanese Otaku city, but it crushed of RAM error because it was too heavy to process. I stopped using Japanese Otaku city and used some other object groups.
4. I did Occulusion Culling, but the FPS didn't seem to be changed.
5. I set the target frame rate of Unity to 75 FPS. But this didn't work too.
Profiling my game performance.
6. I started using Unity Profiler and Unity Frame debugger. I found that more than 1000 drawcall are used. I searched about drawcalls and look more carefully of the Unity Profiler. Shadow was the biggest overhead.
Cutting 600 drawcalls by using baked lightmaps.
7. I found that lightmap setting was auto and I changed to manual mode and bake it. I could cut 600 drawcalls.
Mesh skin baking unityChan, pocket query chan, and terrain. Their overall drawcall is below 10.
8. Next time the character object skin rendering was the biggest drawcall(about 400) and overhead. I used mesh baker unity asset to combine meshes and textures and made their overall draw call below 10.
Great FPS.
9. This time CPU FPS was way bigger than 75 FPS and GPU is over than 50 FPS. The display GPU synchronization  is the overhead of the profiler so this overhead doesn't happen in real problem.  Now the biggest overhead is opaque rendering(10ms) and the main problem is oculus screen blurring getting motion sick. This problem can be solved using tracking camera of oculus.
Why baked Japanese Otaku city is taking drawcalls?
10. I solved this scene optimization and changed the terrain asset to Gigantic Mesh Japanese Otaku City and did a baking. This time I succeed in Occulusion Culling. The FPS was below 30. I searched by frame debugging and unity wasn't doing static batching because the number of vertices was too big. It seems this problem can be solved by larger core GPU(my GPU is NVIDIA 940M for laptop and the CUDA Core number is 384) by larger batch processing or downsampling polygons. And about the down sampling, I have to use external 3d modeling software. So I started learning 3d graphics now.
unity working on nexus 5 lolipop.
Also I started working on getting android sensor information with unity.

Check out for my latest updates in Drone Space Defense FB Page !

2014年10月16日木曜日

turtlebot2をros hydro上でethernet接続のHOKUYO-30LX-EWを使ってrvizに表示する方法

 
 turtlebot2でHOKUYO-30LX-EWをros hydro上でrvizで利用できるようにしたので方法を紹介しておきます。
1. terminalに
  %roscore
    %roscd turtlebot_bringup/launch
2. %sudo chmod 777 minimal.launch

    %emacs -nw minimal.launch
<node name="laser_driver" pkg="urg_node" type="urg_node">
   <param name="frame_id" value="base_laser_link" />
       <rosparam>
      publish_intensity: false
      angle_min: -2.2689
      angle_max: 2.2689
      cluster: 1
      skip: 0
      ip_address: 192.168.0.10
      ip_port: 10940
      serial_port: /dev/ttyACM0
      frame_id: laser
      calibrate_time: true
      time_offset: 0.0
      publish_multiecho: true
    </rosparam>  
 </node>
を</launch>より上に入力

3. %sudo chmod 777 3dsensor.launch
    %emacs -nw 3dsensor.launch
    <arg name="scan_topic" default="scan" />
     を
    <arg name="scan_topic" default="kinect_scan" />
 に置き換え
4. terminalで
    %roslaunch turtlebot_bringup minimal.launch
     %rosrun rviz rviz
    rviz上で
      Fixed Frame : base_laser_link
    を選択

2014年9月21日日曜日

つくばチャレンジ用ロボット Making the robot for Tsukuba Autonomous Robot Challenge

シャーシ設計 Design of the chassis
Saintです。
つくばチャレンジ用のロボットのシャーシ設計加工、GPSの性能試験を行いました。
 ROSでhokuyoのlidarをrvizで見るコンフィギュレーションをubuntu上で行なっていて苦戦中です。

For the Tsukuba Autonomous Wheelchair challenge, I did the benchmark test of the GPS, designing  the chassis of the robot, and cut the chassis with CNC.
I'm trying to see the data of the Hokuyo LIDAR through rviz using ROS in ubuntu, but it's not working well. If you have any tips about it, please tell me.

2014年5月8日木曜日

ロボカップメジャージャパンオープン2014北九州


チーム名 夢考房ジュニア
ゼッケン



SIGVerse開発者の稲邑先生(左)とSIGVerse(中央のスクリーン)とロボカップジュニアの友達(右)
ファイナル、発表とデモ


ニュース記事
5/3 ~ 5/5 に開かれたロボカップメジャーに初めて出場しました。


 @ホームシュミレーションという競技に出場しました。@ホームリーグは生活支援ロボットの競技で、生活支援ロボットを製作して色々なタスクに挑戦していきます。シュミレーションはその競技をバーチャル世界(サーバー上)で行う競技です。ロボット(ハードウエア)は使用せず、かわりに3Dグラフィックスのロボットを使用します。SIGVerseというソフトで動作するソフトウエアメインの競技です。

 調整日。自分のPCをサーバーとSSH通信で接続する必要があるのですが、SSH通信は初めてのためやり方がよくわかりませんでした。その日の8時までサーバー上にプログラムを置いておくように言われていましたが、サーバーに接続することすらできず、このままでは競技失格になると思い、なんとかしようと悪戦苦闘していたところ、休憩時にふとメールを見ると、メール上で1時間前に接続方法を通知してあるではありませんか!ロボカップメジャーの運営では同じパドックですぐ近くにいても口頭連絡ではなく、ChatWorksで連絡という方法を取るのだと初めて知りました。この後も通信に苦戦を強いられました。たまたまメールを見たので良かったです。RSA暗号については2年前の@homeキャンプでしたことがあったので上手く行きました。

 2日目。朝2時間かけ、やっと接続することができ、遅ればせながらコントローラファイルを提出することができ、安心しました。午後にシュミレーションリーグ最初の競技であるfollowmeが始まりました。ロボットは人について行き、部屋の中からエレベータにのり、外、と障害物を回避して迷路のように歩き回ります。事前のサンプルでは普通に歩いていたはずの人が当日の競技では手を水平に広げたまま歩く人となっていたため、ロボットが腕に接触し、マイナスになってしまいました。しかし、競技の20回の試行を高速に完走することができ、147.5 点という高得点で思いがけず2位になりました!この競技のプログラムは大会の10日前に完成していたため僕の中では一番自信がありました。九州ブロックのジュニアのロボカッパーが見に来てくれた時はこの競技だったのでラッキーでした。

 3日目のcleanup, EGPSRでは一点も得点できませんでした。cleanupのプログラムは大会前に用意していたのですが、予期しなかった場所にゴミが置かれたため、ゴミに到達することができませんでした。EGPSRは運営が提供しているサンプルコードがバイナリだけになっており、サンプルコードを参考にしたソースを作ることが出来ませんでした。文字列処理プログラムを書いてみたもの上手く動作せず、cleanupのプログラムを改造したもので臨みました。

 4日目の最終競技ファイナルデモでは、いつものように度胸でプレゼンに臨みました。自分のロボットの3DモデルをSIGVerseに登場させる方法について発表しました。他のチームの研究者達の発表を聞いたのですが、技術レベルの高さに圧巻でした!僕もさらに@ホームの世界に興味が湧きました。そのような優れた発表の中で僕も80点という高得点を頂くことができ、嬉しかったでした!

 ロボカップジュニアでは、周りから勝ち負けで判断される気がしていました。勝ちにこだわるあまり、皆、あまり新しいことにチャレンジせず、例えば昨年の優勝チームのロボットを再現しようとする等、一部の競技者を除いては保守的になってしまう傾向があるように感じられました。
ロボカップ@ホームでは、勝ち負けにこだわらず、競技者が「常に新しい、難しいこと」に挑戦しているのが感じられます。高校の部活でジュニアに参加していた僕にとっては革新的で新鮮な世界でした。しかも世界で活躍している研究者達の中に高校生の僕も差別なく競技に参加させてもらえました。

 結果は・・・・・・、

三位入賞

 ロボカップメジャーではチャレンジができます。
自分の居場所はここだと感動しました。