forked from mkran/moos-ivp-bluerov
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
176 lines (136 loc) · 7.02 KB
/
README
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
##############################################################################
# NAME: Muthukumaran Chandrasekaran
# FILE: moos-ivp-bluerov/README
# DATE: 2017/10/12
# DESCRIPTION: Contains important information regarding the moos-ivp-bluerov
# repository.
##############################################################################
#=============================================================================
# Introduction
#=============================================================================
The moos-ivp-bluerov repository contains an interface for extending the MOOS-IvP
Autonomy system to work with the BlueROV2 running ArduSub as the front seat
controller on a Pixhawk. This includes a 2 MOOS applications and an example
mission for testing.
#---------------------------------------
# MOOS APP 1: pMavlinkConverter
#---------------------------------------
This app takes as input, the DESIRED_SPEED and DESIRED_HEADING from MOOSDB,
published by the MOOS IvP Helm, packages that into a mavlink message
"MAVLINK_MSG_SET_POSITION_TARGET", and publishes this message back into the MOOSDB.
#---------------------------------------
# MOOS APP 2: iArduSubComms
#---------------------------------------
This app takes the mavlink message "MAVLINK_MSG_SET_POSITION_TARGET" from the MOOSDB,
published by pMavlinkConverter, and routes it over a serial port (/dev/ttyACM0 for
Pixhawk) and/or a UDP port (eg. 14000 on "127.0.0.1" for SITL). We can toggle between
the two using the "TOGGLE_PORT" flag. TOGGLE_PORT = 1 for Enabling Comms via UDP (for
BlueROV2 control (or in SITL) from MOOS running on GCS) and TOGGLE_PORT = 0 for Enabling
Comms via SERIAL Port (for BlueROV2 control from MOOS running on companion computer onboard).
#=============================================================================
# Directory Structure
#=============================================================================
The directory structure for the moos-ivp-bluerov is decribed below:
bin - Directory for generated executable files
build - Directory for build object files
missions - Directory for mission files
scripts - Directory for script files
src - Directory for source code
thirdparty - Directory for third party libraries
CMakeLists.txt - CMake configuration file for the project
build.sh - Script for building moos-ivp-bluerov
clean.sh - Script for cleaning moos-ivp-bluerov
LICENSE - Contains license information
README - Contains helpful information - (this file).
#=============================================================================
# Installation Instructions -- Linux/Mac users
#=============================================================================
#---------------------------------------
# Setup MOOS IvP
#---------------------------------------
First, to setup MOOS IvP, execute the following from the command line:
$ cd ~
$ sudo apt-get install subversion
$ svn co https://oceanai.mit.edu/svn/moos-ivp-aro/trunk/ moos-ivp
$ cd ~/moos-ivp/
$ svn update
$ sudo apt-get install g++ cmake xterm libfltk1.3-dev freeglut3-dev
$ sudo apt-get libpng12-dev libjpeg-dev libxft-dev libxinerama-dev libtiff5-dev
$ cd ~/moos-ivp/
$ ./build-moos.sh
$ ./build-ivp.sh
$ echo 'export PATH=$PATH:~/moos-ivp/bin' >> ~/.bashrc
$ source ~/.bashrc
#---------------------------------------
# Setup the moos-ivp-bluerov extension
#---------------------------------------
Next, to setup the moos-ivp-bluerov extension, execute the following from the
command line:
$ cd ~
$ sudo apt-get install git
$ git clone https://github.com/mkran/moos-ivp-bluerov
$ cd ~/moos-ivp-bluerov/
$ ./build.sh
$ echo 'export PATH=$PATH:~/moos-ivp-bluerov/bin' >> ~/.bashrc
$ source ~/.bashrc
#---------------------------------------
# Setup the SITL for testing
#---------------------------------------
To test our moos-ivp-bluerov extension in simulation, we will first need to setup
SITL to run with ArduSub. Execute the following from the command line:
$ cd ~
$ git clone git://github.com/ArduPilot/ardupilot.git
$ cd ardupilot
$ git submodule update --init --recursive
$ sudo apt-get install python-matplotlib python-serial python-wxgtk3.0 python-wxtools python-lxml
$ sudo apt-get install python-scipy python-opencv ccache gawk git python-pip python-pexpect
$ sudo pip install future pymavlink MAVProxy
$ echo 'export PATH=$PATH:$HOME/ardupilot/Tools/autotest' >> ~/.bashrc
$ echo 'export PATH=/usr/lib/ccache:$PATH' >> ~/.bashrc
$ source ~/.bashrc
#=============================================================================
# Running Instructions
#=============================================================================
#-------------------------------------
# Running an example mission: s1_alpha
#-------------------------------------
Execute the following from the command line:
$ cd ~/moos-ivp-bluerov/missions/s1_alpha/
$ pAntler alpha.moos
Next, hit "DEPLOY" on the pMarineViewer window. You should see a yellow kayak-like
vehicle move around in pMarineViewer and execute the s1_alpha mission.
#---------------------------------------
# Running the s1_alpha mission in SITL
#---------------------------------------
First, run the s1_alpha mission as per the instructions above. Then, execute the
following from the command line:
$ cd ~/ardupilot/ArduSub/
$ sim_vehicle.py -v ArduSub --map --out=udpin:127.0.0.1:14000
This will open up a MAVProxy console. Wait till the "ArduSub" vehicle gets a GPS lock.
Then, type in the following:
MAV> mode GUIDED
MAV> arm throttle
Next, hit "DEPLOY" on the pMarineViewer window. You should also see the "ArduSub"
vehicle move around in SITL and execute the s1_alpha mission.
#----------------------------------------
# Running the s1_alpha mission in BlueROV
#----------------------------------------
First, plug in the ethernet tether to your laptop that is running MOOS.
Next, run the s1_alpha mission as per the instructions above.
Assuming that you have configured MAVProxy correctly, you should be able to talk to
your BlueROV2 via MAVProxy. Run the following from the command line:
$ mavproxy.py --out=udpin:127.0.0.1:14000
This will open up a MAVProxy console. Wait till the all the parameters load correctly
and make sure that BlueROV2 is connected properly. Then, type in the following:
MAV> mode GUIDED
MAV> arm throttle
Next, hit "DEPLOY" on the pMarineViewer window. You should also see the BlueROV2
execute the s1_alpha mission.
#=============================================================================
# Disclaimer
#=============================================================================
I am not responsible, if your BlueROV2 crashes into something! This is a work in progress.
There is still quite a bit of work to do to make the BlueROV situationally aware :)
##############################################################################
# END of README
##############################################################################