Ga verder naar hoofdinhoud

Set up Spot

Once you completed the general setup, configure the Spot-specific settings to connect Spot to InRobot. For better experience with the InRobot functionality, use Spot Enterprise with Spot Cam + IR and Core I/O with the internet access or Spot EAP 2.

Connect Spot Core to the internet

Learn about the Spot CORE I/O specifications and how to connect the Spot CORE I/O to the internet.

Download Spot integration

To download the Spot CORE I/O integration:

  1. Navigate to CDF.
  2. In Data management, select Integrate > Extractors.
  3. Select and download the Cognite Boston Dynamics Spot Integration extractor.

Learn more about data extraction.

Deploy Spot device agent to your Boston Dynamics Spot

Set environment variables

Copy the .env template and follow the guidance below to fill in the environment variables.

.env template
#Deployment environment variables

TAG=<tag>
REPOSITORY=cognite/

# Cognite
COGNITE_CLIENT_ID=abc1234
COGNITE_CLIENT_SECRET=abc1234
COGNITE_TENANT_ID=abc1234
COGNITE_PROJECT=officerobotics
COGNITE_CLUSTER=greenfield

# Should not be set in most cases, only useful for debugging
# COGNITE_LOG_LEVEL=INFO
# LOG_LEVEL=WARNING
# ENABLE_LOGGING_TO_INROBOT=false
# UPLOAD_AGENT_LOGS_TO_CDF=true

# Enable sending metrics to Cognite.
# ENABLE_REPORT_METRICS=false

# Boston dynamics
BOSDYN_HOSTNAME=192.168.50.3
BOSDYN_CLIENT_USERNAME=user
BOSDYN_CLIENT_PASSWORD=<password>

MISSION_PARSER_SERVICE_PORT=5533
DATA_UPLOAD_SERVICE_PORT=5534
VIDEO_RECORDER_SERVICE_PORT=5535
SERVICE_HOST_IP=192.168.50.5
ROBOT_NAME="Spot Robot 1"
SPOT_DOCK_ID=520
ENABLE_ESTOP_HIJACK=False or True
ESTOP_TIMEOUT=9.0
MAX_SPEED_MS=0.5

# Video streaming
STREAM_TARGET_BITRATE=100
STREAM_FRAME_REFRESH_INTERVAL=30
STREAM_IDR_INTERVAL=30

VIDEO_STREAM_ID=5
WEBRTC_JANUS_ADDRESS=<janus instance|EU,US>
WEBRTC_JANUS_ROOM=<janus room id>
WEBRTC_JANUS_FORWARD_VIDEO_PORT=<forward port>
WEBRTC_JANUS_FORWARD_SECRET=<room admin password>
WEBRTC_CONFIG="config-twilio" or "config-janus"

Docker images

ParameterDescription
TAGEnter the latest version of the device agent, for example, 0.5.0.
REPOSITORYEnter cognite/.

Cognite

ParameterDescription
COGNITE_CLIENT_IDEnter client ID.
COGNITE_CLIENT_SECRETEnter client secret.
COGNITE_TENANT_IDEnter Microsoft Entra tenant ID.
COGNITE_PROJECTEnter the name of the CDF project.
COGNITE_CLUSTEREnter the name of the CDF cluster.

Debugging

Setting up these variables is useful for debugging only.

ParameterDescription
COGNITE_LOG_LEVELEnter the log level of the logs sent to InRobot. Default value is info.
LOG_LEVELEnter the log level of the logs send to std::out. Default value is info.
ENABLE_LOGGING_TO_INROBOTAllow the forward of all logs to InRobot log window.
UPLOAD_AGENT_LOGS_TO_CDFLeave the default value to upload the agent logs to CDF.

Metrics

ParameterDescription
ENABLE_REPORT_METRICSAllow sending metrics to CDF.

Boston Dynamics

