Skip to content

Commit 8ad0cc5

Browse files
wip: post initial no-strafe slalom test
1 parent 46b7154 commit 8ad0cc5

6 files changed

Lines changed: 60 additions & 443 deletions

File tree

src/config/slalom.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ pub struct Config {
1010
pub side: Side,
1111
pub centered_threshold: f32,
1212
pub dumb_strafe_secs: u64,
13+
pub init_duration: f32,
14+
pub strafe_duration: f32,
15+
pub traversal_duration: f32,
16+
pub yaw_adjustment: f32,
17+
pub yaw_speed: f32,
1318
}
1419

1520
impl Default for Config {
@@ -22,6 +27,11 @@ impl Default for Config {
2227
side: Side::Left,
2328
centered_threshold: 0.0,
2429
dumb_strafe_secs: 2,
30+
init_duration: 1.0,
31+
strafe_duration: 2.0,
32+
traversal_duration: 6.0,
33+
yaw_adjustment: 15.0,
34+
yaw_speed: 0.2,
2535
}
2636
}
2737
}

src/main.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,16 @@ async fn run_mission(mission: &str, cancel: CancellationToken) -> Result<()> {
487487
.unwrap();
488488
Ok(())
489489
}
490-
"slalom" => ctwrap!(slalom(
490+
"slalom_left" => ctwrap!(slalom(
491491
static_context().await,
492492
&config.missions.slalom,
493+
false,
494+
&config.get_color_profile().unwrap()
495+
)),
496+
"slalom_right" => ctwrap!(slalom(
497+
static_context().await,
498+
&config.missions.slalom,
499+
true,
493500
&config.get_color_profile().unwrap()
494501
)),
495502
"sonar" => {

src/missions/basic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ where
5454

5555
// time in seconds that each action will wait until before continuing onto the next action.
5656
let dive_duration = 2.0;
57-
let forward_duration = 2.0;
57+
let forward_duration = 0.0;
5858
ActionSequence::new(
5959
WaitArm::new(context),
6060
ActionSequence::new(

src/missions/path_align.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,20 @@ pub async fn path_align_procedural<
4141
// .stability_1_speed_set(config.speed, 0.1, 0.0, 0.0, 0.0, config.depth)
4242
// .await;
4343
let _ = cb
44-
.stability_2_speed_set(config.speed, config.forward_speed, 0.0, 0.0, initial_yaw, config.depth)
44+
.stability_2_speed_set(0.0, 0.0, 0.0, 0.0, initial_yaw, config.depth)
45+
.await;
46+
47+
sleep(Duration::from_secs(3)).await;
48+
49+
let _ = cb
50+
.stability_2_speed_set(
51+
config.speed,
52+
config.forward_speed,
53+
0.0,
54+
0.0,
55+
initial_yaw,
56+
config.depth,
57+
)
4558
.await;
4659

4760
let mut last_set_yaw = initial_yaw;

0 commit comments

Comments
 (0)