ROS2 CANopen—
Supporting CANopen in ROS2

Design goals

Why complete reimplementation for ROS2?

Understandability andExtendability

Maintainability

Robust Parallel Requests

Plain ROS2 Interface

ros2_control
Interface

Extensive Documentation

OpenOverviewGeneral Based on the Lely Core CANopen Stack(https://gitlab.com/lely_industries/lely-core) Based on ROS2 components concept, CANopen
master and drivers are components

canopencanopen_core

canopen_interfaces

Package aggregating

Device containers, master and driver

ROS interface descriptions

ros2_canopen packages

interfaces, standard master.

canopen_base_driver

canopen_proxy_driver

canopen_402_driver

Abstract driver for interacting with

Generic driver with interface for

A driver for motion controllers

lely_core_libraries.

nmt, sdo, pdo communications

implementing CIA402 profile.

 Don’t hardcode, configure Licensed under Apache 2.0 where possible(currently only canopen_402_driver needs to beunder LGPLv3)

Page 307.11.2022© Fraunhofer IPA

canopen_ros2_control

canopen_ros2_controller

ros2_control system interface

Controller for sending genericcommands

lely_core_libraries

canopen_fake_slaves

A ros2 wrapper for lely coreContains slaves that mock thelibraries.

behaviour of real devices

Open

canopen_tests
Contains tests for canopen stackthat need mock slaves.

…

Configuration

Configure MasterSettings

Different Configuration Options

Configure Driver Settings

Master Definition node id Definition of component that provides the master
driver Further master configuration options such as sync
period or heartbeat are available

Configure Device
Objects

Driver Definition of name Definition of node id Definition of component that provides the master Definition of SDO calls that are automatically executed
after device boot Definition of rpdo and tpdo configuration that is
automatically configured after device bootPage 407.11.2022© Fraunhofer IPA

Configure PDO

OpenBus Configuration

Automatic configuration artefact generation
Master DCF
User

OEM
creates

Device EDS

creates
uses@Designtime

Master BIN
CMAKEgenerates

Bus Description
Loads

Device BIN
loads@Runtime
CANopen Master
User

launches

Device Container

loads

configures
CANopen Drivers

Page 507.11.2022© Fraunhofer IPAOpen

Simplicity

Operation

Different Operating Options

Servicebased

Working All drivers expose theirfunctionality via ROS interface
 All drivers and master arecomponents
 Drivers and master are enabled
directly after launch

Under Development

OperatingOptions

Real-time Control

 Driver’s functionality is exposed
via ros2_control system interface

Page 607.11.2022© Fraunhofer IPA

ROS2control
based

Robustness

Lifecycle
service
based

Open

 All drivers expose theirfunctionality via ROS interface
 All drivers and master are
lifecycle nodes
 Lifecycle device manager enables
managing overall lifecycle

Service-based interface
Simplicity

On Launch

Executor

Configuration FilesBIN

DCF

YAML

Loads

Device Container
NodeBIN

DCF

Device Container
NodeLoads

Master Node

Master NodeConfigures

Loads

Page 707.11.2022© Fraunhofer IPA

Driver Node
Driver Node
Driver Node

Open

Driver Node
Driver Node
Driver NodeLifecycle service-based interface
Robustness

Device Container
Node

On Launch
Configuration Files
BIN

DCF

YAML

Executor
Device Container
NodeTakes

BIN

DCF

Loads

Lifecycle
MasterLifecycle
MasterConfigures

Loads

Loads

Page 807.11.2022© Fraunhofer IPA

Driver NodeDriver
NodeLifecycle
DriverDriver NodeDriver
NodeLifecycle

Lifecycle
Manager

Lifecycle
ManagerOpenDriverros2_control System Interface
Controlling – Under Development
On Creation
ROS2 CANopen
SystemInterface

Executor(ros2_control::SystemInterface)

Robot
Description

URDF

Loads

Load from URDF:

SystemInterface

ros2_control

YAML

BIN

DCF

Loads

Master NodeConfigures

Loads

Driver Nodeoperates

Page 907.11.2022© Fraunhofer IPA

Master Node

Open

Driver Node

Videoros2_canopen with lifecycle service interface

Page 1007.11.2022© Fraunhofer IPA

Open

Further Developments• Final integration of ros2_control interface• Streamlining of the different interfaces (removing code duplications etc.)• Extensive testing (Pilz PRBT, Care-O-Bot and others planned)

Page 11

07.11.2022© Fraunhofer IPAOpen

Thank you
for your attention!

—Contact—

Harsh Deshpande and Christoph Hellmann Santos
Fraunhofer IPA – Robots and assistive systems
Phone +49 711 970-1097
Christoph.hellmann.santos@ipa.fraunhofer.deFraunhofer IPA
Nobelstraße 1270569 Stuttgart
Germany
www.ipa.fraunhofer.de

Future is our productSustainable. Personalized. Smart.