#include <mechanical_calibration_controller.h>

Public Member Functions | |
| bool | init (hardware_interface::RobotHW *robot_hw, ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh) override |
| Get necessary params from param server. Init joint_calibration_controller. More... | |
| MechanicalCalibrationController ()=default | |
| void | update (const ros::Time &time, const ros::Duration &period) override |
| Execute corresponding action according to current calibration controller state. More... | |
Public Member Functions inherited from rm_calibration_controllers::CalibrationBase< rm_control::ActuatorExtraInterface, hardware_interface::EffortJointInterface > | |
| CalibrationBase ()=default | |
| bool | init (hardware_interface::RobotHW *robot_hw, ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh) override |
| Get necessary params from param server. Init joint_calibration_controller. More... | |
| void | starting (const ros::Time &time) override |
| Switch all of the actuators state to INITIALIZED. More... | |
| void | stopping (const ros::Time &time) override |
Public Member Functions inherited from controller_interface::MultiInterfaceController< T... > | |
| virtual bool | init (hardware_interface::RobotHW *, ros::NodeHandle &) |
| MultiInterfaceController (bool allow_optional_interfaces=false) | |
Public Member Functions inherited from controller_interface::ControllerBase | |
| virtual void | aborting (const ros::Time &) |
| virtual void | aborting (const ros::Time &) |
| bool | abortRequest (const ros::Time &time) |
| bool | abortRequest (const ros::Time &time) |
| ControllerBase ()=default | |
| ControllerBase (const ControllerBase &)=delete | |
| ControllerBase (ControllerBase &&)=delete | |
| bool | isAborted () const |
| bool | isAborted () const |
| bool | isInitialized () const |
| bool | isInitialized () const |
| bool | isRunning () const |
| bool | isRunning () const |
| bool | isStopped () const |
| bool | isStopped () const |
| bool | isWaiting () const |
| bool | isWaiting () const |
| ControllerBase & | operator= (const ControllerBase &)=delete |
| ControllerBase & | operator= (ControllerBase &&)=delete |
| bool | startRequest (const ros::Time &time) |
| bool | startRequest (const ros::Time &time) |
| bool | stopRequest (const ros::Time &time) |
| bool | stopRequest (const ros::Time &time) |
| void | updateRequest (const ros::Time &time, const ros::Duration &period) |
| void | updateRequest (const ros::Time &time, const ros::Duration &period) |
| virtual void | waiting (const ros::Time &) |
| virtual void | waiting (const ros::Time &) |
| bool | waitRequest (const ros::Time &time) |
| bool | waitRequest (const ros::Time &time) |
| virtual | ~ControllerBase ()=default |
Private Types | |
| enum | State { MOVING_POSITIVE = 3, MOVING_NEGATIVE } |
Private Attributes | |
| int | countdown_ {} |
| bool | is_center_ {} |
| bool | is_return_ {} |
| double | negative_position_ {} |
| double | position_threshold_ {} |
| double | positive_position_ {} |
| double | target_position_ {} |
| double | velocity_threshold_ {} |
Definition at line 76 of file mechanical_calibration_controller.h.
| Enumerator | |
|---|---|
| MOVING_POSITIVE | |
| MOVING_NEGATIVE | |
Definition at line 138 of file mechanical_calibration_controller.h.
|
default |
|
overridevirtual |
Get necessary params from param server. Init joint_calibration_controller.
Get params from param server and check whether these params are set.Init JointVelocityController.Check whether threshold is set correctly.
| robot_hw | The robot hardware abstraction. |
| root_nh | A NodeHandle in the root of the controller manager namespace. This is where the ROS interfaces are setup (publishers, subscribers, services). |
| controller_nh | A NodeHandle in the namespace of the controller. This is where the controller-specific configuration resides. |
Reimplemented from controller_interface::MultiInterfaceController< T... >.
Definition at line 75 of file mechanical_calibration_controller.cpp.
|
overridevirtual |
Execute corresponding action according to current calibration controller state.
Execute corresponding action according to current joint state. If INITIALIZED, target joint will be set a vel_search_ and countdown_ to move, and switch state to MOVING. If MOVING, target joint will move until current velocity lower than threshold last for a while, and switch state to CALIBRATED. If CALIBRATED, target joint velocity will be set to zero and wait for next command.
| time | The current time. |
| period | The time passed since the last call to update. |
Implements controller_interface::ControllerBase.
Definition at line 112 of file mechanical_calibration_controller.cpp.
|
private |
Definition at line 143 of file mechanical_calibration_controller.h.
|
private |
Definition at line 146 of file mechanical_calibration_controller.h.
|
private |
Definition at line 146 of file mechanical_calibration_controller.h.
|
private |
Definition at line 145 of file mechanical_calibration_controller.h.
|
private |
Definition at line 144 of file mechanical_calibration_controller.h.
|
private |
Definition at line 145 of file mechanical_calibration_controller.h.
|
private |
Definition at line 145 of file mechanical_calibration_controller.h.
|
private |
Definition at line 144 of file mechanical_calibration_controller.h.