https://github.com/pollen-robotics/poulpe_ethercat_controller
A rust based ethercat master controller for the Poulpe boards
https://github.com/pollen-robotics/poulpe_ethercat_controller
ethercat grpc pollen-robotics rust
Last synced: about 1 month ago
JSON representation
A rust based ethercat master controller for the Poulpe boards
- Host: GitHub
- URL: https://github.com/pollen-robotics/poulpe_ethercat_controller
- Owner: pollen-robotics
- License: apache-2.0
- Created: 2024-05-16T12:03:08.000Z (almost 2 years ago)
- Default Branch: develop
- Last Pushed: 2025-10-02T16:32:40.000Z (6 months ago)
- Last Synced: 2025-10-02T18:29:00.617Z (6 months ago)
- Topics: ethercat, grpc, pollen-robotics, rust
- Language: Jupyter Notebook
- Homepage: https://pollen-robotics.github.io/poulpe_ethercat_controller/
- Size: 24.1 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Poulpe ethercat controller
[![Build Status]][actions]  
[Build Status]: https://img.shields.io/github/actions/workflow/status/pollen-robotics/poulpe_ethercat_controller/rust.yml?branch=develop
[actions]: https://github.com/pollen-robotics/poulpe_ethercat_controller/actions?query=branch%3Adevelop
This is a full EtherCAT stack that manages the communication with the poulpe boards through EtherCAT network primarlly developed for the use in the [Reachy2](https://pollen-robotics.com) robot's [Orbita2d](https://github.com/pollen-robotics/orbita3d_control) and [Orbita3d](https://github.com/pollen-robotics/orbita3d_control) actuators.
The code is written in rust. It is intended to communicate with poulpe boards running the [firmware_Poulpe](https://github.com/pollen-robotics/firmware_Poulpe).
The full stack looks something like this:

`ethercat_controller` creates the direct connection to the EtherCAT master deamon (which communicates with the poulpe boards). `poulpe_ethercat_controller` provides the abstraction layer for the poulpe boards around the `ethercat_controller`. Finally, `poulpe_ethercat_grpc` creates the `server` that can be accessed by multiple `client` instances.
Fin out more in our docs: [docs](https://pollen-robotics.github.io/poulpe_ethercat_controller/)
## Installation
Se more complete installation guide in the [docs](https://pollen-robotics.github.io/poulpe_ethercat_controller/installation)
### Prerequisites
For using this code, you need to have the following installed: see the [installation guide](https://pollen-robotics.github.io/poulpe_ethercat_controller/installation/installation_ethercat/)
The you can start the master with:
```shell
sudo ethercatctl start
```
And see the connected slaves with:
```shell
ethercat slaves
```
### Building
Clone the repo
```shell
git clone git@github.com:pollen-robotics/poulpe_ethercat_controller.git
```
Check out the branches that you need, depending on the poulpe firmware version that you are using.
`firmware_poulpe` version | `poulpe_etehract_controller` version
--- | ---
v0.9.x | 0.9.x
v1.0.x | 1.0.x or higher
v1.5.x | 1.5.x
For example if you are using the v1.5.x firmware version you should check out the 1.5.x branch:
```shell
git checkout 1.5.x
```
Make sure to have rust installed: [Rust](https://www.rust-lang.org/tools/install) as well as the Ethercat master.
```shell
cargo build --release
```
### Running
Make sure you have your EteherCAT master running and the poulpe boards connected.
To run the server, you need to have the ethercat master running.
```shell
RUST_LOG=info cargo run --release config/ethercat.yaml
```
Example output with only one slave connected (NeckOrbita3d):
```shell
$ RUST_LOG=info cargo run --release config/ethercat.yaml
[2024-12-03T07:58:37Z INFO ethercat_controller::ethercat_controller] Found 1 slaves
[2024-12-03T07:58:37Z INFO ethercat_controller::ethercat_controller] Slave "NeckOrbita3d" at position 0
[2024-12-03T07:58:37Z INFO server] Setup Slave 0...
[2024-12-03T07:58:37Z INFO ethercat_controller::ethercat_controller] Master and all slaves operational!
[2024-12-03T07:58:37Z INFO poulpe_ethercat_controller] Slave 0, inital state: SwitchOnDisabled
[2024-12-03T07:58:37Z INFO poulpe_ethercat_controller] Slave 0, setup done! Current state: SwitchedOn
[2024-12-03T07:58:37Z INFO server] Done!
[2024-12-03T07:58:37Z INFO server] POULPE controller ready!
[2024-12-03T07:58:47Z INFO ethercat_controller::ethercat_controller] EtherCAT loop: 913.37 Hz
...
```
The server is now running and you can connect to it using the clients. For example to make a sinusoidal movement with the NeckOrbita3d, you can run the following command:
```shell
RUST_LOG=info cargo run --release --examples client_sinus 0 # takes the slave id or name as argument
```
## Support
This project adheres to the Contributor [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [contact@pollen-robotics.com](mailto:contact@pollen-robotics.com).
Visit [pollen-robotics.com](https://pollen-robotics.com) to learn more or join our [Dicord community](https://discord.gg/vnYD6GAqJR) if you have any questions or want to share your ideas.
Follow [@PollenRobotics](https://twitter.com/pollenrobotics) on Twitter for important announcements.