Class LinearFeedbackControllerRos

Inheritance Relationships

Base Type

  • public ChainableControllerInterface

Class Documentation

class LinearFeedbackControllerRos : public ChainableControllerInterface

Public Types

template<typename T>
using InterfaceVector = std::vector<std::reference_wrapper<T>>

The interfaces are defined as the types in ‘allowed_interface_types_’ member. For convenience, for each type the interfaces are ordered so that i-th position matches i-th index in joint_names_.

Public Functions

LinearFeedbackControllerRos()

Construct a new State Estimation Controller object.

virtual ~LinearFeedbackControllerRos()

Destroy the State Estimation Controller object.

InterfaceConfiguration command_interface_configuration() const final

This function access the output torques.

InterfaceConfiguration state_interface_configuration() const final

This function access none of the states.

std::vector<hardware_interface::CommandInterface> on_export_reference_interfaces() final

ChainableControllerInterface::on_export_reference_interfaces This function access the reference state from an estimator.

return_type update_reference_from_subscribers() final

ChainableControllerInterface::update_reference_from_subscribers.

return_type update_and_write_commands(const rclcpp::Time &time, const rclcpp::Duration &period) final

ChainableControllerInterface::update_and_write_commands.

CallbackReturn on_configure(const rclcpp_lifecycle::State &previous_state) final
CallbackReturn on_init() final

can return SUCCESS, FAILURE, or ERROR

CallbackReturn on_activate(const rclcpp_lifecycle::State &previous_state) final

Here we assume that the robot is not moving and has it’s feet on the ground.

bool on_set_chained_mode(bool chained_mode) final
CallbackReturn on_deactivate(const rclcpp_lifecycle::State &previous_state) final
controller_interface::CallbackReturn on_cleanup(const rclcpp_lifecycle::State &previous_state) final
controller_interface::CallbackReturn on_error(const rclcpp_lifecycle::State &previous_state) final

Protected Functions

bool load_parameters()
bool wait_for_robot_description()
bool get_robot_description(std::string &robot_description)
bool load_linear_feedback_controller(const std::string &robot_description)
bool setup_reference_interface()
bool allocate_memory()
bool initialize_introspection()
bool read_state_from_references()
bool update_parameters()
void register_var(const std::string &id, const Eigen::Vector3d &vec)
void register_var(const std::string &id, const Eigen::Matrix<double, 6, 1> &vec)
void register_var(const std::string &id, const Eigen::Matrix<double, 7, 1> &vec)
void register_var(const std::string &id, const Eigen::Quaterniond &quat)
void register_var(const std::string &id, const std::vector<double> &vec)
void register_var(const std::string &id, const Eigen::VectorXd &vec)
bool ends_with(const std::string &str, const std::string &suffix) const
void state_syncher_callback(const Odometry::ConstSharedPtr &msg_odom, const JointState::ConstSharedPtr &msg_joint_state)
void control_subscription_callback(const ControlMsg msg)

Protected Attributes

std::shared_ptr<linear_feedback_controller::ParamListener> parameter_listener_
linear_feedback_controller::Params parameters_
rclcpp::Node::SharedPtr robot_description_node_
rclcpp::SyncParametersClient::SharedPtr robot_description_parameter_client_
std::vector<std::string> reference_interface_names_
InterfaceVector<hardware_interface::LoanedCommandInterface> joint_effort_command_interface_
LinearFeedbackController lfc_

Controller without ROS.

TimePoint input_time_
linear_feedback_controller_msgs::Eigen::Sensor input_sensor_
linear_feedback_controller_msgs::Eigen::Control input_control_
linear_feedback_controller_msgs::msg::Sensor input_sensor_msg_
linear_feedback_controller_msgs::msg::Control input_control_msg_
Eigen::VectorXd output_joint_effort_
pal_statistics::RegistrationsRAII bookkeeping_
rclcpp::Publisher<SensorMsg>::SharedPtr sensor_publisher_
rclcpp::Subscription<ControlMsg>::SharedPtr control_subscriber_
ProtectedControlMsg synched_input_control_msg_
Eigen::VectorXd new_joint_velocity_
bool first_time_update_and_write_commands_

Protected Static Attributes

static const std::string robot_description_name_