Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend imagine #1506

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Extend imagine #1506

wants to merge 9 commits into from

Conversation

Vivituhh
Copy link
Contributor

Why? What?

Extends the imagine tool to not only save images but also all node outputs in an mcap file. It contains all main and additional outputs and for each output of those a single message is produced, making it easier and faster to use as one can read each of those individually.
This is needed for future work regarding the sensor data prediction and maybe other things.

Fixes #

ToDo / Known Issues

If this is a WIP describe which problems are to be fixed.

Ideas for Next Iterations (Not This PR)

One could add more metadata/attachments to also include git logs.

How to Test

Take a replay, use imagine as before and it should produce an outputs.mcap file, which can be viewed with https://github.com/foxglove/mcap/releases/tag/releases/mcap-cli/v0.0.49 in the command line.

Cargo.toml Outdated Show resolved Hide resolved
crates/hulk_imagine/build.rs Show resolved Hide resolved
crates/hulk_imagine/src/main.rs Outdated Show resolved Hide resolved
crates/hulk_imagine/Cargo.toml Outdated Show resolved Hide resolved
crates/hulk_imagine/src/main.rs Outdated Show resolved Hide resolved
crates/hulk_imagine/src/main.rs Outdated Show resolved Hide resolved
_stiffnesses: Joints<f32>,
_leds: Leds,
) -> Result<()> {
Ok(())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a quick comment, on why this is intentionally left empty

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we added comments

}
}

impl CameraInterface for ExtractorHardwareInterface {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why these traits are needed for replaying the data? I'd expect that the nodes, that depend on these traits, are actually not executed, are they?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same applies to all the traits below

Copy link
Contributor Author

@Vivituhh Vivituhh Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are executed, for example motor_command_sender which produces AdditionalOutputs which are saved in imagine but also calls write_to_actuators

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, this might be the only one I'd expected to be needed, but all the others are only used by setup nodes, are they?

crates/hulk_imagine/src/main.rs Outdated Show resolved Hide resolved
crates/hulk_imagine/src/main.rs Outdated Show resolved Hide resolved
crates/hulk_imagine/src/main.rs Outdated Show resolved Hide resolved
crates/hulk_imagine/src/main.rs Outdated Show resolved Hide resolved
@@ -0,0 +1,53 @@
#[macro_export]
macro_rules! write_to_mcap {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm missing something, but why is this a macro and not a function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Request for Review
Development

Successfully merging this pull request may close these issues.

3 participants