# Copyright (c) 2023, AgiBot Inc.
# All rights reserved.

aimrt:
  plugin:
    plugins:
      - name: ros2_plugin
        path: ./libaimrt_ros2_plugin.so
        options:
          node_name: example_ros2_rpc_client_node
          executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded
          executor_thread_num: 2
  log:
    core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off
    backends:
      - type: console
  executor:
    executors:
      - name: work_thread_pool
        type: asio_thread
        options:
          thread_num: 4
      - name: timeout_handle
        type: time_wheel
        options:
          bind_executor: work_thread_pool
  rpc:
    backends:
      - type: ros2
        options:
          timeout_executor: timeout_handle
          clients_options:
            - func_name: "(.*)"
              qos:
                history: keep_last
                depth: 10
                reliability: reliable
                durability: volatile
                deadline: -1
                lifespan: -1
                liveliness: automatic
                liveliness_lease_duration: -1
    clients_options:
      - func_name: "(.*)"
        enable_backends: [ros2]
  module:
    pkgs:
      - path: ./libros2_rpc_client_pkg.so
        enable_modules: [NormalRpcCoClientModule]
    modules:
      - name: NormalRpcCoClientModule
        log_lvl: INFO

# Module custom configuration
NormalRpcCoClientModule:
  rpc_frq: 0.5
