Skip to content

Commit 6dd68ec

Browse files
committed
restructure parameter for behavior
1 parent 90fcbd8 commit 6dd68ec

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

crates/types/src/parameters.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ pub struct BehaviorParameters {
5252
pub time_to_reach_delay_when_fallen: Duration,
5353
pub maximum_standup_attempts: u32,
5454
pub walk_with_velocity: WalkWithVelocityParameters,
55-
pub angular_velocitiy_scaling_factor: f32,
5655
}
5756

5857
#[derive(
@@ -500,6 +499,7 @@ pub struct RLWalkingParameters {
500499
pub struct WalkWithVelocityParameters {
501500
pub max_velocity: f32,
502501
pub max_angular_velocity: f32,
502+
pub angular_velocity_scaling_factor: f32,
503503
}
504504

505505
#[derive(

crates/world_state/src/behavior/walk_to_ball.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ pub struct CycleContext {
2222

2323
walk_with_velocity_parameter:
2424
Parameter<WalkWithVelocityParameters, "behavior.walk_with_velocity">,
25-
angular_velocitiy_scaling_factor: Parameter<f32, "behavior.angular_velocitiy_scaling_factor">,
2625
}
2726

2827
#[context]
@@ -54,7 +53,9 @@ impl WalkToBall {
5453
velocity: ball_coordinates_in_ground.normalize()
5554
* context.walk_with_velocity_parameter.max_velocity,
5655
angular_velocity: (normalized_angle_to_ball
57-
* context.angular_velocitiy_scaling_factor)
56+
* context
57+
.walk_with_velocity_parameter
58+
.angular_velocity_scaling_factor)
5859
.clamp(-max_angular_velocity_abs, max_angular_velocity_abs),
5960
}
6061
}

etc/parameters/default.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@
318318
"behavior": {
319319
"walk_with_velocity": {
320320
"max_velocity": 1.0,
321-
"max_angular_velocity": 1.0
322-
},
323-
"angular_velocitiy_scaling_factor": 2.0
321+
"max_angular_velocity": 1.0,
322+
"angular_velocity_scaling_factor": 2.0
323+
}
324324
},
325325
"use_remote_control_for_motion_selection": true,
326326
"field_dimensions": {

tools/mujoco-simulator/mujoco-simulator/K1/ball.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</asset>
1515

1616
<worldbody>
17-
<body pos="2 -1 2.0" name="ball">
17+
<body pos="2 2 2.0" name="ball">
1818
<joint name="ball_free_joint" type="free" limited="false" actuatorfrclimited="false" damping="0.002" />
1919

2020
<geom name="ball" type="sphere" size="0.095" mass="0.450" solref="0.08 0.25" priority="1"

0 commit comments

Comments
 (0)