Hardware
Figure 1: VideoRay Control Box (3) |
Figure 2: Serial RS-232 Splitter (female – male/male) (2) |
|
|
Figure 3: Serial RS-232 Gender Changer (male --> female) (1) |
Figure 4: Serial RS-232 cable (female-female) (1) |
Figure 5: Serial RS-232 cable (male-female) (3) |
Figure 6: Sealink Serial RS-232 / RS-485 / USB adapter (RS-232 female – USB) (1) |
|
|
Figure
7: B & B Electronics Serial RS-232 / RS-485 / USB adapter (RS-232
female—RS-232 female) (2) |
Figure 8: RS-232 (male) – USB adapter (2) |
|
|
Figure 9: Video Composite (female) –USB adapter (2, different) |
Figure 10: Video Composite cable (male-male) |
Software
1. SeaSprite Sonar Software
2. Seanet Dumplog Client
a. This is used to convert the sonar data into a CSV file format
3. Video Capture software (e.g. Debut)
4. Microsoft Visual Studio (if editing VideoRay code is desired)
NOTE: To run in Visual Studio 2010, some special instructions are required. Realize that this is not exactly a solution to the configuration problem, but a workaround that gets the code to run. If insight can be given or a better solution is found, please make the appropriate changes to this document.
a. Extract "extractToProjectFolder" to the Project folder of the desired project (i.e. "VideoRay_SLAM_ICEX_2011/VideoRay/"
b. Go to the Project menu. Navigate to "<Project Name> Properties"
a) Clicking on the solution name in the “Solution Explorer” may be necessary
c. Under "Configuration Properties" click on "C/C++"
d. In the "General" section, click on "Additional Include Libraries"
e. Add the new "include" directory to the list (i.e. "VideoRay_SLAM_ICEX_2011/VideoRay/include" OR better option, use macro: “$(SolutionDir)VideoRay\include”)
f. Under "Configuration Properties" click on "Linker"
g. In the "General" section, click on "Additional Library Dependencies"
h. Add the new "lib" directory to the list (i.e. . "VideoRay_SLAM_ICEX_2011/VideoRay/lib" OR better option, use macro: “$(SolutionDir)VideoRay\lib”)
i. In the “Input” section (still under “Linker”) click on “Additional Dependencies”
j. Add the following values to the field:
opengl32.lib
glu32.lib
glaux.lib
5. Compression / extraction program (e.g. 7z [http://www.7-zip.org/])
6. Drivers
a. Sealink Adapter drivers
b. Prolific (Serial RS-232 – USB) adapter drivers [Figure 8]
c. Gigaware Composite – USB Adapter [Figure 9b] Driver
d. KWorld Composite – USB Adapter [Figure 9a] Driver
Setup
With a Connected Computer
Needs
3 USB ports + 1 serial RS 232 port
OR
4 USB ports and an unbuffered RS 232/485/USB adapter (VideoRay provided, Sealink, black box. See Figure 6)
NOTE: If a hub must be used, connect the Joystick and the RS-232/USB adapter for the Controller end of the control box <> to it
Setup
1. Connect the sonar to the ROV
a. Cable to “Main” port of sonar
b. Connect 9-pin ends together
i. VideoRay cable into sonar cable into VideoRay body
2. Connect the serial RS-232 splitter [Figure 2] to RS-232 port (red box below) of the Control Box [Figure 1]
3. Connect composite video cable [Figure 10] to Video Out (green box above) port
4. Connect non-connected end of composite video cable to USB video adapter [Figure 9a or Figure 9b]
5. Connect serial RS-232 cable to “Computer Control” end of splitter RS-232/USB adapter [Figure 2]
6. Connect serial 485/232/USB adapter [Figure 6 or Figure 7] to “Instrument” end of splitter [Figure 2]
a. If the adapter has 2 female RS-232 ends [Figure 7], connect the longer-cabled end to the splitter
7. Connect “Computer Control” end of RS-232 splitter [Figure 2] to USB port on computer via RS-232/USB adapter [Figure 8]
8. Connect “Instrument” end of RS-232 splitter [Figure 2] to computer via serial 485/232 adapter [Figure 6 or Figure 7]
NOTE: If a serial RS-232 / 485 adapter [Figure 7] is used, either a serial port is required on the computer, or an RS-232 / USB adapter [Figure 8] must be used to connect to a USB port.
9. Connect USB end of video adapter [Figure 9a or Figure 9b] to USB port on computer
10. Connect joystick to USB port
11. Open SeaSprite Sonar software
12. Set the COM port to the connected serial port of the sonar data (from the serial 485/232/USB adapter [Figure 6 or Figure 7])
a. Click on the “wrench” icon in the center of the right hand menu
b. Click on “Com port”
c. The number of the “Port” option must match the com port in Device Manager
i. To check this, open up Device Manager by typing “Device Manager” in the search bar of the Windows menu (menu that comes up by pressing the Windows key)
ii. Under “Ports” check the port of the serial adapter that corresponds to the sonar serial connector, right click on it and go to “Properties”
iii. Under the “Port Settings” tab, ensure that the Baud rate is 115200
d. The Baud number in the SeaSprite Sonar software must also be 115200
e. The AUX Data Output Port should not be enabled unless using a device attached to the sonar head
13. Turn on control box [Figure 1]
a. SeaSprite should begin displaying sonar data
i. when the connection is established, the "Timeout" in the top left corner will change to "BBUser"
14. a. Open ICEX_2011 Code in Visual Studio and "Debug"
OR
14. b. Double-click the executable "VideoRay.exe" in the "Debug" folder
15. Go to “File>Initialize…” in the running program
a. “Thruster” dialog controls connected VideoRay
i. Note the "Start Logging" button towards the bottom of this dialog.
b. “Camera” dialog should show front camera of VideoRay
i. The correct connection must be established via the window that will popup requesting it.
Simply choose the correct USB connection listed.
ii. Alternatively, this dialog can be closed or ignored in favor of another program (e.g. Debut, see step 10 of Using the Control Box to Drive: Setup)
NOTE: If the Google Talk plugin is installed on the computer, "Google Camera Adapter 0" and "Google Camera Adapter 1" will also appear in the list. These will likely stop the correct USB from functioning, so try the Google Adapters which should pick up the actual VideoRay Camera
c. “Lights” dialog should appear on the bottom of the program
16. If desired, attach the HD GoPro Hero camera to the ROV
The hardware setup should look like this when finished:
Note that each serial connection can be extended with the correct cables and that the USB plugs need to go to the computer as does the open serial port. The serial port can be directly connected if an RS-232 port is available, otherwise a RS-232 / USB adapter [Figure 8] must be used.
Logging
When using the above setup, 3 pieces of data are being logged from the computer:
1. ROV data (bearing, depth, location, etc)
a. This is done by clicking the "Start Logging" button in the "Thrusters" dialog box
IMPORTANT NOTE: The program looks at "../Data/" with respect to the VideoRay.exe file and creates a log file there. If the data directory does not exist (i.e. the exe is moved), the folder does not get created. This causes the log files to never be created. In the event this is the case, a dialog box will alert the user that a logging error has occurred. Therefore, pay attention when logging.
2. Sonar data (See Sonar Logging Notes for best practices)
a. This is done by clicking the red, circular record button in the top left of the window.
b. Doing so opens a dialog box that requests a name. Unless you have a good reason not to, accept the default name which is formatted with the current date and time.
3. Video
a. If using the Video dialog window in the VideoRay code, logging is initialized with the small, red record button in the bottom left.
i. A name and path are requested, and recording begins upon acceptance.
b. If using Debut, pressing the record button on the bottom or the space bar will begin recording.
i. The file is autonamed and placed into some specified folder.
1. At the time of this writeup, the destination folder was "C:\Users\ICEX\Desktop\Video Logs" and the naming convention was "%DD%_%MM%_%HH%_%MIN%_%SS%" in an attempt to closely resemble the sonar output files.
Without a Computer (using the just the control box)
Needs
2 USB ports
OR
1 USB port + 1 serial RS232 port
Setup
1. Connect the sonar to the ROV
a. Cable to “Main” port of sonar
b. Connect 9-pin ends together
i. VideoRay cable into sonar cable into VideoRay body
2. Connect the serial RS-232 splitter [Figure 2] to RS-232 port (red box below) of the Control Box [Figure 1]
3. Connect composite video cable [Figure 10] to Video Out (green box above) port
4. Connect non-connected end of composite video cable to USB video adapter [Figure 9a or Figure 9b]
5. Connect serial 485/232/USB adapter [Figure 6 or Figure 7] to “Instrument” end of splitter [Figure 2]
a. If the adapter has 2 female RS-232 ends [Figure 7], connect the longer-cabled end to the splitter
6. Connect “Instrument” end of RS-232 splitter [Figure 2] to computer via serial 485/232 adapter [Figure 6 or Figure 7]
NOTE: If a serial RS-232 / 485 adapter [Figure 7] is used, either a serial port is required on the computer, or an RS-232 / USB adapter [Figure 8] must be used to connect to a USB port.
7. Connect USB end of video adapter [Figure 9a or Figure 9b] to USB port on computer
8. Open SeaSprite Sonar software
9. Set the COM port to the connected serial port of the sonar data (from the serial 485/232/USB adapter [Figure 6 or Figure 7])
a. Click on the “wrench” icon in the center of the right hand menu
b. Click on “Com port”
c. The number of the “Port” option must match the com port in Device Manager
i. To check this, open up Device Manager by typing “Device Manager” in the search bar of the Windows menu (menu that comes up by pressing the Windows key)
ii. Under “Ports” check the port of the serial adapter that corresponds to the sonar serial connector, right click on it and go to “Properties”
iii. Under the “Port Settings” tab, ensure that the Baud rate is 115200
d. The Baud number in the SeaSprite Sonar software must also be 115200
e. The AUX Data Output Port should not be enabled unless using a device attached to the sonar head
10. Turn on control box [Figure 1]
a. SeaSprite should begin displaying sonar data
i. When the connection is established, the "Timeout" in the top left corner will change to "BBUser"
11. Open Debut Video Capture Software
12. Click "Options"
13. On the "Devices" tab, select "Webcam / Capture Devices"
14. Choose the correct USB device in the "Name" drop-down box and click "OK". The VideoRay’s front camera should be displayed on screen.
15. If desired, attach the HD GoPro Hero camera to the ROV
The hardware setup should look like this when finished:
Note that the serial connection can be extended with the correct cables and that the USB plugs need to go to the computer as does the open serial port. The serial port can be directly connected if an RS-232 port is available, otherwise a RS-232 / USB adapter [Figure 8] must be used.
Logging
When using the above setup, 2 pieces of data are being logged from the computer:
1. Sonar data (See Sonar Logging Notes for best practices)
a. This is done by clicking the red, circular record button in the top left of the window.
b. Doing so opens a dialog box that requests a name. Unless you have a good reason not to, accept the default name which is formatted with the current date and time.
2. Video
a. Using Debut, pressing the record button on the bottom or the space bar will begin recording.
i. The file is autonamed and placed into some specified folder.
1. At the time of this writeup, the destination folder was "C:\Users\ICEX\Desktop\Video Logs" and the naming convention was "%DD%_%MM%_%HH%_%MIN%_%SS%" in an attempt to closely resemble the sonar output files.
Piloting / Data collection
The aim of piloting is to move to places that will result in useful data collection. This requires focusing on features like walls and corners. Also note that if one must move, it is important to move extremely slowly so that the sonar can pick up sufficient data despite the movement. Keep in mind when choosing locations that overlap is helpful when processing the data into useful maps.
1. Exploration and Video Recording
a. In log book write down date, location, compass reading of ROV with respect to some landmark like a wall of the building.
b. Start logging ROV control data
c. Start Recording ROV Video, HD Cam Video, and scan above ground area before lowering the ROV down the cistern
d. Explore, trying to understand general layout and looking for dangerous areas and points of interest
e. Stop Recording Video
2. 2D Static Mapping
a. In log book write down date, location, compass reading of ROV with respect to some landmark like a wall of the building (see Required Manual Logging Notes below)
b. Start Recording ROV Video, HD Cam Video, and scan above ground area before lowering the ROV down the cistern
c. Loop until full coverage of cistern
i. Land on Floor
ii. Write in log book depth, bearing and sonar scan
iii. Start logging ROV control data
iv. Start logging Sonar data
1. 3-4 full sonar rotations
v. Stop Robot Logging, stop sonar logging
vi. Move 4-5 meters to new location, ensuring overlap with previous scan
vii. Repeat
d. Stop Recording ROV Video, Stop HD Cam Video
3. 3D Static Mapping
a. In log book write down date, location, compass reading of ROV with respect to some landmark like a wall of the building (see Required Manual Logging Notes below).
b. Start Recording ROV Video, HD Cam Video, and scan above ground area before lowering the ROV down the cistern
c. Loop until full coverage of cistern
i. Land on Floor
1. Write in log book depth, bearing and sonar scan
2. Start logging ROV and sonar data
a. 3-4 full sonar rotations
3. Stop logging ROV and sonar data
4. Move up 1-2 meters
5. Repeat until at surface
ii. Move 4-5 meters to new location, ensuring overlap with previous scan
iii. Repeat
d. Stop Recording ROV Video, Stop HD Cam Video
4. 2D Dynamic Mapping
a. Use the method of 2D Static Mapping but do not separate the locations into different files, but rather keep logging the entire time, moving extremely SLOWLY
5. 3D Dynamic Mapping
a. Combine 3 and 4
Sonar Logging Notes
1. The bar on the left-hand side controls how the data is viewed. It can change the color intensity and how the data is displayed. It does not affect how the data is collected, and this option can be tweaked after collection to result in the same effect (i.e. during playback). That is, the same data will be collected regardless of the setting of the left bar.
2. The options on the right-hand side control how data is collected. That is, these will affect the data, and cannot be undone or changed once data collection begins.
3. Gain must be set and "calibrated" for each water feature
a. Get general sense of cistern layout
b. Set gain based on video image / wall types
i. Yellow = high probability of wall being present
ii. Adjust gains so that known walls appear as yellow
iii. Reducing the gain eliminates noise
4. It is generally a good practice to begin by landing in the center of the area that you will be collecting data for the initial scan. This gives a sense of the room as a whole and enables plans to be made for future scans.
5. Place priorities on collecting data near walls and corners in visible on-screen area
6. ~3 rotations is sufficient for building a map out of sonar data (maximum)
7. Stay close to the last scan in order to provide overlap (systematically choose scans)
The center-point of the rings (where the small circle is) represent where ROV is during the time of scan. The rings represent 1 (one) meter each, so these sonar scans are about 2 meters apart. These scans are about the distance desired between scans. They can be combined (mosaic-ed) to produce a fuller image of the cistern because of the useful data gained from the two scans.
Independently, the scans cannot create the entire map, but when combined, the cistern can be viewed completely.
8. Make an attempt to plan the location of the next scan based on the current location and present map visible (maybe 2-3 scans in the future) (helps increase confidence in whether or not the feature has been completely scanned)
Video Recording Notes
1. Close-up snapshots of wall textures are useful and can be done with Debut by either clicking the camera button towards the right, or pressing F8
2. SLOW moving videos gathering different textures of environment
NOTE: Video-capture through the number of devices while recording other data simultaneously can result in a large strain on the processor. When possible, this should be avoided because if the processor is stressed, the video capture will drop frames which is undesired.
Manual Logging Notes (further detail)
There should be four streams of data being logged into physical log books so data does not become useless in the event of some kind of simple failure (e.g. compass / depth not calibrated):
1. The location of the water feature, and where the cistern is with respect to the real world
a. The reasoning behind this is so that if one becomes lost with the data, one could orient the ROV based on a real-world reference point, and use a map to determine bearing and the like
2. The state of the ROV when beginning a scan for later reference
a. Depth (a number and a relative location (i.e. bottom, top, on a step or platform etc.))
b. Bearing
c. Time of scan
3. A running sketch of the water feature map taken from the sonar as scans are done and where the ROV is on the map each time a scan is done. Depths should be added as applicable, and if multiple levels are present in the water feature, multiple sketches should be done.
4. A log of technical work that is being done on site for later reference. This includes bugs and difficulties, and all methods implored for solving them: down to which cables are being plugged in where and in what order.
These 4 things can be logged by 2 separate individuals in 2 log books, with the breakdown as follows:
1. 1 and 2, while logging 4 as necessary. This should be doable because these pieces of data are not often simultaneous (i.e. if troubleshooting is being done, logging data probably isn’t necessary).
2. One person drawing the map and adding to it with every scan, and adding every scan location to the map, numbered accordingly. This requires
some communication with the other logger, as the number should be matching for the duration of the water feature.
As can be seen in the above pictures, the scans are labeled and have columns with the appropriate information. Also note the sketch, showing the location of the cistern relative to other noticeable features.