2013년 9월 17일 화요일

web browser in c++

솔루션을 찾은것 같다. 

open source인 chromium을 이용하는 것이다. 


berkelium.org에서 제공된 win32용 berkelium.dll을 이용하고 
ofxBerkelium을 사용해서 

native c++에서 browser을 보여주고 oF의 기능을 사용 할 수 있는 example을 만들었다

이로써 궁긍적인 c++과 browser와  flash의 연동이 가능하고 통신 또한 쉽게 할 수 있는 길이 열렸다고 할 수 있다. 

더구체적인 내용은 다음 기회에..

2013년 9월 16일 월요일

Web browser & flash Viewer in c++



http://berkelium.org/ 
http://vimeo.com/18891189


정리하면 다음과 같다.

Chromium의 리소스를 직접 가져와 Browser의 기능 쓸수 있게 만든 Berkelium은
Chromium의 라이브러리를 컴파일 해야 한다.

또한 Berkelium을 oF의 addon으로 만든 예제가 있지만 Chromium의 API를 필요로 하는데
컴파일이 안되 실행 할 수가 없다.

그래서

윈도우에서 Chromium을 컴파일 할 수 있는 방법을 찾아 보자.

2013년 9월 8일 일요일

OROCOS 윈도우 ^^

드뎌 했다~~ 긴 시간의 싸움 이였다.
문제는 일관된 문서가 없다는 것이다.
RTT는 git에서, OCL은 toolchain 2.6.0에서 호환된다. RTT의 버전은 물론 2.6.0이여야 한다.

ocl Cmake시 같은 버전이 아니면 에러를 낸다.
누가 알았겠는가.

2.3.0, 2.3.2, 2.6.0에서 RTT, OCL 다 해봤지만 안된 이유가 이것이다.
또한 boost 1.40.0, 1.44.0, 1.52.0 1.38.0 과도 case를 내가며 해봤지만 모두 에러만 있을뿐이 였다.

그럼 오늘 하루 작업한 내용을 적겠다.

위에서 말한 바 대로 rtt는 git에서 ocl은 toolchain 2.6.0에서 다운 받는다.

rtt는 boost 1.44.0으로 컴파일 하고 몇개의 boost에러가 있지만 별거 아니다.

ocl은 rtt의 install 위치를 알아야 하고 log4cpp와 readline이 있어야 빌드(CMake)된다.

물론 boost위치도 알아야 한다.

그럼 컴파일 한다. 당연히 컴파일 에러가 난다.
하나하나 잡아가자 ^^ 뭐 이골이 났지만.

처음에는 기억을 되집어 가보자면......
RTT의 COmponentLoad에 관한 것이다. RTT_API로 dll에 넣어 주고
몇개의 링크 에러는 RTT의 plugin이 없어서 이다. ==> windows8에서는 이런 문제가 없는데
7에서는 파일 링크가 안되었다.

대부분의 문제가 이런 링크에러 문제들이다.
log4cpp에서도 export해줘야 한다. 커멘트로 내부에 쓰이는 클래스 인데 왜 구~~~~~~~~ 지 OCL에서 쓰셨는지는 모르겠다.

OCL project에 ocl dll 이 있다. 99%가 header로 구혔되었는데 Category, CategoryStream? 요 두놈이 log4cpp를 랩핑했는데 vtable? 이런 에러가 난다. 링크에러인데 OCL_EXPORT로 명시적으로 하니 된다. 왜그런지는 pass

LoggingEvent.cpp?  이 파일도 빠져 있어 CMakeLists.txt에 추가 했다.

그렇게 큰 에러는 없는 것 같은데 ... runtime에서 테스트해봐야 맘이 놓이 겠다.

위의 그림 어후~~ 굿~~ ^^ 잘자  새벽 1시 30분 오늘은 월요일 회사가서 또 쾡하니 있겠군 ㅎㅎㅎㅎㅎ



2013년 9월 7일 토요일

building RTT & OCL on windows 7

clone git://gitorious.org/orocos-toolchain/rtt.git

rtt를 컴파일 하기에 많은 시도를 하였지만 윈도우에서는 아직 정립 되지 않아 어려움을 격고 있다.

하지만 OCL보다 RTT는 나름 컴파일과 정리가 된것 같다 이번에 RTT를 윈도우에서 실행 하기로 했다. 


결론부터 말하자면 

RTT는 되는데 OCL은 안된다. 

RTT는 최근 까지 커밋을 한 흔적이 있고 OCL은 아에 Toolchain에 종속되어 같이 가는것 같다. 

