Giter Club home page Giter Club logo

ecat_control_ws's Introduction

Welcome to Veysi ADIN & Chunwoo Kim's ROS2 EtherCAT package.

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 /slave_feedback topic name in 1 kHz frequency. Additionally, subscribes to /controller topic, published from the control input node, / gui_buttons topic published from the GUI node, and /safety_info topic published from the safety node. Calculates target values for each motor and sends control commands to slaves via EtherCAT communication and publishes those values under the /master_commands topic.

• Control node: Acquires input data from the input device and in the current setup input device is the Xbox controller. Therefore, it gets axis data and button data from the Xbox controller and publishes it under the /controller topic. Additionally, this node subscribes to the /slave_feedback topic published from the EtherCAT node.

• GUI node: Consists of camera viewer and slave feedback visualizers such as motor state, communication state, and emergency button state. Publishes under /gui_buttons data consists of soft button events, subscribes to /master_ commands, and /slave_feedback, and /safety info topics to give visual feedback to the user. Control user interface buttons activated based on lifecycle node state.

• Safety node: Subscribes to all published topics and checks the consistency in the system, decides about the state of the system. System-related safety information is checked every cycle. Manages lifecycle node and state transitions are triggered from this node.

Published and subscribed topics for each node are shown in figure below,

Nodes Published and Subscribed Topics

and the contents of the topics are shown in figure below.

Topics and contained messages

Note that published topic messages can be changed by changing msg file contents in case custom message is required.

Please check guides, links and documentations before installation, or using this control framework.

Guides

Prerequisites

Building and running

Building

  git clone https://github.com/veysiadn/ecat_control_ws
  source /opt/ros/foxy/setup.bash
  cd ecat_control_ws
  colcon build --symlink-install

Note that, before running, you might need to change lauch_all_nodes.py file, to isolate specific CPU core in your system.

Running

  sudo -s
  source /opt/ros/foxy/setup.bash
  . install/setup.bash
  ros2 launch launch_all_nodes.py
Note that, two launch files are provided. In launch_all_nodes.py file, state transitions are requested by pressing buttons in GUI node, and Safety Node changes state for the EtherCAT node. In other launch file, ethercat_nodes_launch.py file, state transitions directly triggered in the python script, and in the current version, it brings the EtherCAT node to the active state.

ecat_control_ws's People

Contributors

bigyuun avatar

Stargazers

 avatar Neil Wang avatar  avatar injae hwang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.