Conversation
honzikschenk
left a comment
There was a problem hiding this comment.
Great work so far! Couple comments
Basalt_VIO_RTab.py
Outdated
| width = 640 | ||
| height = 400 | ||
| # Define sources and outputs | ||
| left = p.create(dai.node.Camera).build(dai.CameraBoardSocket.CAM_B, sensorFps=fps) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
As in if we can instantiate each camera 0 or multiple times?
There was a problem hiding this comment.
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
pipeline-combine.py
Outdated
|
|
||
| object_tracker.add_object_tracker(pipeline) | ||
| Basalt_VIO_RTab.add_basalt_vio_rtab(pipeline) | ||
| pipeline.start() No newline at end of file |
There was a problem hiding this comment.
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
honzikschenk
left a comment
There was a problem hiding this comment.
Some structural changes need to be made, such as consolidating the loops into the main function
Basalt_VIO_RTab.py
Outdated
| slam.occupancyGridMap.link(rerunViewer.inputGrid) | ||
| slam.obstaclePCL.link(rerunViewer.inputObstaclePCL) | ||
| slam.groundPCL.link(rerunViewer.inputGroundPCL) | ||
| p.start() |
There was a problem hiding this comment.
You should only start this in the main module once
object_tracker.py
Outdated
| fps = 0 | ||
| color = (255, 255, 255) | ||
| pipeline.start() | ||
| while(pipeline.isRunning()): |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
This is the only place the code should start/stop the pipeline and run a continuous loop (this part is correct)
pipeline-combine.py
Outdated
|
|
||
| with dai.Pipeline() as pipeline: | ||
|
|
||
| object_tracker.add_object_tracker(pipeline) |
There was a problem hiding this comment.
Very very small nit but if you could make the two functions formatted the same, that'd be much appreciated
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
I'll make it return the rerunNode then? I'm having some trouble understanding how to handle that object though
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
Could you delete the pycache files and gitignore the folder
| @@ -0,0 +1,66 @@ | |||
| import depthai as dai | |||
There was a problem hiding this comment.
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
pipeline-combine.py
Outdated
|
|
||
| with dai.Pipeline() as pipeline: | ||
|
|
||
| object_tracker.add_object_tracker(pipeline) |
There was a problem hiding this comment.
On this note, please rename all the files to be consistent with the rerun_node.py file (snake case)
pipeline-combine.py
Outdated
|
|
||
| with dai.Pipeline() as pipeline: | ||
| cameraBundle = CameraBundle(pipeline) | ||
| object_tracker.add_object_tracker(pipeline) |
There was a problem hiding this comment.
You should also pass in the camerabundle here
No description provided.