Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
rm_shooter_controllers::Controller Class Reference

#include <standard.h>

Inheritance diagram for rm_shooter_controllers::Controller:
Inheritance graph
[legend]

Public Member Functions

 Controller ()=default
 
bool init (hardware_interface::RobotHW *robot_hw, ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh) override
 
void starting (const ros::Time &) override
 
void update (const ros::Time &time, const ros::Duration &period) override
 
- Public Member Functions inherited from controller_interface::MultiInterfaceController< hardware_interface::EffortJointInterface, rm_control::RobotStateInterface >
virtual bool init (hardware_interface::RobotHW *, ros::NodeHandle &)
 
 MultiInterfaceController (bool allow_optional_interfaces=false)
 
- Public Member Functions inherited from controller_interface::ControllerBase
virtual void aborting (const ros::Time &)
 
virtual void aborting (const ros::Time &)
 
bool abortRequest (const ros::Time &time)
 
bool abortRequest (const ros::Time &time)
 
 ControllerBase ()=default
 
 ControllerBase (const ControllerBase &)=delete
 
 ControllerBase (ControllerBase &&)=delete
 
bool isAborted () const
 
bool isAborted () const
 
bool isInitialized () const
 
bool isInitialized () const
 
bool isRunning () const
 
bool isRunning () const
 
bool isStopped () const
 
bool isStopped () const
 
bool isWaiting () const
 
bool isWaiting () const
 
ControllerBaseoperator= (const ControllerBase &)=delete
 
ControllerBaseoperator= (ControllerBase &&)=delete
 
bool startRequest (const ros::Time &time)
 
bool startRequest (const ros::Time &time)
 
virtual void stopping (const ros::Time &)
 
virtual void stopping (const ros::Time &)
 
bool stopRequest (const ros::Time &time)
 
bool stopRequest (const ros::Time &time)
 
void updateRequest (const ros::Time &time, const ros::Duration &period)
 
void updateRequest (const ros::Time &time, const ros::Duration &period)
 
virtual void waiting (const ros::Time &)
 
virtual void waiting (const ros::Time &)
 
bool waitRequest (const ros::Time &time)
 
bool waitRequest (const ros::Time &time)
 
virtual ~ControllerBase ()=default
 

Private Types

enum  { STOP, READY, PUSH, BLOCK }
 

Private Member Functions

void block (const ros::Time &time, const ros::Duration &period)
 
void commandCB (const rm_msgs::ShootCmdConstPtr &msg)
 
void judgeBulletShoot (const ros::Time &time, const ros::Duration &period)
 
void normalize ()
 
void push (const ros::Time &time, const ros::Duration &period)
 
void ready (const ros::Duration &period)
 
void reconfigCB (rm_shooter_controllers::ShooterConfig &config, uint32_t)
 
void setSpeed (const rm_msgs::ShootCmd &cmd)
 
void stop (const ros::Time &time, const ros::Duration &period)
 

Private Attributes

double anti_friction_block_duty_cycle_ {}
 
double anti_friction_block_vel_ {}
 
ros::Time block_time_
 
rm_msgs::ShootCmd cmd_
 
realtime_tools::RealtimeBuffer< rm_msgs::ShootCmd > cmd_rt_buffer_
 
ros::Subscriber cmd_subscriber_
 
Config config_ {}
 
realtime_tools::RealtimeBuffer< Configconfig_rt_buffer
 
int count_ {}
 
effort_controllers::JointPositionController ctrl_trigger_
 
std::vector< std::vector< effort_controllers::JointVelocityController * > > ctrls_friction_
 
dynamic_reconfigure::Server< rm_shooter_controllers::ShooterConfig > * d_srv_ {}
 
bool dynamic_reconfig_initialized_ = false
 
hardware_interface::EffortJointInterfaceeffort_joint_interface_ {}
 
bool enter_ready_ = false
 
double freq_threshold_ {}
 
int friction_block_count = 0
 
double friction_block_effort_ {}
 
double friction_block_vel_ {}
 
bool friction_wheel_block = false
 
bool has_shoot_ = false
 
bool has_shoot_last_ = false
 
ros::Time last_block_time_
 
bool last_friction_wheel_block = false
 
ros::Time last_shoot_time_
 
double last_wheel_speed_ {}
 
std::shared_ptr< realtime_tools::RealtimePublisher< rm_msgs::LocalHeatState > > local_heat_state_pub_
 
bool maybe_block_ = false
 
int push_per_rotation_ {}
 
double push_wheel_speed_threshold_ {}
 
std::shared_ptr< realtime_tools::RealtimePublisher< rm_msgs::ShootState > > shoot_state_pub_
 
int state_ = STOP
 
bool state_changed_ = false
 
std::vector< std::vector< double > > wheel_speed_directions_
 
bool wheel_speed_drop_ = true
 
std::vector< std::vector< double > > wheel_speed_offsets_
 
bool wheel_speed_raise_ = true
 

Additional Inherited Members

