Skip to content

Add a camera synchronization node#13

Merged
lucasreljic merged 7 commits intomainfrom
lucas/camera_sync
Oct 10, 2025
Merged

Add a camera synchronization node#13
lucasreljic merged 7 commits intomainfrom
lucas/camera_sync

Conversation

@lucasreljic
Copy link
Contributor

Uses Message filters to synchronize Image msgs of both compressed and raw images. Then republishes them as a combined custom MultiImage msgs.

Currently there is no way to implicitly set message filters to have any number of subscribers so camera sync just has cases for each number of cameras from 2-6. In the future this could be changes though.

Note:

In order to republish the images as a combined msg type it needs to be deep copied otherwise there might be ownership issues. This could be a problem with raw images, as they are quite large and as such will take lots of CPU time becoming more significant with more cameras.

Copy link
Contributor

@Edwardius Edwardius left a comment

Choose a reason for hiding this comment

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

Added some comments.

For deep copying: we should be avoiding as many copy operations as possible. To do so, we should be utilizing ComposableNodes. Its edging closer to NITROS every second, but composable nodes allow for zero-copy message transfer https://docs.ros.org/en/humble/Tutorials/Intermediate/Writing-a-Composable-Node.html. Its a rossy way to pass messages without having to deep copy the data (mightve spawned outside of nvidia stuff)

@thomasonzhou good for you to note as well on composable nodes, it might be the only way we can mitigate the copying going on within deep ros, in a rossy way as well

@Edwardius
Copy link
Contributor

also gotta add tests

Edwardius and others added 3 commits September 20, 2025 15:20
* adds test package

* documentation on the node

* pre-commit

* ci failing
- This is required since compressed image subs only work with lifecycle in rolling
- Additional fixed package test errors
@thomasonzhou
Copy link
Contributor

Sorry for the late comment, but what is the goal of republishing raw images? It would be super nice to have debayering + compression integrated into deepros though.

@lucasreljic
Copy link
Contributor Author

For camera software synchronization, so other deep_ros nodes subscribe to one multi-image topic that ensures all the images are synced to an adjustable sync tolerance (in ms). Also, software sync is needed in cases where hardware sync is not possible and since deep_ros is intended to be open source this could be used by others without it. This could be expanded to incorporate compression and debayering if need be.

@thomasonzhou
Copy link
Contributor

Makes sense, thanks for the clarification. Looking forward to seeing the speedups from batch inference :)

Copy link
Contributor

@Edwardius Edwardius left a comment

Choose a reason for hiding this comment

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

approved, just some small changes before merge plz

@lucasreljic lucasreljic merged commit 279d97d into main Oct 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants