https://github.com/swri-robotics/eip_bridge
ROS to PLC bridge using Ethernet/IP
https://github.com/swri-robotics/eip_bridge
ethernet-ip plc ros ros-industrial
Last synced: 3 months ago
JSON representation
ROS to PLC bridge using Ethernet/IP
- Host: GitHub
- URL: https://github.com/swri-robotics/eip_bridge
- Owner: swri-robotics
- License: apache-2.0
- Created: 2020-04-17T16:17:08.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-03T15:02:43.000Z (about 3 years ago)
- Last Synced: 2024-03-27T04:51:12.504Z (about 1 year ago)
- Topics: ethernet-ip, plc, ros, ros-industrial
- Language: Python
- Homepage:
- Size: 29.3 KB
- Stars: 12
- Watchers: 7
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EIP Bridge
[](https://opensource.org/licenses/Apache-2.0)This repository contains a bridge between a ROS system and PLC using the Ethernet/IP (EIP) communication protocol.
## Dependencies:
1. [PyComm 1.0.8](https://github.com/ruscito/pycomm)
- `pip install pycomm==1.0.8`## Notes:
- Supported message types:
- Core PLC data types (e.g. integers, floats, booleans, strings, etc.)
- Fixed-length arrays of core PLC data types
- Not currently supported:
- User-defined type (UDT)
- User-defined type array
- Currently only tested on Allen Bradley PLCs## Configuration
The EIP bridge accepts a YAML config file specifying communication between the ROS system and PLC. This includes:
- `Subscribers`: PLC tags which should receive data from ROS topics (i.e. ROS -> PLC)
- `Publishers`: PLC tags which should publish their values as ROS messages (i.e. PLC -> ROS)
- `Services`: on-demand access via ROS service for getting/setting data of a specified type on arbitrary tagsThe format of the YAML configuration file is shown below:
``` yaml
Services:
- name:
- type:
Publishers:
- name:
tag:
type:
length:
sim_value:
Subscribers:
- name:
tag:
type:
length:
sim_value:
```
See the [example configuration file](eip_bridge/example/eip_config.yaml) for reference## Usage:
1. Create YAML file listing ROS topics to map to EIP tags
1. **(Optional)** Add the path to `pycomm` to the `PYTHONPATH` environment variable``` bash
export PYTHONPATH=
```
> Note: this should not be necessary if `pycomm` was installed using `pip`
1. Run the launch file, specifying the path to your config file``` bash
roslaunch eip_bridge eip_bridge.launch config_file:='/path/to/config.yaml' sim:=
```