- Public Types inherited from controller_interface::ControllerBase
typedef std::vector< hardware_interface::InterfaceResourcesClaimedResources
 
enum  ControllerState {
  ControllerState::CONSTRUCTED, ControllerState::INITIALIZED, ControllerState::RUNNING, ControllerState::STOPPED,
  ControllerState::WAITING, ControllerState::ABORTED
}
 
- Public Attributes inherited from controller_interface::ControllerBase
ControllerState state_
 
- Protected Member Functions inherited from controller_interface::MultiInterfaceController< hardware_interface::EffortJointInterface, rm_control::RobotStateInterface >
bool initRequest (hardware_interface::RobotHW *robot_hw, ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh, ClaimedResources &claimed_resources) override
 
- Static Protected Member Functions inherited from controller_interface::MultiInterfaceController< hardware_interface::EffortJointInterface, rm_control::RobotStateInterface >
static void clearClaims (hardware_interface::RobotHW *robot_hw)
 
static void extractInterfaceResources (hardware_interface::RobotHW *robot_hw_in, hardware_interface::RobotHW *robot_hw_out)
 
static bool hasRequiredInterfaces (hardware_interface::RobotHW *robot_hw)
 
static void populateClaimedResources (hardware_interface::RobotHW *robot_hw, ClaimedResources &claimed_resources)
 
- Protected Attributes inherited from controller_interface::MultiInterfaceController< hardware_interface::EffortJointInterface, rm_control::RobotStateInterface >
bool allow_optional_interfaces_
 
hardware_interface::RobotHW robot_hw_ctrl_
 

Detailed Description

Definition at line 95 of file standard.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
STOP 
READY 
PUSH 
BLOCK 

Definition at line 140 of file standard.h.

Constructor & Destructor Documentation

◆ Controller()

rm_shooter_controllers::Controller::Controller ( )
default

Member Function Documentation

◆ block()

void Controller::block ( const ros::Time time,
const ros::Duration period 
)
private

Definition at line 286 of file standard.cpp.

◆ commandCB()

void rm_shooter_controllers::Controller::commandCB ( const rm_msgs::ShootCmdConstPtr &  msg)
inlineprivate

Definition at line 112 of file standard.h.

◆ init()

bool Controller::init ( hardware_interface::RobotHW robot_hw,
ros::NodeHandle root_nh,
ros::NodeHandle controller_nh 
)
overridevirtual

◆ judgeBulletShoot()

void Controller::judgeBulletShoot ( const ros::Time time,
const ros::Duration period 
)
private

Definition at line 370 of file standard.cpp.

◆ normalize()

void Controller::normalize ( )
private

Definition at line 353 of file standard.cpp.

◆ push()

void Controller::push ( const ros::Time time,
const ros::Duration period 
)
private

Definition at line 227 of file standard.cpp.

◆ ready()

void Controller::ready ( const ros::Duration period)
private

Definition at line 216 of file standard.cpp.

◆ reconfigCB()

void Controller::reconfigCB ( rm_shooter_controllers::ShooterConfig &  config,
uint32_t   
)
private

Definition at line 412 of file standard.cpp.

◆ setSpeed()

void Controller::setSpeed ( const rm_msgs::ShootCmd &  cmd)
private

Definition at line 306 of file standard.cpp.

◆ starting()

void Controller::starting ( const ros::Time )
overridevirtual

Reimplemented from controller_interface::ControllerBase.

Definition at line 139 of file standard.cpp.

◆ stop()

void Controller::stop ( const ros::Time time,
const ros::Duration period 
)
private

Definition at line 199 of file standard.cpp.

◆ update()

void Controller::update ( const ros::Time time,
const ros::Duration period 
)
overridevirtual

Implements controller_interface::ControllerBase.

Definition at line 145 of file standard.cpp.

Member Data Documentation

◆ anti_friction_block_duty_cycle_

double rm_shooter_controllers::Controller::anti_friction_block_duty_cycle_ {}
private

Definition at line 134 of file standard.h.

◆ anti_friction_block_vel_

double rm_shooter_controllers::Controller::anti_friction_block_vel_ {}
private

Definition at line 134 of file standard.h.

◆ block_time_

ros::Time rm_shooter_controllers::Controller::block_time_
private

Definition at line 139 of file standard.h.

◆ cmd_

rm_msgs::ShootCmd rm_shooter_controllers::Controller::cmd_
private

Definition at line 151 of file standard.h.

◆ cmd_rt_buffer_

realtime_tools::RealtimeBuffer<rm_msgs::ShootCmd> rm_shooter_controllers::Controller::cmd_rt_buffer_
private

Definition at line 150 of file standard.h.

◆ cmd_subscriber_

ros::Subscriber rm_shooter_controllers::Controller::cmd_subscriber_
private

Definition at line 154 of file standard.h.

◆ config_

Config rm_shooter_controllers::Controller::config_ {}
private

Definition at line 148 of file standard.h.

◆ config_rt_buffer

