ros2_control - galactic
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
inverted_pendulum_controller::InvertedPendulumController Class Reference

#include <inverted_pendulum_controller.hpp>

Inheritance diagram for inverted_pendulum_controller::InvertedPendulumController:
Inheritance graph
[legend]
Collaboration diagram for inverted_pendulum_controller::InvertedPendulumController:
Collaboration graph
[legend]

Public Member Functions

controller_interface::CallbackReturn on_init () override
 
controller_interface::InterfaceConfiguration command_interface_configuration () const override
 
controller_interface::InterfaceConfiguration state_interface_configuration () const override
 
controller_interface::CallbackReturn on_configure (const rclcpp_lifecycle::State &previous_state) override
 
controller_interface::CallbackReturn on_activate (const rclcpp_lifecycle::State &previous_state) override
 
controller_interface::CallbackReturn on_deactivate (const rclcpp_lifecycle::State &previous_state) override
 
controller_interface::return_type update (const rclcpp::Time &time, const rclcpp::Duration &period) override
 
- Public Member Functions inherited from controller_interface::ControllerInterface
CONTROLLER_INTERFACE_PUBLIC void assign_interfaces (std::vector< hardware_interface::LoanedCommandInterface > &&command_interfaces, std::vector< hardware_interface::LoanedStateInterface > &&state_interfaces)
 
CONTROLLER_INTERFACE_PUBLIC void release_interfaces ()
 
virtual CONTROLLER_INTERFACE_PUBLIC return_type init (const std::string &controller_name)
 
CONTROLLER_INTERFACE_PUBLIC std::shared_ptr< rclcpp::Node > get_node ()
 
template<typename ParameterT >
auto auto_declare (const std::string &name, const ParameterT &default_value)
 Declare and initialize a parameter with a type.
 
CONTROLLER_INTERFACE_PUBLIC const rclcpp_lifecycle::State & configure ()
 
CONTROLLER_INTERFACE_PUBLIC const rclcpp_lifecycle::State & cleanup ()
 
CONTROLLER_INTERFACE_PUBLIC const rclcpp_lifecycle::State & deactivate ()
 
CONTROLLER_INTERFACE_PUBLIC const rclcpp_lifecycle::State & activate ()
 
CONTROLLER_INTERFACE_PUBLIC const rclcpp_lifecycle::State & shutdown ()
 
CONTROLLER_INTERFACE_PUBLIC const rclcpp_lifecycle::State & get_state () const
 
CONTROLLER_INTERFACE_PUBLIC unsigned int get_update_rate () const
 

Protected Attributes

std::string motor_joint_state_name_
 
std::string motor_joint_vel_name_
 
std::string pendulum_joint_state_name_
 
std::string pendulum_joint_vel_name_
 
std::string motor_joint_command_name_
 
double balance_angle_
 
double kp_
 
double kd_
 
double max_acceleration_
 
- Protected Attributes inherited from controller_interface::ControllerInterface
std::vector< hardware_interface::LoanedCommandInterfacecommand_interfaces_
 
std::vector< hardware_interface::LoanedStateInterfacestate_interfaces_
 
std::shared_ptr< rclcpp::Node > node_
 
rclcpp_lifecycle::State lifecycle_state_
 
unsigned int update_rate_ = 0
 

Detailed Description

Feedback controller for a Furuta (rotary) inverted pendulum.

Reads pendulum position and velocity from state interfaces, outputs a motor joint acceleration command via PD control on the pendulum angle.

Member Function Documentation

◆ command_interface_configuration()

controller_interface::InterfaceConfiguration inverted_pendulum_controller::InvertedPendulumController::command_interface_configuration ( ) const
overridevirtual

◆ on_init()

controller_interface::CallbackReturn inverted_pendulum_controller::InvertedPendulumController::on_init ( )
overridevirtual

◆ state_interface_configuration()

controller_interface::InterfaceConfiguration inverted_pendulum_controller::InvertedPendulumController::state_interface_configuration ( ) const
overridevirtual

◆ update()

controller_interface::return_type inverted_pendulum_controller::InvertedPendulumController::update ( const rclcpp::Time &  time,
const rclcpp::Duration &  period 
)
overridevirtual

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