#include <controller.h>
|
| Controller (int controller_freq) |
|
virtual | ~Controller () |
|
bool | RunStandUpSequence () |
|
void | waitForReadyToProceed () |
|
virtual void | UpdateFeetReferences ()=0 |
|
bool | UpdateJointCommands () |
|
bool | UpdateVelocityCommands () |
|
bool | sendJointPositionCommands () |
|
void | StandStill (const double &duration) |
|
virtual void | setInitialConfiguration () |
|
void | SetTwistCommand (double lin_vel_cmd_x, double lin_vel_cmd_y, double ang_vel_cmd_z) |
|
void | initROS () |
|
void | WaitForInitialState () |
|
bool | MoveFeetToPositions (Eigen::Matrix< double, 3, 1 > fl_goal_foot_pos, Eigen::Matrix< double, 3, 1 > fr_goal_foot_pos, Eigen::Matrix< double, 3, 1 > rl_goal_foot_pos, Eigen::Matrix< double, 3, 1 > rr_goal_foot_pos) |
|
bool | MoveJointsToSetpoints (Eigen::Matrix< double, 12, 1 > goal_joint_angles) |
|
bool | MoveFootToPosition (const Kinematics::LegType &leg_type, const Eigen::Matrix< double, 3, 1 > &goal_foot_position) |
|
void | UpdateFeetPositions () |
|
bool | CheckReadyToProceed () |
|
void | ResetReadyToProceedFlag () |
|
void | SetReadyToProceedFlag () |
|
bool | ReadyToProceed (std_srvs::Empty::Request &_req, std_srvs::Empty::Response &_res) |
| The ReadyToProceed function handles an incoming readyToProceed service request. More...
|
|
bool | Shutdown (std_srvs::Empty::Request &_req, std_srvs::Empty::Response &_res) |
| The Shutdown function handles an incoming shutdown service request. More...
|
|
void | WriteToLog () |
|
|
std::string | node_name = "controller_node" |
|
std::string | robot_name = ROBOT_NAME |
|
int | controller_freq |
|
Kinematics | kinematics |
|
ros::NodeHandlePtr | nodeHandle |
|
ros::Publisher | joint_command_publisher |
|
ros::Subscriber | joint_state_subscriber |
|
ros::Subscriber | base_pose_state_subscriber |
|
ros::Subscriber | ready_to_proceed_subscriber |
|
ros::Subscriber | twist_command_subscriber |
| Subscribes to twist command messages from an external controller. More...
|
|
ros::Subscriber | twist_state_subscriber |
|
Eigen::Vector3d | fl_offset = Eigen::Vector3d(LEG_OFFSET_LENGTH, LEG_OFFSET_LENGTH, 0) |
|
Eigen::Vector3d | fr_offset = Eigen::Vector3d(LEG_OFFSET_LENGTH, -LEG_OFFSET_LENGTH, 0) |
|
Eigen::Vector3d | rl_offset = Eigen::Vector3d(-LEG_OFFSET_LENGTH, LEG_OFFSET_LENGTH, 0) |
|
Eigen::Vector3d | rr_offset = Eigen::Vector3d(-LEG_OFFSET_LENGTH, -LEG_OFFSET_LENGTH, 0) |
|
Eigen::Vector3d | fl_position_body |
|
Eigen::Vector3d | fr_position_body |
|
Eigen::Vector3d | rl_position_body |
|
Eigen::Vector3d | rr_position_body |
|
Eigen::Vector3d | fl_velocity_body |
|
Eigen::Vector3d | fr_velocity_body |
|
Eigen::Vector3d | rl_velocity_body |
|
Eigen::Vector3d | rr_velocity_body |
|
Eigen::Vector3d | fl_acceleration_body |
|
Eigen::Vector3d | fr_acceleration_body |
|
Eigen::Vector3d | rl_acceleration_body |
|
Eigen::Vector3d | rr_acceleration_body |
|
JointState | joint_angle_commands = JointState::Zero() |
|
JointState | joint_velocity_commands = JointState::Zero() |
|
JointState | joint_acceleration_commands = JointState::Zero() |
|
JointState | joint_torque_commands = JointState::Zero() |
|
JointState | joint_angles = JointState::Constant(UNINITIALIZED_JOINT_STATE) |
|
JointState | joint_velocities = JointState::Zero() |
|
JointState | joint_torques = JointState::Zero() |
|
Eigen::Matrix< double, 6, 1 > | base_pose_state = Eigen::Matrix<double, 6, 1>::Zero() |
|
Eigen::Matrix< double, 6, 1 > | base_pose_commands = Eigen::Matrix<double, 6, 1>::Zero() |
|
double | lin_vel_x = 0.0 |
| The desired linear robot velocity in the body frame's x direction. More...
|
|
double | lin_vel_y = 0.0 |
| The desired linear robot velocity in the body frame's y direction. More...
|
|
double | ang_vel_z = 0.0 |
| The desired angular robot velocity around the robot's z axis. More...
|
|
double | _lin_vel_x_estimated = 0.0 |
|
double | _lin_vel_y_estimated = 0.0 |
|
double | _ang_vel_z_estimated = 0.0 |
|
double | _lin_vel_z_measured = 0.0 |
|
double | _ang_vel_x_measured = 0.0 |
|
double | _ang_vel_y_measured = 0.0 |
|
double | nominal_base_height = 0.35 |
|
Definition at line 29 of file controller.h.
◆ JointState
◆ Controller()
Controller::Controller |
( |
int |
controller_freq | ) |
|
◆ ~Controller()
Controller::~Controller |
( |
| ) |
|
|
virtual |
◆ RunStandUpSequence()
bool Controller::RunStandUpSequence |
( |
| ) |
|
◆ waitForReadyToProceed()
void Controller::waitForReadyToProceed |
( |
| ) |
|
◆ UpdateFeetReferences()
virtual void Controller::UpdateFeetReferences |
( |
| ) |
|
|
pure virtual |
◆ UpdateJointCommands()
bool Controller::UpdateJointCommands |
( |
| ) |
|
◆ UpdateVelocityCommands()
bool Controller::UpdateVelocityCommands |
( |
| ) |
|
◆ sendJointPositionCommands()
bool Controller::sendJointPositionCommands |
( |
| ) |
|
◆ StandStill()
void Controller::StandStill |
( |
const double & |
duration | ) |
|
◆ setInitialConfiguration()
void Controller::setInitialConfiguration |
( |
| ) |
|
|
virtual |
◆ SetTwistCommand()
void Controller::SetTwistCommand |
( |
double |
lin_vel_cmd_x, |
|
|
double |
lin_vel_cmd_y, |
|
|
double |
ang_vel_cmd_z |
|
) |
| |
◆ initROS()
void Controller::initROS |
( |
| ) |
|
◆ WaitForInitialState()
void Controller::WaitForInitialState |
( |
| ) |
|
◆ MoveFeetToPositions()
bool Controller::MoveFeetToPositions |
( |
Eigen::Matrix< double, 3, 1 > |
fl_goal_foot_pos, |
|
|
Eigen::Matrix< double, 3, 1 > |
fr_goal_foot_pos, |
|
|
Eigen::Matrix< double, 3, 1 > |
rl_goal_foot_pos, |
|
|
Eigen::Matrix< double, 3, 1 > |
rr_goal_foot_pos |
|
) |
| |
◆ MoveJointsToSetpoints()
bool Controller::MoveJointsToSetpoints |
( |
Eigen::Matrix< double, 12, 1 > |
goal_joint_angles | ) |
|
◆ MoveFootToPosition()
bool Controller::MoveFootToPosition |
( |
const Kinematics::LegType & |
leg_type, |
|
|
const Eigen::Matrix< double, 3, 1 > & |
goal_foot_position |
|
) |
| |
◆ UpdateFeetPositions()
void Controller::UpdateFeetPositions |
( |
| ) |
|
◆ jointStateCallback()
void Controller::jointStateCallback |
( |
const sensor_msgs::JointStatePtr & |
msg | ) |
|
|
protected |
◆ readyToProceedCallback()
void Controller::readyToProceedCallback |
( |
const std_msgs::Bool & |
msg | ) |
|
|
protected |
◆ TwistCommandCallback()
void Controller::TwistCommandCallback |
( |
const geometry_msgs::TwistConstPtr & |
_msg | ) |
|
|
protected |
Converts twist command messages into desired linear and angular body velocities.
Definition at line 254 of file controller.cpp.
◆ TwistStateCallback()
void Controller::TwistStateCallback |
( |
const geometry_msgs::TwistConstPtr & |
_msg | ) |
|
|
protected |
◆ BasePoseStateCallback()
void Controller::BasePoseStateCallback |
( |
const std_msgs::Float64MultiArrayConstPtr & |
msg | ) |
|
|
protected |
◆ CheckReadyToProceed()
bool Controller::CheckReadyToProceed |
( |
| ) |
|
|
inline |
◆ ResetReadyToProceedFlag()
void Controller::ResetReadyToProceedFlag |
( |
| ) |
|
|
inline |
◆ SetReadyToProceedFlag()
void Controller::SetReadyToProceedFlag |
( |
| ) |
|
|
inline |
◆ ReadyToProceed()
bool Controller::ReadyToProceed |
( |
std_srvs::Empty::Request & |
_req, |
|
|
std_srvs::Empty::Response & |
_res |
|
) |
| |
The ReadyToProceed function handles an incoming readyToProceed service request.
- Parameters
-
[in] | _req | Service request. |
[out] | _res | Service response. |
- Returns
- Returns true if success, and false if not.
Definition at line 842 of file controller.cpp.
◆ Shutdown()
bool Controller::Shutdown |
( |
std_srvs::Empty::Request & |
_req, |
|
|
std_srvs::Empty::Response & |
_res |
|
) |
| |
The Shutdown function handles an incoming shutdown service request.
- Parameters
-
[in] | _req | Service request. |
[out] | _res | Service response. |
- Returns
- Returns true if success, and false if not.
Definition at line 850 of file controller.cpp.
◆ WriteToLog()
void Controller::WriteToLog |
( |
| ) |
|
◆ ready_to_proceed
bool Controller::ready_to_proceed = false |
|
private |
◆ node_name
std::string Controller::node_name = "controller_node" |
|
protected |
◆ robot_name
◆ controller_freq
int Controller::controller_freq |
|
protected |
◆ kinematics
◆ nodeHandle
ros::NodeHandlePtr Controller::nodeHandle |
|
protected |
◆ shutdownService
ros::ServiceServer Controller::shutdownService |
|
private |
◆ readyToProceedService
ros::ServiceServer Controller::readyToProceedService |
|
private |
◆ joint_command_publisher
ros::Publisher Controller::joint_command_publisher |
|
protected |
◆ joint_state_subscriber
ros::Subscriber Controller::joint_state_subscriber |
|
protected |
◆ base_pose_state_subscriber
ros::Subscriber Controller::base_pose_state_subscriber |
|
protected |
◆ ready_to_proceed_subscriber
ros::Subscriber Controller::ready_to_proceed_subscriber |
|
protected |
◆ twist_command_subscriber
ros::Subscriber Controller::twist_command_subscriber |
|
protected |
Subscribes to twist command messages from an external controller.
Definition at line 131 of file controller.h.
◆ twist_state_subscriber
ros::Subscriber Controller::twist_state_subscriber |
|
protected |
◆ fl_offset
◆ fr_offset
◆ rl_offset
◆ rr_offset
◆ fl_position_body
◆ fr_position_body
◆ rl_position_body
◆ rr_position_body
◆ fl_velocity_body
◆ fr_velocity_body
◆ rl_velocity_body
◆ rr_velocity_body
◆ fl_acceleration_body
◆ fr_acceleration_body
◆ rl_acceleration_body
◆ rr_acceleration_body
◆ joint_angle_commands
JointState Controller::joint_angle_commands = JointState::Zero() |
|
protected |
◆ joint_velocity_commands
JointState Controller::joint_velocity_commands = JointState::Zero() |
|
protected |
◆ joint_acceleration_commands
JointState Controller::joint_acceleration_commands = JointState::Zero() |
|
protected |
◆ joint_torque_commands
JointState Controller::joint_torque_commands = JointState::Zero() |
|
protected |
◆ joint_angles
◆ joint_velocities
JointState Controller::joint_velocities = JointState::Zero() |
|
protected |
◆ joint_torques
JointState Controller::joint_torques = JointState::Zero() |
|
protected |
◆ base_pose_state
Eigen::Matrix<double, 6, 1> Controller::base_pose_state = Eigen::Matrix<double, 6, 1>::Zero() |
|
protected |
◆ base_pose_commands
Eigen::Matrix<double, 6, 1> Controller::base_pose_commands = Eigen::Matrix<double, 6, 1>::Zero() |
|
protected |
◆ lin_vel_x
double Controller::lin_vel_x = 0.0 |
|
protected |
The desired linear robot velocity in the body frame's x direction.
Definition at line 186 of file controller.h.
◆ lin_vel_y
double Controller::lin_vel_y = 0.0 |
|
protected |
The desired linear robot velocity in the body frame's y direction.
Definition at line 189 of file controller.h.
◆ ang_vel_z
double Controller::ang_vel_z = 0.0 |
|
protected |
The desired angular robot velocity around the robot's z axis.
Definition at line 192 of file controller.h.
◆ _lin_vel_x_estimated
double Controller::_lin_vel_x_estimated = 0.0 |
|
protected |
◆ _lin_vel_y_estimated
double Controller::_lin_vel_y_estimated = 0.0 |
|
protected |
◆ _ang_vel_z_estimated
double Controller::_ang_vel_z_estimated = 0.0 |
|
protected |
◆ _lin_vel_z_measured
double Controller::_lin_vel_z_measured = 0.0 |
|
protected |
◆ _ang_vel_x_measured
double Controller::_ang_vel_x_measured = 0.0 |
|
protected |
◆ _ang_vel_y_measured
double Controller::_ang_vel_y_measured = 0.0 |
|
protected |
◆ nominal_base_height
double Controller::nominal_base_height = 0.35 |
|
protected |
◆ joint_state_logger
ros::Publisher Controller::joint_state_logger |
|
private |
◆ joint_command_logger
ros::Publisher Controller::joint_command_logger |
|
private |
◆ base_twist_state_logger
ros::Publisher Controller::base_twist_state_logger |
|
private |
◆ base_pose_state_logger
ros::Publisher Controller::base_pose_state_logger |
|
private |
◆ base_twist_command_logger
ros::Publisher Controller::base_twist_command_logger |
|
private |
◆ base_pose_command_logger
ros::Publisher Controller::base_pose_command_logger |
|
private |
The documentation for this class was generated from the following files: