Skip to main content
peaq ROS 2 brings the Robotics Python SDK’s identity APIs into the ROS 2 ecosystem. core_node exposes fully lifecycle-managed services so every robot can create and query decentralized identities (DIDs) without leaving ROS tooling.
ServiceTypePurpose
/peaq_core_node/identity/createpeaq_ros2_interfaces/srv/IdentityCreateCreate a DID with optional metadata
/peaq_core_node/identity/readpeaq_ros2_interfaces/srv/IdentityReadReturn the DID document linked to the node wallet

When to Use It

  • Provision new robots on the peaq network directly from ROS launch flows
  • Attach metadata to robots for fleet discovery and access control
  • Audit DID state via ROS services before orchestrating missions

Launch Prerequisites

ros2 launch peaq_ros2_core core.launch.py \
  network:=agung \
  config_yaml:=/work/peaq_ros2_examples/config/peaq_robot.yaml

ros2 lifecycle set /peaq_core_node configure
ros2 lifecycle set /peaq_core_node activate
The core node must be active to serve identity calls. Ensure the wallet in peaq_robot.yaml holds sufficient testnet funds.

Create a DID

ros2 service call /peaq_core_node/identity/create \
  peaq_ros2_interfaces/srv/IdentityCreate \
  '{metadata_json: "{\"fleet\": \"warehouse_drivers\"}"}'
Service response (abridged):
transaction_hash: 0xabc123...
status: PENDING
message: "Identity creation submitted"
Monitor progress via peaq/tx_status:
ros2 topic echo /peaq/tx_status
You will see phases such as PENDING → IN_BLOCK → FINALIZED. The node publishes the DID to /tmp/core_node.log once finalized.

Read the DID Document

ros2 service call /peaq_core_node/identity/read \
  peaq_ros2_interfaces/srv/IdentityRead
Example output:
document_json: '{"id":"did:peaq:5G...","metadata":{"fleet":"warehouse_drivers"}}'
exists: true
network: agung
Use this service to confirm metadata before handing off to mission control nodes.

Integrate in Launch Files

Embed identity creation in automated provisioning flows:
# launch/identity_provision.launch.py
from launch import LaunchDescription
from launch_ros.actions import LifecycleNode

def generate_launch_description():
    return LaunchDescription([
        LifecycleNode(
            package='peaq_ros2_core',
            executable='core_node',
            name='peaq_core_node',
            parameters=[{'config_yaml': '/work/configs/peaq_robot.yaml'}]
        )
    ])
After activation, issue a ros2 service call or include a lightweight automation node that wraps the service call to guarantee every robot registers itself when it boots.

Operational Tips

  • Store metadata (e.g., robot_model, location) to simplify downstream access control rules.
  • Use FINAL confirmation mode for production identity provisioning by setting PEAQ_ROBOT_CONFIRMATION_MODE=FINAL.
  • Automate faucet funding in CI pipelines to avoid manual intervention when spinning up new test robots.
Continue to Access Control for managing roles once identities exist.