OpTaS  1.0.7
An optimization-based task specification library for trajectory optimization and model predictive control.
Public Member Functions | Public Attributes | Private Member Functions | List of all members
optas.templates.Manager Class Reference

Base manager class. More...

Inheritance diagram for optas.templates.Manager:
Inheritance graph
[legend]
Collaboration diagram for optas.templates.Manager:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, Union[None, str] config_filename=None, bool record_solver_perf=False)
 Initializer for the Manger class. More...
 
None reset_manager (self)
 Reset basic variables in the manager. More...
 
float get_solver_duration (self)
 Returns the duration of the solver. More...
 
bool is_first_solve (self)
 True when the solver is being run for the first time. More...
 
None setup_solver (self)
 Abstract methods. More...
 
bool is_ready (self)
 True when manager is ready to use. More...
 
None reset (self)
 Reset the optimization problem. More...
 
cs.DM get_target (self)
 Return the target from the solution. More...
 

Public Attributes

 config_filename
 
 record_solver_perf
 
 config
 
 solver
 
 solve
 
 num_solves
 
 solver_duration
 
 solution
 

Private Member Functions

Dict _load_configuration (self, filename)
 Load the configuration file. More...
 
Callable _initialize_solve_method (self)
 Initialize the solve method, i.e. More...
 
None _solve (self)
 Solves the optimization problem. More...
 
None _solve_and_time (self)
 Solves the optimization problem and times. More...
 

Detailed Description

Base manager class.

Constructor & Destructor Documentation

◆ __init__()

def optas.templates.Manager.__init__ (   self,
Union[None, str]   config_filename = None,
bool   record_solver_perf = False 
)

Initializer for the Manger class.

   @param config_filename Filename for a YAML configuration file. When None is passed, it is assumed there is no configuration.
   @param record_solver_perf When true the solver duration is recorded when there is a call to solve.
   @return An instance of the Manger class.

Member Function Documentation

◆ _initialize_solve_method()

Callable optas.templates.Manager._initialize_solve_method (   self)
private

Initialize the solve method, i.e.

whether to record solver duration or not.

◆ _load_configuration()

Dict optas.templates.Manager._load_configuration (   self,
  filename 
)
private

Load the configuration file.

   @param filename Filename for the YAML file.
   @return Dictionary of the configuration.

◆ _solve()

None optas.templates.Manager._solve (   self)
private

Solves the optimization problem.

◆ _solve_and_time()

None optas.templates.Manager._solve_and_time (   self)
private

Solves the optimization problem and times.

◆ get_solver_duration()

float optas.templates.Manager.get_solver_duration (   self)

Returns the duration of the solver.

   @return Duration in secs.

◆ get_target()

cs.DM optas.templates.Manager.get_target (   self)

Return the target from the solution.

For example, the target joint states. This is an abstract method.

   @return The part of the solution that represents the target. E.g. the next step in a motion plan.

◆ is_first_solve()

bool optas.templates.Manager.is_first_solve (   self)

True when the solver is being run for the first time.

   @return Boolean indicating if this is the first time the solver is called.

◆ is_ready()

bool optas.templates.Manager.is_ready (   self)

True when manager is ready to use.

This is an abstract method.

Reimplemented in optas.templates.ROSManager.

◆ reset()

None optas.templates.Manager.reset (   self)

Reset the optimization problem.

This is an abstract method.

◆ reset_manager()

None optas.templates.Manager.reset_manager (   self)

Reset basic variables in the manager.

◆ setup_solver()

None optas.templates.Manager.setup_solver (   self)

Abstract methods.

Setup the optimization solver. This is an abstract method.

Member Data Documentation

◆ config

optas.templates.Manager.config

◆ config_filename

optas.templates.Manager.config_filename

◆ num_solves

optas.templates.Manager.num_solves

◆ record_solver_perf

optas.templates.Manager.record_solver_perf

◆ solution

optas.templates.Manager.solution

◆ solve

optas.templates.Manager.solve

◆ solver

optas.templates.Manager.solver

◆ solver_duration

optas.templates.Manager.solver_duration

The documentation for this class was generated from the following file: