This repository contains ROS2 and EtherCAT based control framework for our spine surgery robot project, but this implementation can be used with any robotic system with small modifications.Contains EtherCAT real-time thread with priority of 98. Software consists of four components (ROS2 nodes) :
• EtherCAT node : Responsible for EtherCAT communication between master and slaves and publishes acquired feedback from slaves under /slavefeedback topicname in 1 kHz frequency. Additionally, subscribes to/mastercommands topic published from control node and sends control commands to slaves via EtherCATcommunication.
• Control node : Kinematic calculations will be done in this node. This node subscribes /slavefeedback topic published from EtherCAT node and publishes control commands under /mastercommands topic.Currently this node retrieves button and joystick data from Xbox Controller via USB communication.
• GUI node : Consist of camera viewer and slave feedback visualizers such as motor state, communication state, emergency button state. Publishes under /guidata consists of soft emergency button events, subscribes to /mastercommands and /slavefeedback topics to give visual feedback to user
• Surgical Tool Node : Contains Dynamixel SDK for RS485 communication with Dynamixel motors.
Please check guides, links and documentations before installation, or using this control framework.
- ROS2
- ROS2 Life-cycle Node
- ROS2 DDS
- ROS2 QoS
- EtherCAT
- Etherlab Webpage
- IgH EtherCAT Library Documentation
- Real-time Linux
- ROS2 Real-time Background
- Article on EtherCAT-RT PREEMPT- Xenomai
- RT_Preempt Linux and IgH EtherCAT Implementation
- If you want to use Xenomai-Instalattion
- ROS2 Foxy Installation
- Dynamixel-SDK
git clone https://github.com/veysiadn/spinerobot_ws
sudo -s
source /opt/ros/foxy/setup.bash
colcon build --symlink install
. install/setup.bash
ros2 launch ./src/ethercat_nodes_launch.py