Skip to content

Commit

Permalink
add sobel to ron file
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarriba committed Dec 30, 2024
1 parent 2a079e7 commit 5b17574
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
10 changes: 6 additions & 4 deletions examples/copper_pipeline/kornia_app.ron
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@
id: "rerun",
type: "copper::tasks::rerun_viz::RerunViz",
),
//(
// id: "sobel",
// type: "copper::tasks::sobel::Sobel",
//),
(
id: "sobel",
type: "copper::tasks::sobel::Sobel",
),
],
cnx: [
(src: "cam_garden", dst: "rerun", msg: "copper::tasks::ImageRGBU8Msg"),
(src: "cam", dst: "rerun", msg: "copper::tasks::ImageRGBU8Msg"),
(src: "sobel", dst: "rerun", msg: "copper::tasks::ImageGrayU8Msg"),
(src: "cam", dst: "sobel", msg: "copper::tasks::ImageRGBU8Msg"),
],
logging: (
slab_size_mib: 1024, // Preallocates 1GiB of memory map file at a time
Expand Down
12 changes: 8 additions & 4 deletions examples/copper_pipeline/src/tasks/rerun_viz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub struct RerunViz {
impl Freezable for RerunViz {}

impl<'cl> CuSinkTask<'cl> for RerunViz {
type Input = input_msg!('cl, ImageRGBU8Msg, ImageRGBU8Msg);
type Input = input_msg!('cl, ImageRGBU8Msg, ImageRGBU8Msg, ImageGrayU8Msg);

fn new(_config: Option<&ComponentConfig>) -> Result<Self, CuError>
where
Expand All @@ -23,14 +23,18 @@ impl<'cl> CuSinkTask<'cl> for RerunViz {
}

fn process(&mut self, _clock: &RobotClock, input: Self::Input) -> Result<(), CuError> {
let (img2, img1) = input;
let (img1, img2, img3) = input;

if let Some(img) = img1.payload() {
log_image_rgb(&self.rec, "webcam", &img)?;
log_image_rgb(&self.rec, "webcam", img)?;
}

if let Some(img) = img2.payload() {
log_image_rgb(&self.rec, "garden", &img)?;
log_image_gray(&self.rec, "sobel", img)?;

Check failure on line 33 in examples/copper_pipeline/src/tasks/rerun_viz.rs

View workflow job for this annotation

GitHub Actions / Check

mismatched types

Check failure on line 33 in examples/copper_pipeline/src/tasks/rerun_viz.rs

View workflow job for this annotation

GitHub Actions / Test Suite - i686-unknown-linux-gnu

mismatched types
}

if let Some(img) = img3.payload() {
log_image_rgb(&self.rec, "rtsp", img)?;

Check failure on line 37 in examples/copper_pipeline/src/tasks/rerun_viz.rs

View workflow job for this annotation

GitHub Actions / Check

mismatched types

Check failure on line 37 in examples/copper_pipeline/src/tasks/rerun_viz.rs

View workflow job for this annotation

GitHub Actions / Test Suite - i686-unknown-linux-gnu

mismatched types
}

Ok(())
Expand Down

0 comments on commit 5b17574

Please sign in to comment.