45
MotionPlanning Documentation Release 1.0.0 Bharathram Hariharan May 03, 2016

MotionPlanning Documentation

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: MotionPlanning Documentation

MotionPlanning DocumentationRelease 1.0.0

Bharathram Hariharan

May 03, 2016

Page 2: MotionPlanning Documentation
Page 3: MotionPlanning Documentation

Contents

1 Introduction 31.1 ReedsShepp Car . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Collision Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3 Strategies used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.4 Sample Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.5 Improvement possibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2 Code Description 92.1 Driver Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.2 ReedsShepp Car . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.3 Environment Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.4 Graph Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3 Input/Output 15

4 Instruction to Run the Code 35

5 Indices and tables 37

Python Module Index 39

i

Page 4: MotionPlanning Documentation

ii

Page 5: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

Contents:

Contents 1

Page 6: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

2 Contents

Page 7: MotionPlanning Documentation

CHAPTER 1

Introduction

Motion planning also called piano mover’s problem, is a method for discretizing the movements controls and satisfymovement constraints for an autonomous robot. One example would be for a robot to find a path to move along abuilding which has obstacles. This is a PSPACE-hard problem.

This project aims to solve a problem involving a Car like robot (Reeds Shepp Car) to move around in a knownenvironment. Algorithm used to solve this problem is RRT* algorithm for non-holonomic robots. Here, if go close tothe goal position, it is considered as success.

1.1 ReedsShepp Car

Car is a single rigid body object.

Following are differential constraints for our non-holonomic car.

𝑡𝑜

𝜕𝑥

𝜕𝑡= 𝑈𝑠 * cos 𝜃

𝜕𝑦

𝜕𝑡= 𝑈𝑠 * sin 𝜃

𝜕𝜃

𝜕𝑡= 𝑈𝑠/𝐿 * tan𝑈𝜑(1.1)

Where,

• 𝑈𝑠: Linear velocity

• 𝑈𝜑: Maximum possible Angle between front wheel and axis along the car length.

• L: Distance between front axle and rear axle when the 𝑈𝜑 is 0.

3

Page 8: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

1.2 Collision Detection

Since we are considering a 2D world with polygonal obstacles, it is feasible to use shape library to perform geometriccomputations. Collision detection is done using shapely library.

1.3 Strategies used

• The format of robot/car and transforming them to get a set of vertices for a new config is explained inConfig.Environment._change_axis().

• To optimize computation while integrating, each object generates all of its possible motions to by integrationand caches the result. Upon requesting the steer method, the minimum is computed from the pre-cached data.

• Static variable called data is used in ReedsShepp class since the car data/specifications won’t change over thecourse of running a program.

• All the angles are taken in the range [-𝜋 𝜋]. While storing and angle, it is rotated based onReedsSheppCar.ReedsShepp._roll_over() method. Also in distance function, to make sure samebehaviour while comparing a positive angle and negative angle, all angles are converted in [0 2𝜋].

• If the path is ‘s’ or ‘b’ or ‘f’, then only the starting and end points of the line segment is tracked, otherwisefor drawing the curve, the points are discretized based on geom_skip_factor value. This is to ensure memoryoptimization at the cost of final graph plot legibility.

• The output is stored as JSON file which can be read quickly and be plotted.

• Tolerance concept and weighted knn ensures a better convergence though at a cost of error.

1.4 Sample Output

Following are the meta information about the figures.

• Blue dot at (45, 45) is the center of rear axle. The rectangle bounding the point is the car.

• Green triangle at (480, 50) is the goal position.

• Green lines/curves are the tree.

• Red lines/curves are the path which the car needs to follow.

• Remaining rectangles are obstacles.

For 1000 random points, non optimal path.

4 Chapter 1. Introduction

Page 9: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

For 1000 random points, better path.

1.4. Sample Output 5

Page 10: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

For 10000 random points, even better path.

6 Chapter 1. Introduction

Page 11: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

Note that it is difficult to check for the percentage of optimality due to the differential constraints of robot. However,visual inspection makes it clear that RRT* is better than RRT (Figures of RRT is not shown here).

1.5 Improvement possibility

• Currently, the goal is connected to the nearest neighbour if a connection is possible. The final maneuver to reachthe goal at desired orientation could be implemented.

• Better visualization can be employed.

1.5. Improvement possibility 7

Page 12: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

8 Chapter 1. Introduction

Page 13: MotionPlanning Documentation

