Skip to content

Feature/56 python part of utility library for sdo data type conversion#59

Open
AntonOh wants to merge 56 commits into
mainfrom
feature/56-python-part-of-utility-library-for-sdo-data-type-conversion
Open

Feature/56 python part of utility library for sdo data type conversion#59
AntonOh wants to merge 56 commits into
mainfrom
feature/56-python-part-of-utility-library-for-sdo-data-type-conversion

Conversation

@AntonOh

@AntonOh AntonOh commented May 30, 2026

Copy link
Copy Markdown

Context

When using the SOEM library for SDO read and write the value being read or written is passed as bytes. Using this, rise-motion makes both SDO read and write available as services. The datatype used in the ROS2 message definition is uint8[]. rclpy maps this to a list of integers (representing bytes). To enable sending and receiving data with SDO read and write (using python) there needs to be library which encodes and decodes python data types into a list of integers (representing bytes) according to the EtherCAT specifications.

Changes

  • there are two generic python functions to convert to and fro for all EtherCAT base data types (from the tables 119 and 120 out of "ETG.1020 EtherCAT Protocol Enhancements")
  • every function has a descriptive docstring
  • test before every conversion from byte list to data type if the byte list has the right size for the data type
  • test before every conversion from data type to byte list if variable is valid
  • unit tests for every data type
  • returns integer -1 on error

Resources

Documentation issue
EtherCAT Encoding rules can be found in ETG.1000.6 and tables of base data types in ETG.1020 which can be downloaded by members of the EtherCAT Technology Group on ethercat.org.

Acceptance criteria

  • possible to convert a data type to a builtins.list which can then be inserted into a ROS2 message
  • possible to convert a builtins.list and the info which data type it contains into that data type
  • tested this on a real EtherCAT device

AntonOh and others added 30 commits May 22, 2026 17:48
@AntonOh AntonOh linked an issue May 30, 2026 that may be closed by this pull request
6 tasks
@github-actions github-actions Bot added the Idle No one is currently working on the issue, its sitting in the backlog... label May 30, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, you just created your first merge request! See the following link for some guidance infromation on the first merge request! https://riseos-docs-e1325d.gitlab-pages.tu-berlin.de/docs/contributing/devops/git/git-merge/

@paulwetzel

Copy link
Copy Markdown
Member

@AntonOh this branch is currently failing the CI pileine, seems like the resulting ros2 project can't be build. Could you look into this, and try to fix it, so that everything is green? Great, thanks!

@paulwetzel paulwetzel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before we'll review this, i am going to merge the main branch into this branch, to make sure that all random git artifacts are removed from the final branch diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Idle No one is currently working on the issue, its sitting in the backlog...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Python part of utility library for SDO data type conversion

4 participants