ros-industrial / ros2_canopen

CANopen driver framework for ROS2
https://ros-industrial.github.io/ros2_canopen/manual/rolling/
125 stars 52 forks source link
canopen robotics ros2

ROS2 CANopen

Status

Build Process Status
Industrial CI Build CI Build Status
Documentation Build CI Documentation Status
Buildfarm Build (rolling) Buildfarm Status

The stack is currently under development and not yet ready for production use.

Rolling Distribution (Noble & RHEL9)

Package Noble (Ubuntu) RHEL9
canopen_interfaces Build Status Build Status
lely_core_libraries Build Status Build Status
canopen_core Build Status Build Status
canopen_master_driver Build Status Build Status
canopen_base_driver Build Status Build Status
canopen_proxy_driver Build Status Build Status
canopen_402_driver Build Status Build Status
canopen_ros2_control Build Status Build Status
canopen_ros2_controllers Build Status Build Status
canopen_tests Build Status Build Status
canopen_utils Build Status Build Status

Documentation

The documentation consists of two parts: a manual and an api reference. The documentation is built for rolling (master), iron and humble and hosted on github pages. Older ROS 2 releases are EOL and are not supported anymore.

Rolling

Iron

Humble

Features

These are some of the features this stack implements. For further information please refer to the documentation.

Post testing

To test stack after it was built from source you should first setup a virtual can network.

sudo modprobe vcan
sudo ip link add dev vcan0 type vcan
sudo ip link set vcan0 txqueuelen 1000
sudo ip link set up vcan0

Then you can launch a managed example

ros2 launch canopen_tests cia402_lifecycle_setup.launch.py
ros2 lifecycle set /lifecycle_manager configure
ros2 lifecycle set /lifecycle_manager activate

Or you can launch a standard example

ros2 launch canopen_tests cia402_setup.launch.py

Or you can launch a ros2_control example

ros2 launch canopen_tests robot_control_setup.launch.py

Contributing

This repository uses pre-commit for code formatting. This program has to be setup locally and installed inside the repository. For this execute in the repository folder following commands:

sudo apt install -y pre-commit
pre-commit install

The checks are automatically executed before each commit. This helps you to always commit well formatted code. To run all the checks manually use pre-commit run -a command. For the other options check pre-commit --help.

In a case of an "emergency" you can avoid execution of pre-commit hooks by adding -n flag to git commit command - this is NOT recommended to do if you don't know what are you doing!