CHAPTER 2

Code Description

2.1 Driver Code

2.2 ReedsShepp Car

class ReedsSheppCar.ReedsShepp(xy, orientation, cost, variable_time_integration=True,env_check=None, action=None)

__init__(xy, orientation, cost, variable_time_integration=True, env_check=None, action=None)Car class to define ReedsShepp car object. Any mentioning of configuration mean [x, y, orientation] datastructure.

Parameters

• xy – xy coordinate tuple of the rear axle center

• orientation – orientation angle of the car w.r.t to x-axis

• cost – cost to reach the current configuration from initial configuration

• variable_time_integration – True if the integration needs to be performed overa variable time, and is used for RRT*. False if the integration step size is fixed, and is usedfor RRT.

• env_check – Function to check if the given configuration is intersecting an obstacleof not. Function should accept an argument of tuple/list/nd.array which states and centerpoint of rear axle and orientation. (x, y, orientation) is the format.

• action – A String, which states on what action (“straight”, “left”, “right”, “reverse”,“left_reverse”, “right_reverse”) the current object is derived from the parent and the timefor which the control was given.

Returns None

_fn(t, data, us_fn, uphi_fn)Function that defines the differential constraint for ReedsShepp car.Differential constraints for ReedsSheppCar is as mentioned in http://planning.cs.uiuc.edu/ch13.pdf pg. 6 of the pdf.

Parameters

• t – time. Here this doesn’t matter as the differential equation doesn’t have a variable t.

• data – (x, y, orientation) tuple or list or nd.array.

• us_fn – Linear velocity in m/s or cm/s.

9

Page 14: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

• uphi_fn – Turning angle of the car

Returns Next state after integrating or time t.

_generate_steer_possibilities_fixed()Function to generate all possible 6 steer methods whose integration time is limited to data[”epsilon”] forthe car at this current configuration. This function updates self.steer_possibilities_fixed dictionary.

Returns None

_generate_steer_possibilities_vr()Function to generate all possible 6 steer methods whose integration time is limited todata[”time_to_cover_entire_perimeter”] for the car at this current configuration. This function updatesself.steer_possibilities_vr dictionary.

Returns None

_roll_over(angle)Converting an angle which is not bounded by any limit to an angle in -math.pi to math.pi range. eg:math.radians(182) = math.radians(-172)

Parameters angle – in radians

Returns Angle in -math.pi to math.pi

_runge_kutta_fixed(us_rk, uphi_rk)4th order runge-kutta integration method with fixed step size given in data[”epsilon”]. Note that the inte-gration breaks once the car hits an obstacle. Return next state after integrating over the step size.

Parameters

• us_rk – Linear velocity control input. A number.

• uphi_rk – Turning angle control input. A number.

Returns None if no possible steps, else a numpy array of numpy array which gives the informa-tion of on x, y, orientation upon each integrating steps (h).

_runge_kutta_helper(ur_h, uphi_h, epsilon)Helper function for runge-kutta 4th order integration.

Parameters

• ur_h – Linear velocity control input. A number.

• uphi_h – Turning angle control input. A number.

• epsilon – Step size of integration.

Returns None if no possible steps, else a numpy array of numpy array which gives the informa-tion of on x, y, orientation upon each integrating steps (h).

_runge_kutta_variable_step(Us_rk, Uphi_rk)4th order runge-kutta integration method step size limited to data[”time_to_cover_entire_perimeter”].Note that the integration breaks once the car hits an obstacle. Return next state after integrating overthe step size.

Parameters

• us_rk – Linear velocity control input. A number.

• uphi_rk – Turning angle control input. A number.

Returns None if no possible steps, else a numpy array of numpy array which gives the informa-tion of on x, y, orientation upon each integrating steps (h).

10 Chapter 2. Code Description

Page 15: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

get_next_best_state(nearest_conf, distance_function)

Obtains the best possible steer method to reach nearest_conf configuration as close as possiblefrom the current configuration. Note that this method considers fixed integration. Raises excep-tion if self.variable_time_integration is True.

Parameters

• nearest_conf – The destination configuration.

• distance_function – Distance function for determining the closest neighbour.

Returns None if no possible motions else, a tuple with control name at first index (0) andnp.array of next possible configurations at second index (1).

