2017년 6월 23일 금요일

pos agent system

https://panel.omnivore.io/docs/guides/agent_installation/micros_3700#supported-versions

2017년 6월 17일 토요일

python3 swig openframeworks windows tensorflow

1. install python3 64bit
2. modify python3/include/pyconfig.h => #ifdef _DEBUG
//# define Py_DEBUG
#endif
pragma comment(lib,"python35.lib")
3. modify python3/lib/argparse.py => props = ''
4. clone ofxPython
cd swig-additional, swig -c++ -python -fcompact -fvirtual -I../../../libs/openFrameworks -I../src openframeworks_extra.i
openframeworks_extra_wrap.cxx to *.cpp
5. install tensorflow
6. if cuda, add cuda include & lib path in MSVC2015
7. add python3 include & lib in MSVC2015
8. add PyImport_AppendInittab("_openframeworks_extra", PyInit__openframeworks_extra);
9. modif #define PyString_AsString(str) PyUnicode_AsUTF8String(str)
10. modify return string(PyBytes_AsString(PyString_AsString(get()->obj)));
11. build Debug, x64
12 ofLog() << lines[j].asString() -> lines[j].str() in ofxPython.cpp
13 ofLog() << "\t" << "Error: " << opvalue.str() -> opvalue.repr() in ofxPython.cpp


cuda error
numpy error
arch error

2017년 6월 13일 화요일

tensorflow-gpu with openframeworks on windows 10

1. Python35\Lib\argparse.py

if prog is None:
            prog = '' #_os.path.basename(_sys.argv[0])


2. ofxPython.cpp
ofLog() << lines[j].str()


3. #define PyString_AsString(str) PyUnicode_AsUTF8(str)

2017년 5월 28일 일요일

install foxPython & tensorflow on OS X

osx에서 python 작업시 주의해야할 사항

osx 기본 python. 버전은  /usr/bin/python

 python download후. install 했을때는  /usr/local/bin/python 이다.

자 그럼 ofxPython example에서 python include & python lib path에 따라 실행이 달라 진다.

그리고 tensorflow 64bit이다.

openframeworks api 사용 하지 않으면 swig compile 된 bindings 없이 ofxPython으로만 써도 된다.

1.  python.h 없는 에러
 => Other C++ flags에 include path 추가

2. import openframeworks 에러
 => ofxPython.cpp "sys.path.append('.')\n"
"sys.path.append('data')\n"


3. python_d.lib  없는 에러
 => python/include/pyconfig.h에서 debug 관련 코드 제거 또는 수정
 => // #define Py_DEBUG

4. pip install package 설치후 import 에러시
 => python --version 확인 해서 같지 않으면 include & library path를 같은 버전으로 설정한다. (매우 중요)

5. tensorflow 설치 후 아키텍처 및 심볼 에러
 =>  tensorflow는 64bit이므로 32bit app 실행 시 아키텍처 충돌이 나서 같은 버전으로 컴파일 하고 실행 해야 한다. (매우 중요)


6. sys.argv 에러
 => 해당 파일 라인 주석 또는 props = '' 추가

7.

2017년 5월 16일 화요일

install ofxPython windows 10

ofxPython와 함께 디버그로 컴파일 하면
python27_d.lib이 없다고 나오는데
http://stackoverflow.com/questions/38860915/lnk2019-error-in-pycaffe-in-debug-mode-for-caffe-for-windows
pyconfig.h에 다 있음.
이렇게 하면 되고

에러도 나오는데 이것으로 다 해결됨.


mac에서 swig로 만든 openframeworks.py와 openframeworks_extra.py를
본인이 만든 of project /data 폴더에 복사후 사용한다.
문제가 있다면 런타임시 에러 이므로 swig가 잘못된것임.

# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12

위의 두 파일은 swig 3.0.12로 만듬



2017년 3월 23일 목요일

intel realsense with faceshift studio

faceshift stduio
https://docs.google.com/uc?id=0B10zXV570eMgTEhQa01uOWhhX3c&export=download

intel realsense sdk 2014
https://communities.intel.com/thread/111793
본문:

Intel RealSense Installation

  • Download the SDK and the DCM (Depth Camera Manager).
  • Install the SDK first. Note that for using the Intel RealSense camera with faceshift studio, you don’t need all the modules selected for installation by default, but only those selected in the screenshot below.
SR300 DCM은 최신 인스톨 상관없음.
http://faceshift.com/studio/2015.2/introduction.html


2017년 3월 8일 수요일

install pm2 on dawinop (ubuntu 12.04)

robotis@robotis:~$ npm i pm2 -g
npm http GET https://registry.npmjs.org/pm2

npm ERR! Error: failed to fetch from registry: pm2
npm ERR!     at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR!     at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR!     at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR!     at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR!     at Request. (/usr/lib/nodejs/request/main.js:212:58)
npm ERR!     at Request.emit (events.js:88:20)
npm ERR!     at ClientRequest. (/usr/lib/nodejs/request/main.js:412:12)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at HTTPParser.onIncoming (http.js:1261:11)
npm ERR!     at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR!     
npm ERR! or use
npm ERR!     reportbug --attach /home/robotis/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.66-op2
npm ERR! command "node" "/usr/bin/npm" "i" "pm2" "-g"
npm ERR! cwd /home/robotis
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: pm2
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/robotis/npm-debug.log
npm not ok

sudo add-apt-repository ppa:chris-lea/node.js  
sudo apt-get update  
sudo apt-get install nodejs
node -v
npm -v
npm install pm2 -g
robotis@robotis:~$ npm install pm2 -g
npm ERR! Error: EACCES, mkdir '/usr/lib/node_modules/pm2'
npm ERR!  { [Error: EACCES, mkdir '/usr/lib/node_modules/pm2']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/usr/lib/node_modules/pm2',
npm ERR!   fstream_type: 'Directory',
npm ERR!   fstream_path: '/usr/lib/node_modules/pm2',
npm ERR!   fstream_class: 'DirWriter',
npm ERR!   fstream_stack:
npm ERR!    [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR!      '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR!      'Object.oncomplete (fs.js:108:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 3.2.66-op2
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "pm2" "-g"
npm ERR! cwd /home/robotis
npm ERR! node -v v0.10.37
npm ERR! npm -v 1.4.28
npm ERR! path /usr/lib/node_modules/pm2
npm ERR! fstream_path /usr/lib/node_modules/pm2
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/lib/node_modules/pm2'
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/robotis/npm-debug.log
npm ERR! not ok code 0


sudo npm install pm2 -g

pm2 -v