The Data Buffer service can be used to log data to the robot which can later be retrieved via API calls to the Data Service or by bddf-download. This example shows how to log various kinds of data to robot.
This example requires the bosdyn API and client to be installed, and must be run using python3. Using pip, these dependencies can be installed using:
python3 -m pip install -r requirements.txt
The example requires that you specify a username and password to authenticate with the robot.
This example adds an operator comment to the robot log. This comment will show up in the comments list in the robot log download web page.
python3 data_buffer.py ROBOT_IP operator 'This is a test of the Data Buffer client.'
This example adds a serialized protobuf to the log using the add_blob()
method of the Data Buffer client.
python3 data_buffer.py ROBOT_IP blob
This is similar to the 'blob' data example, but it serializes the protobuf automatically and sets the message type from the full protobuf type name.
python3 data_buffer.py ROBOT_IP protobuf
This writes an example event into the log.
python3 data_buffer.py ROBOT_IP event