steer(z_end, distance_fn, tolerance_steer, within_tolerance=False)Obtains the best possible steer method to reach z_end configuration from the current configuration. Thismethod takes the best of best configuration of all possible steer types (“straight”, “left”, etc). Note that thismethod considers variable integration. Raises exception if self.variable_time_integration is False.

Parameters

• z_end – The destination configuration.

• distance_fn – Distance function for determining the closest neighbour.

• within_tolerance – boolean. True if the destination needs to be reached within thetolerant limit, and False if the car needs to reach z_end as close as possible.

Returns None if no possible motions else, a tuple of following format. (min_steer_name,(min_t, min_value, min_index, steps)), where min_steer_name is the name of the action,min_t is the integration time, min_value is the value from distance fuction between z_endand config at min_t and steps is the nd.array for all the intermediate configurations.

class ReedsSheppCar.DataNotDefinedExceptionstatic variable “data” a dictionary needs to be defined before using this class. “data” should have the followingattributes.

•data[’l’] : distance between front_axle and rear axle of the car

•data[’Us’] : linear_velocity of the car

•data[’Uphi’] : maximum turning angle of the car (same of all turns)

•data[”ro_min”] : minimum turning radius, given by abs(data[”l”]/math.tan(data[”Uphi”]))

•data[”delta_t”] : h value for 4th order runge kutta integration

•data[”epsilon”] : step size for integration. Required for RRT and not for RRTStar

•data[”time_to_cover_entire_perimeter”] : time to cover entire perimeter for the car, given by2*math.pi*data[”ro_min”]/data[”Us”]. i.e, distance/velocity.

•data[”collision_check_skip_factor”] : how often the collision check should be skipped while integrating.

•data[”tolerance”] : maximum tolerance between any match in configuration

•data[”theta_norm”] : [x, y, theta] normalization vector for the distance function.

2.2. ReedsShepp Car 11

Page 16: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

2.3 Environment Configuration

2.4 Graph Data Structure

class Graph.Vertex(name, data)

__init__(name, data)Vertex class for graph data structure.

Parameters

• name – Name of the vertex.

• data – Additional associated data.

Returns None

remove_edge(destination)Removes an edge. raise key error if the object is not found. This O(1) operation since the self.adj_verticesis a dictionary.

Parameters destination – vertex object

Returns None.

class Graph.Edge(source, destination, weight)

__init__(source, destination, weight)Edge class to store edge information.

Parameters

• source – Source vertex object.

• destination – Destination vertex object.

• weight – Edge weight which is a number.

Returns None

class Graph.Graph

__init__()Graph data structure. self.vertex_map holds all the vertex mapped by its name. Hence the name needs tohashable.

add_edge(source, destination, weight, source_data=None, destination_data=None, directed=False, ig-nore_previous_destination_data_validation=True, set_destination_parent=False)

Method to add a new edge.

Parameters

• source – Source object.

• destination – Destination object.

• weight – Edge weight.

• source_data – Optional source_data if adding the source vertex for the first time.

• destination_data – Optional destination_data if adding the destination vertex forthe first time.

12 Chapter 2. Code Description

Page 17: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

• directed – True for undirected and False for directed.

• ignore_previous_destination_data_validation – If set to True, raise Ob-jectAlreadyPresentException if destination is present already. If set to False, the methodignore this check.

• set_destination_parent – If directed it set to True and set_destination_parent setto True, then each child will have it parent stored in variable pi in vertex object.

Returns None

add_vertex(node_name, data=None)Add a new vertex.

Parameters

• node_name – Name of the vertex.

• data – Associated data object.

has_key(k)To check is a vertex k exists of not.

Parameters k – Vertex name.

Returns boolean. True if present, False if not.

min_path(source, goal, return_as_list=False)Dijkstra algorithm.

Parameters

• source – Source name

• goal – Destination name

• return_as_list – Boolean variable which determines the return output.

Returns If return_as_list is set to True, return a list of vertex names as a list else, None.

traverse_to(source, destination)To traverse from child to parent until the parent’s pi variable is None.

Parameters

• source – Source object name.

• destination – Destination object name.

Returns A list of traversal path.

class MinHeap.MinHeap(data, key)This class is for Object and key for which the priority has to built should be passed while initializing. Buildheap method will be called once the object is instantiated. updateData will also call the build heap method withthe new data.

build_heap()Builds heap from self.data.

Returns None

decrease_key(node, newValue, setKeyFunction)Decrease the key by bubble up operation.

Parameters

• node – The object whose priority has to decreased

