First of all some side items:
- add user to dialout group to deal with serial port permissions with the command "usermod -a -G dialout josh"
- add /sbin/ to path in .bashrc
- (optional) add a line to .bashrc to export DISTCC_HOSTS
1) Install dependency packages assuming ubuntu derivative. . Note - these steps can potentially be done during SD cart setup on the host machine.
Code Block |
---|
sudo apt-get update sudo apt-get install aptitude sudo aptitude update sudo aptitude install build-essential freeglut3-dev libboost-all-dev xterm libtiff4-dev libpng12-dev libgsl0-dev subversion bzr cmake-curses-gui libxftlibblas-dev libxinerama-dev fluid default-jre libblas-dev gpsdrsync libgmp3-dev |
2) Downloads:
Code Block |
---|
cd ~/ svn co https://mv-ezproxy-com.ezproxyberklee.flo.org/svn/moos-ivp-aro/releases/moos-ivp-13.25 moos-ivp cd ~/ bzr co lp:goby/2.0 goby cd goby sudo ./DEPENDENCIES debian cd ~/ svn checkout https://hovergroup.googlecode.com/svn/trunk/third-party third-party svn checkout https://hovergroup.googlecode.com/svn/trunk/ivp-extend hovergroup-extend cd ~/ mkdir MOOS cd MOOS git clone https://github.com/themoos/core-moos.git MOOSCore cd MOOSCore git checkout master cd .. git clone https://github.com/themoos/essential-moos.git MOOSEssentials cd MOOSEssentials git checkout devel cd .. git clone https://github.com/themoos/ui-moos.git MOOSToolsUI cd MOOSToolsUI git checkout V10-beta-rc1 cd .. git clone https://github.com/themoos/geodesy-moos.git MOOSGeodesy cd MOOSGeodesy git checkout master cd .. mv ~/MOOS/MOOSCore/Core/libMOOS/Comms/XPCGetProtocol.cpp ~/MOOS/MOOSCore/Core/libMOOS/Comms/XPCGetProtocol_bck.cpp cp ~/third-party/XPCGetProtocol.cpp ~/MOOS/MOOSCore/Core/libMOOS/Comms/ |
3) Build:
Code Block |
---|
export CXX='/usr/local/lib/distcc/arm-linux-gnueabi-g++-4.4' export CC='/usr/local/lib/distcc/arm-linux-gnueabi-gcc-4.4' export DISTCC_HOSTS=192.168.1.4 export DISTCC_POTENTIAL_HOSTS=192.168.1.4 cd ~/moos-ivp/MOOS/MOOSCore cmake -D DISABLE_NAMES_LOOKUP=ON -D USE_ASYNC_COMMS=ON . make -j2 cd ../MOOSEssentials cmake . make -j2 cd ../MOOSGeodesy cmake . make -j2 cd ../MOOSToolsUI cmake -D BUILD_GRAPHICAL_TOOLS=OFF . distcc-pump make -j2 cd ~/moos-ivp rm MOOS ln -s ../MOOS MOOS cd ~/moos-ivp/ivp/src cmake -D IVP_BUILD_GUI_CODE=OFF . distcc-pump make -j2 cd ~/goby cmake -D build_apps=OFF -D build_moos=OFF . make -j2 cd ~/hovergroup-extend/trunk ./build_proto.sh cmake -D BOOST_146=ON -D BUILD_SHORE_APPS=OFF . make -j2 cd ~/hovergroup-extend/josh ./build_proto.sh cmake -D BUILD_SHORE_APPS=OFF . make -j2 |
4) Remove hotplug scripts for gpsd and configure for autostartBashrc:
Code Block |
---|
sudo update-rc.d gpsd remove
more stuff here.
|
5) Configure by editing the /etc/ntp.conf configuration file with the following lines: (this information should also be avilable on the gpsd man page)
Code Block |
---|
server 127.127.28.0 minpoll 4 maxpoll 4
fudge 127.127.28.0 time1 0.420 refid GPS
server 127.127.28.1 minpoll 4 maxpoll 4 prefer
fudge 127.127.28.1 refid GPS1
|
The first line just uses serial data from the gps while the second adds information from the pps line. The "0.420" is an offset to try to correct for delays in the serial comms. Restart the ntp service and verify functionality.
Code Block |
---|
/etc/init.d/ntp restart
ntpq -p
|
asdflj
Testing gpsd:
For debugging purposes gpsd can be run in the foreground with:
Code Block |
---|
gpsd -nN -D9 /dev/ttyUSB0
|
HOME_DIR="/home/josh"
IVP_DIR=${HOME_DIR}/moos-ivp
MOOS_DIR=${IVP_DIR}/MOOS
PATH=$PATH:${MOOS_DIR}/MOOSCore/bin:${MOOS_DIR}/MOOSEssentials/bin:${MOOS_DIR}/MOOSToolsUI/bin
PATH=$PATH:${IVP_DIR}/bin
HOVERGROUP_DIR=${HOME_DIR}/hovergroup-extend
PATH=$PATH:${HOVERGROUP_DIR}/trunk/bin
PATH=$PATH:/sbin
export DISTCC_HOSTS="192.168.1.100"
export DISTCC_POTENTIAL_HOSTS="192.168.1.100"
export CC="/usr/local/lib/distcc/arm-linux-gnueabi-gcc-4.4"
export CXX="/usr/local/lib/distcc/arm-linux-gnueabi-g++-4.4"
|
5) Rtklib
build:
Code Block |
---|
~/third-party/rtklib/app/makeall.sh
|
Add as launch script: (for some reason this doesn't work when copy pasted - type in manually)
Code Block |
---|
cd /etc/init.d
sudo ln -s /home/josh/third_party/josh_rtklib/start_silvana.sh start_silvana.sh
sudo ln -s /home/josh/third_party/josh_rtklib/start_rtkrcv.sh start_rtkrcv.sh
sudo update-rc.d start_silvana.sh defaults
sudo update-rc.d start_silvana.sh defaults
|
temp fixssh-keygen -t rsa
ssh keygen: ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host
remote host is the kayak
added chmod 777 /var/run/screen to rc.local
default compass update rate is 10HzThe -n flag is needed to provide ntpd with updates even when a client isn't connected. Drop the -N flag to start in the background.