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:
-
Sign in to
Cognite Data Fusion(CDF). -
Go to Data management > Integrate > Extractors.
-
Select and download the ANYmal Integration extractor. The extracted folder must have the compressed
Dockerimages,anymal_agent.tar.gz
andwebrtc_controller.tar.gz
, thedocker-compose.yaml
file, and the.env_template
template file for the required environment variables. -
Load the
Dockerimages into yourDockerruntime: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
Parameter | Description |
---|---|
COGNITE_CLIENT_ID | Enter client ID. |
COGNITE_CLIENT_SECRET | Enter client secret. |
COGNITE_TOKEN_URL | Enter the token URL. |
COGNITE_TENANT_ID | Enter COGNITE_TOKEN_URL if you're using COGNITE_TENANT_ID will be used if you set COGNITE_TOKEN_URL and COGNITE_TENANT_ID . |
COGNITE_SCOPES | Enter the scopes to expand or restrict the access. |
COGNITE_PROJECT | Enter the name of the |
COGNITE_CLUSTER | Enter the name of the |
ANYmal
Parameter | Description |
---|---|
ANYMAL_SERVER | Enter the 172.21.0.1:58050 . |
ANYMAL_ROBOT_NAME | Enter the name of the robot to connect to. |
ANYMAL_STATE_UPDATE_PERIOD_MILLISECS | Enter the rate at which states are sent from the |
ANYBOTICS_CREDENTIALS_DIR | Enter the path to the ads-cli.crt and ads-cli.pem ). |
COGNITE_ANYMAL_CLIENT_NAME | Enter the name of the Cognite cognite_anymal_agent . |
DATA_FOLDER_PATH | Enter 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_PATH | Enter the path to an existing folder on the machine the Cognite agent is running on. The configuration folder can contain an |
LOG_LEVEL | Cognite agent log level. Possible level values are DEBUG , INFO , WARNING , ERROR . |
LOG_LEVEL_ANYMAL | DEBUG , INFO , WARNING , ERROR . |
Video stream
Parameter | Description |
---|---|
ANYMAL_CERTIFICATE | Enter the path to the ads-cli.crt file ("/usr/share/ads/credentials/ads-cli.crt" ). |
ANYMAL_CERTIFICATE_KEY | Enter the path to the ads-cli.pem file ("/usr/share/ads/credentials/ads-cli.crt" ). |
ANYMAL_ROOT_CA | Enter the path to a root certificate. You can skip it if ANYMAL_SKIP_AUTH_VERIFY=true . |
ANYMAL_SKIP_AUTH_VERIFY | Enter true or false if the agent skips verifying the root certificate. |
ANYMAL_PREFERRED_STREAM | Enter "zoom_camera" or "thermal_camera" . The agent currently doesn't support online changing of streams. |
ANYMAL_INSECURE | Enter true when connecting to the false . |
WEBRTC_CONFIG | Select the correct configuration file: set to "config-anymal-twilio" . |
Environments and missions
Parameter | Description |
---|---|
MISSION_FOLDER | Enter the path to the folder to upload |
ENVIRONMENT_FOLDER | Enter the path to the folder to upload |
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.
Link ANYmal AssetId to CDF Asset external ID
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",
}