Skip to content

Commit

Permalink
Merge pull request #36 from nilsbore/fix_tree_file
Browse files Browse the repository at this point in the history
Fixed install problem with writing last_ran_tree in installed path
  • Loading branch information
nilsbore authored Jan 4, 2021
2 parents 4a5654b + 82f5e15 commit 85103f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion smarc_bt/src/smarc_bt.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ def main(config):
viz = pt.display.ascii_tree(tree.root)
rospy.loginfo(viz)
package_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir)
last_ran_tree_path = os.path.join(package_path, 'last_ran_tree.txt')
#last_ran_tree_path = os.path.join(package_path, 'last_ran_tree.txt')
last_ran_tree_path = 'last_ran_tree.txt' # this will put it in the ~/.ros folder if run from launch file
with open(last_ran_tree_path, 'w+') as f:
f.write(viz)
rospy.loginfo("Wrote the tree to {}".format(last_ran_tree_path))
Expand Down

0 comments on commit 85103f9

Please sign in to comment.