Design By Contract

Okay, range specs would certainly be interesting.

I also once had a case with parameters, where the combination of two parameters resulted in an out-of-range condition.

You can use “roswtf” during runtime, it will report subscriptions that have no publisher, and also type mismatches.

The thing is, you never know whether a subscription might be optional, and there are also cases where either one or the other subscription can be used, but not both.

Again, I agree this would be useful to check. We’ve so far called such things “graph consistency checks”.

The video-link is here: ROSCon 2017 Vancouver Day 2: Determinism in ROS – or when things break /sometimes / and how to fix it… on Vimeo

I have since published the related code at GitHub - boschresearch/ros1_tracetools: Tracing tools for ROS, but be aware that it’s not very useful without our instrumentation of roscpp. I’m also in the process of publishing that, but not quite there, yet.

Well, yes, you could, but that’s why I would prefer to put those specs (at least in part) onto the resulting system.