-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall.txt
118 lines (85 loc) · 4.05 KB
/
install.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
###
# Installation Instructions for Flylab.
#
# The bulk of the software runs on Ubuntu, but if you want to run the galvodriver using
# a National Instruments DAQ, then you'll also need a Windows machine with winros (so far
# I've tested it w/ winros hydro) to run just the galvodriver node. If you have a
# different DAQ, then you'll need to write a galvodriver for it.
#
###
# Install ROS Hydro on Ubuntu.
sudo apt-get install ros-hydro-desktop-full
sudo apt-get install ros-hydro-cmake-modules
sudo apt-get install ros-hydro-smach-viewer
sudo rosdep init
rosdep update
# Get a few additional pieces.
sudo apt-get install -y python-setuptools
sudo apt-get install -y python-numpy
sudo apt-get install -y python-scipy
sudo apt-get install -y libdc1394-22-dev
sudo apt-get install -y intltool
sudo apt-get install -y gobject-introspection
sudo easy_install munkres
# Get the motmot software (used for saving .fmf files).
cd ~/src.git
git clone git://github.com/motmot/motmot.git
cd motmot
git submodule update --init
cd FlyMovieFormat
sudo python setup.py install
# Get the Flylab software.
cd ~/src.git
git clone https://github.com/ssafarik/Flylab.git
sudo copy ~/src.git/Flylab/udevrules/99-simple_step.rules /etc/udev/rules.d
# Get simple_step.
cd ~/src.hg
hg clone https://bitbucket.org/willdickson/simple_step
sudo python ~/src.hg/simple_step/api/python/setup.py develop
cd ~/src.git
git clone https://github.com/ssafarik/rosSimpleStep.git
git clone https://github.com/strawlab/pylibusb.git
sudo python ~/src.git/pylibusb/setup.py install
# Get Aravis camera library.
Download the latest release from https://wiki.gnome.org/Aravis,
for example: http://ftp.acc.umu.se/pub/GNOME/sources/aravis/0.3/aravis-0.3.1.tar.xz
tar -xzf aravis-0.3.1.tar.xz # To extract the files.
cd aravis-0.3.1
./configure
make && sudo make install
# Set up a catkin workspace.
mkdir -p ~/catkin/src
# Run the following commands (adjust them first if necessary).
echo "source /opt/ros/hydro/setup.bash" >> ~/.bashrc
echo "export ROS_IP=123.456.789.012" >> ~/.bashrc # (i.e. your ip)
echo "export ROS_MASTER_URI=http://localhost:11311" >> ~/.bashrc
echo "export PYTHONPATH=~/src.git/Flylab/arena_tf/src:~/src.git/Flylab/flycore/src:$PYTHONPATH" >> ~/.bashrc
echo "source ~/catkin/devel/setup.bash" >> ~/.bashrc
echo "export ROS_PACKAGE_PATH=~/src.git:~/src.hg:~/catkin:$ROS_PACKAGE_PATH" >> ~/.bashrc # (Assuming your ROS projects are in these two directories).
echo "export RIG=bigtop" >> ~/.bashrc # (change this to the name of your Flylab rig)
source ~/.bashrc
# Get camera_aravis.
cd ~/catkin/src
git clone http://github.com/ssafarik/camera_aravis.git
cd ~/catkin && catkin_make
# Make the Flylab software.
rosmake flylaball
# Galvos Setup:
# If you are using the galvos, at present you must have a Windows machine to run the National Instruments DAQ (a non-Windows DAQ would be appreciated, and writing a linux-based galvodriver should not be difficult). The software in Flylab/galvodriver compiles on Windows with the free version of Microsoft Visual C++ 2010 Express, and requires the National Instruments driver API "NiDAQ" available from them.
1. Have a Windows machine on the same network as the Ubuntu machine.
2. Download and install the free MS Visual C++ 2010 Express
3. Download and install NiDAQmx
4. Open the galvodriver code in MSVC, and compile it.
# Verify that you have proper hardware: i.e. a Flylab rig (the "RIG=___" line in your .bashrc) that consists
# of, at minimum, a tracking camera (preferably ethernet) and an arena for flies to walk around. It might also
# have a robotic mechanism, a laser/galvo system, LED panels, lighting, etc.
#
# Calibrate
# Perform the steps given in the files:
Flylab/calibrate_camera.txt
Flylab/calibrate_actuator.txt
Flylab/calibrate_galvos.txt
# You're done!
# Assuming that "rosmake flylaball" finished without errors, and that you have functioning Flylab hardware, then you
# should be able to run an experiment, for example:
roslaunch experiments testtracking.launch