Skip to content

Commit 2f3372a

Browse files
committed
wip pre post process
1 parent a28b1c0 commit 2f3372a

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/missions/gate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ pub async fn gate_run_procedural<
8989

9090
let shark = detections
9191
.iter()
92-
.filter(|d| matches!(d.class().identifier, Target::LeftPole))
92+
.filter(|d| matches!(d.class().identifier, Target::Shark))
9393
.collect_vec();
9494

9595
let sawfish = detections
9696
.iter()
97-
.filter(|d| matches!(d.class().identifier, Target::RightPole))
97+
.filter(|d| matches!(d.class().identifier, Target::Sawfish))
9898
.collect_vec();
9999

100-
let mut traversal_timer = DelayAction::new(9.5); // forward duration in second
100+
let mut traversal_timer = DelayAction::new(7.5); // forward duration in second
101101

102102
match config.side {
103103
Side::Left => {

src/missions/path_align.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub async fn path_align_procedural<
3838
};
3939

4040
let _ = cb
41-
.stability_2_speed_set(0.0, config.speed, 0.0, 0.0, initial_yaw, config.depth)
41+
.stability_1_speed_set(config.speed, 0.0, 0.0, 0.0, 0.0, config.depth)
4242
.await;
4343

4444
let mut last_set_yaw = initial_yaw;
@@ -105,7 +105,7 @@ pub async fn path_align_procedural<
105105
logln!("Positive detection count: {consec_detections}");
106106
}
107107
let _ = cb
108-
.stability_2_speed_set(1.0, 0.3, 0.0, 0.0, last_set_yaw, config.depth)
108+
.stability_2_speed_set(0.0, 1.0, 0.0, 0.0, last_set_yaw, config.depth)
109109
.await;
110110
sleep(Duration::from_secs(1)).await;
111111
}

src/video_source/appsink.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl Camera {
5252
let capture_string =
5353
pipeline_head(camera_path, camera_dimensions.0, camera_dimensions.1, 30)
5454
+ " ! jpegdec ! tee name=raw "
55-
+ "raw. ! queue ! videoconvert ! videobalance brightness=-0.6 ! appsink "
55+
+ "raw. ! queue ! videoconvert ! videobalance brightness=0.0 ! appsink "
5656
+ "raw. ! queue ! videoconvert ! "
5757
+ &h264_enc_pipeline(2048000)
5858
+ " ! tee name=h264 "
@@ -152,7 +152,7 @@ fn pipeline_head(device_name: &str, width: u32, height: u32, framerate: u32) ->
152152
return format!("mfvideosrc device-index={device_name} ! image/jpeg, width={width}, height={height}, framerate={framerate}/1");
153153

154154
#[cfg(not(target_os = "windows"))]
155-
return format!("v4l2src device={device_name} exposure=25 ! image/jpeg, width={width}, height={height}, framerate={framerate}/1");
155+
return format!("v4l2src device={device_name} exposure=30 ! image/jpeg, width={width}, height={height}, framerate={framerate}/1");
156156
}
157157

158158
fn h264_enc_pipeline(bitrate: u32) -> String {

src/vision/gate_poles.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ impl TryFrom<i32> for Target {
5959
3 => Ok(Self::Sawfish),
6060
// 4 => Ok(Self::Pole),
6161
// 5 => Ok(Self::Pole),
62-
4 => Ok(Self::LeftPole),
63-
5 => Ok(Self::RightPole),
62+
5 => Ok(Self::LeftPole),
63+
4 => Ok(Self::RightPole),
6464
x => Err(TargetError { x }),
6565
}
6666
}

src/vision/path_cv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl PathCV {
8282
}
8383

8484
pub fn from_color_profile(color_profile: &ColorProfile) -> Self {
85-
Self::new(color_profile.orange.clone(), Size::from((400, 300)))
85+
Self::new(dbg!(color_profile.orange.clone()), Size::from((400, 300)))
8686
}
8787
}
8888

0 commit comments

Comments
 (0)