![]() |
Tetrapod Project
|
#include <single_leg_controller.h>
Public Types | |
enum | GaitPhase { stance = 1 , swing = 2 , uninitialized = 3 } |
Gait phases. More... | |
Public Member Functions | |
SingleLegController (double _publish_frequency) | |
Constructor. More... | |
virtual | ~SingleLegController () |
Destructor. More... | |
void | initROS () |
This function initilizes ROS. More... | |
void | generalizedCoordinatesCallback (const std_msgs::Float64MultiArrayConstPtr &_msg) |
Listens to joint angle messages from the simulated leg. More... | |
void | generalizedVelocitiesCallback (const std_msgs::Float64MultiArrayConstPtr &_msg) |
Listens to joint velocity messages from the simulated leg. More... | |
void | generalizedForcesCallback (const std_msgs::Float64MultiArrayConstPtr &_msg) |
Listens to joint force messages from the simulated leg. More... | |
void | readyToProceedCallback (const std_msgs::Bool &_msg) |
The ready_to_proceed parameter is changed based on the incomming message. More... | |
void | updateSwingFootPositionTrajectory () |
Update the swing foot trajectory for the leg. More... | |
void | updateStanceFootPositionTrajectory () |
Update the stance foot tractory for the leg. More... | |
void | updateJointReferences () |
Update The joint trajectory reference based on the spatial foot trajectory. More... | |
void | updateJointTorqueCommands (const Eigen::Matrix< double, 3, 1 > &_joint_pos_ref, const Eigen::Matrix< double, 3, 1 > &_joint_vel_ref, const Eigen::Matrix< double, 3, 1 > &_joint_acc_ref, const Eigen::Matrix< double, 3, 1 > &_joint_pos, const Eigen::Matrix< double, 3, 1 > &_joint_vel) |
Update the joint torqes references based on the joint trajectories and joint states. More... | |
void | updateJointTorqueCommands () |
Overloaded function that uses the current joint references and joint states. More... | |
void | updateClosedLoopTorqueCommands () |
A non model based torque controller. More... | |
void | updateJointVelocityCommands () |
Updates the joint velocity control commands based on the joint velocity reference and the joint position error. More... | |
void | sendJointPositionCommands () |
Sends a joint position commands to the motors. More... | |
void | sendJointVelocityCommands () |
Updates the joint velocity commands and send them to the motors. More... | |
void | sendJointTorqueCommands () |
Updates the joint torque control commands based on the desired foot position. More... | |
void | increaseIterator () |
Increment the gait cycle iterator. It stops iterating when the final iteration is reached. More... | |
bool | updateGaitPhase () |
Increments the gait cycle iterator and updates the leg state. More... | |
void | updateFootTrajectoryReference () |
Update the foot trajectory based on the leg state. More... | |
bool | updatePoseControlJointTrajectoryReference () |
Update the pose control trajectory reference for the single leg. More... | |
void | setPoseGoal (Eigen::Matrix< double, 3, 1 > _foot_pos) |
Set the final and initial states for pose control trajectories. More... | |
void | setMotorGains () |
Tries to set the control gains in the motors. The function loops until it succeeds. More... | |
bool | moveFootToPosition (Eigen::Matrix< double, 3, 1 > _foot_goal_pos) |
Creates a trajectory from the current foot position to the goal foot position and moves the foot to the target position along the trajectory. Function returns when the foot is standing still at the goal position. More... | |
bool | moveJointsToSetpoints () |
The function tries to move the foot to the foot position given by the input parameters. More... | |
bool | moveFootToNominalPosition () |
The function tries to move the foot to the nominal trajectory position. More... | |
void | checkForNewMessages () |
Function used to check if any new ROS messages has been received. More... | |
bool | readyToProceed () |
Check whether or not a ready to proceed message has been received. More... | |
void | resetReadyToProceed () |
Set the ready_to_proceed flag to false. More... | |
bool | isTargetPositionReached () |
Check if the squared error between the current joint angles and target joint angles is smaller than some threshold. More... | |
bool | isJointVelocitySmall () |
Checks if the sum of squared joint velocities are smaller than a certain threshold. More... | |
bool | isInitialStateReceived () |
Check if the uninitalized joint state of the robot has been overridden by measurements. More... | |
void | printTorqueReferences () |
Print the joint torque references. More... | |
void | printSpatialTrajectories () |
Print the foot trajectory reference. More... | |
void | printJointTrajectories () |
Print the joint trajectory references. More... | |
void | printAllStates () |
Print various information about all joints. More... | |
void | writeToLog () |
Write the joint references and estimated states to the log. More... | |
GaitPhase | getGaitPhase () |
Return the leg's phase state. More... | |
Private Member Functions | |
void | jointStateCallback (const sensor_msgs::JointStatePtr &_msg) |
Listens to joint state messages from the motors The messages contains joint angles, velocities and torques for all three motors. More... | |
void | jointSetpointCallback (const std_msgs::Float64MultiArrayConstPtr &_msg) |
Listens to joint setpoints messages. More... | |
void | motorConfirmationCallback (const std_msgs::Bool &_msg) |
Listens to a confirmation message from the motors which is used to indicate if the motor gains have been set successfully. More... | |
Eigen::Matrix< double, 3, 1 > | calculateSwingLegHeightTrajectory (double _percentage, double _period, double _max_swing_height, double _hip_height) |
This function calculates the swing leg height trajectory based on various gait cycle parameters. More... | |
void | calculateSingleAxisTrajectory (const double &_percentage, const double &_period, const double &_max_travel, double &_axis_pos, double &_axis_vel, double &_axis_acc) |
This functions calculates a smooth trajectory along a single linear axis. Please see the report for details. More... | |
Private Attributes | |
Eigen::Matrix< double, 3, 1 > | foot_pos_ref = Eigen::Matrix<double, 3, 1>::Zero() |
The foot position reference relative to the hip. More... | |
Eigen::Matrix< double, 3, 1 > | foot_vel_ref = Eigen::Matrix<double, 3, 1>::Zero() |
The foot velocity reference relative to the hip. More... | |
Eigen::Matrix< double, 3, 1 > | foot_acc_ref = Eigen::Matrix<double, 3, 1>::Zero() |
The foot acceleration reference relative to the hip. More... | |
Eigen::Matrix< double, 3, 1 > | foot_pos_goal = Eigen::Matrix<double, 3, 1>::Zero() |
When using setpointTrajectory control these are the joint angles we want to reach eventually. More... | |
Eigen::Matrix< double, 3, 1 > | joint_pos_goal = Eigen::Matrix<double, 3, 1>::Zero() |
The joint angles we want to eventually reach when using pose trajectory control. More... | |
Eigen::Matrix< double, 3, 1 > | joint_pos_initial = Eigen::Matrix<double, 3, 1>::Zero() |
The joint angles at the beginning of a trajectory. More... | |
Eigen::Matrix< double, 3, 1 > | joint_pos = Eigen::Matrix<double, 3, 1>::Zero() |
The estimated joint angles of the motors. More... | |
Eigen::Matrix< double, 3, 1 > | joint_vel = Eigen::Matrix<double, 3, 1>::Zero() |
The estimated joint velocities of the motors. More... | |
Eigen::Matrix< double, 3, 1 > | joint_torque = Eigen::Matrix<double, 3, 1>::Zero() |
The estimated joint torques of the motors. More... | |
Eigen::Matrix< double, 3, 1 > | joint_pos_ref = Eigen::Matrix<double, 3, 1>::Zero() |
The reference joint angles for the motors. More... | |
Eigen::Matrix< double, 3, 1 > | joint_vel_ref = Eigen::Matrix<double, 3, 1>::Zero() |
The reference joint velocities for the motors. More... | |
Eigen::Matrix< double, 3, 1 > | joint_acc_ref = Eigen::Matrix<double, 3, 1>::Zero() |
The reference joint accelerations for the motors. More... | |
Eigen::Matrix< double, 3, 1 > | joint_torque_ref = Eigen::Matrix<double, 3, 1>::Zero() |
The reference joint torques for the motors. More... | |
Eigen::Matrix< double, 3, 1 > | joint_vel_commands = Eigen::Matrix<double, 3, 1>::Zero() |
The velocity commands sent to the motors. More... | |
Eigen::Matrix< double, 3, 1 > | joint_torque_commands = Eigen::Matrix<double, 3, 1>::Zero() |
The joint torque command being sent to the motors. More... | |
GaitPhase | gait_phase = GaitPhase::stance |
The current gait phase of the leg. More... | |
bool | ready_to_proceed = false |
A variable used to control the flow of the program. It can be set throuh a boolean message received by the ready_to_proceed_subscriber. More... | |
double | current_iteration = 0 |
The current iteration in a gait phase. This should be incremented for every control loop. More... | |
double | final_iteration = 400.0 |
The final iteration of a gait phase. More... | |
double | current_pose_iteration = 0 |
The current iteration used for pose control. More... | |
double | final_pose_iteration = 100 |
The final iteration used for pose control. More... | |
bool | gains_set = false |
Keeps track of whether or not the motor gains have been set. More... | |
const int | NUMBER_OF_MOTORS = 3 |
The number of motors used in single leg control tests. More... | |
const double | UNINITIALIZED_STATE = 100.0 |
The value of an uninitialized state. More... | |
const double | POSITION_CONVERGENCE_CRITERIA = 0.01 |
Convergence crieria for position control test. More... | |
const double | POSITION_COMMAND = 1.0 |
The identifier to be used for position command messages. More... | |
const double | VELOCITY_COMMAND = 2.0 |
The identifier to be used for velocity command messages. More... | |
const double | TORQUE_COMMAND = 3.0 |
The identifier to be used for torque command messages. More... | |
Eigen::Matrix< double, 3, 3 > | K_p = Eigen::Matrix<double, 3, 3>::Zero() |
A diagonal matrix of proportional gains for the closed loop torque controller. More... | |
Eigen::Matrix< double, 3, 3 > | K_d = Eigen::Matrix<double, 3, 3>::Zero() |
A diagonal matrix of derivative gains for the closed loop torque controller. More... | |
Eigen::Matrix< double, 3, 3 > | K_pos_error_vel_control = Eigen::Matrix<double, 3, 3>::Zero() |
A digonal matrix for of gains used for the position error in the closed loop velocity controller. More... | |
double | publish_frequency = 200.0 |
The expected publish frequency of the robot. This is used to calculate the maximum number of iterations per gait phase. More... | |
double | phase_period = 0.5 |
The duration of a phase period in seconds. More... | |
double | hip_height = 0.35 |
The standard height of the hips above the ground. More... | |
double | x_nominal = 0.1 |
The nominal x position of the foot relative to the hip. More... | |
double | y_nominal = 0.3 |
The nominal y position of the foot relative to the hip. More... | |
double | x_step_distance = 0.2 |
The step distance in the x direction. More... | |
double | y_step_distance = 0.0 |
The step distance in the y direction. More... | |
double | max_swing_height = 0.12 |
The maximum height above the ground to lift the foot. More... | |
double | pose_period |
The time used to change from one pose to the next. More... | |
double | max_pose_vel = math_utils::degToRad(50) |
Max pose control joint angle velocity [rad/s]. More... | |
double | k_p_pos_hy |
Hip yaw joint motor position control proportional gain. More... | |
double | k_i_pos_hy |
Hip yaw joint motor position control integral gain. More... | |
double | k_p_pos_hp |
Hip pitch joint motor position control proportional gain. More... | |
double | k_i_pos_hp |
Hip pitch joint motor position control integral gain. More... | |
double | k_p_pos_kp |
Knee pitch joint motor position control proportional gain. More... | |
double | k_i_pos_kp |
Knee pitch joint motor position control integral gain. More... | |
double | k_p_vel_hy |
Hip yaw joint motor velocity control proportional gain. More... | |
double | k_i_vel_hy |
Hip yaw joint motor velocity control integral gain. More... | |
double | k_p_vel_hp |
Hip pitch joint motor velocity control proportional gain. More... | |
double | k_i_vel_hp |
Hip pitch joint motor velocity control integral gain. More... | |
double | k_p_vel_kp |
Knee pitch joint motor velocity control proportional gain. More... | |
double | k_i_vel_kp |
Knee pitch joint motor velocity control integral gain. More... | |
double | k_p_torque_hy |
Hip yaw motor torque control proportional gain. More... | |
double | k_i_torque_hy |
Hip yaw motor torque control integral gain. More... | |
double | k_p_torque_hp |
Hip pitch motor torque control proportional gain. More... | |
double | k_i_torque_hp |
Hip pitch motor torque control integral gain. More... | |
double | k_p_torque_kp |
Knee pitch motor torque control proportional gain. More... | |
double | k_i_torque_kp |
Knee pitch motor torque control integral gain. More... | |
std::unique_ptr< ros::NodeHandle > | node_handle |
ROS node handle. More... | |
ros::Subscriber | generalized_coordinates_subscriber |
Subscribes to generalized coordinates messages. More... | |
ros::Subscriber | generalized_velocities_subscriber |
Subscribes to generalized velocities messages. More... | |
ros::Subscriber | generalized_forces_subscriber |
Subscribes to generalized forces messages. More... | |
ros::Subscriber | joint_state_subscriber |
Subscribes to joint state messages from the motors. More... | |
ros::Subscriber | ready_to_proceed_subscriber |
Subscribes to messages deciding whether or not we should proceed in the script. More... | |
ros::Subscriber | joint_setpoint_subscriber |
Subscribes to joint setpoint messages. More... | |
ros::Subscriber | motor_confirmation_subscriber |
Subscribes to confirmation messages from the motor. More... | |
ros::Publisher | joint_state_publisher |
Publishes velocity commands to the teensy to control the motors. More... | |
ros::Publisher | motor_gain_publisher |
Publishes desired motor gains to the motors. More... | |
sensor_msgs::JointState | motor_command_msg |
The joint state message that is sent to the Teensy. More... | |
ros::Publisher | log_joint_states_publisher |
Publishes joint positions for logging. More... | |
sensor_msgs::JointState | joint_state_log_msg |
The joint state message that is used to log states. More... | |
ros::Publisher | log_joint_references_publisher |
Publishes joint position references for logging. More... | |
sensor_msgs::JointState | joint_reference_log_msg |
The joint state message that is used to log references. More... | |
Kinematics | kinematics |
Kinematics object. More... | |
Definition at line 27 of file single_leg_controller.h.
Gait phases.
Enumerator | |
---|---|
stance | |
swing | |
uninitialized |
Definition at line 30 of file single_leg_controller.h.
SingleLegController::SingleLegController | ( | double | _publish_frequency | ) |
Constructor.
Definition at line 3 of file single_leg_controller.cpp.
|
inlinevirtual |
Destructor.
Definition at line 38 of file single_leg_controller.h.
void SingleLegController::initROS | ( | ) |
This function initilizes ROS.
Definition at line 100 of file single_leg_controller.cpp.
void SingleLegController::generalizedCoordinatesCallback | ( | const std_msgs::Float64MultiArrayConstPtr & | _msg | ) |
Listens to joint angle messages from the simulated leg.
[in] | _msg | A float array containing the simulated single leg joint angles |
Definition at line 194 of file single_leg_controller.cpp.
void SingleLegController::generalizedVelocitiesCallback | ( | const std_msgs::Float64MultiArrayConstPtr & | _msg | ) |
Listens to joint velocity messages from the simulated leg.
[in] | _msg | A float array containing the simulated single leg joint velocities |
Definition at line 204 of file single_leg_controller.cpp.
void SingleLegController::generalizedForcesCallback | ( | const std_msgs::Float64MultiArrayConstPtr & | _msg | ) |
Listens to joint force messages from the simulated leg.
[in] | _msg | A float array containing the simulated single leg joint forces |
Definition at line 214 of file single_leg_controller.cpp.
|
private |
Listens to joint state messages from the motors The messages contains joint angles, velocities and torques for all three motors.
[in] | _msg | A float array containing the motor joint states |
Definition at line 224 of file single_leg_controller.cpp.
void SingleLegController::readyToProceedCallback | ( | const std_msgs::Bool & | _msg | ) |
The ready_to_proceed parameter is changed based on the incomming message.
[in] | _msg | A bool message indicating whether or not a script can proceed |
Definition at line 239 of file single_leg_controller.cpp.
|
private |
Listens to joint setpoints messages.
[in] | _msg | A float array containing the desired hy, hp, and kp angles |
Definition at line 245 of file single_leg_controller.cpp.
|
private |
Listens to a confirmation message from the motors which is used to indicate if the motor gains have been set successfully.
[in] | _msg | A bool indicating whether or not the gains have been set successfully |
Definition at line 254 of file single_leg_controller.cpp.
|
private |
This function calculates the swing leg height trajectory based on various gait cycle parameters.
[in] | _percentage | Our location in the gait cycle in the interval [0, 1] |
[in] | _period | The gait cycle period [s] |
[in] | _max_swing_height | The maximum foot height above the ground |
[in] | _hip_height | The height of the hip relative to the ground |
Definition at line 263 of file single_leg_controller.cpp.
|
private |
This functions calculates a smooth trajectory along a single linear axis. Please see the report for details.
[in] | _percentage | The location in the gait cycle in the interval [0, 1] |
[in] | _period | The gait cycle period |
[in] | _max_travel | The maximum distance to move in a direction along the linear axis from its origin |
[out] | _x | The desired position along the axis |
[out] | _x_d | The desired velocity along the axis |
[out] | _x_dd | The desired acceleration along the axis |
Definition at line 289 of file single_leg_controller.cpp.
void SingleLegController::updateSwingFootPositionTrajectory | ( | ) |
Update the swing foot trajectory for the leg.
Definition at line 315 of file single_leg_controller.cpp.
void SingleLegController::updateStanceFootPositionTrajectory | ( | ) |
Update the stance foot tractory for the leg.
Definition at line 367 of file single_leg_controller.cpp.
void SingleLegController::updateJointReferences | ( | ) |
Update The joint trajectory reference based on the spatial foot trajectory.
Definition at line 525 of file single_leg_controller.cpp.
void SingleLegController::updateJointTorqueCommands | ( | const Eigen::Matrix< double, 3, 1 > & | _joint_pos_ref, |
const Eigen::Matrix< double, 3, 1 > & | _joint_vel_ref, | ||
const Eigen::Matrix< double, 3, 1 > & | _joint_acc_ref, | ||
const Eigen::Matrix< double, 3, 1 > & | _joint_pos, | ||
const Eigen::Matrix< double, 3, 1 > & | _joint_vel | ||
) |
Update the joint torqes references based on the joint trajectories and joint states.
[in] | _joint_pos_ref | The joint angle references |
[in] | _joint_vel_ref | the joint velocity references |
[in] | _joint_acc_ref | The joint acceleration references |
[in] | _joint_pos | The estimated joint angles |
[in] | _joint_vel | The estimated joint velocities |
Definition at line 559 of file single_leg_controller.cpp.
void SingleLegController::updateJointTorqueCommands | ( | ) |
Overloaded function that uses the current joint references and joint states.
Definition at line 553 of file single_leg_controller.cpp.
void SingleLegController::updateClosedLoopTorqueCommands | ( | ) |
A non model based torque controller.
Definition at line 596 of file single_leg_controller.cpp.
void SingleLegController::updateJointVelocityCommands | ( | ) |
Updates the joint velocity control commands based on the joint velocity reference and the joint position error.
Definition at line 548 of file single_leg_controller.cpp.
void SingleLegController::sendJointPositionCommands | ( | ) |
Sends a joint position commands to the motors.
Definition at line 601 of file single_leg_controller.cpp.
void SingleLegController::sendJointVelocityCommands | ( | ) |
Updates the joint velocity commands and send them to the motors.
Definition at line 634 of file single_leg_controller.cpp.
void SingleLegController::sendJointTorqueCommands | ( | ) |
Updates the joint torque control commands based on the desired foot position.
Definition at line 658 of file single_leg_controller.cpp.
void SingleLegController::increaseIterator | ( | ) |
Increment the gait cycle iterator. It stops iterating when the final iteration is reached.
Definition at line 763 of file single_leg_controller.cpp.
bool SingleLegController::updateGaitPhase | ( | ) |
Increments the gait cycle iterator and updates the leg state.
Definition at line 775 of file single_leg_controller.cpp.
void SingleLegController::updateFootTrajectoryReference | ( | ) |
Update the foot trajectory based on the leg state.
Definition at line 804 of file single_leg_controller.cpp.
bool SingleLegController::updatePoseControlJointTrajectoryReference | ( | ) |
Update the pose control trajectory reference for the single leg.
Definition at line 466 of file single_leg_controller.cpp.
void SingleLegController::setPoseGoal | ( | Eigen::Matrix< double, 3, 1 > | _foot_pos | ) |
Set the final and initial states for pose control trajectories.
Definition at line 428 of file single_leg_controller.cpp.
void SingleLegController::setMotorGains | ( | ) |
Tries to set the control gains in the motors. The function loops until it succeeds.
Definition at line 924 of file single_leg_controller.cpp.
bool SingleLegController::moveFootToPosition | ( | Eigen::Matrix< double, 3, 1 > | _foot_goal_pos | ) |
Creates a trajectory from the current foot position to the goal foot position and moves the foot to the target position along the trajectory. Function returns when the foot is standing still at the goal position.
Definition at line 682 of file single_leg_controller.cpp.
bool SingleLegController::moveJointsToSetpoints | ( | ) |
The function tries to move the foot to the foot position given by the input parameters.
Definition at line 751 of file single_leg_controller.cpp.
bool SingleLegController::moveFootToNominalPosition | ( | ) |
The function tries to move the foot to the nominal trajectory position.
Definition at line 756 of file single_leg_controller.cpp.
void SingleLegController::checkForNewMessages | ( | ) |
Function used to check if any new ROS messages has been received.
Definition at line 826 of file single_leg_controller.cpp.
|
inline |
Check whether or not a ready to proceed message has been received.
Definition at line 183 of file single_leg_controller.h.
|
inline |
Set the ready_to_proceed flag to false.
Definition at line 186 of file single_leg_controller.h.
bool SingleLegController::isTargetPositionReached | ( | ) |
Check if the squared error between the current joint angles and target joint angles is smaller than some threshold.
Definition at line 831 of file single_leg_controller.cpp.
bool SingleLegController::isJointVelocitySmall | ( | ) |
Checks if the sum of squared joint velocities are smaller than a certain threshold.
Definition at line 848 of file single_leg_controller.cpp.
bool SingleLegController::isInitialStateReceived | ( | ) |
Check if the uninitalized joint state of the robot has been overridden by measurements.
Definition at line 862 of file single_leg_controller.cpp.
void SingleLegController::printTorqueReferences | ( | ) |
Print the joint torque references.
Definition at line 875 of file single_leg_controller.cpp.
void SingleLegController::printSpatialTrajectories | ( | ) |
Print the foot trajectory reference.
Definition at line 880 of file single_leg_controller.cpp.
void SingleLegController::printJointTrajectories | ( | ) |
Print the joint trajectory references.
Definition at line 885 of file single_leg_controller.cpp.
void SingleLegController::printAllStates | ( | ) |
Print various information about all joints.
Definition at line 890 of file single_leg_controller.cpp.
void SingleLegController::writeToLog | ( | ) |
Write the joint references and estimated states to the log.
Definition at line 901 of file single_leg_controller.cpp.
|
inline |
Return the leg's phase state.
Definition at line 215 of file single_leg_controller.h.
|
private |
The foot position reference relative to the hip.
Definition at line 221 of file single_leg_controller.h.
|
private |
The foot velocity reference relative to the hip.
Definition at line 224 of file single_leg_controller.h.
|
private |
The foot acceleration reference relative to the hip.
Definition at line 227 of file single_leg_controller.h.
|
private |
When using setpointTrajectory control these are the joint angles we want to reach eventually.
Definition at line 230 of file single_leg_controller.h.
|
private |
The joint angles we want to eventually reach when using pose trajectory control.
Definition at line 233 of file single_leg_controller.h.
|
private |
The joint angles at the beginning of a trajectory.
Definition at line 236 of file single_leg_controller.h.
|
private |
The estimated joint angles of the motors.
Definition at line 239 of file single_leg_controller.h.
|
private |
The estimated joint velocities of the motors.
Definition at line 242 of file single_leg_controller.h.
|
private |
The estimated joint torques of the motors.
Definition at line 245 of file single_leg_controller.h.
|
private |
The reference joint angles for the motors.
Definition at line 248 of file single_leg_controller.h.
|
private |
The reference joint velocities for the motors.
Definition at line 251 of file single_leg_controller.h.
|
private |
The reference joint accelerations for the motors.
Definition at line 254 of file single_leg_controller.h.
|
private |
The reference joint torques for the motors.
Definition at line 257 of file single_leg_controller.h.
|
private |
The velocity commands sent to the motors.
Definition at line 260 of file single_leg_controller.h.
|
private |
The joint torque command being sent to the motors.
Definition at line 263 of file single_leg_controller.h.
|
private |
The current gait phase of the leg.
Definition at line 266 of file single_leg_controller.h.
|
private |
A variable used to control the flow of the program. It can be set throuh a boolean message received by the ready_to_proceed_subscriber.
Definition at line 270 of file single_leg_controller.h.
|
private |
The current iteration in a gait phase. This should be incremented for every control loop.
Definition at line 274 of file single_leg_controller.h.
|
private |
The final iteration of a gait phase.
Definition at line 277 of file single_leg_controller.h.
|
private |
The current iteration used for pose control.
Definition at line 280 of file single_leg_controller.h.
|
private |
The final iteration used for pose control.
Definition at line 283 of file single_leg_controller.h.
|
private |
Keeps track of whether or not the motor gains have been set.
Definition at line 286 of file single_leg_controller.h.
|
private |
The number of motors used in single leg control tests.
Definition at line 293 of file single_leg_controller.h.
|
private |
The value of an uninitialized state.
Definition at line 296 of file single_leg_controller.h.
|
private |
Convergence crieria for position control test.
Definition at line 299 of file single_leg_controller.h.
|
private |
The identifier to be used for position command messages.
Definition at line 302 of file single_leg_controller.h.
|
private |
The identifier to be used for velocity command messages.
Definition at line 305 of file single_leg_controller.h.
|
private |
The identifier to be used for torque command messages.
Definition at line 308 of file single_leg_controller.h.
|
private |
A diagonal matrix of proportional gains for the closed loop torque controller.
Definition at line 311 of file single_leg_controller.h.
|
private |
A diagonal matrix of derivative gains for the closed loop torque controller.
Definition at line 314 of file single_leg_controller.h.
|
private |
A digonal matrix for of gains used for the position error in the closed loop velocity controller.
Definition at line 317 of file single_leg_controller.h.
|
private |
The expected publish frequency of the robot. This is used to calculate the maximum number of iterations per gait phase.
Definition at line 321 of file single_leg_controller.h.
|
private |
The duration of a phase period in seconds.
Definition at line 324 of file single_leg_controller.h.
|
private |
The standard height of the hips above the ground.
Definition at line 327 of file single_leg_controller.h.
|
private |
The nominal x position of the foot relative to the hip.
Definition at line 330 of file single_leg_controller.h.
|
private |
The nominal y position of the foot relative to the hip.
Definition at line 333 of file single_leg_controller.h.
|
private |
The step distance in the x direction.
Definition at line 336 of file single_leg_controller.h.
|
private |
The step distance in the y direction.
Definition at line 339 of file single_leg_controller.h.
|
private |
The maximum height above the ground to lift the foot.
Definition at line 342 of file single_leg_controller.h.
|
private |
The time used to change from one pose to the next.
Definition at line 345 of file single_leg_controller.h.
|
private |
Max pose control joint angle velocity [rad/s].
Definition at line 348 of file single_leg_controller.h.
|
private |
Hip yaw joint motor position control proportional gain.
Definition at line 351 of file single_leg_controller.h.
|
private |
Hip yaw joint motor position control integral gain.
Definition at line 354 of file single_leg_controller.h.
|
private |
Hip pitch joint motor position control proportional gain.
Definition at line 357 of file single_leg_controller.h.
|
private |
Hip pitch joint motor position control integral gain.
Definition at line 360 of file single_leg_controller.h.
|
private |
Knee pitch joint motor position control proportional gain.
Definition at line 363 of file single_leg_controller.h.
|
private |
Knee pitch joint motor position control integral gain.
Definition at line 366 of file single_leg_controller.h.
|
private |
Hip yaw joint motor velocity control proportional gain.
Definition at line 369 of file single_leg_controller.h.
|
private |
Hip yaw joint motor velocity control integral gain.
Definition at line 372 of file single_leg_controller.h.
|
private |
Hip pitch joint motor velocity control proportional gain.
Definition at line 375 of file single_leg_controller.h.
|
private |
Hip pitch joint motor velocity control integral gain.
Definition at line 378 of file single_leg_controller.h.
|
private |
Knee pitch joint motor velocity control proportional gain.
Definition at line 381 of file single_leg_controller.h.
|
private |
Knee pitch joint motor velocity control integral gain.
Definition at line 384 of file single_leg_controller.h.
|
private |
Hip yaw motor torque control proportional gain.
Definition at line 387 of file single_leg_controller.h.
|
private |
Hip yaw motor torque control integral gain.
Definition at line 390 of file single_leg_controller.h.
|
private |
Hip pitch motor torque control proportional gain.
Definition at line 393 of file single_leg_controller.h.
|
private |
Hip pitch motor torque control integral gain.
Definition at line 396 of file single_leg_controller.h.
|
private |
Knee pitch motor torque control proportional gain.
Definition at line 399 of file single_leg_controller.h.
|
private |
Knee pitch motor torque control integral gain.
Definition at line 402 of file single_leg_controller.h.
|
private |
ROS node handle.
Definition at line 409 of file single_leg_controller.h.
|
private |
Subscribes to generalized coordinates messages.
Definition at line 412 of file single_leg_controller.h.
|
private |
Subscribes to generalized velocities messages.
Definition at line 415 of file single_leg_controller.h.
|
private |
Subscribes to generalized forces messages.
Definition at line 418 of file single_leg_controller.h.
|
private |
Subscribes to joint state messages from the motors.
Definition at line 421 of file single_leg_controller.h.
|
private |
Subscribes to messages deciding whether or not we should proceed in the script.
Definition at line 424 of file single_leg_controller.h.
|
private |
Subscribes to joint setpoint messages.
Definition at line 427 of file single_leg_controller.h.
|
private |
Subscribes to confirmation messages from the motor.
Definition at line 430 of file single_leg_controller.h.
|
private |
Publishes velocity commands to the teensy to control the motors.
Definition at line 433 of file single_leg_controller.h.
|
private |
Publishes desired motor gains to the motors.
Definition at line 436 of file single_leg_controller.h.
|
private |
The joint state message that is sent to the Teensy.
Definition at line 439 of file single_leg_controller.h.
|
private |
Publishes joint positions for logging.
Definition at line 442 of file single_leg_controller.h.
|
private |
The joint state message that is used to log states.
Definition at line 445 of file single_leg_controller.h.
|
private |
Publishes joint position references for logging.
Definition at line 448 of file single_leg_controller.h.
|
private |
The joint state message that is used to log references.
Definition at line 451 of file single_leg_controller.h.
|
private |
Kinematics object.
Definition at line 456 of file single_leg_controller.h.