Salt la conținutul principal

Set up ANYmal

Once you completed the general setup, configure the ANYmal-specific settings to connect ANYmal to InRobot. Before you begin, ensure you have internet access on your PC or WM and that the ANYmal API is available and installed.

Download ANYmal integration

To download the ANYmal integration:

  1. Sign in to Cognite Data Fusion (CDF).

  2. Go to Data management > Integrate > Extractors.

  3. Select and download the ANYmal Integration extractor. The extracted folder must have the compressed Docker images, anymal_agent.tar.gz and webrtc_controller.tar.gz, the docker-compose.yaml file, and the .env_template template file for the required environment variables.

  4. Load the Docker images into your Docker runtime:

    docker load -i anymal_agent.tar.gz
    docker load -i webrtc_controller.tar.gz

Learn more about data extraction.

Deploy ANYmal agent

Set environment variables

Rename the .env_template to .env and fill in the environment variables.

Cognite

ParameterDescription
COGNITE_CLIENT_IDEnter client ID.
COGNITE_CLIENT_SECRETEnter client secret.
COGNITE_TOKEN_URLEnter the token URL.
COGNITE_TENANT_IDEnter Microsoft Entra tenant ID instead of setting COGNITE_TOKEN_URL if you're using Microsoft Entra ID. The COGNITE_TENANT_ID will be used if you set COGNITE_TOKEN_URL and COGNITE_TENANT_ID.
COGNITE_SCOPESEnter the scopes to expand or restrict the access.
COGNITE_PROJECTEnter the name of the Cognite project.
COGNITE_CLUSTEREnter the name of the Cognite cluster.

ANYmal

ParameterDescription
ANYMAL_SERVEREnter the ANYmal server to connect to, for example, 172.21.0.1:58050.
ANYMAL_ROBOT_NAMEEnter the name of the robot to connect to.
ANYMAL_STATE_UPDATE_PERIOD_MILLISECSEnter the rate at which states are sent from the ANYymal device agent, for example, 100".
ANYBOTICS_CREDENTIALS_DIREnter the path to the ANYymal credentials folder (with ads-cli.crt and ads-cli.pem).
COGNITE_ANYMAL_CLIENT_NAMEEnter the name of the Cognite ANYymal Data Service client, for example cognite_anymal_agent.
DATA_FOLDER_PATHEnter the path to an existing folder on the computer the Cognite agent is running on. The data folder is used to temporarily store inspection data before uploading it to CDF.
CONFIG_FOLDER_PATHEnter the path to an existing folder on the machine the Cognite agent is running on. The configuration folder can contain an ANYymal-to Cognite-asset mapping. See Upload an ANYmal environment and Parse ANYmal missions.
LOG_LEVELCognite agent log level. Possible level values are DEBUG, INFO, WARNING, ERROR.
LOG_LEVEL_ANYMALANYymal client log level. Possible level values are DEBUG, INFO, WARNING, ERROR.

Video stream

ParameterDescription
ANYMAL_CERTIFICATEEnter the path to the ads-cli.crt file ("/usr/share/ads/credentials/ads-cli.crt").
ANYMAL_CERTIFICATE_KEYEnter the path to the ads-cli.pem file ("/usr/share/ads/credentials/ads-cli.crt").
ANYMAL_ROOT_CAEnter the path to a root certificate. You can skip it if ANYMAL_SKIP_AUTH_VERIFY=true.
ANYMAL_SKIP_AUTH_VERIFYEnter true or false if the agent skips verifying the root certificate.
ANYMAL_PREFERRED_STREAMEnter "zoom_camera" or "thermal_camera". The agent currently doesn't support online changing of streams.
ANYMAL_INSECUREEnter true when connecting to the ANYbotics simulator, otherwise, enter false.
WEBRTC_CONFIGSelect the correct configuration file: set to "config-anymal-twilio".

Environments and missions

ParameterDescription
MISSION_FOLDEREnter the path to the folder to upload ANYmal mission files.
ENVIRONMENT_FOLDEREnter the path to the folder to upload ANYmal environment files.

