Skip to content

Commit 849578d

Browse files
authored
Merge pull request #3 from DeepRoboticsLab/test
fix timestamp bug in idle and standup states
2 parents 9ea0489 + 030e8ab commit 849578d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/M20_sdk_deploy/state_machine/quadruped_wheel/idle_state.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ namespace qw {
2121
bool first_enter_flag_ = true;
2222
VecXf joint_pos_, joint_vel_, joint_tau_;
2323
Vec3f rpy_, acc_, omg_;
24-
float enter_state_time_ = 10000.;
25-
float last_print_time = 0;
24+
double enter_state_time_ = 10000.;
25+
double last_print_time = 0;
2626

2727
void GetProprioceptiveData() {
2828
joint_pos_ = ri_ptr_->GetJointPosition();

src/M20_sdk_deploy/state_machine/quadruped_wheel/standup_state.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ namespace qw{
1616
class StandUpState : public StateBase{
1717
private:
1818
VecXf init_joint_pos_, init_joint_vel_, current_joint_pos_, current_joint_vel_;
19-
float time_stamp_record_, run_time_;
19+
double time_stamp_record_, run_time_;
2020
VecXf goal_joint_pos_, kp_, kd_;
2121
MatXf joint_cmd_;
22-
float stand_duration_ = 2.;
22+
double stand_duration_ = 2.;
2323

2424
const float init_hipx_pos_ = Deg2Rad(0.);
2525
const float set_wheel_kd_ = 1.;

0 commit comments

Comments
 (0)