19 struct StandUpLegCommand
21 double desired_length;
23 double desired_angle_vel;
28 const std::vector<control_toolbox::Pid*>& pid_legs,
const std::vector<control_toolbox::Pid*>& pid_thetas);
29 void execute(
const ros::Time& time,
const ros::Duration& period)
override;
30 const char*
name()
const override
36 void setUpLegMotion(
const Eigen::Matrix<double, STATE_DIM, 1>& x,
const LegOrientation& other_leg_orientation,
37 const double& leg_length,
const double& leg_theta,
LegOrientation& leg_orientation,
38 StandUpLegCommand& legCommand,
bool& stop_flag,
bool& arrive_flag, ros::Time arrive_time);
44 void detectLegState(
const Eigen::Matrix<double, STATE_DIM, 1>& x,
LegOrientation& leg_orientation);
58 inline LegCommand computePidLegCommand(
const StandUpLegCommand& leg_command,
const VMCPtr& vmc_,
59 control_toolbox::Pid& length_pid, control_toolbox::Pid& angle_pid,
60 control_toolbox::Pid& angle_vel_pid,
const LegOrientation& leg_orientation,
61 const ros::Duration& period,
double feedforward_force = 0.0f);
62 std::vector<hardware_interface::JointHandle*> joint_handles_;
63 std::vector<control_toolbox::Pid*> pid_legs_, pid_thetas_;
65 double theta_des_l, theta_des_r, length_des_l, length_des_r;
66 StandUpLegCommand left_leg_command_, right_leg_command_;
67 bool left_stop_{
false }, right_stop_{
false };
68 std::shared_ptr<LegStateThresholdParams> leg_state_threshold_;
69 ros::Time left_arrive_time_, right_arrive_time_;
70 bool left_arrive_flag_{
false }, right_arrive_flag_{
false };
72 std::shared_ptr<RampFilter<double>> ramp_length_des_l_, ramp_length_des_r_, ramp_angle_des_l_, ramp_angle_des_r_;
StandUp(BipedalControllerInterface *controller_, const std::vector< hardware_interface::JointHandle * > &joint_handles, const std::vector< control_toolbox::Pid * > &pid_legs, const std::vector< control_toolbox::Pid * > &pid_thetas)
Definition stand_up.cpp:11