Run the ANYmal agent

From a folder that contains the .env file and the docker-compose.yaml file, run the following commands:

  • To run all images:
docker-compose up -d
  • To stop the Docker container:
docker compose down
  • To run the device agent only:
docker compose up -d anymal-agent
  • To run the video agent:
docker compose up -d webrtc-controller

Upload an ANYmal environment

The anymal-environment-parser parses ANYmal environment files and converts them to an InRobot waypoint map and location. The location will have the same external ID as the environment file name (without extension), and the map will have the name <filename>_inspection_points. For example, if the file's name is my_environment.yaml, the location's name is my_environment, and the corresponding waypoint map's name is my_environment_inspection_points.

The environment parser isn't running continuously as part of the docker-compose.yaml file. To upload an environment, run the environment parser container with the following command in the same folder as the .env file:

docker run --env-file=.env --name anymal-environment-parser --restart unless-stopped -v ${ENVIRONMENT_FOLDER}:/environments cognite/anymal-environment-parser:latest

If your .env file is in another folder, update the --env-file path. Set the ENVIRONMENT_FOLDER environment variable to the path where the environment files are stored in your terminal session. The command will connect to the running container. Once you're done, stop the container, select the following shortcut: Mac - CMD+C and Windows - Ctrl+C.

Find an ANYmal environment file and rename it to <environment_name>.yaml, where the environment_name is the name for the location in InRobot. Add that file to the folder specified by the ENVIRONMENT_FOLDER environment variable. This makes the environment parser process the environment file and create a location, frame, and a waypoint map in CDF.

For example, if you have an environment file called my_environment.yaml, add it to the folder specified by the ENVIRONMENT_FOLDER environment variable. The location in InRobot will be called my_environment, and the corresponding waypoint map will be called my_environment_inspection_points.

environments/
my_environment.yaml

If you'd like to move the new map to another location, update the map's location using Postman to update in the robotics/maps/update:

{
"items": [
{
"externalId": "my_environment_inspection_points", // The externalId of the map
"update": {
"locationExternalId": {
"set": "my_other_location" // The externalId of the location
}
}
}
]
}

Parse ANYmal missions

anymal-mission-parser parses ANYmal missions. The parser creates InRobot missions from the ANYmal mission files. The parser isn't running continuously as part of the docker-compose.yaml file. To upload missions, run the mission parser container with the following command in the same folder as the .env file:

docker run --env-file=.env --name anymal-mission-parser --restart unless-stopped -v ${MISSION_FOLDER}:/missions cognite/anymal-mission-parser:latest

If your .env file is in another folder, update the --env-file path. Set the MISSION_FOLDER environment variable to the path where the mission files are stored in your terminal session. The command will connect to the running container. Once you're done, stop the container, select the following shortcut: Mac - CMD+C and Windows - Ctrl+C.

After the environment has been parsed and uploaded to CDF, you can upload ANYmal missions trained in that environment. To parse and upload ANYmal missions, add a folder containing all the missions in the environment to the folder specified by the MISSIONS_FOLDER environment variable. The name of the folder added to the MISSIONS_FOLDER must be the environment_name.

Here are the examples of mission files:

missions/
testenvironment1/
mission1.yaml
mission2.yaml
testenvironment2/
mission3.yaml

ANYmal is deployment ready; there's no need to add sensors, tags, or other physical adjustments to your environment. ANYmal uses onboard sensors to navigate without tags or fiducials.

If a mission is triggered through the ANYmal native application and not through InRobot, linking data from inspection events to the correct asset in CDF isn't possible. To solve this, add an Anymal_AssetId: CDF_AssetInternalId in a configuration file. The file should be defined as $CONFIG_FOLDER_PATH/anymal_asset_id_to_cdf_asset_id_mapping.json, where $CONFIG_FOLDER_PATH is set in the .env file. The file format is:

{
"Anymal_AssetId1": "CDF_AssetInternalId1",
"Anymal_AssetId2": "CDF_AssetInternalId2",
}