2.4. Graph Data Structure 13

Page 18: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

• newValue – The new value of the Key in the object

• setKeyFunction – Key setter function in object

Returns Boolean

extract_min()To extract min element from the heap.

Returns Min element object

min_heapify(i)Performs min heapify at index i.

Parameters i – index

Returns None

updateData(data, key)This method populates data and updates key if a heap object has to be reused.

Parameters

• data – iteratable data

• key – function to point the comparable variable.

Returns None

14 Chapter 2. Code Description

Page 19: MotionPlanning Documentation

CHAPTER 3

Input/Output

Following are the requirements for input environment json file.

• resolution: Canvas dimension n. eg: n=500 –> means 0-500, 0-500 along x-axis and y-axis respectively.

• initial_state: x, y of the rear axle center at initial state. eg: [45, 45].

• initial_orientation: Orientation angle in degree at initial state. eg: 45.

• goal_state: x, y of the rear axle center at goal state. eg: [480, 50].

• goal_orientation : Orientation angle in degree at goal state. eg: 90.

• random_points: Number of random point for the algorithm. eg: 5000.

• theta_norm: [x, y, theta] normalization vector for the distance function. Usually x and y be given equal weightand a constant for theta term. eg: [1, 1, 5].

• tolerance: Allowed error tolerance for distance function. eg: 1.

• geom_skip_factor: Used for drawing curves. This number defines the number of lines used while drawingcurves. eg: value 1 would yield a better looking curve than value 5. However at a cost of memory.

• collision_check_skip_factor: Frequency of collision detection while performing the integration. eg: value 1would yield higher number of collision detection, while value 4 would skip at an interval of 4 while doing theintegration. The former one would be a 4 times computational intensive than the later one.

• total_steps_for_complete_integration: Defines the h value in the 4th order Runge-Kutta integration. Highervalue yield better accuracy in integration and consequently better overall accuracy.

• obstacles: Defines a list of obstacles objects as polygon. Following is the method to define obstacles in the environment.

– shape: Has to be “polygon” for all obstacles

– property: where the vertex data goes.

* vertices: define the x, y coordinate as a list. eg: [[400, 80], [400, 0], [100, 0], [100, 80]]

• car: meta data of car robot

– linear_velocity: Velocity at which the car goes linearly. eg: 1.

– max_turning_angle: Maximum angle between the axis along the car length and the front wheel whenit is turned at its maximum.

– front_axle_back_axle_distance: Distance between the front axle and rear axle of the car.

– dimension: Defines the car dimension when its position (center of rear axle) is super imposed on 0, 0of euclidean plane. Provide the xy coordinates as a list similar to obstacles–>property–>vertices.

15

Page 20: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

Sample definition for input file is as follows.

{"resolution": 500,"initial_state": [45, 45],"initial_orientation": "45","goal_state": [480, 50],"goal_orientation" : "90","random_points": 25000,"theta_norm": [1, 1, 5],"tolerance": 1,"geom_skip_factor": 5,"collision_check_skip_factor": 4,"total_steps_for_complete_integration": 40,"obstacles": [{

"shape": "polygon","property": {

"vertices": [[400, 80],[400, 0],[100, 0],[100, 80]

]}

},{

"shape": "polygon","property": {

"vertices": [[80, 300],[80, 200],[0, 200],[0, 300]

]}

},{

"shape": "polygon","property": {

"vertices": [[100, 500],[100, 350],[0, 350],[0, 500]

]}

},{

"shape": "polygon","property": {

"vertices": [[350, 500],[350, 400],[150, 400],[150, 500]

]}

},

16 Chapter 3. Input/Output

Page 21: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

{"shape": "polygon","property": {

"vertices": [[350, 300],[350, 110],[150, 110],[150, 300]

]}

},{

"shape": "polygon","property": {

"vertices": [[500, 500],[500, 300],[450, 300],[450, 500]

]}

}

],"car": {"linear_velocity": 1,"max_turning_angle": 24.23,"front_axle_back_axle_distance": 25.62,"dimension": {

"shape": "polygon","property": {

"vertices": [[35.02, 8.58

],[

35.02, -8.58],[

-10.14, -8.58],[

-10.14, 8.58]

]}

}}

}

The output generated will have all the details similar to that of input json and additionally the tree details and pathdetails will be embedded. Extra attributes are as follows.

• control: Control input

• tree_lines: Tree as a list of line segments

