4 Aralık 2014 Perşembe

Kinect Installation on Ubuntu 12.04 Platfrom

***Getting the OpenNI and PrimeSense drivers working on Ubuntu***
Here’s an overview of the process to get the OpenNI and PrimeSense drivers working with the Kinect and Ubuntu 12.04.

If you have not 51-android.rules in /etc/udev/rules.d/ you should copy.
Before copy operation please change OWNER="xxx". Replace your username with xxx.
$ sudo cp External/51-android.rules /etc/udev/rules.d/

Copy 55-primesense-usb.rules file to cp /etc/udev/rules.d/55-primesense-usb.rules ~/Desktop/
$ sudo cp External/55-primesense-usb.rules /etc/udev/rules.d/
$ udevadm control --reload-rules
$ udevadm trigger (if not works try "sudo shutdown -r 0")

-------------------------------------
Begin by installing some dependencies:
$ sudo apt-get install git-core cmake freeglut3-dev pkg-config build-essential libxmu-dev libxi-dev libusb-1.0-0-dev doxygen graphviz

Install Eclipse and JDK 1.6 or upper version

-------------------------------------
Installation should in the order:
    1. OpenNI
    2. SensorKinect driver
    3. NITE

-------------------------------------
Make a directory to store the build, then clone the OpenNI source from Github.
$ mkdir ~/kinect
$ cd ~/kinect
$ git clone https://github.com/OpenNI/OpenNI.git

Run the RedistMaker script in the Platform/Linux folder and install the output binaries
$ cd OpenNI/Platform/Linux/CreateRedist/
$ git checkout unstable
$ chmod +x RedistMaker
$ ./RedistMaker
$ cd ../Redist/OpenNI-Bin-Dev-Linux-x64-v1.5.4.0/

In ~/kinect/OpenNI/Data
 - SampleConfig.xml

To SampleConfig XML file:
  - add <License> attribute to <Licences> subterms:
     <License vendor="PrimeSense" key="0KOIk2JeIBYClPWVnMoRKn5cdY4="/>

  - add <MapOutputMode> attribute to <Configuration> subterms:
     <MapOutputMode xRes="640" yRes="480" FPS="30"/>

$ chmod +x install.sh
$ sudo ./install.sh

-------------------------------------
Next, clone the Avin2 SensorKinect source from Github.
$ cd ~/kinect/
$ git clone https://github.com/avin2/SensorKinect.git

Run the RedistMaker script in the Platform/Linux folder and install the output binaries.
$ cd SensorKinect/Platform/Linux/CreateRedist/
$ git checkout unstable
$ chmod +x RedistMaker
$ ./RedistMaker
You change x.x according to your Sensor-Bin version
$ cd ../Redist/Sensor-Bin-Linux-x64-v5.1.x.x/
$ chmod +x install.sh
$ sudo ./install.sh

Attention: If unstable branch gives compilation errors please try master branch again.

-------------------------------------
Then download the OpenNI Compliant Middleware NITE Binaries to ~/kinect
$ cd ~/kinect
$ wget http://www.mira-project.org/downloads/3rdparty/bin-linux/nite-bin-linux-x64-v1.5.2.21.tar.bz2

Extract the contents of the archive and switch to the Data directory contained within.
$ cd ~/kinect
$ tar -xvjpf nite-bin-linux-x64-v1.5.2.21.tar.bz2
$ cd NITE-Bin-Dev-Linux-x64-v1.5.2.21/Data

Now modify the license in the files: Sample-Scene.xml, Sample-Tracking.xml, and Sample-User.xml.
Edit four XML Configuration Files

In ~/kinect/NITE-Bin-Dev-Linux-x64-v1.5.2.21/Data:
 - Sample-Scene.xml
 - Sample-Training.xml
 - Sample-User.xml

To all XML files:
  - add <License> attribute to <Licences> subterms:
     <License vendor="PrimeSense" key="0KOIk2JeIBYClPWVnMoRKn5cdY4="/>

  - add <MapOutputMode> attribute to <Configuration> subterms:
     <MapOutputMode xRes="640" yRes="480" FPS="30"/>

You must edit Nite.ini in Hands_1_5_2/Data
(or whatever the latest version of Hands_XXX/ is called) to allow NITE
to track multiple hands. Uncommented both property lines, so the file contains:

[HandTrackerManager]
AllowMultipleHands=1
TrackAdditionalHands=1

Change back to the NITE directory and run the install script.
$ cd ..
$ sudo ./install.sh

-------------------------------------
That’s it!. You can plug your kinect to computer. You should see following line after "lsusb" command;
$ lsusb
>> Bus 002 Device 009: ID 045e:02ad Microsoft Corp. Xbox NUI Audio
>> Bus 002 Device 008: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor
>> Bus 002 Device 010: ID 045e:02ae Microsoft Corp. Xbox NUI Camera

