OpTaS
1.0.7
An optimization-based task specification library for trajectory optimization and model predictive control.
|
A class for implementing controllers. More...
Public Member Functions | |
def | __init__ (self, Any rosapi, int rosver, Union[None, str] config_filename, int hz, str urdf_string, bool record_solver_perf=False) |
Initializer for the ROSController class. More... | |
None | __call__ (self) |
Step the controller. More... | |
Public Member Functions inherited from optas.templates.ROSManager | |
def | __init__ (self, Any rosapi, int rosver, Union[None, str] config_filename, bool record_solver_perf=False) |
Initializer for the ROSManger class. More... | |
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 | |
urdf_string | |
The URDF for the robot as a string. More... | |
hz | |
Sampling frequency for the controller. 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 controllers.
def optas.templates.ROSController.__init__ | ( | self, | |
Any | rosapi, | ||
int | rosver, | ||
Union[None, str] | config_filename, | ||
int | hz, | ||
str | urdf_string, | ||
bool | record_solver_perf = False |
||
) |
Initializer for the ROSController 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 hz The sampling frequency (in Hz) that the controller will run. @param urdf_string The URDF for the robot passed as a string. @param record_solver_perf When true the solver duration is recorded when there is a call to solve. @return An instance of the ROSController class.
None optas.templates.ROSController.__call__ | ( | self | ) |
Step the controller.
Reset the problem, solve the problem, and pubslih the target.
optas.templates.ROSController.hz |
Sampling frequency for the controller.
optas.templates.ROSController.urdf_string |
The URDF for the robot as a string.