Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions bitbots_dynup/config/dynup_robot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dynup:
com_shift_1: 0.051
com_shift_2: 0.0
foot_angle: 51.76

hands_behind_back_x: 0.162
hands_behind_back_z: 0.183
leg_min_length_back: 0.253
Expand All @@ -27,8 +28,9 @@ dynup:
time_full_squat_legs: 0.196
time_legs_close: 0.068
trunk_height_back: 0.179
trunk_overshoot_angle_back: 5.95
wait_in_squat_back: 1.0
trunk_overshoot_angle_back: 1.0
arm_to_body_time: 1.0
wait_in_squat_back: 3.0

# Front
arm_side_offset_front: 0.13
Expand All @@ -44,11 +46,11 @@ dynup:
time_torso_45: 0.462
trunk_overshoot_angle_front: -10.54
trunk_x_front: 0.091
wait_in_squat_front: 1.2
wait_in_squat_front: 1.5

time_walkready: 2.0
# Rise
rise_time: 1.0
rise_time: 2.0

# Descend
descend_time: 0.25
Expand All @@ -66,19 +68,19 @@ dynup:

dynup_pid_trunk_fused_roll:
ros__parameters:
p: 0.36
i: 0.8674
d: 0.03735
p: 0.0
i: 0.0
d: 0.0
i_clamp: 0
i_clamp_min: 0.0
i_clamp_max: 0.0
antiwindup: True
publish_state: False
dynup_pid_trunk_fused_pitch:
ros__parameters:
p: -0.42
i: -5.31646
d: -0.008295
p: -0.2
i: 0.0
d: 0.0
i_clamp: 0.0
i_clamp_min: 0.0
i_clamp_max: 0.0
Expand Down
19 changes: 18 additions & 1 deletion bitbots_dynup/src/dynup_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,10 +558,27 @@ double DynupEngine::calcBackSplines() {
l_foot_spline_.pitch()->addPoint(time, 0);
l_foot_spline_.yaw()->addPoint(time, 0);

/*
* Pose 4.5: Move hands to body
*/
time += params_["arm_to_body_time"].get_value<double>();
l_hand_spline_.x()->addPoint(time, 0);
l_hand_spline_.y()->addPoint(time, params_["arm_side_offset_back"].get_value<double>());
l_hand_spline_.z()->addPoint(time, -params_["arm_extended_length"].get_value<double>());
l_hand_spline_.roll()->addPoint(time, 0);
l_hand_spline_.pitch()->addPoint(time, M_PI / 2);
l_hand_spline_.yaw()->addPoint(time, 0);
r_hand_spline_.x()->addPoint(time, 0);
r_hand_spline_.y()->addPoint(time, -params_["arm_side_offset_back"].get_value<double>());
r_hand_spline_.z()->addPoint(time, -params_["arm_extended_length"].get_value<double>());
r_hand_spline_.roll()->addPoint(time, 0);
r_hand_spline_.pitch()->addPoint(time, M_PI / 2);
r_hand_spline_.yaw()->addPoint(time, 0);

/*
* Pose 5: Wait in squat to let instabilities settle
*/
time += params_["wait_in_squat_back"].get_value<double>();
time += params_["wait_in_squat_back"].get_value<double>() ;
l_foot_spline_.x()->addPoint(time, 0);
l_foot_spline_.y()->addPoint(time, params_["foot_distance"].get_value<double>());
l_foot_spline_.z()->addPoint(time, 0);
Expand Down
1 change: 1 addition & 0 deletions bitbots_dynup/src/dynup_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ namespace bitbots_dynup {
l_wrist_frame_ = this->get_parameter("l_wrist_frame").get_value<std::string>();

param_names_ = {
"arm_to_body_time",
"engine_rate",
"arm_extended_length",
"foot_distance",
Expand Down
8 changes: 4 additions & 4 deletions bitbots_hcm/bitbots_hcm/hcm_dsd/hcm.dsd
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ $StartHCM
OKAY --> $PickedUp
PICKED_UP --> @PlayAnimationDynup + direction:walkready, @StayPickedUp
ON_GROUND --> $Fallen
FALLEN_FRONT --> @CancelGoals, @PlayAnimationDynup + direction:front
FALLEN_BACK --> @CancelGoals, @SetFootZero, @PlayAnimationDynup + direction:back
FALLEN_RIGHT --> @CancelGoals, @TurnRightToBack + duration:1.5, @PlayAnimationDynup + direction:back
FALLEN_LEFT --> @CancelGoals, @TurnLeftToBack + duration:1.5, @PlayAnimationDynup + direction:back
FALLEN_FRONT --> @CancelGoals, @PlayAnimationDynup + direction:front + r:false
FALLEN_BACK --> @CancelGoals, @SetFootZero, @PlayAnimationDynup + direction:back + r:false
FALLEN_RIGHT --> @CancelGoals, @TurnRightToBack + duration:1.5 + r:false, @FallingPoseBack + duration:0.5 + r:false, @Wait + time:0.5 + r:false, @PlayAnimationDynup + direction:back + r:false
FALLEN_LEFT --> @CancelGoals, @TurnLeftToBack + duration:1.5 + r:false, @FallingPoseBack + duration:0.5 + r:false, @Wait + time:0.5 + r:false, @PlayAnimationDynup + direction:back + r:false
NOT_FALLEN --> $Falling
FALLING_LEFT --> @CancelGoals, @FallingPoseLeft + duration:0.5
FALLING_RIGHT --> @CancelGoals, @FallingPoseRight + duration:0.5
Expand Down