There was an error while loading. Please reload this page.
1 parent 30030bd commit af3647eCopy full SHA for af3647e
4 files changed
crates/control/src/motion/step_planner.rs
@@ -66,7 +66,7 @@ impl StepPlanner {
66
None
67
};
68
69
- let (max_turn_left, max_turn_right) = if let Some(support_side) = support_side {
+ let (mut max_turn_left, mut max_turn_right) = if let Some(support_side) = support_side {
70
if support_side == Side::Left {
71
(-*context.max_inside_turn, context.max_step_size.turn)
72
} else {
crates/walking_engine/src/mode/walking.rs
@@ -43,12 +43,21 @@ impl Walking {
43
)
44
45
46
+ let turn_acceleration =
47
+ if last_requested_step.forward.abs() > context.parameters.forward_turn_threshold {
48
+ context.parameters.max_turn_acceleration * context.parameters.forward_turn_reduction
49
+ } else {
50
+ context.parameters.max_turn_acceleration
51
+ };
52
+
53
let requested_step = Step {
54
forward: last_requested_step.forward
55
+ (requested_step.forward - last_requested_step.forward)
56
.clamp(backward_acceleration, forward_acceleration),
57
left: requested_step.left,
- turn: requested_step.turn,
58
+ turn: last_requested_step.turn
59
+ + (requested_step.turn - last_requested_step.turn)
60
+ .clamp(-turn_acceleration, turn_acceleration),
61
62
let plan = StepPlan::new_from_request(context, requested_step, support_side);
63
let step = StepState::new(plan);
crates/walking_engine/src/parameters.rs
@@ -17,17 +17,20 @@ pub struct Parameters {
17
pub catching_steps: CatchingStepsParameters,
18
pub gyro_balancing: GyroBalancingParameters,
19
pub foot_leveling: FootLevelingParameters,
20
- pub max_forward_acceleration: f32,
+ pub forward_turn_reduction: f32,
21
+ pub forward_turn_threshold: f32,
22
pub max_base_inside_turn: f32,
23
+ pub max_forward_acceleration: f32,
24
pub max_inside_turn_increase: f32,
25
pub max_rotation_speed: f32,
26
pub max_step_duration: Duration,
27
pub max_support_foot_lift_speed: f32,
28
+ pub max_turn_acceleration: f32,
29
pub min_step_duration: Duration,
30
pub sole_pressure_threshold: f32,
31
pub step_midpoint: Step,
- pub stiffnesses: Stiffnesses,
32
pub stiffness_loss_compensation: StiffnessLossCompensation,
33
+ pub stiffnesses: Stiffnesses,
34
pub swinging_arms: SwingingArmsParameters,
35
}
36
etc/parameters/default.json
@@ -384,7 +384,7 @@
384
"rotation_exponent": 2.0,
385
"request_scale": {
386
"forward": 1.0,
387
- "left": 1.4,
+ "left": 1.4, // todo
388
"turn": 1.0
389
390
},
@@ -458,12 +458,15 @@
458
"roll_scale": 0.0872665,
459
"start_reduce_to_zero": 0.75
460
461
- "max_rotation_speed": 50000.0,
462
- "max_forward_acceleration": 0.01,
+ "forward_turn_reduction": 0.7,
+ "forward_turn_threshold": 0.45,
463
"max_base_inside_turn": 0.1,
464
+ "max_forward_acceleration": 0.01,
465
"max_inside_turn_increase": 4,
466
+ "max_rotation_speed": 50000.0,
467
"max_step_duration": { "nanos": 0, "secs": 2 },
468
"max_support_foot_lift_speed": 0.025,
469
+ "max_turn_acceleration": 0.7,
470
"min_step_duration": { "nanos": 100000000, "secs": 0 },
471
"sole_pressure_threshold": 0.4,
472
"step_midpoint": {
0 commit comments