RTT를 위의 git에서 다운 받아 cmake로 컴파일 하니 boost 에러가 났다. 

boost.org에서 1.44 바이너라와 헤더를 다운받아 path를 설정 하니 에러 없이 생성되었다. 

컴파일하니

boost::filesystem2::create.... 에러는 주석으로 

함수 에러는 std::tr1():: 추가로 해결 했다. 

RUN_TEST를 실행하니 60%정도의 성공률을 보이고 install하여 끝냈다. 


OCL은 LOG4CPP의 문제로 잠정 중단 되었다. 


나름 생각 해 보니 

toolchain의 rtt와 rtt.git이 서로 같다는 생각이 든다. 

1.x 처럼 RTT와 OCL를 컴파일 하기에는 이젠 아닌것 간ㅌ다. 

2013년 9월 2일 월요일

Working Thespian


Thespian #4 접근

ssh: 192.168.32.2:2022
root/1s4ns__4

Thespian #4 접근

web: 192.168.32.2:2080
admin/ABC_r00ty_123

Thespian #4 접근

IOServer : 192.168.32.2:7766
flash/foobar

고정 id 또는 dhcp로도 접근 가능
ifconfig로 해보면 앎.

2013년 8월 1일 목요일

method to push ssh on bitbucket.org

https://confluence.atlassian.com/pages/viewpage.action?pageId=218274615

 간단히 설명하면

puttygen를 이용해서 키를 생성 한후 pageant에서 key를 추가하고
bitbucket.org의 마스터 계정에서 ssh key를 추가 한다.

puttygen에서는 ssh-2로 그리고  private key로 저장한다.


2013년 7월 31일 수요일

build orocos-toolchain-2.3.2 on winodws 7

bjam을 이용해서 boost 1.4.0을 빌드 한다.

bjam --build-type=complete release debug install <-- nbsp="" p="">
orocos-toolchain-2.3.2를 다운 받아 rtt에서 cmake를 실행 한다.


cd orocos-toolchain-2.3.2/rtt
mkdir build
cd budil
cmake -DBoost_DEBUG=ON ../ <-- boost="" nbsp="" p="">or
cmake -DBoost_DEBUG=ON -DCMAKE_INSTALL_PREFIX=../install ../

보여진 위치 처럼 해당 위치를 잡고 cmake를 실행 한다.
fond boost 1.4.0이라고 표시되면 성공 이다.

만약 안되면...


FindBoost.cmake를 참조 하고
원하는 boost가 없기 때문에 not found라 나온다.

                                                                     
ocl은 못했음.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         

2013년 7월 5일 금요일

wxStreamToTextRedirector class ?

This class can be used to (temporarily) redirect all output sent to a C++ ostream object to a wxTextCtrl instead.

2013년 7월 4일 목요일

OpenSubdiv <-- another cmake trick

https://github.com/PixarAnimationStudios/OpenSubdiv

build orocos-rtt on windows 7

Download orocos-toolchain-2.6.0
Download boost 1.52.0

vi tools/build/v2/user-config.jam

remove '#' comment
using msvc : 9.0 ; --> it is Visual Studio 2009

more information site is http://www.boost.org/boost-build2/doc/html/bbv2/reference/tools.html

cd boost_1_52_0
bootstrap.bat

Building Boost.Build engine

created b2.exe and bjam.exe

b2.exe --help
b2.exe --build-dir=c:\boost --build-type=complete --prefix=c:\boost\152

.. take a long time ...

cd c:/boost/152/include/boost_1_52_0
mv boost ../
cd ../
rm -rf boost_1_52_0

cd orocos-toolchain-2.6.0/rtt
mkdir build
cd build

cmake --help
cmake -DBoost_USE_STATIC_LIBS=ON -DBoost_DEBUG=TRUE -D "BOOST_ROOT:string=c:/boost" -G "visual Studio 9 2008" ..

Refer FindBoost.cmake file

2013년 6월 30일 일요일

mount.sh

at embedded
#!/bin/bash
mount -t nfs -o nolock,tcp 192.168.0.26:/home/bcc nfsroot

at host
vi /etc/exports
/home/bcc *(rw,no_root_squash,no_all_squash,async,no_subtree_check)

2013년 6월 21일 금요일

2013년 1월 19일 토요일

How to mount a samba shared folder

http://askubuntu.com/questions/137011/how-to-mount-a-samba-shared-folder-ubuntu-x-ubuntu


VNC setup on Raspberry Pi