ParameterDescription
BOSDYN_HOSTNAMEEnter the IP address of the robot found on the Spot CORE, for example, 192.168.50.3.
BOSDYN_CLIENT_USERNAMEEnter the Spot username, for example, user.
BOSDYN_CLIENT_PASSWORDEnter the Spot password.
MISSION_PARSER_SERVICE_PORTLeave the default value of 5533.
DATA_UPLOAD_SERVICE_PORTLeave the default value of 5534.
SERVICE_HOST_IPEnter the IP address of the Spot CORE on the robot network, for example, 192.168.50.5.
SPOT_DOCK_IDEnter the ID of the fiducial on the docking station, for example 520. If the robot has no docking station, remove this parameter.
ENABLE_ESTOP_HIJACKAllow the device agent to take control over the emergency stop from any other entity (tablet, other agents running on Spot). Default value is False.
ESTOP_TIMEOUTEnter the number of seconds of the timeout for the services that keep the estop alive.
MAX_SPEED_MSEnter the maximum walk speed of the robot in m/s. The maximum allowed value is 2.0.

Video streaming

ParameterDescription
STREAM_TARGET_BITRATEEnter the compression level in target BPS.
STREAM_FRAME_REFRESH_INTERVALEnter the number of frames for how often the entire feed should be refreshed.
STREAM_IDR_INTERVALEnter the number of frames for how often an IDR message should be sent.
VIDEO_STREAM_IDEnter the video stream ID.
WEBRTC_VERSION_TAGEnter the version of the video docker image.
WEBRTC_ADDRESSEnter the address to the instance.
WEBRTC_ROOMEnter the room ID.
WEBRTC_FORWARD_VIDEO_PORTEnter the video port.
WEBRTC_FORWARD_SECRETEnter the room admin password.

Install Device Agent on Spot CORE I/O

Copy the .env file to the Spot CORE I/O. Run the following command via the robot Ethernet or Wi-Fi:

scp -P 20022 ${path/to/.env} spot@${spots_ip}:~/
ssh -p 20022 spot@${spots_ip}
sudo mkdir -p /data/cognite/
sudo cp ~/.env /data/cognite/

Make sure you're standing close to the robot, and in the Spot CORE I/O interface, navigate to the Extensions page and upload the CogniteRobot.spx file. The extension starts running.

Device agent extension

Spot uses fiducials, QR code-like images, to align its internal map with the surroundings. Fiducials are essential at the start of each mission and should be placed along the entire mission path. Each point of Spot's route should have a visible fiducial. The default size for fiducial images is 146 mm x 146 mm, but you can adjust it in the robot's admin panel if needed.

opmerking

Use 500-series fiducials to identify the docking stations only.

Place fiducials

Recommendations to follow when positioning fiducials:

  • Place one fiducial at the mission’s starting location and one at the docking station.
  • Place fiducials at ground level at the starting location.
  • Tape fiducials securely against a wall in a location where they will persist. If fiducials shift after recording, the mission may no longer replay.
  • Place fiducials low on the wall, with the top of the fiducial image at a human knee height, around 45-60 cm (18-24 in.) from the ground.
  • Place fiducials in areas that are feature deserts, for example, a span of over 3m of a featureless white wall.
  • Place fiducials on glass walls so that the robot avoids walking into the glass. You can also enhance glass walls with markers, such as AprilTags, post-it notes, or A4 sheets to create identifiable "features."
  • Place fiducials at intersections to mark the area the robot can pass through several times. These loops can improve the quality of the map.

Things to avoid when positioning fiducials:

  • Avoid using the same fiducial multiple times in a single mission. Each fiducial in a mission must be unique. However, you can use the same fiducial in other missions.
  • Don't place fiducials in areas with inconsistent lighting. Shadowed or unevenly lit fiducials can have unreliable detections.
  • Don't place fiducials on bright surfaces, such as windows.
  • Don't place fiducials where they can be blocked, damaged, moved, or removed.

Train a robot map and upload it to CDF

Learn how to train robot maps with the Spot Autowalk functionality.

Set up VPN (optional)

Setting up a VPN on the robot can be beneficial for an easier upgrade. VPN lets you upgrade the device agent and the robot remotely. You will need a VPN setup or host it yourself.