Skip to content

LQR

python_motion_planning.local_planner.lqr.LQR

Bases: LocalPlanner

Class for Linear Quadratic Regulator(LQR) motion planning.

Parameters:

Name Type Description Default
start tuple

start point coordinate

required
goal tuple

goal point coordinate

required
env Env

environment

required
heuristic_type str

heuristic function type

'euclidean'
**params

other parameters can be found in the parent class LocalPlanner

{}

Examples:

Python Console Session
>>> from python_motion_planning.utils import Grid
>>> from python_motion_planning.local_planner import LQR
>>> start = (5, 5, 0)
>>> goal = (45, 25, 0)
>>> env = Grid(51, 31)
>>> planner = LQR(start, goal, env)
>>> planner.run()

lqrControl(s, s_d, u_r)

Execute LQR control process.

Parameters:

Name Type Description Default
s tuple

current state

required
s_d tuple

desired state

required
u_r tuple

refered control

required

Returns:

Name Type Description
u ndarray

control vector

plan()

LQR motion plan function.

Returns:

Name Type Description
flag bool

planning successful if true else failed

pose_list list

history poses of robot

run()

Running both plannig and animation.