ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

self_test is not suitable to emulate "Design By Contract".

However self_test is not required to emulate DbC with self_test at all but would be overhead instead. It is sufficient to implement "assert" functions for parameter values, topics message values, service request/response message values and action goal/result/feedback topic message values and call them in corresponding "sections" of nodes. For "asserting" different alternatives come to mind: diagnostics status.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "DbC violation" or logging rospy.logerr("DbC violation").