10 #ifndef STABILIZER_COMPONENT_H 11 #define STABILIZER_COMPONENT_H 13 #include <rtm/idl/BasicDataType.hh> 14 #include <rtm/idl/ExtendedDataTypes.hh> 16 #include <rtm/DataFlowComponentBase.h> 20 #include <rtm/idl/BasicDataTypeSkel.h> 21 #include <rtm/idl/ExtendedDataTypesSkel.h> 29 #include "../ImpedanceController/JointPathEx.h" 30 #include "../ImpedanceController/RatsMatrix.h" 31 #include "../TorqueFilter/IIRFilter.h" 123 void getParameter(OpenHRP::StabilizerService::stParam& i_stp);
124 void setParameter(
const OpenHRP::StabilizerService::stParam& i_stp);
125 void setBoolSequenceParam (std::vector<bool>& st_bool_values,
const OpenHRP::StabilizerService::BoolSequence& output_bool_values,
const std::string& prop_name);
126 void setBoolSequenceParamWithCheckContact (std::vector<bool>& st_bool_values,
const OpenHRP::StabilizerService::BoolSequence& output_bool_values,
const std::string& prop_name);
135 const double DD,
const double TT);
140 double vlimit(
double value,
double llimit_value,
double ulimit_value);
283 std::map<std::string, hrp::VirtualForceSensorParam>
m_vfs;
284 std::vector<hrp::JointPathExPtr>
jpe_v;
307 hrp::Vector3 act_zmp,
act_cog,
act_cogvel,
act_cp,
rel_act_zmp,
rel_act_cp,
prev_act_cog,
act_base_rpy,
current_base_rpy,
current_base_pos,
sbp_cog_offset,
cp_offset,
diff_cp;
345 #endif // STABILIZER_COMPONENT_H
RTC::TimedPoint3D m_originActCog
virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id)
RTC::TimedPoint3D m_originRefZmp
hrp::Vector3 eefm_swing_rot_time_const
hrp::Vector3 eefm_pos_damping_gain
void getCurrentParameters()
RTC::OutPort< RTC::TimedPoint3D > m_originActZmpOut
RTC::OutPort< RTC::TimedPoint3D > m_actCPOut
std::string getStabilizerAlgorithmString(OpenHRP::StabilizerService::STAlgorithm _st_algorithm)
RTC::TimedDoubleSeq m_tau
RTC::TimedPoint3D m_originNewZmp
RTC::InPort< RTC::TimedDoubleSeq > m_controlSwingSupportTimeIn
std::vector< hrp::Vector3 > rel_ee_pos
void calcSwingSupportLimbGain()
double eefm_body_attitude_control_gain[2]
std::vector< RTC::InPort< RTC::TimedPoint3D > * > m_limbCOPOffsetIn
RTC::OutPort< RTC::TimedDoubleSeq > m_allRefWrenchOut
hrp::Vector3 eefm_rot_time_const
double eefm_gravitational_acceleration
hrp::Matrix33 prev_act_foot_origin_rot
OpenHRP::StabilizerService::STAlgorithm st_algorithm
RTC::TimedDoubleSeq m_qRefSeq
double swing_support_gain
unsigned int m_debugLevel
hrp::Matrix33 ref_foot_origin_rot
double eefm_body_attitude_control_time_const[2]
RTC::OutPort< RTC::TimedOrientation3D > m_currentBaseRpyOut
std::vector< std::vector< Eigen::Vector2d > > support_polygon_vetices
RTC::OutPort< RTC::TimedLong > m_emergencySignalOut
std::vector< std::vector< Eigen::Vector2d > > margined_support_polygon_vetices
StabilizerService_impl m_service0
RTC::OutPort< RTC::TimedDoubleSeq > m_allEECompOut
hrp::Vector3 eefm_swing_pos_spring_gain
RTC::TimedPoint3D m_originActZmp
RTC::TimedOrientation3D m_currentBaseRpy
RTC::OutPort< RTC::TimedPoint3D > m_refCPOut
double limb_stretch_avoidance_vlimit[2]
RTC::InPort< RTC::TimedDoubleSeq > m_qRefIn
RTC::InPort< RTC::TimedPoint3D > m_sbpCogOffsetIn
std::vector< RTC::TimedDoubleSeq > m_ref_wrenches
RTC::CorbaPort m_StabilizerServicePort
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)
std::vector< RTC::InPort< RTC::TimedDoubleSeq > * > m_wrenchesIn
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
std::vector< hrp::Vector3 > act_ee_p
hrp::Vector3 eefm_swing_rot_damping_gain
hrp::Vector3 prev_d_rpy_swing
double root_rot_compensation_limit[2]
std::vector< double > eefm_swing_damping_force_thre
void calcDiffFootOriginExtMoment()
std::vector< bool > is_ik_enable
std::vector< RTC::TimedPoint3D > m_limbCOPOffset
std::vector< hrp::Vector3 > target_ee_p
std::vector< std::string > rel_ee_name
bool eefm_use_force_difference_control
virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id)
Stabilizer(RTC::Manager *manager)
Constructor.
TwoDofController m_tau_x[2]
RTC::OutPort< RTC::TimedBooleanSeq > m_actContactStatesOut
hrp::Vector3 eefm_swing_pos_damping_gain
bool is_seq_interpolating
std::vector< STIKParam > stikp
std::vector< hrp::Vector3 > act_force
RTC::InPort< RTC::TimedPoint3D > m_zmpRefIn
std::vector< bool > act_contact_states
void calcContactMatrix(hrp::dmatrix &tm, const std::vector< hrp::Vector3 > &contact_p)
void calcEEForceMomentControl()
std::vector< double > eefm_swing_damping_moment_thre
std::vector< RTC::TimedDoubleSeq > m_wrenches
RTC::TimedPoint3D m_sbpCogOffset
hrp::Vector3 act_total_foot_origin_moment
double eefm_zmp_delay_time_const[2]
std::vector< hrp::Matrix33 > rel_ee_rot
hrp::Vector3 target_ee_diff_p
std::vector< RTC::InPort< RTC::TimedDoubleSeq > * > m_ref_wrenchesIn
bool eefm_use_swing_damping
std::vector< bool > is_zmp_calc_enable
std::vector< bool > is_feedback_control_enable
RTC::TimedDoubleSeq m_controlSwingSupportTime
RTC::TimedDoubleSeq m_debugData
void StabilizerInit(RTC::Manager *manager)
RTC::TimedPoint3D m_refCP
std::vector< int > m_will_fall_counter
double eefm_pos_time_const_swing
RTC::InPort< RTC::TimedDoubleSeq > m_qCurrentIn
RTC::TimedDoubleSeq m_allEEComp
RTC::OutPort< RTC::TimedDoubleSeq > m_debugDataOut
void getTargetParameters()
hrp::Matrix33 target_ee_diff_r
bool isContact(const size_t idx)
RTC::OutPort< RTC::TimedPoint3D > m_originActCogOut
void getActualParameters()
OpenHRP::StabilizerService::EmergencyCheckMode emergency_check_mode
hrp::Matrix33 current_root_R
RTC::TimedPoint3D m_originRefCog
hrp::dvector transition_joint_q
hrp::Vector3 ref_total_force
RTC::TimedPoint3D m_zmpRef
void fixLegToCoords(const std::string &leg, const rats::coordinates &coords)
ExecutionContextHandle_t UniqueId
void moveBasePosRotForBodyRPYControl()
Feedback and Feedforward Controller.
void startStabilizer(void)
void getParameter(OpenHRP::StabilizerService::stParam &i_stp)
std::vector< bool > ref_contact_states
void calcStateForEmergencySignal()
virtual ~Stabilizer()
Destructor.
RTC::OutPort< RTC::TimedDoubleSeq > m_qRefOut
int calcMaxTransitionCount()
RTC::OutPort< RTC::TimedDoubleSeq > m_COPInfoOut
void setBoolSequenceParam(std::vector< bool > &st_bool_values, const OpenHRP::StabilizerService::BoolSequence &output_bool_values, const std::string &prop_name)
RTC::TimedPoint3D m_basePos
std::vector< double > cp_check_margin
hrp::Vector3 prev_act_cog
std::vector< double > tilt_margin
double eefm_pos_margin_time
void calcFootOriginCoords(hrp::Vector3 &foot_origin_pos, hrp::Matrix33 &foot_origin_rot)
RTC::OutPort< RTC::TimedPoint3D > m_originNewZmpOut
RTC::OutPort< RTC::TimedPoint3D > m_diffFootOriginExtMomentOut
boost::shared_ptr< FirstOrderLowPassFilter< hrp::Vector3 > > target_ee_diff_p_filter
hrp::Vector3 ref_total_moment
hrp::Vector3 eefm_rot_damping_gain
int detection_count_to_air
RTC::OutPort< RTC::TimedPoint3D > m_originRefCogOut
bool initial_cp_too_large_error
boost::shared_ptr< FirstOrderLowPassFilter< hrp::Vector3 > > target_ee_diff_r_filter
RTC::InPort< RTC::TimedPoint3D > m_basePosIn
enum Stabilizer::cmode control_mode
hrp::Vector3 eefm_swing_rot_spring_gain
RTC::TimedBooleanSeq m_contactStates
std::vector< double > toeheel_ratio
std::map< std::string, size_t > contact_states_index_map
hrp::Vector3 prev_ref_cog
hrp::Vector3 eefm_pos_time_const_support
boost::shared_ptr< FirstOrderLowPassFilter< hrp::Vector3 > > act_cogvel_filter
hrp::Matrix33 target_root_R
RTC::TimedOrientation3D m_actBaseRpy
rats::coordinates target_foot_midcoords
hrp::Vector3 target_root_p
hrp::Vector3 foot_origin_offset[2]
std::vector< double > prev_act_force_z
double eefm_pos_transition_time
RTC::TimedOrientation3D m_baseRpy
SimpleZMPDistributor * szd
hrp::Vector3 current_base_pos
void setParameter(const OpenHRP::StabilizerService::stParam &i_stp)
RTC::TimedDoubleSeq m_toeheelRatio
std::vector< hrp::Vector3 > projected_normal
RTC::InPort< RTC::TimedBoolean > m_walkingStatesIn
RTC::OutPort< RTC::TimedPoint3D > m_currentBasePosOut
hrp::Vector3 act_base_rpy
double limb_stretch_avoidance_time_const
double eefm_rot_compensation_limit
bool calcZMP(hrp::Vector3 &ret_zmp, const double zmp_z)
std::vector< bool > prev_ref_contact_states
virtual RTC::ReturnCode_t onFinalize()
double vlimit(double value, double llimit_value, double ulimit_value)
sample RT component which has one data input port and one data output port
void setBoolSequenceParamWithCheckContact(std::vector< bool > &st_bool_values, const OpenHRP::StabilizerService::BoolSequence &output_bool_values, const std::string &prop_name)
RTC::TimedPoint3D m_actCP
double calcDampingControl(const double tau_d, const double tau, const double prev_d, const double DD, const double TT)
RTC::TimedPoint3D m_originActCogVel
RTC::InPort< RTC::TimedOrientation3D > m_baseRpyIn
virtual RTC::ReturnCode_t onInitialize()
hrp::Matrix33 prev_ref_foot_origin_rot
RTC::TimedDoubleSeq m_qRef
RTC::InPort< RTC::TimedDoubleSeq > m_toeheelRatioIn
RTC::TimedDoubleSeq m_allRefWrench
double limb_length_margin
RTC::TimedDoubleSeq m_qCurrent
RTC::TimedOrientation3D m_rpy
void calcSwingEEModification()
RTC::OutPort< RTC::TimedPoint3D > m_originRefZmpOut
std::vector< hrp::Matrix33 > target_ee_R
double transition_smooth_gain
bool use_limb_stretch_avoidance
void stopStabilizer(void)
hrp::Vector3 current_root_p
RTC::TimedDoubleSeq m_COPInfo
RTC::TimedBooleanSeq m_actContactStates
Eigen::Matrix< double, 6, 1 > dvector6
hrp::Vector3 diff_foot_origin_ext_moment
std::vector< hrp::JointPathExPtr > jpe_v
RTC::InPort< RTC::TimedBooleanSeq > m_contactStatesIn
hrp::Vector3 prev_ref_zmp
hrp::Vector3 ref_total_foot_origin_moment
RTC::InPort< RTC::TimedOrientation3D > m_rpyIn
RTC::TimedPoint3D m_diffFootOriginExtMoment
hrp::dvector6 eefm_ee_forcemoment_distribution_weight
RTC::OutPort< RTC::TimedPoint3D > m_zmpOut
void getFootmidCoords(rats::coordinates &ret)
hrp::Vector3 eefm_swing_pos_time_const
double contact_decision_threshold
bool reset_emergency_flag
void limbStretchAvoidanceControl(const std::vector< hrp::Vector3 > &ee_p, const std::vector< hrp::Matrix33 > &ee_R)
hrp::Vector3 eefm_ee_moment_limit
RTC::OutPort< RTC::TimedOrientation3D > m_actBaseRpyOut
RTC::TimedLong m_emergencySignal
hrp::Vector3 sbp_cog_offset
TwoDofController m_tau_y[2]
RTC::OutPort< RTC::TimedDoubleSeq > m_tauOut
RTC::TimedPoint3D m_originRefCogVel
hrp::Vector3 ee_d_foot_pos
RTC::OutPort< RTC::TimedPoint3D > m_originActCogVelOut
hrp::Matrix33 target_foot_origin_rot
RTC::InPort< RTC::TimedDoubleSeq > m_qRefSeqIn
RTC::OutPort< RTC::TimedPoint3D > m_diffCPOut
hrp::Vector3 ee_d_foot_rpy
std::map< std::string, hrp::VirtualForceSensorParam > m_vfs
hrp::Vector3 prev_d_pos_swing
hrp::Vector3 current_base_rpy
RTC::TimedBoolean m_walkingStates
RTC::OutPort< RTC::TimedPoint3D > m_originRefCogVelOut
RTC::TimedPoint3D m_diffCP
double eefm_pos_compensation_limit
RTC::TimedPoint3D m_currentBasePos
std::vector< hrp::Matrix33 > act_ee_R
bool is_estop_while_walking