gennav.planners.potential_field package¶
Submodules¶
gennav.planners.potential_field.potential_field module¶
-
class
gennav.planners.potential_field.potential_field.PotentialField(KP, ETA, THRESH, STEP_SIZE, error, *args, **kwargs)¶ Bases:
gennav.planners.base.PlannerPotential Field Class
-
KP¶ Attractive potential gain
Type: float
-
ETA¶ Repulsive potential gain
Type: float
-
THRESH¶ Distance beyond which attractive potential varies conically and repulsive potential has no effect
Type: float
-
STEP_SIZE¶ Step size for gradient descent while add a waypoint
Type: float
-
error¶ Minimum distance from the goal after which the bot will stop
Type: float
-
grad_attractive()¶ Calculates the gradient due to the attractive component of the potential field, i.e, the potential field created by the goal point
Parameters: None – Returns: The gradient due to the attractive potential field at the state of the robot Return type: grad (float)
-
grad_repulsive()¶ Calculates the gradient due to the repulsive component of the potential field, i.e, the potential field created by the obstacles
Parameters: None – Returns: Total gradient due to potential field of all obstacles at the state of the robot Return type: total_grad (float)
-
plan(start, goal, env)¶ Plans the path to be taken by the robot to get from start to goal in the form of waypoints
Parameters: - start (gennav.utils.RobotState) – starting state of the robot (x, y and z coordinates)
- goal (gennav.utils.RobotState) – goal state of the robot (x, y and z coordinates)
- env (gennav.envs.Environment) – Type of environment the robot is operating in
Returns: A list of waypoints(in the form of robot states) that the robot will follow to go to the goal from the start dict: Dictionary containing additional information
Return type: trajectory (gennav.utils.Trajectory)
-
replan(start, goal, env)¶ Replans the path to be taken by the robot to get from start to goal in the form of waypoints
Parameters: - start (gennav.utils.RobotState) – starting state of the robot (x, y and z coordinates)
- goal (gennav.utils.RobotState) – goal state of the robot (x, y and z coordinates)
- env (gennav.envs.Environment) – Type of environment the robot is operating in
Returns: A list of waypoints(in the form of robot states) that the robot will follow to go to the goal from the start dict: Dictionary containing additional information
Return type: trajectory (gennav.utils.Trajectory)
-