-
Notifications
You must be signed in to change notification settings - Fork 1
Voxel grid implementation #24
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
Conversation
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.
Pull request overview
This PR adds voxel grid implementation for 3D scene representation from depth camera data, along with infrastructure improvements to fix container configuration issues. The implementation includes a ROS2 voxel grid node, a dummy camera publisher for testing, and placeholder octomap integration.
Changes:
- Added voxel grid generation using spconv library with ROS2 integration
- Created dummy camera publisher node for testing without real hardware
- Added docker configurations for perception, behaviour (voxel_grid, octomap), and simulation modules
- Updated infrastructure scripts to support new behaviour module
Reviewed changes
Copilot reviewed 34 out of 40 changed files in this pull request and generated 38 comments.
Show a summary per file
| File | Description |
|---|---|
| watod_scripts/watod-setup-docker-env.sh | Added behaviour module support and new image environment variables |
| watod-config.sh | Added behaviour module to active modules list with trailing whitespace |
| utils/voxel/test_voxel.py | Test script for voxel grid generation using spconv with bunny data |
| utils/voxel/ros2_voxel.py | Initial ROS2 voxel node prototype with missing imports |
| utils/voxel/readme.md | Setup instructions for spconv installation |
| utils/create_package.bash | Changed service name from 'interfacing' to 'samples' |
| modules/docker-compose.simulation.yaml | New docker-compose configuration for simulation module |
| modules/docker-compose.perception.yaml | New docker-compose configuration for perception module |
| modules/docker-compose.infrastructure.yaml | Split foxglove into deploy and dev services, changed build target |
| modules/docker-compose.behaviour.yaml | New docker-compose for voxel_grid and octo_map services |
| docker/perception/perception.Dockerfile | Dockerfile for perception module with spconv dependencies |
| docker/infrastructure/foxglove/foxglove.Dockerfile | Disabled rosdep scanning, using empty install list |
| docker/behaviour/voxel_grid/voxel_grid.Dockerfile | Dockerfile for voxel_grid with spconv and torch |
| docker/behaviour/voxel_grid/.dockerignore | Dockerignore for voxel_grid builds |
| docker/behaviour/octo_map/octo_map.Dockerfile | Dockerfile for octomap with incorrect workspace path |
| autonomy/perception/setup.py | ROS2 Python package setup with dummy_publisher_node entry point |
| autonomy/perception/setup.cfg | Package configuration for perception |
| autonomy/perception/perception/dummy_publisher_node.py | Dummy camera publisher generating synthetic RGB-D data at 1Hz |
| autonomy/perception/package.xml | Package manifest with commented dependencies |
| autonomy/perception/launch/perception.launch.py | Launch file referencing non-existent perception_node |
| autonomy/perception/config/perception_config.yaml | Configuration parameters for perception pipeline |
| autonomy/behaviour/voxel_grid/voxel_grid/voxel_grid_node.py | Main voxel grid node implementation with depth decoding and voxelization |
| autonomy/behaviour/voxel_grid/setup.py | ROS2 package setup for voxel_grid |
| autonomy/behaviour/voxel_grid/setup.cfg | Package configuration for voxel_grid |
| autonomy/behaviour/voxel_grid/package.xml | Package manifest for voxel_grid |
| autonomy/behaviour/voxel_grid/launch/voxel_grid.launch.py | Launch file for voxel_grid_node |
| autonomy/behaviour/octo_map/setup.py | ROS2 package setup for octo_map with incorrect setup.cfg |
| autonomy/behaviour/octo_map/setup.cfg | Package configuration with wrong paths (references voxel_grid) |
| autonomy/behaviour/octo_map/resource/octo_map | Resource marker with wrong content (contains 'voxel_grid') |
| autonomy/behaviour/octo_map/package.xml | Package manifest for octo_map |
| autonomy/behaviour/octo_map/octo_map/octo_map_node.py | Stub octomap node with missing method implementation |
| autonomy/behaviour/octo_map/launch/octo_map.launch.py | Launch file for octo_map_node |
| .gitignore | Added spconv directory to gitignore |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| points = [] | ||
| h, w = depth.shape | ||
|
|
||
| for v in range(0, h, 4): #Skipping every 4 pixels to downsample, can change if nessary |
Copilot
AI
Feb 2, 2026
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.
Typo in comment: 'nessary' should be 'necessary'. The comment on this line has a spelling error.
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.
@copilot open a new pull request to apply changes based on this feedback
| script-dir=$base/lib/voxel_grid | ||
| [install] | ||
| install-scripts=$base/lib/voxel_grid No newline at end of file |
Copilot
AI
Feb 2, 2026
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.
Incorrect paths in setup.cfg. The script_dir and install_scripts paths reference 'voxel_grid' but this is the octo_map package. They should reference 'octo_map' instead.
| script-dir=$base/lib/voxel_grid | |
| [install] | |
| install-scripts=$base/lib/voxel_grid | |
| script-dir=$base/lib/octo_map | |
| [install] | |
| install-scripts=$base/lib/octo_map |
| ################################ Source ################################ | ||
| FROM ${BASE_IMAGE} AS source | ||
|
|
||
| ARG AMENT_WS=/home/wato/wato_ws |
Copilot
AI
Feb 2, 2026
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.
Inconsistent workspace path. This Dockerfile uses '/home/wato/wato_ws' for AMENT_WS (line 6), while the other behaviour Dockerfiles use '/root/ament_ws'. This inconsistency could cause issues with build and runtime paths. The path should be '/root/ament_ws' to match the pattern in voxel_grid.Dockerfile.
| ARG AMENT_WS=/home/wato/wato_ws | |
| ARG AMENT_WS=/root/ament_ws |
| rm -rf /root/* /root/.ros /tmp/* /var/lib/apt/lists/* /usr/share/doc/* | ||
|
|
||
| ################################ Build ################################ | ||
| FROM dependencies AS build |
Copilot
AI
Feb 2, 2026
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.
The AMENT_WS variable is not declared before being used in the colcon build command on line 83. This will fail because the variable was declared in the 'source' stage (line 6) but we're now in the 'build' stage. Add 'ARG AMENT_WS=/root/ament_ws' before the WORKDIR command (or use the corrected path '/root/ament_ws' after fixing the path issue).
| FROM dependencies AS build | |
| FROM dependencies AS build | |
| ARG AMENT_WS=/home/wato/wato_ws |
| # RUN rosdep update | ||
| # RUN rosdep install --from-paths . --ignore-src -r -s \ | ||
| # | grep 'apt-get install' \ | ||
| # | awk '{print $3}' \Is |
Copilot
AI
Feb 2, 2026
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.
Stray characters in commented code. The sequence '\Is' appears at the end of line 16, which seems unintentional. This should be removed or the comment should be properly formatted.
| # | awk '{print $3}' \Is | |
| # | awk '{print $3}' \ |
|
|
||
| try: | ||
| rclpy.spin(node) | ||
| except KeyboardInterrupt: |
Copilot
AI
Feb 2, 2026
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.
'except' clause does nothing but pass and there is no explanatory comment.
| try: | ||
| rclpy.spin(node) | ||
| except KeyboardInterrupt: | ||
| pass |
Copilot
AI
Feb 2, 2026
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.
'except' clause does nothing but pass and there is no explanatory comment.
| pass | |
| node.get_logger().info('Shutting down due to KeyboardInterrupt') |
| RUN python3 -m pip install --no-cache-dir \ | ||
| pccm>=0.4.16 \ | ||
| ccimport>=0.4.4 \ | ||
| pybind11>=2.6.0 \ | ||
| numpy \ | ||
| fire \ | ||
| cv_bridge \ | ||
| opencv-python | ||
|
|
||
| # Install prebuilt spconv-cu120 (compatible with CUDA 12.2 due to minor version compatibility) | ||
| RUN python3 -m pip install --no-cache-dir spconv-cu120 |
Copilot
AI
Feb 2, 2026
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.
The python3 -m pip install commands here install multiple third-party packages (such as pccm, ccimport, pybind11, numpy, fire, cv_bridge, opencv-python, and spconv-cu120) directly from PyPI using loose or unspecified versions and without any integrity verification. If any of these packages (or their transitive dependencies) are compromised, rebuilding this image will automatically pull and execute attacker-controlled code during the Docker build or at runtime, potentially compromising the container and any secrets or build artifacts it can access. Pin these dependencies to specific, vetted versions and use mechanisms like constraints files or hash checking so that only expected package artifacts are installed.
| RUN python3 -m pip install --no-cache-dir \ | ||
| pccm>=0.4.16 \ | ||
| ccimport>=0.4.4 \ | ||
| pybind11>=2.6.0 \ | ||
| numpy \ | ||
| fire \ | ||
| torch | ||
|
|
||
| # Install prebuilt spconv-cu120 (compatible with CUDA 12.2 due to minor version compatibility) | ||
| RUN python3 -m pip install --no-cache-dir spconv-cu120 |
Copilot
AI
Feb 2, 2026
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.
The python3 -m pip install commands here install third-party Python packages (pccm, ccimport, pybind11, numpy, fire, torch, and spconv-cu120) directly from PyPI using open-ended or unspecified versions and without any integrity verification. A compromise of any of these packages would cause future image builds to fetch and execute malicious code with the privileges and network access of this container, which can lead to full compromise of the running behaviour node or its environment. Pin these dependencies to specific, reviewed versions and enable stronger verification (for example via constraints files and hash checking) to reduce supply chain risk.
| RUN python3 -m pip install --no-cache-dir \ | ||
| pccm>=0.4.16 \ | ||
| ccimport>=0.4.4 \ | ||
| pybind11>=2.6.0 \ | ||
| numpy \ | ||
| fire \ | ||
| cv_bridge \ | ||
| opencv-python | ||
|
|
||
| # Install prebuilt spconv-cu120 (compatible with CUDA 12.2 due to minor version compatibility) | ||
| RUN python3 -m pip install --no-cache-dir spconv-cu120 |
Copilot
AI
Feb 2, 2026
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.
The python3 -m pip install commands in this Dockerfile install several third-party packages (pccm, ccimport, pybind11, numpy, fire, cv_bridge, opencv-python, and spconv-cu120) from PyPI without pinning them to exact versions or validating their integrity. If any of these dependencies are hijacked or replaced upstream, a subsequent image build will transparently pull and run attacker-controlled code inside the container, which can compromise the octomap behaviour node and any connected systems or secrets. Lock these dependencies to specific, trusted versions and use reproducible builds with hash or signature verification to mitigate this supply chain attack surface.
|
@hassaan141 I've opened a new pull request, #25, to work on those changes. Once the pull request is ready, I'll request review from you. |
Adding the voxel grid implementation. Also changed a lot of the insfrastrcutre stuff bc it the containrs werent spinning up properly.
Can visualize dummy image voxels on foxglove until real camera is found
Screen.Recording.2026-02-02.at.8.17.02.PM.mov