• path_lines: Final path as a list of line segments

Following is a sample output file while running the RRT* for 10 iterations (To limit number of lines in this display).

17

Page 22: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

{"car": {

"dimension": {"property": {

"vertices": [[

35.02,8.58

],[

35.02,-8.58

],[

-10.14,-8.58

],[

-10.14,8.58

]]

},"shape": "polygon"

},"front_axle_back_axle_distance": 25.62,"linear_velocity": 1,"max_turning_angle": 50

},"collision_check_skip_factor": 4,"control": null,"epsilon": 10,"geom_skip_factor": 5,"goal_orientation": "90","goal_state": [

480,50

],"initial_orientation": "45","initial_state": [

45,45

],"obstacles": [

{"property": {

"vertices": [[

400,80

],[

400,0

],[

100,0

18 Chapter 3. Input/Output

Page 23: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

],[

100,80

]]

},"shape": "polygon"

},{

"property": {"vertices": [

[80,300

],[

80,200

],[

0,200

],[

0,300

]]

},"shape": "polygon"

},{

"property": {"vertices": [

[100,500

],[

100,350

],[

0,350

],[

0,500

]]

},"shape": "polygon"

},{

"property": {"vertices": [

19

Page 24: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

[350,500

],[

350,400

],[

150,400

],[

150,500

]]

},"shape": "polygon"

},{

"property": {"vertices": [

[350,300

],[

350,125

],[

150,125

],[

150,300

]]

},"shape": "polygon"

},{

"property": {"vertices": [

[500,500

],[

500,300

],[

450,300

],

20 Chapter 3. Input/Output

Page 25: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

[450,500

]]

},"shape": "polygon"

}],"path_lines": [],"random_points": 10,"resolution": 500,"stats": {

"best_z_near_count": 0,"re_wiring_count": 0

},"theta_norm": [

1,1,5

],"tolerance": 1,"total_steps_for_complete_integration": 45,"tree_lines": [

[[

45.0,45.0

],[

46.68902138519762,46.68902138519762

]],[

[46.68902138519762,46.68902138519762

],[

48.37804277039524,48.37804277039524

]],[

[48.37804277039524,48.37804277039524

],[

50.06706415559286,50.06706415559286

]],[

[50.06706415559286,50.06706415559286

21

Page 26: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

],[

51.75608554079048,51.75608554079048

]],[

[51.75608554079048,51.75608554079048

],[

53.4451069259881,53.4451069259881

]],[

[53.4451069259881,53.4451069259881

],[

55.13412831118572,55.13412831118572

]],[

[55.13412831118572,55.13412831118572

],[

56.82314969638334,56.82314969638334

]],[

[56.82314969638334,56.82314969638334

],[

58.51217108158096,58.51217108158096

]],[

[58.51217108158096,58.51217108158096

],[

60.20119246677858,60.20119246677858

]],[

[

22 Chapter 3. Input/Output

Page 27: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

60.20119246677858,60.20119246677858

],[

61.8902138519762,61.8902138519762

]],[

[61.8902138519762,61.8902138519762

],[

63.57923523717382,63.57923523717382

]],[

[63.57923523717382,63.57923523717382

],[

65.26825662237144,65.26825662237144

]],[

[65.26825662237144,65.26825662237144

],[

66.95727800756906,66.95727800756906

]],[

[66.95727800756906,66.95727800756906

],[

68.64629939276668,68.64629939276668

]],[

[68.64629939276668,68.64629939276668

],[

70.3353207779643,70.3353207779643

]],

23

Page 28: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

[[

70.3353207779643,70.3353207779643

],[

72.02434216316192,72.02434216316192

]],[

[72.02434216316192,72.02434216316192

],[

73.71336354835954,73.71336354835954

]],[

[73.71336354835954,73.71336354835954

],[

75.40238493355716,75.40238493355716

]],[

[75.40238493355716,75.40238493355716

],[

77.09140631875478,77.09140631875478

]],[

[77.09140631875478,77.09140631875478

],[

78.7804277039524,78.7804277039524

]],[

[78.7804277039524,78.7804277039524

],[

80.46944908915002,80.46944908915002

24 Chapter 3. Input/Output

Page 29: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

]],[

[80.46944908915002,80.46944908915002

],[

82.15847047434764,82.15847047434764

]],[

[82.15847047434764,82.15847047434764

],[

83.84749185954526,83.84749185954526

]],[

[83.84749185954526,83.84749185954526

],[

85.53651324474288,85.53651324474288

]],[

[85.53651324474288,85.53651324474288

],[

87.2255346299405,87.2255346299405

]],[

[87.2255346299405,87.2255346299405

],[

88.91455601513812,88.91455601513812

]],[

[88.91455601513812,88.91455601513812

],[

25

Page 30: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

90.60357740033574,90.60357740033574

]],[

[90.60357740033574,90.60357740033574

],[

92.29259878553336,92.29259878553336

]],[

[92.29259878553336,92.29259878553336

],[

93.98162017073098,93.98162017073098

]],[

[93.98162017073098,93.98162017073098

],[

95.6706415559286,95.6706415559286

]],[

[95.6706415559286,95.6706415559286

],[

97.35966294112622,97.35966294112622

]],[

[97.35966294112622,97.35966294112622

],[

99.04868432632384,99.04868432632384

]],[

[99.04868432632384,99.04868432632384

26 Chapter 3. Input/Output

Page 31: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

],[

100.73770571152146,100.73770571152146

]],[

[100.73770571152146,100.73770571152146

],[

102.42672709671908,102.42672709671908

]],[

[102.42672709671908,102.42672709671908

],[

104.1157484819167,104.1157484819167

]],[

[104.1157484819167,104.1157484819167

],[

105.80476986711432,105.80476986711432

]],[

[105.80476986711432,105.80476986711432

],[

107.49379125231194,107.49379125231194

]],[

[107.49379125231194,107.49379125231194

],[

109.18281263750956,109.18281263750956

]],[

[

27

Page 32: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

109.18281263750956,109.18281263750956

],[

110.87183402270718,110.87183402270718

]],[

[110.87183402270718,110.87183402270718

],[

112.5608554079048,112.5608554079048

]],[

[112.5608554079048,112.5608554079048

],[

114.24987679310242,114.24987679310242

]],[

[114.24987679310242,114.24987679310242

],[

115.93889817830004,115.93889817830004

]],[

[115.93889817830004,115.93889817830004

],[

117.62791956349766,117.62791956349766

]],[

[117.62791956349766,117.62791956349766

],[

119.31694094869528,119.31694094869528

]],

28 Chapter 3. Input/Output

Page 33: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

[[

119.31694094869528,119.31694094869528

],[

117.72513079490345,117.53765474779746

]],[

[117.72513079490345,117.53765474779746

],[

116.34042845565972,115.59283640612307

]],[

[116.34042845565972,115.59283640612307

],[

115.17991144126633,113.5064713350668

]],[

[115.17991144126633,113.5064713350668

],[

114.25789238824274,111.3042906394195

]],[

[114.25789238824274,111.3042906394195

],[

113.58574254182383,109.01345377609223

]],[

[113.58574254182383,109.01345377609223

],[

113.1717515145867,106.66221359699794

29

Page 34: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

]],[

[113.1717515145867,106.66221359699794

],[

113.02102505080018,104.27956790711148

]],[

[113.02102505080018,104.27956790711148

],[

113.13542205736807,101.8949018350359

]],[

[113.13542205736807,101.8949018350359

],[

113.51353167796204,99.53762542671326

]],[

[113.51353167796204,99.53762542671326

],[

114.15069069308855,97.23681093183039

]],[

[114.15069069308855,97.23681093183039

],[

115.03904103149534,95.02083425625986

]],[

[115.03904103149534,95.02083425625986

],[

30 Chapter 3. Input/Output

Page 35: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

116.1676266836299,92.91702500249748

]],[

[45.0,45.0

],[

46.68902138519762,46.68902138519762

]],[

[46.68902138519762,46.68902138519762

],[

48.37804277039524,48.37804277039524

]],[

[48.37804277039524,48.37804277039524

],[

50.06706415559286,50.06706415559286

]],[

[50.06706415559286,50.06706415559286

],[

51.75608554079048,51.75608554079048

]],[

[51.75608554079048,51.75608554079048

],[

53.4451069259881,53.4451069259881

]],[

[53.4451069259881,53.4451069259881

31

Page 36: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

],[

55.13412831118572,55.13412831118572

]],[

[55.13412831118572,55.13412831118572

],[

56.82314969638334,56.82314969638334

]],[

[56.82314969638334,56.82314969638334

],[

58.51217108158096,58.51217108158096

]],[

[58.51217108158096,58.51217108158096

],[

60.20119246677858,60.20119246677858

]],[

[60.20119246677858,60.20119246677858

],[

61.8902138519762,61.8902138519762

]],[

[61.8902138519762,61.8902138519762

],[

63.57923523717382,63.57923523717382

]],[

[

32 Chapter 3. Input/Output

Page 37: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

63.57923523717382,63.57923523717382

],[

65.26825662237144,65.26825662237144

]],[

[65.26825662237144,65.26825662237144

],[

66.95727800756906,66.95727800756906

]],[

[66.95727800756906,66.95727800756906

],[

68.64629939276668,68.64629939276668

]],[

[68.64629939276668,68.64629939276668

],[

70.3353207779643,70.3353207779643

]],[

[70.3353207779643,70.3353207779643

],[

72.02434216316192,72.02434216316192

]],[

[72.02434216316192,72.02434216316192

],[

73.71336354835954,73.71336354835954

]],

33

Page 38: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

[[

73.71336354835954,73.71336354835954

],[

75.40238493355716,75.40238493355716

]],[

[75.40238493355716,75.40238493355716

],[

76.41579776467573,76.41579776467573

]]

]}

34 Chapter 3. Input/Output

Page 39: MotionPlanning Documentation

CHAPTER 4

Instruction to Run the Code

RRTStarReedsShepp.py is the entry point file and Environments are defined in Env directory.

Programming language: Python Version: 3.4.3

Requirements for this project are mentioned in requirements.txt file.

To run the program to generate the path, use the following command.

python3 RRTStarReedsShepp.py <Input_JSON_File>python3 RRTStarReedsShepp.py Env/EnvRRTStarRS10.json

To just plot the final graph, use the following command.

python3 DrawGraph.py <Output_of_Previous_Step>python3 DrawGraph.py Env/EnvRRTStarRS10_1000_graph.json

35

Page 40: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

36 Chapter 4. Instruction to Run the Code

Page 41: MotionPlanning Documentation

CHAPTER 5

Indices and tables

• genindex

• modindex

• search

37

Page 42: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

38 Chapter 5. Indices and tables

Page 43: MotionPlanning Documentation

Python Module Index

cConfig, 12

gGraph, 12

mMinHeap, 13

rReedsSheppCar, 9

39

Page 44: MotionPlanning Documentation

MotionPlanning Documentation, Release 1.0.0

40 Python Module Index

Page 45: MotionPlanning Documentation

Index

Symbols__init__() (Graph.Edge method), 12__init__() (Graph.Graph method), 12__init__() (Graph.Vertex method), 12__init__() (ReedsSheppCar.ReedsShepp method), 9_fn() (ReedsSheppCar.ReedsShepp method), 9_generate_steer_possibilities_fixed() (ReedsShepp-

Car.ReedsShepp method), 10_generate_steer_possibilities_vr() (ReedsShepp-

Car.ReedsShepp method), 10_roll_over() (ReedsSheppCar.ReedsShepp method), 10_runge_kutta_fixed() (ReedsSheppCar.ReedsShepp

method), 10_runge_kutta_helper() (ReedsSheppCar.ReedsShepp

method), 10_runge_kutta_variable_step() (ReedsShepp-

Car.ReedsShepp method), 10

Aadd_edge() (Graph.Graph method), 12add_vertex() (Graph.Graph method), 13

Bbuild_heap() (MinHeap.MinHeap method), 13

CConfig (module), 12

DDataNotDefinedException (class in ReedsSheppCar), 11decrease_key() (MinHeap.MinHeap method), 13

EEdge (class in Graph), 12extract_min() (MinHeap.MinHeap method), 14

Gget_next_best_state() (ReedsSheppCar.ReedsShepp

method), 10

Graph (class in Graph), 12Graph (module), 12

Hhas_key() (Graph.Graph method), 13

Mmin_heapify() (MinHeap.MinHeap method), 14min_path() (Graph.Graph method), 13MinHeap (class in MinHeap), 13MinHeap (module), 13

RReedsShepp (class in ReedsSheppCar), 9ReedsSheppCar (module), 9remove_edge() (Graph.Vertex method), 12

Ssteer() (ReedsSheppCar.ReedsShepp method), 11

Ttraverse_to() (Graph.Graph method), 13

UupdateData() (MinHeap.MinHeap method), 14

VVertex (class in Graph), 12

41