Skip to content

Fix ROS 2 port: lcec symbol fix, HAL pin nan values, EtherCAT IO module init hang#2

Merged
zultron merged 11 commits intotormach:humblefrom
zultron:zultron/2025-07-31_fix_lcec_symbols
Sep 10, 2025
Merged

Fix ROS 2 port: lcec symbol fix, HAL pin nan values, EtherCAT IO module init hang#2
zultron merged 11 commits intotormach:humblefrom
zultron:zultron/2025-07-31_fix_lcec_symbols

Conversation

@zultron
Copy link
Copy Markdown
Contributor

@zultron zultron commented Jul 31, 2025

User @futnuh on the Tormach robot forums pointed out a linker problem loading the lcec component because of a missing symbol, LCEC_PDOINIT.

https://forums.tormach.com/t/ros2-support-for-the-za6/2370/8

That's now fixed in this branch:
https://github.com/zultron/linuxcnc-ethercat/tree/zultron/2025-07-31-fix_linker_error

...along with the bit-rotted GH Actions config that pushes the packages here:
https://cloudsmith.io/~zultron/repos/etherlabmaster-test/packages/

This PR bumps an env var in the Dockerfile that invalidates cache and forces the new version of the package to be installed.

It also prints an error and exits the Docker build if the EtherCAT master is running, which causes the Docker image build to fail with only cryptic error messages.

Updates:

  • Fix issue where qc comp has nan value for HAL pins; this is the result of a Machinekit HAL fix that needed corresponding changes in the HAL config
  • Fix problem with iTegva IO module init hanging; this is the result of drive param handling updates that weren't tested against devices that don't have params to update

With these changes, user reports ZA6 with IS620N drives and iTegva IO module now resets and moves.

This PR depends on tormach/hw_device_mgr#22. The changes to devel_scripts/docker/ros_custom/repos.yaml will need to be reverted after that PR is merged.

zultron added 2 commits July 31, 2025 18:04
The `linuxcnc-ethercat` packages had a typo in the sources, causing a
dynamic linker error when the `lcec` component was loaded.  This is
fixed in the cloudsmith repos.  `ENV PACKAGE_UPDATE_SERIAL` is bumped
to pick up that change.

The Docker image build will fail if the EtherCAT master is running.
Print out a big fat warning and exit if it is running.
@zultron zultron force-pushed the zultron/2025-07-31_fix_lcec_symbols branch from e67ec3b to 80fd4ed Compare July 31, 2025 23:07
zultron added 5 commits August 4, 2025 19:29
Silence joint_trajectory_controller error:

    [hal_mgr-1] [ERROR 1754338069.553251029] [joint_trajectory_controller]: Trajectories with effort fields are currently not supported. (validate_trajectory_msg() at ./src/joint_trajectory_controller.cpp:1559)

Remove unneeded `vel_fb`.

Log zero trajectory for debugging.

Fix case where `load` pin isn't cleared.
* Fix HAL pins with `-nan` value causing robot startup to fail

Fixes ROB-922

The `latency.icomp` has an output pin, `curr_periodf`, that is
initialized with a zero value.  That's connected to the other pins
through the `curr_periodf` signal.  Our recent patch to Machinekit
propagates the value of an output pin to the signal when linked, so
that explains the behavior change.

The `pll` comp was initializing the `periodf` pin to 0.001, so the fix
here is to intialize the `latency` comp `curr_periodf` pin to 0.001
instead.

(Cherry-picked from 6eda3cf2 in ROS 1 stack)
- Log device mgr state changes and respond to fault state
- Improve timeout code
- Improve exception handling
@zultron
Copy link
Copy Markdown
Contributor Author

zultron commented Aug 6, 2025

Updated PR with fixes for more issues found by futnuh. :D

The main problem was a bug we fixed in Machinekit HAL needed changes in a HAL comp from this repo.

@zultron zultron force-pushed the zultron/2025-07-31_fix_lcec_symbols branch from 6ba312f to 1d5c91c Compare August 7, 2025 22:29
@zultron
Copy link
Copy Markdown
Contributor Author

zultron commented Aug 8, 2025

Added more commits. @futnuh reported his machine is up and running!

  • Pull in more hw_device_mgr changes updating the ROS 2 interfaces
  • Fix an issue where the iTegva IO module (which has no params) hangs startup on param init
    • With these changes, the ROS 2 port is confirmed working on robots with the IS620N + iTegva IO drives

Huge thanks to @futnuh for reporting these problems and for iterating through several test cycles!

@zultron zultron changed the title Zultron/2025 07 31 fix lcec symbols Fix ROS 2 port: lcec symbol fix, HAL pin nan values, EtherCAT IO module init hang Aug 8, 2025
@zultron zultron merged commit b58078a into tormach:humble Sep 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant