Skip to content

Drop hardware interface lifecycle state when reading fails#1712

Open
URJala wants to merge 10 commits intoUniversalRobots:mainfrom
URJala:drop_lifecycle_when_reading_fails
Open

Drop hardware interface lifecycle state when reading fails#1712
URJala wants to merge 10 commits intoUniversalRobots:mainfrom
URJala:drop_lifecycle_when_reading_fails

Conversation

@URJala
Copy link
Copy Markdown
Collaborator

@URJala URJala commented Mar 19, 2026

If non_blocking_read is false, the hardware interface will error out if it fails to read a package from rtde.
If non_blocking_read is true I have added a timeout, which is configurable through the ros2_control xacro, as it does not seem totally right to just ignore missed reads forever. The default value is 0.04 seconds like the robot_receive_timeout, but I am not sure if that is the optimal value.
Also added the timeout to the documentation.

As it is right now the driver might fail to launch if the timeout is small (<10 ms), as the first couple of cycles take a longer time I guess. Don't know if we should add a "grace period" on startup before counting toward the timeout? It is not as much of an issue on a real robot as in the simulator though.

I also added checks to write() so that if any of the calls to the robot fail, the hardware interface will also stop.

I did not write tests, as I am not sure how I would go about testing this in CI

Related to #1656

@URJala URJala force-pushed the drop_lifecycle_when_reading_fails branch from fe56071 to ac45a86 Compare March 19, 2026 13:43
@URJala URJala requested a review from urfeex March 19, 2026 15:50
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.

2 participants