Managed Service Interface

Device Container with managed nodes

The device container implements ROS2 component manager. The load and unload services are disabled. Devices are loaded based on the Bus Configuration File (bus.yml). The device container provides the list service, which can be used with ros2cli to check which components have been loaded.

Device Manager Concept

device manager concept

The device container uses the bus description file to identify the correct drivers for each devices. On launch it will load the CANopen master node and driver nodes and pass the appropriate configuration data to the nodes. The nodes are now in unconfigured state.

When using the default launch files in canopen_core the lifecycle manager node will automatically be launched. The lifecycle manager takes care of sequencing the lifecycle of the different nodes in the device container. By bringing the lifecycle_manager to active lifecycle state, all master and driver nodes will be activated in correct sequence.

If you choose to write your own lifecycle_manager, you’ll need to remember, that the master needs to be configured and activated before any driver node can be configured or activated.

Bus Configuration

The bus configuration for the managed service interface needs to use the driver classes that are marked as lifecycle drivers. The master driver indicates whether the bus.yml will be treated as managed or un-managed service interface.

Available Driver Components

Package

Component

canopen_master_driver

ros2_canopen::LifecycleMasterDriver

canopen_proxy_driver

ros2_canopen::LifecycleProxyDriver

canopen_402_driver

ros2_canopen::LifecycleCia402Driver

Launching

The device manager has the following configuration parameters.

Parameters

Parameter

Type

Description

bus_conf

string

(Mandatory) Path to the bus configuration YAML-file

master_dcf

string

(Mandatory) Path to the DCF file to be used by the master node. Usually generated by dcfgen as master.dcf.

master_bin

string

(Optional) Path to the concise DCF (.bin) file to be used to configure the master. Usually generated by dcfgen as master.bin. (default: “”)

can_interface

string

(Mandatory) Name of the CAN interface to be used. (default: vcan0)