PPL API Reference |
|
---|
Public Member Functions | |
Construction | |
MatlabNeedleController (Robot *const _r) | |
MatlabNeedleController (Robot *const _r, XMLNode &_node) | |
MatlabNeedleController (Robot *const _r, const MatlabNeedleController &_c) | |
virtual std::unique_ptr< ControllerMethod > | Clone (Robot *const _r) const override |
virtual | ~MatlabNeedleController () |
ControllerMethod Overrides | |
virtual Control | operator() (const Cfg &_current, const Cfg &_target, const double _steps) override |
virtual Control | GetRandomControl (const Cfg &_current, const double _steps) const noexcept override |
Interface | |
ControlSet * | GetControlSet () noexcept |
void | SetControlSet (ControlSet *const _c) noexcept |
Static Public Member Functions | |
Construction | |
static std::unique_ptr< ControllerMethod > | Factory (Robot *const _r, XMLNode &_node) |
Protected Member Functions | |
Control Selection Overrides | |
virtual std::vector< double > | ComputeDesiredForce (const Cfg &_current, const Cfg &_target, const double _steps) override |
Not used within this class. More... | |
Control Selection | |
virtual Control | ComputeNearestControl (const Cfg &_current, std::vector< double > &&_force) |
virtual Control | ComputeNearestContinuousControl (const Cfg &_current, std::vector< double > &&_force) |
virtual Control | ComputeNearestDiscreteControl (const Cfg &_current, std::vector< double > &&_force) |
Protected Attributes | |
Internal State | |
Robot *const | m_robot |
The owning robot object. | |
ControlSet * | m_controls {nullptr} |
The discrete controls, if any. | |
bool | m_debug {false} |
Show debug messages? | |
A controller for a steerable needle using a matlab mechanics model.
MatlabNeedleController::MatlabNeedleController | ( | Robot *const | _r | ) |
Construct a simple controller.
_r | The robot to control. |
Construct a simple controller from an XML node.
_r | The robot to control. |
_node | The XML node to parse. |
MatlabNeedleController::MatlabNeedleController | ( | Robot *const | _r, |
const MatlabNeedleController & | _c | ||
) |
Copy a controller for another robot.
_r | The destination robot. |
_c | The controller to copy. |
|
overridevirtual |
Create a copy of this controller for another robot. This is provided so that we can copy controllers without knowing their derived type.
_r | The robot receiving the cloned controller. |
Implements ControllerMethod.
|
overridevirtual |
This is different from other controllers - it takes a number of steps instead of a time span.
_current | The current configuration. |
_target | The target configuration. |
_steps | The number of steps to take. |
Reimplemented from ControllerMethod.
|
overridevirtualnoexcept |
This is different from other controllers - it takes a number of steps instead of a time span.
_current | The current configuration. |
_steps | The number of steps to take. |
Reimplemented from ControllerMethod.
|
overrideprotectedvirtual |
Not used within this class.
Implements ControllerMethod.
|
staticinherited |
Create a dynamically-allocated controller from an XML node.
_r | The robot to control. |
_node | The XML node to read parameters from. |
|
noexceptinherited |
Get the discrete set of controls that this controller can use, if any.
|
noexceptinherited |
Set a discrete set of controls for this controller to use. This limits the controller to a subset of all possible controls accepted by a robot's actuators.
_c | The control set to use. |
|
protectedvirtualinherited |
Compute the control that produces the closest force to the ideal.
_current | The current configuration. |
_force | The desired force in the robot's local frame. |
|
protectedvirtualinherited |
Compute the continuous control that produces the closest force to the ideal.
_current | The current configuration. |
_force | The desired force in the robot's local frame. |
Reimplemented in CarlikeNeedleController.
|
protectedvirtualinherited |
Compute the discrete control that produces the closest force to the ideal.
_current | The current configuration. |
_force | The desired force in the robot's local frame. |