Handling empty velocity or effort arrays in JointState consumers
JointState messages may legally leave velocity or effort arrays empty; indexing them by joint count crashes fragile consumers.
How to test it
Validate array lengths against the name list before reading position, velocity, or effort, and test consumers with partial messages.

ZHILIANHAI