Projects / emss / Linux Scripts
From emss Framework - iRobot Create C++ Framework
You are here: Projects / emss / Linux Scripts
[edit] emss Interface via Network on emss Hardware
ssh -C -X emss@152.96.232.92 /home/emss/emss/Binaries/Unix/emssInterface
[edit] Webcam Driver and Streamer
sudo apt-get install gst-launch
[edit] Webcam image extract
gst-launch-0.10 v4l2src ! xvimagesink gst-launch-0.10 v4l2src ! videorate ! video/x-raw-yuv,framerate=1/1 ! jpegenc ! filesink location=out.jpg gst-launch-0.10 v4l2src ! ffmpegcolorspace ! pngenc ! filesink location=out.png
[edit] Serial Port Test App
sudo apt-get install minicom mincom -p ttyUSB0
[edit] TTS Interface
sudo apt-get install espeak espeak -v english_rp -a 10 -p 50 -s 150 "hello world"
[edit] Start inadyn for dyndns
sudo apt-get install inadyn inadyn --background --username dankrusi --password PWD --update_period_sec 600 --alias emssrobot.dyndns.org
[edit] emss Startup Script Template
#!/bin/sh inadyn --background --username dankrusi --password PWD --update_period_sec 10 --alias emssrobot.dyndns.org cpufreq-selector -g powersave & /home/emss/emssframework/bin/emssInterface &
[edit] Install Startup Script
- start is the argument given to the script (start, stop).
- 99 is the start order of the script (1 = first one, 99= last one)
- 2 3 4 5 are the runlevels to start
# update-rc.d -f my_script start 99 2 3 4 5 .
[edit] G++ emssCore Build for Qt
g++ -c -pipe -g -fPIC -Wall -W ...
- -c do not link
- -pipe pipe to next chaintool instead of using tmp files
- -g produce debug info
- -fPIC emit position independent code, for shared libraries
- -Wall all warnings
[edit] Compile a Static Version of Qt 4.5
The following describes how to compile a static version of Qt fit for releasing emss Framework version on different OS's.
[edit] Linux
- Step 1: Get all the required dev libs:
sudo apt-get install g++ sudo apt-get install libx11-dev sudo apt-get install libxinerama-dev sudo apt-get install libxrandr-dev sudo apt-get install libxrender-dev sudo apt-get install libxcursor-dev sudo apt-get install libfontconfig-dev sudo apt-get install libsm-dev sudo apt-get install libgtk2.0-dev sudo apt-get install xorg-dev sudo apt-get install libasound2-dev
- Step 2: Remove dynamic libasound2 libs (so that it is statically linked):
sudo mv /usr/lib/libasound2.so /usr/lib/_libasound2.so sudo mv /usr/lib/libasound2.so.2 /usr/lib/_libasound2.so.2 sudo mv /usr/lib/libasound2.so.2.0.0 /usr/lib/_libasound2.so.2.0.0
- Step 3: Re-configure and build Qt:
cd /opt/qtsdk-2009.02-static/qt sudo ./configure -release -static -nomake tools -nomake examples -nomake demos -nomake docs -nomake translations -fast sudo make sub-src sudo make install
[edit] Windows
- Step 1: Re-configure and build Qt:
cd C:\Qt\2009.01\qt\ configure -static -release -no-exceptions mingw32-make sub-src
[edit] Get Qt dependencies for binary file
ldd emssInterface | egrep 'qt' | cut -d' ' -f3
[edit] Blacklist internal wlan driver
In /etc/modprobe.d/blacklist add:
blacklist rt61pci
[edit] Figuring out the Working Directory Safely
TMP=`pwd`; cd `dirname $0`; SCRIPTS=`pwd`; cd $TMP;