Giter Club home page Giter Club logo

safeplan's Introduction

SafePlan

SafePlan is an implementation of optimal temporal logic planning for multi-robot systems in uncertain semantic maps [1]. The goal of this planner is to complete collaborative high-level tasks captured by global temporal logic specifications in the presence of uncertainty in the workspace. The workspace is modeled as a semantic map determined by Gaussian distributions over landmark positions and arbitrary discrete distributions over landmark classes. We extend Linear Temporal Logic by including information-based predicates allowing us to incorporate uncertainty and probabilistic satisfaction requirements directly into the task specification. We propose a new highly scalable sampling-based approach that simultaneously searches the semantic map along with an automaton corresponding to the task and synthesizes paths that satisfy the assigned task specification.

[1] Y. Kantaros and G. J. Pappas, "Optimal Temporal Logic Planning for Multi-Robot Systems in Uncertain Semantic Maps," 2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Macau, China, 2019, pp. 4127-4132, doi: 10.1109/IROS40897.2019.8968547.

Requirements

Usage

Structures

Basic procedure

  • First, in the class Workspace specify the size of the workspace, the layout of landmarks and obstacles, and the covariance associated with each landmark. Also specify the number of classes and the class distribution.
  • Then, specify the LTL task in the class Task, which mainly involves the assigned task, the number of robots, the initial locations of robots and the minimum distance between any pair of robots, and workspace in the class Workspace that contains the information about the size of the workspace, the layout of regions and obstacles. If manual initiation is set to False, then the robots will be initated at random locations.
  • Set the parameters used in the TL-RRT* in the script biased_tree.py, such as the maximum number of iterations, the step size, sensor range, sensor noise.
  • If the output will be used by the simulation, the specify location of folder where the waypoints should be saved.
  • Run biased_TLRRT_star.py to generate the solution.
  • Finally, after the TL-RRT* terminates, the runtime and the cost of the solution are presented. What's more, the path composed of prefix and suffix parts for each robot is drawn with workspace layout when the number of robots is relatively small, otherwise, the path for each robot is printed onto the screen when the number of robots is large.

Example

Workspace

The workspace of size 150 x 150 is shown below, with l_1-l_13 being regions and o_1-o_3 being obstacles

Test Cases

For all the following test cases, the same set of parameters are used.

# parameters
# maximum number of iterations
n_max = 100000
para = dict()
# lite version, excluding extending and rewiring
para['is_lite'] = True
# step_size used in function near
para['step_size'] = 0.25 * buchi.number_of_robots
# probability used when choosing node q_p_closest
para['p_closest'] = 0.9
# probability used when deciding the target point 
para['y_rand'] = 0.99
# minimum distance between any pair of robots  
para['threshold'] = 1
# Updates landmark covariance when inside sensor range
para['update_covariance'] = True
# sensor range in meters
para['sensor_range'] = 10
# sensor measurement noise
para['sensor_R'] = 0.5

Furthermore, the construction of the tree terminates once an accepting node is detected, which is controlled in construct_biased_tree.py by line

if len(tree.goals): break

Case 1

The task involving one robot is specified by

self.formula = '<> e1  && <> ( e2 && <> e3) && !e4 U e1' 
self.subformula = {2: ['(l11_1)',0,0.8,1.5, 0],
                    3: ['(l9_1)',0,0.8,1.5, 0], 
                    1: ['(l13_1)',0,0.8,3, 0], 
                    4: ['(l11_1)',0,0.8,5, 0]
                   }
robot_initial_pos = ((25,80),)  # in the form of ((x,y), (x,y), ...)    

The output results during execution are

Time for the prefix path: 0.0066 min
Cost of path: 228.00000000000003

Case 2

The task involving two robots is specified by

self.formula = '<> e1  && <> e2 && <> e3 && !e3 U e1' 
self.subformula = {1: ['(l9_1)',0,0.8,1.5, 0],
                    2: ['(l12_2)',0,0.8,1.5, 0], 
                    3: ['(l2_1 && l10_2)',0,0.8,3, 0]
                  }
robot_initial_pos = ((25,80),(10,8)  # in the form of ((x,y), (x,y), ...)    

The output results during execution are

Time for the prefix path: 0.0995 min
Cost of path: 229.45128947213922

Case 3

The task involving five robots is specified by

self.formula = '<>e1 && <> ( e2 && <> e3) && []!e4'
self.subformula = {1: ['(l1_1 && l3_2 && l7_4 && l10_5)',0,    0.7,    1.5, 0],
                    2: ['(l9_1 && l11_2 && l8_3)',  0,    0.7,    1.5,  0],
                    3: ['(l8_1 && l7_2 && l2_3 && l6_4 && l12_5)', 0,    0.7,   1.5,  0],
                    4: ['(l13_1 || l13_2 || l13_3 || l13_4 || l13_5)', 0,    0.7,    5,  0]
                   }
robot_initial_pos = ((25,80),(10,8),(15,8),(20,8),(25,8))

The output results during execution are

Time for the prefix path: 0.2149 min
Cost of path: 535.7794199619735

safeplan's People

Contributors

samarth-kalluraya avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.