<< Previous Page | Next Page >>
Part 5: Collecting Data¶
In this part of the tutorial, you will:
Create an action on the tablet to capture data from the services we wrote.
Record a mission using those actions around your environment.
Play back the mission to autonomously capture data a the recorded locations.
Download the data from the robot.
Configure the robot to automatically upload its data to the cloud.
To collect data we will create an Autowalk mission with Spot.
Creating Actions¶
Sources from image services and data acquisition plugins are automatically registered as action on the Spot tablet app. They can be modified in the hamburger menu, under the Actions
section. That means they are available to set up as captures during the recording of a mission using the Red Plus button. After setting up the image service and/or the data acquisition plugin to run on SpotCORE or on a computer connected to the robot’s wifi, new actions will automatically be created to capture from those services. Make sure that the corresponding actions are listed in the Spot tablet app.
For our data collection, we want to capture from both sources. We will create a new action “web_cam_battery” that captures both. To do that, navigate to Settings -> Actions from the hamburger menu.
Then, click Create New Action
, which brings up the menu shown below to choose a template.
Select the All Data and Images
template and click CREATE
. The following window pops up, where you can update the action name to “web_cam_battery” and select Video0
under WEB CAM
and also Battery level
under DATA ACQUISITION BATTERY
:
Testing the action¶
You may now drive the robot around and trigger the new action. This will cause it to capture both the web cam image and the battery data. This data can be downloaded from the “Download Data” in the hamburger menu, where you will be able to see the images captured directly on the tablet.
Mission Recording¶
Follow these steps to record a mission with the new captures:
First select
Autowalk
from the drop-down menu in the top-left corner of the app, and then selectRecord
.Enter mission name.
Stand the robot up and move it near a fiducial, if necessary. The app displays those two warnings till both are satisfied. The robot automatically detects fiducials in the robot cameras field of view.
Start recording.
Move robot to location where to capture data.
Then, click the Red Plus button and choose
web_cam_battery
action.Click
Confirm
.Click
Create
to create action.Repeat steps 5-8 as desired.
When done recording the mission, click
Finish Recording
to save mission.
Mission playback¶
Next, follow these steps to play back the mission recorded in the section above.
First select
Autowalk
from the drop-down menu in the top-left corner of the app, and then selectPlayback
.Select
DAQ_Tutorial_Mission
mission and clickPlay Now
.Move the robot near the fiducial at the beginning of the mission and click
Initialize
.When the mission completes, download the captured data by clicking “Sit and View Data”.
Configure the robot to automatically upload its data to the cloud.¶
The Post Docking Callbacks example contains scripts to enable users to upload files saved during a data acquisition mission to various endpoints, with the target use case having the callback run when Spot docks at the end of an Autowalk mission. Please follow instructions in that example to set up a callback to upload the captured data to AWS when the robot docks.