Closed ahendrix closed 11 years ago
[watts] Should ROS_WARN and stop publishing if no messages for 3-5 seconds. ROS_WARN at startup if no messages for 10 seconds (initially), but don't publish to diagnostics
[wim] For the max: it is the controller manager that keeps track of the max value; the script only publishes this value to diagnostics. I don't think the script needs to store a state to keep track of the max.
[watts] The max value is the max value over the CM's publish interval. Since joints_to_diags doesn't publish every value, we need to track the max over joint_to_diags publish interval.
[watts] We're losing data because of this.
[watts] r32526 for all of these fixes.
[watts] r32624 for python version. max/min values still incorrect. Since its fixed in the CPP version, I think we're OK.
After talking with Wim and Ken, I'm going to spin out the CPP version to the sandbox, to pr2_mechanism_diagnostics
. See #3941 for details on what it's supposed to do.
r32626 for removal.
Problems with this script:
Script fixes:
This determines publish time, and can screw up with just a little bit of jitter: {{{ def state_cb(msg): global last_publish_time now = rospy.get_rostime() if (now - last_publish_time).to_sec() > 1.0: d = DiagnosticArray() d.header.stamp = msg.header.stamp if msg.joint_statistics == []: ds = DiagnosticStatus() ds.level = 0 ds.message = 'No Joint states published by the controller manager' ds.name = "Joints: none" d.status = [ds] else: d.status = [joint_to_diag(js) for js in msg.joint_statistics] pub_diag.publish(d) last_publish_time = now }}}
trac data: