Background of package
I’ve been working on a project that (I believe) simplifies testing nodes. I have a working proof of concept that permits one to simply supply inputs (currently, just messages but extensible) and verify outputs to expected values. I’ve also been experimenting with methods of supplying parametric rules (near mappings) between input and output for testing a full parameter space.
I’m looking for feedback, and in the future some testers, to see which direction I should grow this project.
Take for example a node that filters a Twist message
/cmd_vel. Let’s propose it does two things, first it clamps the message to a certain velocity magnitude. Then, let’s say it subscribes to a Float64 message (or perhaps in the future, a dynamic parameter)
/accel_max that correspondingly considers the change in velocity and clamps acceleration.
The first and biggest pain point I see in my mind is defining tests. Rather than supplying a few test cases, I’d love to be able to just give the functional mapping of input to output and say “make sure the node follows this”. However for even relatively few degrees of freedom, this becomes costly in time.
To test such a node, I could create several extreme test cases to ensure clamping, and others to ensure acceleration limiting.
However, It would be very nice to be able to describe that velocity magnitude
v is clamped to a max value, and
dv/dt should correspond with
/accel_max. The risk of such a modality is requiring the developer maintain both the node and the tests, which for complex behavior may be unreasonable.
One modality I’ve also considered/experimented with is allowing one to provide input, record a node (or many nodes) output, and then use this as a base to test against in future work. However I don’t know how useful this would be in broad application.
First, I’m interested in how you might envision using such a tool (if at all), and what features would be most desired.
Then, I’m seeking any feedback on how to best define an input/output space for testing, and establishing those relationships.