Skip to content

Commit

Permalink
[watchers] bugfix dot to string functionality (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
stonier committed May 19, 2019
1 parent 2a72bb9 commit 9a7872c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changelog
Forthcoming
-----------
* [conversions] bugfix msg_to_behaviour for decorators
* [watchers] bugfix tree-watchers dot-graph to string functionality

1.0.0 (2019-04-28)
------------------
Expand Down
9 changes: 6 additions & 3 deletions py_trees_ros/trees.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,12 +513,15 @@ def deserialise_tree_recursively(msg):
target_directory=directory_name
)
xdot_program = py_trees.utilities.which('xdot')
xdot_program = None

if not xdot_program:
console.logerror("No xdot viewer found, skipping display [hint: sudo apt install xdot]")
print(py_trees.display.dot_graph(root=root).to_string())
print("")
console.logerror("No xdot viewer found [hint: sudo apt install xdot]")
print("")
print(py_trees.display.dot_tree(root=root).to_string())
self.done = True
self.xdot_process = 1
self.xdot_process = None
return

filename = py_trees.utilities.get_valid_filename(root.name) + '.dot'
Expand Down

0 comments on commit 9a7872c

Please sign in to comment.