realtime_tools::RealtimeBuffer<Config> rm_shooter_controllers::Controller::config_rt_buffer
private

Definition at line 149 of file standard.h.

◆ count_

int rm_shooter_controllers::Controller::count_ {}
private

Definition at line 124 of file standard.h.

◆ ctrl_trigger_

effort_controllers::JointPositionController rm_shooter_controllers::Controller::ctrl_trigger_
private

Definition at line 121 of file standard.h.

◆ ctrls_friction_

std::vector<std::vector<effort_controllers::JointVelocityController*> > rm_shooter_controllers::Controller::ctrls_friction_
private

Definition at line 120 of file standard.h.

◆ d_srv_

dynamic_reconfigure::Server<rm_shooter_controllers::ShooterConfig>* rm_shooter_controllers::Controller::d_srv_ {}
private

Definition at line 155 of file standard.h.

◆ dynamic_reconfig_initialized_

bool rm_shooter_controllers::Controller::dynamic_reconfig_initialized_ = false
private

Definition at line 127 of file standard.h.

◆ effort_joint_interface_

hardware_interface::EffortJointInterface* rm_shooter_controllers::Controller::effort_joint_interface_ {}
private

Definition at line 119 of file standard.h.

◆ enter_ready_

bool rm_shooter_controllers::Controller::enter_ready_ = false
private

Definition at line 129 of file standard.h.

◆ freq_threshold_

double rm_shooter_controllers::Controller::freq_threshold_ {}
private

Definition at line 126 of file standard.h.

◆ friction_block_count

int rm_shooter_controllers::Controller::friction_block_count = 0
private

Definition at line 131 of file standard.h.

◆ friction_block_effort_

double rm_shooter_controllers::Controller::friction_block_effort_ {}
private

Definition at line 133 of file standard.h.

◆ friction_block_vel_

double rm_shooter_controllers::Controller::friction_block_vel_ {}
private

Definition at line 133 of file standard.h.

◆ friction_wheel_block

bool rm_shooter_controllers::Controller::friction_wheel_block = false
private

Definition at line 132 of file standard.h.

◆ has_shoot_

bool rm_shooter_controllers::Controller::has_shoot_ = false
private

Definition at line 135 of file standard.h.

◆ has_shoot_last_

bool rm_shooter_controllers::Controller::has_shoot_last_ = false
private

Definition at line 135 of file standard.h.

◆ last_block_time_

ros::Time rm_shooter_controllers::Controller::last_block_time_
private

Definition at line 139 of file standard.h.

◆ last_friction_wheel_block

bool rm_shooter_controllers::Controller::last_friction_wheel_block = false
private

Definition at line 132 of file standard.h.

◆ last_shoot_time_

ros::Time rm_shooter_controllers::Controller::last_shoot_time_
private

Definition at line 139 of file standard.h.

◆ last_wheel_speed_

double rm_shooter_controllers::Controller::last_wheel_speed_ {}
private

Definition at line 137 of file standard.h.

◆ local_heat_state_pub_

std::shared_ptr<realtime_tools::RealtimePublisher<rm_msgs::LocalHeatState> > rm_shooter_controllers::Controller::local_heat_state_pub_
private

Definition at line 152 of file standard.h.

◆ maybe_block_

bool rm_shooter_controllers::Controller::maybe_block_ = false
private

Definition at line 130 of file standard.h.

◆ push_per_rotation_

int rm_shooter_controllers::Controller::push_per_rotation_ {}
private

Definition at line 124 of file standard.h.

◆ push_wheel_speed_threshold_

double rm_shooter_controllers::Controller::push_wheel_speed_threshold_ {}
private

Definition at line 125 of file standard.h.

◆ shoot_state_pub_

std::shared_ptr<realtime_tools::RealtimePublisher<rm_msgs::ShootState> > rm_shooter_controllers::Controller::shoot_state_pub_
private

Definition at line 153 of file standard.h.

◆ state_

int rm_shooter_controllers::Controller::state_ = STOP
private

Definition at line 147 of file standard.h.

◆ state_changed_

bool rm_shooter_controllers::Controller::state_changed_ = false
private

Definition at line 128 of file standard.h.

◆ wheel_speed_directions_

std::vector<std::vector<double> > rm_shooter_controllers::Controller::wheel_speed_directions_
private

Definition at line 123 of file standard.h.

◆ wheel_speed_drop_

bool rm_shooter_controllers::Controller::wheel_speed_drop_ = true
private

Definition at line 136 of file standard.h.

◆ wheel_speed_offsets_

std::vector<std::vector<double> > rm_shooter_controllers::Controller::wheel_speed_offsets_
private

Definition at line 122 of file standard.h.

◆ wheel_speed_raise_

bool rm_shooter_controllers::Controller::wheel_speed_raise_ = true
private

Definition at line 136 of file standard.h.


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


rm_shooter_controllers
Author(s): Qiayuan Liao
autogenerated on Sun May 4 2025 02:57:27