#include <single_motor_controller.h>
|
| SingleMotorController (double _publish_frequency, bool _use_position_control) |
|
| SingleMotorController (double _publish_frequency) |
|
virtual | ~SingleMotorController () |
|
void | initROS () |
|
void | calculateSingleAxisTrajectory (const double &_percentage, const double &_period, const double &_max_travel, double &_x, double &_x_d, double &_x_dd) |
|
void | updateTrajectory () |
|
void | sendJointPositionCommand () |
|
void | sendJointTorqueCommand () |
|
void | increaseIterator () |
|
void | moveToZero () |
|
void | setPositionDirectly (double _joint_pos) |
|
void | setVelocityDirectly (double _joint_vel) |
|
void | setTorqueDirectly (double _torque) |
|
void | initializeMotor (double _k_p_pos, double _k_d_pos, double _k_p_vel, double _k_i_vel, double _k_p_torque, double _k_i_torque) |
|
void | initializeMotor () |
|
bool | readyToProceed () |
|
bool | initialStateReceived () |
|
void | checkForNewMessages () |
|
void | printAll () |
|
void | writeToLog () |
|
bool | keepLogging () |
|
double | getPosition () |
|
Definition at line 14 of file single_motor_controller.h.
◆ SingleMotorController() [1/2]
SingleMotorController::SingleMotorController |
( |
double |
_publish_frequency, |
|
|
bool |
_use_position_control |
|
) |
| |
◆ SingleMotorController() [2/2]
SingleMotorController::SingleMotorController |
( |
double |
_publish_frequency | ) |
|
◆ ~SingleMotorController()
virtual SingleMotorController::~SingleMotorController |
( |
| ) |
|
|
inlinevirtual |
◆ initROS()
void SingleMotorController::initROS |
( |
| ) |
|
◆ motorStateCallback()
void SingleMotorController::motorStateCallback |
( |
const sensor_msgs::JointStatePtr & |
_msg | ) |
|
|
private |
◆ readyToProceedCallback()
void SingleMotorController::readyToProceedCallback |
( |
const std_msgs::Bool & |
_msg | ) |
|
|
private |
◆ setGoalCallback()
void SingleMotorController::setGoalCallback |
( |
const std_msgs::Float32 & |
_msg | ) |
|
|
private |
◆ motorConfirmationCallback()
void SingleMotorController::motorConfirmationCallback |
( |
const std_msgs::Bool & |
_msg | ) |
|
|
private |
◆ keepLoggingCallback()
void SingleMotorController::keepLoggingCallback |
( |
const std_msgs::Bool & |
_msg | ) |
|
|
private |
◆ calculateSingleAxisTrajectory()
void SingleMotorController::calculateSingleAxisTrajectory |
( |
const double & |
_percentage, |
|
|
const double & |
_period, |
|
|
const double & |
_max_travel, |
|
|
double & |
_x, |
|
|
double & |
_x_d, |
|
|
double & |
_x_dd |
|
) |
| |
◆ updateTrajectory()
void SingleMotorController::updateTrajectory |
( |
| ) |
|
◆ sendJointPositionCommand()
void SingleMotorController::sendJointPositionCommand |
( |
| ) |
|
◆ sendJointTorqueCommand()
void SingleMotorController::sendJointTorqueCommand |
( |
| ) |
|
◆ increaseIterator()
void SingleMotorController::increaseIterator |
( |
| ) |
|
◆ moveToZero()
void SingleMotorController::moveToZero |
( |
| ) |
|
◆ setPositionDirectly()
void SingleMotorController::setPositionDirectly |
( |
double |
_joint_pos | ) |
|
◆ setVelocityDirectly()
void SingleMotorController::setVelocityDirectly |
( |
double |
_joint_vel | ) |
|
◆ setTorqueDirectly()
void SingleMotorController::setTorqueDirectly |
( |
double |
_torque | ) |
|
◆ initializeMotor() [1/2]
void SingleMotorController::initializeMotor |
( |
double |
_k_p_pos, |
|
|
double |
_k_d_pos, |
|
|
double |
_k_p_vel, |
|
|
double |
_k_i_vel, |
|
|
double |
_k_p_torque, |
|
|
double |
_k_i_torque |
|
) |
| |
◆ initializeMotor() [2/2]
void SingleMotorController::initializeMotor |
( |
| ) |
|
◆ readyToProceed()
bool SingleMotorController::readyToProceed |
( |
| ) |
|
◆ initialStateReceived()
bool SingleMotorController::initialStateReceived |
( |
| ) |
|
◆ checkForNewMessages()
void SingleMotorController::checkForNewMessages |
( |
| ) |
|
◆ printAll()
void SingleMotorController::printAll |
( |
| ) |
|
◆ writeToLog()
void SingleMotorController::writeToLog |
( |
| ) |
|
◆ keepLogging()
bool SingleMotorController::keepLogging |
( |
| ) |
|
|
inline |
◆ getPosition()
double SingleMotorController::getPosition |
( |
| ) |
|
|
inline |
◆ UNINITIALIZED_STATE
const double SingleMotorController::UNINITIALIZED_STATE = 1000.0 |
|
private |
◆ IDLE_COMMAND
const double SingleMotorController::IDLE_COMMAND = 1000.0 |
|
private |
◆ angle_offset
double SingleMotorController::angle_offset = 0.0 |
|
private |
◆ angle_pos
◆ angle_vel
double SingleMotorController::angle_vel = 0 |
|
private |
◆ angle_pos_ref
double SingleMotorController::angle_pos_ref = 0 |
|
private |
◆ angle_vel_ref
double SingleMotorController::angle_vel_ref = 0 |
|
private |
◆ angle_acc_ref
double SingleMotorController::angle_acc_ref = 0 |
|
private |
◆ torque
double SingleMotorController::torque = 0 |
|
private |
◆ torque_ref
double SingleMotorController::torque_ref = 0 |
|
private |
◆ ready_to_proceed
bool SingleMotorController::ready_to_proceed = false |
|
private |
◆ motor_initialized
bool SingleMotorController::motor_initialized = false |
|
private |
◆ current_iteration
double SingleMotorController::current_iteration = 0.0 |
|
private |
◆ keep_logging
bool SingleMotorController::keep_logging = true |
|
private |
◆ gains_set
bool SingleMotorController::gains_set = false |
|
private |
◆ publish_frequency
double SingleMotorController::publish_frequency = 100.0 |
|
private |
◆ period
double SingleMotorController::period = 2.0 |
|
private |
◆ max_iterations
double SingleMotorController::max_iterations |
|
private |
◆ max_travel
double SingleMotorController::max_travel = 0.0 |
|
private |
◆ inertia
double SingleMotorController::inertia = 0.1 |
|
private |
◆ k_p_controller
double SingleMotorController::k_p_controller = 50.0 |
|
private |
◆ k_i_controller
double SingleMotorController::k_i_controller = 10.0 |
|
private |
◆ k_d_controller
double SingleMotorController::k_d_controller = 5.0 |
|
private |
◆ k_p_pos
double SingleMotorController::k_p_pos = 1.0 |
|
private |
◆ k_i_pos
double SingleMotorController::k_i_pos = 1.0 |
|
private |
◆ k_d_pos
double SingleMotorController::k_d_pos = 5.0 |
|
private |
◆ k_p_vel
double SingleMotorController::k_p_vel = 50.0 |
|
private |
◆ k_i_vel
double SingleMotorController::k_i_vel = 50.0 |
|
private |
◆ k_d_vel
double SingleMotorController::k_d_vel = 0.0 |
|
private |
◆ k_p_torque
double SingleMotorController::k_p_torque = 100.0 |
|
private |
◆ k_i_torque
double SingleMotorController::k_i_torque = 100.0 |
|
private |
◆ k_d_torque
double SingleMotorController::k_d_torque = 0.0 |
|
private |
◆ node_handle
std::unique_ptr<ros::NodeHandle> SingleMotorController::node_handle |
|
private |
◆ motor_state_subscriber
ros::Subscriber SingleMotorController::motor_state_subscriber |
|
private |
◆ ready_to_proceed_subscriber
ros::Subscriber SingleMotorController::ready_to_proceed_subscriber |
|
private |
◆ set_goal_subscriber
ros::Subscriber SingleMotorController::set_goal_subscriber |
|
private |
◆ motor_confirmation_subscriber
ros::Subscriber SingleMotorController::motor_confirmation_subscriber |
|
private |
◆ keep_logging_subscriber
ros::Subscriber SingleMotorController::keep_logging_subscriber |
|
private |
◆ joint_command_publisher
ros::Publisher SingleMotorController::joint_command_publisher |
|
private |
◆ motor_gain_publisher
ros::Publisher SingleMotorController::motor_gain_publisher |
|
private |
◆ log_motor_state_publisher
ros::Publisher SingleMotorController::log_motor_state_publisher |
|
private |
◆ log_motor_reference_publisher
ros::Publisher SingleMotorController::log_motor_reference_publisher |
|
private |
The documentation for this class was generated from the following files: