Skip to content

Commit

Permalink
[trees] bugfix missing keys in publications (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
stonier committed Oct 7, 2019
1 parent 45a69e8 commit 65d898d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion py_trees_ros/trees.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,12 +381,17 @@ def _publish_serialised_tree(self):
client_ids=self.snapshot_visitor.visited.keys()
)
for key in visited_keys:
try:
value = str(py_trees.blackboard.Blackboard.get(key))
except KeyError:
value = "-"
tree_message.blackboard_on_visited_path.append(
diagnostic_msgs.KeyValue(
key=key,
value=str(py_trees.blackboard.Blackboard.get(key))
value=value
)
)

if py_trees.blackboard.Blackboard.activity_stream is not None:
tree_message.blackboard_activity_stream = py_trees.display.unicode_blackboard_activity_stream()
# other
Expand Down

0 comments on commit 65d898d

Please sign in to comment.