XushengLuo92 / Hierarchical-LTL

Source code for paper "Decomposition-based Hierarchical Task Allocation and Planning for Multi-Robots under Hierarchical Temporal Logic Specifications"
https://arxiv.org/pdf/2308.10393
11 stars 1 forks source link

Some problem #3

Open Yaochangyu00 opened 1 year ago

Yaochangyu00 commented 1 year ago

Hello! @XushengLuo92 If I want to run your project, what dependencies do I need to install? I got some errors when running it. Are the locations of your main.py and hierarchical.py files wrong? ‘’‘ /bin/sh: 1: /home/yu/TaskPlanner/Hierarchical-LTL-master/src/./../ltl2ba: not found Traceback (most recent call last): File "/home/yu/TaskPlanner/Hierarchical-LTL-master/src/main.py", line 110, in time_task_element_type_robot_axis, reduced_task_network, type_robots = hierarchical_ltl_planner(args=args) File "/home/yu/TaskPlanner/Hierarchical-LTL-master/src/hierarchical_LTL.py", line 521, in hierarchical_ltl_planner task_hierarchy, primitive_subtasks, composite_subtasks = build_buchi_graph_and_poset(task_specification, workspace) File "/home/yu/TaskPlanner/Hierarchical-LTL-master/src/hierarchical_LTL.py", line 110, in build_buchi_graph_and_poset pruned_subgraph, hasse_graphs, element2edge = get_ordered_subtasks(task, workspace) File "/home/yu/TaskPlanner/Hierarchical-LTL-master/src/hierarchical_LTL.py", line 33, in get_ordered_subtasks buchi.construct_buchi_graph() File "/home/yu/TaskPlanner/Hierarchical-LTL-master/src/buchi_parse.py", line 46, in construct_buchi_graph output = subprocess.check_output(dirname + "/./../ltl2ba -f \"" + self.formula + "\"", shell=True).decode( File "/home/yu/anaconda3/envs/LPH/lib/python3.9/subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/home/yu/anaconda3/envs/LPH/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '/home/yu/TaskPlanner/Hierarchical-LTL-master/src/./../ltl2ba -f "<> p100_1_1_0 && <> p200_1_1_0 && !p200_1_1_0 U p100_1_1_0"' returned non-zero exit status 127. ‘’’

XushengLuo92 commented 1 year ago

Hello, the software LTL2BA need be installed. The instructions are included in the updated README.md.

Yaochangyu00 commented 1 year ago

Thank you for your update! Then, I still encountered some problems during the operation. Can you please answer them? Thank you very much! Traceback (most recent call last): File "/home/yu/TaskPlanner/Hierarchical-LTL-master/main.py", line 113, in <module> hierarchical_ltl_planner(args=args) File "/home/yu/TaskPlanner/Hierarchical-LTL-master/hierarchical_LTL.py", line 541, in hierarchical_ltl_planner vis_graph(semantic_reduced_task_network, 'label', 'data/task_network', True) File "/home/yu/TaskPlanner/Hierarchical-LTL-master/hierarchical_LTL.py", line 420, in vis_graph nx.nx_agraph.write_dot(graph, title+'.dot') File "/home/yu/anaconda3/envs/LPH/lib/python3.9/site-packages/networkx/drawing/nx_agraph.py", line 203, in write_dot A.write(path) File "/home/yu/anaconda3/envs/LPH/lib/python3.9/site-packages/pygraphviz/agraph.py", line 1272, in write fh = self._get_fh(path, "w") File "/home/yu/anaconda3/envs/LPH/lib/python3.9/site-packages/pygraphviz/agraph.py", line 1793, in _get_fh fh = open(path, mode=mode) FileNotFoundError: [Errno 2] No such file or directory: 'data/task_network.dot'

XushengLuo92 commented 1 year ago

The data folder does not exist. Fixed in the latest code. Do not forget to install Gurobi.