Skip to main content
Version: 9

License Monitoring

MoveIt Pro provides a ROS 2 service to query license status and other agent information. This is useful for implementing container health checks, automated monitoring, or detecting license validation failures.

Query License Status

Use the /get_agent_info service to retrieve license information:

ros2 service call /get_agent_info moveit_studio_agent_msgs/srv/GetAgentInfo "{info: {version: ''}}"

The response includes the LicenseInfo message with the following structure:

response:
moveit_studio_agent_msgs.srv.GetAgentInfo_Response(
status=moveit_studio_sdk_msgs.msg.RequestStatus(
success=True,
error_message=''
),
info=moveit_studio_agent_msgs.msg.AgentInfo(
version='8.9.1',
state=1,
current_objective_name='',
license=moveit_studio_agent_msgs.msg.LicenseInfo(
status=0,
type=0,
expiration_date=1789244522,
is_floating=True,
error_description=''
),
current_robot_config_name='lab_sim'
)
)

License Status Codes

The status field in the LicenseInfo message uses the following enumeration values:

  • 0 - ACTIVE: License is valid and active. This is the desired state for normal operation.
  • 1 - INACTIVE: License is valid but hasn't been properly activated. May occur if the activation process wasn't completed successfully.
  • 2 - SUSPENDED: License has been administratively suspended. Requires online validation to detect.
  • 3 - EXPIRED: License has passed its expiration date.
  • 4 - REVOKED: License has been permanently revoked.
  • 5 - INET: Internet/Network error with no offline response file, or the server sync date has passed (approximately 90 days from offline response file generation).
  • 6 - UNKNOWN: May indicate corrupted license data or system issues.

For any non-zero status, the error_description field will contain additional details about the license issue.

Implementing Container Health Checks

To implement a container health check that validates license status:

  1. Query the license status using the service call above
  2. Check that status=0 (ACTIVE) to confirm successful license validation
  3. Restart the container if the status is non-zero and you believe a restart might resolve the issue

Example shell script for a health check:

#!/bin/bash
# Check if MoveIt Pro license is active
response=$(ros2 service call /get_agent_info moveit_studio_agent_msgs/srv/GetAgentInfo "{info: {version: ''}}" --timeout 5.0 2>&1)

# Check if the service call was successful
if [ $? -ne 0 ]; then
echo "Service call failed or timed out"
exit 1 # Unhealthy
fi

# Parse the response to check if license status is 0 (ACTIVE)
# Look specifically for the license status field in the LicenseInfo message
if echo "$response" | grep -q "license=.*status=0"; then
exit 0 # Healthy
else
echo "License is not active"
exit 1 # Unhealthy
fi
tip

Before implementing automatic container restarts for license validation failures, consider using offline licenses to handle intermittent network connectivity issues, especially during cold boot scenarios when internet may not be immediately available.

warning

System clock issues can cause both online and offline license validation to fail. If you're experiencing license validation failures at startup, especially on systems without a real-time clock battery, ensure your system clock synchronization is working correctly before the license check occurs. For more details, see the Installation Troubleshooting guide.