rm_controllers
Loading...
Searching...
No Matches
rm_calibration_controllers::MechanicalCalibrationController Class Reference

#include <mechanical_calibration_controller.h>

Inheritance diagram for rm_calibration_controllers::MechanicalCalibrationController:
Collaboration diagram for rm_calibration_controllers::MechanicalCalibrationController:

Public Member Functions

 MechanicalCalibrationController ()=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.
 
void update (const ros::Time &time, const ros::Duration &period) override
 Execute corresponding action according to current calibration controller state.
 
- 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.
 
void starting (const ros::Time &time) override
 Switch all of the actuators state to INITIALIZED.
 
void stopping (const ros::Time &time) override
 

Additional Inherited Members

- Protected Types inherited from rm_calibration_controllers::CalibrationBase< rm_control::ActuatorExtraInterface, hardware_interface::EffortJointInterface >
enum  State
 
- Protected Member Functions inherited from rm_calibration_controllers::CalibrationBase< rm_control::ActuatorExtraInterface, hardware_interface::EffortJointInterface >
bool isCalibrated (control_msgs::QueryCalibrationState::Request &req, control_msgs::QueryCalibrationState::Response &resp)
 Provide a service to know the state of target actuators.
 
- Protected Attributes inherited from rm_calibration_controllers::CalibrationBase< rm_control::ActuatorExtraInterface, hardware_interface::EffortJointInterface >
ros::ServiceServer is_calibrated_srv_
 
int state_
 
double velocity_search_
 
bool calibration_success_
 
rm_control::ActuatorExtraHandle actuator_
 
effort_controllers::JointVelocityController velocity_ctrl_
 
effort_controllers::JointPositionController position_ctrl_
 

Constructor & Destructor Documentation

◆ MechanicalCalibrationController()

rm_calibration_controllers::MechanicalCalibrationController::MechanicalCalibrationController ( )
default

Member Function Documentation

◆ init()

bool rm_calibration_controllers::MechanicalCalibrationController::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.

Get params from param server and check whether these params are set.Init JointVelocityController.Check whether threshold is set correctly.

Parameters
robot_hwThe robot hardware abstraction.
root_nhA NodeHandle in the root of the controller manager namespace. This is where the ROS interfaces are setup (publishers, subscribers, services).
controller_nhA NodeHandle in the namespace of the controller. This is where the controller-specific configuration resides.
Returns
True if init successful, false when failed.

◆ update()

void rm_calibration_controllers::MechanicalCalibrationController::update ( const ros::Time & time,
const ros::Duration & period )
override

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.

Parameters
timeThe current time.
periodThe time passed since the last call to update.

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