If you followed steps through to here you should be able to run the sample applications.
The OpenNI samples are here:
$ cd ~/kinect/OpenNI/Platform/Linux/Bin/x64-Release
$ ./Sample-NiSimpleViewer
$ ./Sample-NiHandTracker
and the PrimeSense samples are here:
$ cd ~/kinect/NITE-Bin-Dev-Linux-x64-v1.5.2.21/Samples/Bin/x64-Release
$ ./Sample-Boxes

-------------------------------------
Note: if you get the error:
InitFromXml failed: Failed to set USB interface!
the solution is to remove the gspca_linect kernel module:
$ sudo rmmod gspca_kinect

OpenNi, PrimeSense sensor installed, but Microsoft Kinect® does not work under Linux

Error message: "One or more of the following nodes could not be enumerated: Device: PrimeSense/SensorV2/5.0.0.43: The device is not connected!". Some older drivers result in a slightly different message like "Can't create any node of the requested type!" or "Open failed: Failed to set USB interface! Press any key to continue . . ."

Use lsusb or USB Viewer (yum install usbview) to identify if the device is recognized by the USB hub. There you will find three entries. Xbox NUI Audio, Xbox NUI Motor, Xbox NUI Camera. This means your installation of OpenNI is fine. In USB Viewer you will see the camera entry in black, and not as intended in red.

In my opinion the problem is caused by two reasons. First the presence of the Linux kernel module gspca_kinect and secondly in not automatically mounting the usb device as a filesystem.

Type lsmod to list all your running modules. You'll find the module gspca_kinect in /lib/modules/*.i686/kernel/drivers/media/video/gspca/gspca_kinect.ko. To disable the module use: rmmod gspca_kinect. If that does not help use force: rmmod -f gspca_kinect. Then unplug and plug back in your kinect! Note after reboot the module is loaded again. Use a blacklist to disable loading of the module in the first place. Add the entry blacklist gspca_kinect to the file /etc/modprobe.de/blacklist.conf. Renaming the module to *.bak does not help. After reboot it will be built again.

Secondly mount the usb device as a filesystem. Use the mount command: mount -t usbdevfs none /proc/bus/usb. Note that the none keyword is arbitrary, you can use anything like usbdevfs or kinect. If you do not want to have to mount the filesystem each time you reboot the system, you can add the entry none /proc/bus/usb usbdevfs defaults 0 0 to the file /etc/fstab after the /proc. This has the same effect as the mount command.

-------------------------------------

***Getting the OpenNI and PrimeSense drivers working on Android Pandaboard***
Please look at http://www.hirotakaster.com/ to install Kinect environment on android pandaboard.

Ümit Uzun
14/06/2013

24 Aralık 2013 Salı

Android telefonlarda çoklu kullanıcı (multi user) desteği nasıl etkinleştirilir?

Uzun süre ara verdikten sonra (yaklaşık olarak 2 yıl kadar :D) tekrardan yazma dürdüsü ağır bastı ve konu olarak da "Andoid işletim sistemine 4.3 ten sonra eklenen ve sadece tablet bilgisayarlar için geçerli olan çoklu kullanıcı desteğini telefonlar için nasıl etkinleştirilebilir?" seçtim.

Çünkü internette çok açık bilgiler bulamadım bu konu ile ilgili ben de bu konuya açıklık getirmek istedim:)

Kendi telefonunuzun çoklu kullanıcı desteğini açmak için öncelikle şunun farkında olmanız gerekmektedir. Bu basit bir son kullanıcı ayarı değildir. Ayarlara girip otomatik olarak tek bir seçimle açılamaz. Kendi telefonunuza has bir tam derleme işlemi yaparak bu seçeneği açabilirsiniz ki bu işlemi de gerçekleştirebilmek için android platform geliştirme konusunda deneyime sahip olmalısınız.

Ben elimde bulunan LG Nexus4 (namı diğer mako :D) cihaz üzerinde bu işlemi gerçekleştirdim.
Sizlerde elinizde bulunan (özellikle google tarafından desteklenen nexus türevi cihazlar olursa işiniz çok kolay olur) telefonunuza has derleme yapmadan önce çekmiş olduğunuz AOSP (ben 4.4 üzerinde yaptım tüm işlemleri) deki kodlarda aşağıda değişim yamaları (git diff) olarak verdiğim güncellemeleri kendi AOSP niz üzerinde yapıp derlerseniz çoklu kullanıcı desteği açık bir telefona sahip olursunuz :D

AOSP/device/lge/mako/overlay/frameworks/base/core/res/res/values/config.xml dosyasında aşağıdaki satırı ekleyiniz.
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -264,4 +264,6 @@

     <!-- MMS user agent prolfile url -->
     <string name="config_mms_user_agent_profile_url" translatable="false">http://gsm.lge.com/html/gsm/20130914.xml</string>
+
+    <integer name="config_multiuserMaximumUsers">8</integer>
 </resources>
AOSP/frameworks/base/packages/Keyguard/res/layout-port/keyguard_host_view.xml dosyasında bulunan ikinci </FrameLayout> satırından hemen önceki satıra aşağıdaki satırı ekleyiniz.
--- a/packages/Keyguard/res/layout-port/keyguard_host_view.xml
+++ b/packages/Keyguard/res/layout-port/keyguard_host_view.xml
@@ -53,6 +53,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_gravity="center"/>
+            <include layout="@layout/keyguard_multi_user_selector"/>
         </FrameLayout>