http://mitchtech.net/vnc-setup-on-raspberry-pi-from-ubuntu/


This tutorial will demonstrate how to setup and connect to a Raspberry Pi over VNC from Ubuntu. This process is easier if you have a display connected to the Raspberry Pi, but will also show the steps to connect with only Ethernet and power connected. It assumes you have Debian for Raspberry Pi installed on an SD card. If not, see RPi Easy SD card setup
Getting the IP address of the Raspberry Pi

The first step is to locate the Raspberry Pi on your network. If you have access to a display for your Raspberry Pi, this task is simple, in a terminal simply type:

    ifconfig

All the network interface configurations will be displayed, including the IP address. However, if you don’t have a display for your Raspberry Pi, this isn’t an option. For this task, we can use the Linux nmap (Network Mapper) utility.

    sudo apt-get install nmap

Then run a scan on your local network. Be change to the specifics of your own network.

    nmap -sV -p 22 192.168.0.1-255

The results will display every machine that could be identified on port 22. The Raspberry Pi (running Debian) looks something like this:

    Nmap scan report for 192.168.0.112
    Host is up (0.033s latency).
    PORT STATE SERVICE VERSION
    22/tcp open ssh OpenSSH 5.5p1 Debian 6+squeeze2 (protocol 2.0)
    Service Info: OS: Linux

Connecting over SSH

So we know that the Raspberry Pi has IP address: 192.168.0.112. Now we can ssh to it:

    ssh pi@192.168.0.112

And you should receive a message like this:

    The authenticity of host ’192.168.0.112 (192.168.0.112)’ can’t be established.
    RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
    Are you sure you want to continue connecting (yes/no)?

Type yes at the prompt, then enter the password for the user pi, ‘raspberry’ by default. You should get a prompt that looks like this:

    pi@raspberrypi:~$

Configuring VNC

Now that we have logged in to the Raspberry Pi, we can setup VNC for remote access. First we need to install the VNC server:

    sudo apt-get install tightvncserver

Next, start the VNC server on the Raspberry Pi. Adjust the geometry paramater to your desired display size.

    vncserver :1 -geometry 1024x600 -depth 16 -pixelformat rgb565

You will be prompted to create a password for VNC login. Once you do, you should see a line looking something like this:

    New ‘X’ desktop is raspberrypi:1

Now, we can finally connect to the Pi with VNC. Back on the Ubuntu machine, install the VNC viewer client:

    sudo apt-get install xtightvncviewer

Then connect to the running VNC server:

    vncviewer 192.168.0.112:5901

To stop the VNC viewer, just close the application. To stop the VNC server, issue the following command (on the Raspberry Pi):

    vncserver -kill :1

2013년 1월 18일 금요일

install OpenCV on ARM

http://josanmoreno.tumblr.com/post/32868245422/raspberrypi-webcam-opencv-facedetect

1. Following steps from MitchTech install necessary libs
sudo apt-get update
sudo apt-get -y install build-essential cmake cmake-qt-gui pkg-config libpng12-0 libpng12-dev libpng++-dev libpng3 libpnglite-dev zlib1g-dbg zlib1g zlib1g-dev pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools
sudo apt-get -y install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-progs ffmpeg libavcodec-dev libavcodec53 libavformat53 libavformat-dev libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev libxine1-ffmpeg libxine-dev libxine1-bin libunicap2 libunicap2-dev libdc1394-22-dev libdc1394-22 libdc1394-utils swig libv4l-0 libv4l-dev python-numpy libpython2.6 python-dev python2.6-dev libgtk2.0-dev pkg-config
2. Download and compile OpenCV
wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.3.1/OpenCV-2.3.1a.tar.bz2
tar -xvjpf OpenCV-2.3.1a.tar.bz2
cd OpenCV-2.3.1/
mkdir build
cd build
 cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON ..
cmake-gui ..
make
3. Exec facedetect app
cd ~/opencv/OpenCV-2.3.1/build/bin
facedetect


tip
sudo apt-get install libvl4l-dev
sudo apt-get install libgtk+

2013년 1월 12일 토요일

mrpt 0.9.6 arm porting 작업 내용

ubuntu 10.04 default path로 적용된 모든 library path를 제거

atomic 수정

opencv, gl, ffmpeg(libdc1394)제거 

examples만 활성화 시키고 나머지 app, test, 등등은 제거

examples 에러부분은 해당 project 제거

arm보드에서 실행 되므로 core, hardware library만 생성하면 된다.