-
Notifications
You must be signed in to change notification settings - Fork 2
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
Connect rerun #12
base: main
Are you sure you want to change the base?
Connect rerun #12
Conversation
a09062b
to
8ef7f30
Compare
src/converters/scalars.rs
Outdated
cdr_buffer: &mut Cursor<Vec<u8>>, | ||
) -> Result<(), Error> { | ||
let value = cdr::deserialize_from::<_, i8, _>(cdr_buffer, cdr::Infinite)?; | ||
rec.log("scalar", &rerun::Scalar::new(value as f64))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these should use the entity_path from the Conversion
as the log destination.
transforms and quaternions. Signed-off-by: Esteve Fernandez <[email protected]>
Co-authored-by: Jeremy Leibs <[email protected]>
662900d
to
691c43b
Compare
This reverts commit 691c43b.
Signed-off-by: Esteve Fernandez <[email protected]>
…l for transforms Signed-off-by: Esteve Fernandez <[email protected]>
@jleibs can you have another look at this? I've added the logic for dispatching different converters based on the |
d8ee5fa
to
b7e65bb
Compare
Signed-off-by: Esteve Fernandez <[email protected]>
b7e65bb
to
26351b7
Compare
Signed-off-by: Esteve Fernandez <[email protected]>
@jleibs I've added a pseudo-converter for |
Signed-off-by: Esteve Fernandez <[email protected]>
Makes sense. Definitely not for this PR, but in the future it would be nice to be able to do that logic, generically, for any Does CDR let you generically pull out a header (if you know it's there?) Alternatively maybe this is something we handle via the trait. If the converter looked like: fn convert(
&self,
topic: &str,
frame_id: &Option<String>,
entity_path: &str,
message: &mut Cursor<Vec<u8>>,
) -> Result<(Option<Header>, Box<dyn Loggable>), Error>; Then we could actually move the logging code out out of the convert and up into Approximately something like: let (header, loggable) = converter.convert(rec, topic, frame_id, message)?;
// Find mapping from (topic, frame_id) -> entity_path
let entity_path = lookup_path_routing(topic, header);
// Use the timestamp from the header if there is one
if let Some(header) = head {
rec.set_time_seconds("ros_time", header.timestamp);
} else {
rec.set_time_seconds("ros_time", receive_time);
}
rec.log(entity_path, loggable); |
We could try two things:
I think either are valid approaches, I can work on it when I come back. |
Connect rclrs to Rerun.
Converters (copied from #4)
From std_msgs:
From geometry_msgs:
From sensor_msgs:
From visualization_msgs:
Depends on Added configuration file parsing #11
Closes Translate basic ROS types to Rerun #4