AOSP/frameworks/base/packages/Keyguard/res/layout/keyguard_multi_user_selector.xml dosyasında bulunan ağıdaki satırı bir altındaki satır ile değiştirin.
--- a/packages/Keyguard/res/layout/keyguard_multi_user_selector.xml
+++ b/packages/Keyguard/res/layout/keyguard_multi_user_selector.xml
@@ -32,7 +32,7 @@
         android:id="@+id/keyguard_users_grid"
         android:orientation="horizontal"
         android:layout_width="wrap_content"
-        android:layout_marginBottom="@dimen/keyguard_muliuser_selector_margin"
+       android:layout_marginBottom="350.0dip"
         android:layout_height="@dimen/keyguard_avatar_size"
         android:layout_gravity="center|bottom" />
Yukarıda değişim noktaları (differenciate points) olarak verilen değişimleri yaptıktan sonra alacağınız derlenmiş binarileri telefonunuza yüklediğiniz de çoklu kullanıcı özelliklerini telefonunuzdan aynı tabletlerde olduğu gibi kolayca kullanabilirsiniz.

Bir sonraki yazımda görüşmek üzere :D (Umarım 2015'e kadar beklemem :D)

20 Aralık 2011 Salı

GRUB error: unknown filesystem, grub rescue

Eğer sisteminizde Windows 7 ve Ubuntu 11.10 sürümü kuruluyken, yanlışlıkla Windows 7'nin Recovery moduna girerseniz bilgisayarınızı yeniden başlattığınızda karşınıza:
"unknown filesystem, grub rescue>"
şeklinde bir siyah ekran gelecektir. İşte bu ekranı gördüğünüzde yapacağınız işlem çok basit;
  • Öncelikle bilindiği üzere yaşanan bu olayı tek nedeni Recovery moda girildiği anda Windows'un sistem MBR'sini değiştirmedir. Doğal olarak aslında bizim MBR'yi tekrar eski haline getirmemiz gerekmektedir.
  • Eğer Linux (Ubuntu 11.10) işletim sisteminiz hangi disk bölümüne kurduğunuzu bilmeniz gerekmektedir. Eğer daha önceden biliyorsanız şanslısınız demektir :) Bilmiyorsanız ise; siyah ekranda beliren "grub rescue>" komut satırına "ls" yazıp listelenen disk bölümlerine bakarak hangi bölüme Linux'unuzu kurduğunuzu tahmin etmeye çalışın.
  • Örneğin benim tahminin listelenen disk bölümlerimden "msdos6" oldu.
  • grub rescue> set prefix=(hd0,msdos6)/boot/grub
  • grub rescue> set root=hd0,msdos6
  • grub rescue> insmod normal
  • grub rescue> normal
  • Bu işlemlerden sonra eğer grub ekranını göremezseniz demek ki tahminde bulunduğunuz disk bölümünde bir yanlışlık var. Yeni bir seçim yapıp yukarıdaki işlemleri tekrarlayınız.
  • Eğer grub ekranı görürseniz, listeden Ubuntuyu seçip işletim sisteminizi yükleyin.
  • Ubuntu açıldıktan sonra konsol ekranı açıp "sudo grub-install /dev/XXX" komutunu çalıştırın. Buradaki XXX Ubuntu işletim sisteminizin yüklü olduğu bölümün genel tanımıdır. Örneğin benim Ubuntu işletim sistemim sda6 disk bölümüne kurulu olduğu için ben XXX yerine sda yazdım. Bunun nedeni grub herhangi bir diskin bir bölümüne değil de o bölümün MBR yani diskin ilk sektörünün başlangıç kısmına yazılır. Bu nedenle XXX yerine sda6 yerine sadece sda demek gerekmektedir. Aksi durumda ise konsol geçersiz işlem mesajını vererek sonlanacaktır.
  • Bu işlemden sonra herhangi bir hata mesajı almadan işleminiz tamamlanırsa grub'ınız başarıyla MBR'ye kurulmuş demektir. Eğer verdiğiniz disk tanımı yani sda doğruysa bilgisayarınızı yeniden başlattığınızda ekranda grub menünüzü göreceksiniz. Aksi durumda ise yukarıda sıraladığımız adımları tekrarlayarak sonuca ulaşmaya çalışmanız gerekecektir.

23 Aralık 2009 Çarşamba

OSGART Project




OSGART
OpenSceneGraph Augmented Reality Toolkit

DOWNLOAD

8 Eylül 2009 Salı

19 Temmuz 2009 Pazar

Real-Time Rendering


Real-Time Rendering
Third Edition

DOWNLOAD

18 Temmuz 2009 Cumartesi

3 Boyulu Matematik

3 Boyutlu Matematiği uygulamalı olarak
öğrenmek istiyorsanız eşi bulunmaz bir kaynak.

İZLE VE ÖĞREN