From 01328f655e6f66986fbf045c110198046aceb17d Mon Sep 17 00:00:00 2001 From: "David V. Lu" Date: Fri, 6 Jan 2017 10:50:03 -0500 Subject: [PATCH] Plot bools --- rqt_plot/src/rqt_plot/rosplot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rqt_plot/src/rqt_plot/rosplot.py b/rqt_plot/src/rqt_plot/rosplot.py index 922583e6..54ec6813 100644 --- a/rqt_plot/src/rqt_plot/rosplot.py +++ b/rqt_plot/src/rqt_plot/rosplot.py @@ -42,7 +42,7 @@ import roslib.message import roslib.names import rospy - +import std_msgs.msg class RosPlotException(Exception): pass @@ -154,6 +154,10 @@ def _get_data(self, msg): val = msg try: if not self.field_evals: + if type(val)==std_msgs.msg.Bool: + val = val.data + if type(val)==bool: + return 1.0 if val else 0.0 return float(val) for f in self.field_evals: val = f(val)