Skip to content

[ServoController] Fix serial packet handling and error propagation - #1341

Closed
soonhyo wants to merge 5 commits into
fkanehiro:masterfrom
soonhyo:review/servo-minimal-tests
Closed

soonhyo wants to merge 5 commits into
fkanehiro:masterfrom
soonhyo:review/servo-minimal-tests

Conversation

@soonhyo

@soonhyo soonhyo commented Sep 11, 2026

Copy link
Copy Markdown

On HIRO running QNX, partial serial reads could leave bytes from a previous transaction and cause subsequent requests to fail across servo IDs. Synchronous packet dumps also delayed service calls.

This PR:

  • Handles partial I/O with timeouts, validates frames, and serializes transactions.
  • Propagates communication failures and validates angle arrays and joint groups.
  • Makes packet dumps optional with SERVO_SERIAL_DEBUG (default OFF), while
    retaining error messages.
  • Adds optional Linux PTY regression tests through CMake/CTest.

Service signatures are unchanged. C++ consumers of ServoSerial.h must rebuild.

Regression tests passed with logging enabled and disabled.
Corresponding changes were tested on HIRO running QNX.

The protocol still cannot distinguish a late reply to an identical request.

@k-okada

k-okada commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

@soonhyo nice!, btw did HIRO ues fkanehiro/master branch?

@soonhyo

soonhyo commented Sep 11, 2026

Copy link
Copy Markdown
Author

@soonhyo nice!, btw did HIRO ues fkanehiro/master branch?

HIRO uses pazeshun/hrpsys-base’s hironxjsk-devel branch. I’ve closed this PR and opened two new PRs: one targeting fkanehiro/master (#1342 ) and another targeting hironxjsk-devel (pazeshun#1).

@soonhyo soonhyo closed this Sep 11, 2026
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