Complete codebase for BWI's Scavenger Hunt project.
website/
contains everything relating to the website. All other directories
are ROS packages for Scavenger Hunt robots. Some important ones:
scavenger_hunt_api/
- The Scavenger Hunt API. Contains utilities for connecting to the website, uploading proofs, and querying proof feedback. Non-ROSified, though there is an optional ROS wrapper.bwi_scavenger/
- Drivers for our Scavenger Hunt participant robots.darksocket/
- Tool for offboard darknet computing.
In the src/
folder of a catkin workspace:
$ git clone https://github.com/utexas-bwi/scavenger_hunt_api.git --recursive
build using catkin tools; $ catkin build
in the root of your catkin workspace.
The scavenger_hunt_api
folder of this repository of the same name contains ROS wrappers for interacting with
the Scavenger Hunt website so you can submit proofs and participate in Hunts.
This leaves the implementation of how to carry out the hunts up to the individual.
Please see the API webpage for details on the API.
The following sections outlines what is required to run the full Scavenger Hunt codebase on the BWIBot platforms. The BWI Scavenger code may serve as an example for how to implement a scavenger hunt, fetching and starting Hunts, and submitting proofs.
There are two options for image recognition: offloading the image processing to an offboard computer if the robot does not have a GPU, or running YOLO directly on the robot computer if a GPU is available.
In the case that a GPU is not available, darksocket
is used to facilitate data flow.
- Verify launch parameters in
bwi_scavenger/config/bwi_scavenger.yaml
scav_hunt_login
- Valid website credentialsws_path
- Fully-qualified path to the workspace containing these packagesworld
- Eithersim
if running in Gazebo orirl
if running in the labtopics/perception/xxx
- Camera topics should be prefixed with/nav_kinect
for IRL and/camera
for simulation
- Verify launch parameters in
scavenger_hunt_api/config/scavenger_hunt.yaml
website/domain
- Domain of Scavenger Hunt website (until the web server is up this islocalhost
for lab machines andlocalhost:8080
for robots)scratch_path
- Valid path that ROS has permission to create files in (we usually use the workspace path)
- Verify darksocket config in
darksocket/scripts/darksocket.conf
- Robot and offboard machine
host
- IP of robot (find withhostname -I
; should be the second IP printed)port
- we usually use 51820
- Offboard machine only
darknet_path
- Location of darknet binary (built withGPU=1
, otherwise you're undermining the purpose of darksocket)cfg_path
- Fully-qualified path of cfg fileweights_path
- Fully-qualified path of weights filemeta_path
- Fully-qualified path of meta file (which in turn contains the fully-qualified path of the names file)recv_img_path
- Fully-qualified path to store a received image in (including image file name)
- Robot and offboard machine
- Verify darksocket launch parameters in
darksocket/launch/darksocket_ros.launch
topics/camera
- Camera topics should be prefixed with/nav_kinect
for IRL and/camera
for simulationconf_path
- Fully-qualified path todarksocket.conf
- Boot up the scavenger robot. Before any ROS
commands, open an SSH tunnel on the robot so it can see the website. This is required only for instances where
darksocket
is used to offload image processing to another machine.
ssh -D 8080 http://utw10989.utweb.utexas.edu/
- Navigate to the workspace and run the following launch files.
roslaunch bwi_launch segbot_v2.launch
roslaunch bwi_scavenger scavenger.launch
rosrun bwi_scavenger absim_ros.py
python3 src/bwi_scavenger/scripts/absim_socket.py
- Run darksocket on the offboard machine. If everything was set up correctly, it should load the network and then print "connection established." Again, only required if using
darksocket
.
python darksocket.py client
- Localize the robot in rviz and start a hunt via the
do_hunt
node.
rosrun bwi_scavenger do_hunt "BWI Lab Hunt"
BWI Lab Hunt
is the name of our test hunt, though any hunt registered on the
website will work.