Skip to content

Combine pipeline#2

Open
samcyx wants to merge 19 commits intomainfrom
combine-pipeline
Open

Combine pipeline#2
samcyx wants to merge 19 commits intomainfrom
combine-pipeline

Conversation

@samcyx
Copy link

@samcyx samcyx commented Jan 24, 2026

No description provided.

Copy link
Contributor

@honzikschenk honzikschenk left a comment

Choose a reason for hiding this comment

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

Great work so far! Couple comments

width = 640
height = 400
# Define sources and outputs
left = p.create(dai.node.Camera).build(dai.CameraBoardSocket.CAM_B, sensorFps=fps)
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing I'd look into is if you can instantiate the same sources (predominantly the three cameras) only once and/or if this is an issue in either direction

Copy link
Author

Choose a reason for hiding this comment

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

As in if we can instantiate each camera 0 or multiple times?

Copy link
Contributor

@honzikschenk honzikschenk Jan 28, 2026

Choose a reason for hiding this comment

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

For example: the left mono camera gets used in both the object localization and VSLAM pipelines. If we could p.create left once and then feed it into both pipelines, that would presumably be more efficient


object_tracker.add_object_tracker(pipeline)
Basalt_VIO_RTab.add_basalt_vio_rtab(pipeline)
pipeline.start() No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

You'll have to add a while loop (ex: while pipeline.isRunning()) that persists for a designated amount of time (or until the user stops the program) and then pipeline.stop()

Here's an example of this:

with dai.Pipeline() as pipeline:
    object_tracker.add_object_tracker(pipeline)
    Basalt_VIO_RTab.add_basalt_vio_rtab(pipeline)
    pipeline.start()
    while pipeline.isRunning():
        if [END_CONDITION]:
            pipeline.stop()
            break

@samcyx samcyx self-assigned this Jan 28, 2026
Copy link
Contributor

@honzikschenk honzikschenk left a comment

Choose a reason for hiding this comment

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

Some structural changes need to be made, such as consolidating the loops into the main function

slam.occupancyGridMap.link(rerunViewer.inputGrid)
slam.obstaclePCL.link(rerunViewer.inputObstaclePCL)
slam.groundPCL.link(rerunViewer.inputGroundPCL)
p.start()
Copy link
Contributor

Choose a reason for hiding this comment

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

You should only start this in the main module once

fps = 0
color = (255, 255, 255)
pipeline.start()
while(pipeline.isRunning()):
Copy link
Contributor

Choose a reason for hiding this comment

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

You can't capture the program here as it's just meant to be a quick add to the pipeline function


object_tracker.add_object_tracker(pipeline)
Basalt_VIO_RTab.add_basalt_vio_rtab(pipeline)
pipeline.start()
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the only place the code should start/stop the pipeline and run a continuous loop (this part is correct)


with dai.Pipeline() as pipeline:

object_tracker.add_object_tracker(pipeline)
Copy link
Contributor

Choose a reason for hiding this comment

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

Very very small nit but if you could make the two functions formatted the same, that'd be much appreciated

Copy link
Contributor

Choose a reason for hiding this comment

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

On this note, please rename all the files to be consistent with the rerun_node.py file (snake case)

@@ -0,0 +1,66 @@
import depthai as dai
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently, this does nothing. You can copy over the logging done in the VIO pipeline to the main script tho to make this output a nice visualization of the map being constructed

Copy link
Author

Choose a reason for hiding this comment

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

I'll make it return the rerunNode then? I'm having some trouble understanding how to handle that object though

Copy link
Contributor

Choose a reason for hiding this comment

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

If you look at the Basalt VIO example, rerunNode is instantiated (this should be done in the main file now) and then used to log the mapping and other stuff. Just copy over what the example does

.gitignore Outdated
@@ -0,0 +1,2 @@
venv/
notes.txt No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you delete the pycache files and gitignore the folder

@@ -0,0 +1,66 @@
import depthai as dai
Copy link
Contributor

Choose a reason for hiding this comment

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

If you look at the Basalt VIO example, rerunNode is instantiated (this should be done in the main file now) and then used to log the mapping and other stuff. Just copy over what the example does

@samcyx samcyx marked this pull request as ready for review February 4, 2026 23:59
Copy link
Contributor

@honzikschenk honzikschenk left a comment

Choose a reason for hiding this comment

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

2 tiny things left


with dai.Pipeline() as pipeline:

object_tracker.add_object_tracker(pipeline)
Copy link
Contributor

Choose a reason for hiding this comment

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

On this note, please rename all the files to be consistent with the rerun_node.py file (snake case)


with dai.Pipeline() as pipeline:
cameraBundle = CameraBundle(pipeline)
object_tracker.add_object_tracker(pipeline)
Copy link
Contributor

Choose a reason for hiding this comment

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

You should also pass in the camerabundle here

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.

2 participants