OpTaS
1.0.7
An optimization-based task specification library for trajectory optimization and model predictive control.
|
A class for implementing motion planners. More...
Public Member Functions | |
def | __init__ (self, Any rosapi, int rosver, Union[None, str] config_filename, bool record_solver_perf=False) |
Initializer for the ROSPlanner class. More... | |
None | set_duration (self, float duration) |
Union[None, float] | get_duration (self) |
interpolate.interp1d | plan (self) |
Solve the planning problem. More... | |
Public Member Functions inherited from optas.templates.ROSManager | |
None | add_subscriber (self, str topic_name, Any msg_type) |
Creates a subscriber. More... | |
Any | get_state (self, str topic_name) |
Get the most current message. More... | |
bool | is_ready (self) |
True when messages have been recieved on all topics. More... | |
None | publish_target (self, cs.DM target) |
Publish a target to ROS. More... | |
None | create_state_listener (self) |
Creates the state listener. More... | |
Public Member Functions inherited from optas.templates.Manager | |
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... | |
None | reset (self) |
Reset the optimization problem. More... | |
cs.DM | get_target (self) |
Return the target from the solution. More... | |
Public Attributes | |
duration | |
Duration of the motion plan (set using set_duration). More... | |
Public Attributes inherited from optas.templates.ROSManager | |
rosapi | |
For ROS 1, this is rospy (ie. More... | |
rosver | |
ROS version (i.e. More... | |
Float64MultiArray | |
Float array message type. More... | |
target_pub | |
Target publisher. More... | |
msgs | |
Dictionary containing messages from the state listener. More... | |
Public Attributes inherited from optas.templates.Manager | |
config_filename | |
record_solver_perf | |
config | |
solver | |
solve | |
num_solves | |
solver_duration | |
solution | |
Additional Inherited Members | |
Static Public Attributes inherited from optas.templates.ROSManager | |
dictionary | state_listener = {} |
ROS state listener. More... | |
A class for implementing motion planners.
def optas.templates.ROSPlanner.__init__ | ( | self, | |
Any | rosapi, | ||
int | rosver, | ||
Union[None, str] | config_filename, | ||
bool | record_solver_perf = False |
||
) |
Initializer for the ROSPlanner class.
@param rosapi For ROS 1, this is rospy (ie. import rospy, and pass the module). For ROS 2, this is the node. @param rosver When using ROS 1, pass 1, and if using ROS 2, pass 2. @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 ROSPlanner class.
Reimplemented from optas.templates.ROSManager.
Union[None, float] optas.templates.ROSPlanner.get_duration | ( | self | ) |
Return duration for the motion plan. When None is returned, this means that the duration is not yet set. @return Duration of the motion plan.
interpolate.interp1d optas.templates.ROSPlanner.plan | ( | self | ) |
Solve the planning problem.
Reset the problem, solve the problem, and interpolate the result.
@return The interpolated plan as a function of time.
None optas.templates.ROSPlanner.set_duration | ( | self, | |
float | duration | ||
) |
Set the duration for the motion plan.
optas.templates.ROSPlanner.duration |
Duration of the motion plan (set using set_duration).