Erik may15#120
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates navigation/perception configuration and tooling for the rover, including Nav2 tuning, behavior tree adjustments, camera bandwidth tweaks, and improved costmap decompression and OpenCV ArUco compatibility.
Changes:
- Tune Nav2 costmaps/planners/controllers/smoothers and adjust search behavior tree goal filtering.
- Switch the dynamic replanning BT to different planner/controller IDs.
- Add an OpenCV ArUco compatibility layer and update the ZED ArUco detector’s QoS/timing/logging; make costmap decompression size limit configurable.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Nav/navigation/params/nav2.yaml | Nav2 parameter tuning (costmaps, planners, controllers, smoothers, velocity smoother). |
| src/Nav/navigation/config/zed/zed_override_params.yaml | Reduce ZED publish frame rate. |
| src/Nav/navigation/config/elevation_mapping/postprocessing_traversability.yaml | Adjust traversability math expression weights. |
| src/Nav/navigation/behavior_trees/bt_swerve_search_tree.xml | Change goal filtering radius and blackboard wiring before planning through poses. |
| src/Nav/navigation/behavior_trees/bt_swerve_dynamic_replanning.xml | Update planner/controller IDs used by dynamic replanning BT. |
| src/Nav/nav_commanders/config/search_patterns.yaml | Increase search pattern turn radii. |
| src/Nav/localization/config/ekf/gps_ekf_local.yaml | Adjust EKF measurement selection (GPS/wheel/IMU configs). |
| src/Nav/localization/config/ekf/gps_ekf_global.yaml | Adjust EKF measurement selection (GPS/wheel/IMU configs). |
| src/Nav/compressed_telemetry_cpp/src/CostmapDecompressor.cpp | Make decompression size cap configurable and improve error messages. |
| src/Nav/compressed_telemetry_cpp/rviz/compressed_nav2.rviz | Update RViz layout/topics/TF tree display settings. |
| src/Cameras/computer_vision/computer_vision/zed_aruco_detector.py | Update ArUco detector to use compatibility layer and new QoS/timing/logging. |
| src/Cameras/computer_vision/computer_vision/cv2_utils.py | New OpenCV ArUco API compatibility layer across versions. |
Comments suppressed due to low confidence (1)
src/Nav/navigation/params/nav2.yaml:266
- The inline comment says the downsampling factor was "increased from 3", but the configured value is
3. Either update the comment to reflect the actual change, or adjust the value to match the intent described.
plugin: "nav2_constrained_smoother/ConstrainedSmoother"
reversing_enabled: false # whether to detect forward/reverse direction and cusps. Should be set to false for paths without orientations assigned
path_downsampling_factor: 3 # every n-th node of the path is taken (increased from 3 to speed up smoothing)
path_upsampling_factor: 1 # 0 - path remains downsampled, 1 - path is upsampled back to original granularity using cubic bezier, 2... - more upsampling
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <Sequence name="PlanAndSmooth"> | ||
| <ComputePathToPose goal="{goal}" path="{path}" planner_id="GridBasedTransit"/> | ||
| <!-- <SmoothPath unsmoothed_path="{path}" smoothed_path="{smoothed_path}" smoother_id="SmootherTransit"/> --> | ||
| <ComputePathToPose goal="{goal}" path="{path}" planner_id="GridBased"/> |
|
|
||
| <RecoveryNode number_of_retries="1" name="FollowPath"> | ||
| <FollowPath path="{path}" controller_id="FollowPathTransit"/> | ||
| <FollowPath path="{path}" controller_id="FollowPath"/> |
| plugin: "nav2_constrained_smoother/ConstrainedSmoother" | ||
| reversing_enabled: false # whether to detect forward/reverse direction and cusps. Should be set to false for paths without orientations assigned | ||
| path_downsampling_factor: 1 # every n-th node of the path is taken (increased from 3 to speed up smoothing) | ||
| path_downsampling_factor: 3 # every n-th node of the path is taken (increased from 3 to speed up smoothing) |
Comment on lines
+57
to
+64
| max_decompressed_bytes_( | ||
| static_cast<size_t>(this->declare_parameter<int64_t>( | ||
| "max_decompressed_bytes", 100 * 1024 * 1024))) { | ||
| if (max_decompressed_bytes_ == 0) { | ||
| max_decompressed_bytes_ = 100 * 1024 * 1024; | ||
| RCLCPP_WARN(this->get_logger(), | ||
| "max_decompressed_bytes must be > 0; using default %zu", | ||
| max_decompressed_bytes_); |
Comment on lines
+67
to
+73
| self.get_logger().info("Received new colour image") | ||
| self.colour_image = self.cv_bridge.imgmsg_to_cv2(msg, desired_encoding="bgra8") | ||
| self.header_msg = msg.header | ||
| self.img_processed_flag = False | ||
|
|
||
| def depth_image_callback(self, msg: Image): | ||
| self.get_logger().info("Received new depth image") |
Comment on lines
+24
to
+34
| from packaging import version | ||
|
|
||
|
|
||
| def get_opencv_version(): | ||
| """Get the OpenCV version as a comparable version object""" | ||
| return version.parse(cv2.__version__) | ||
|
|
||
|
|
||
| # Version breakpoint: 4.7.0 is when the API changed significantly | ||
| OPENCV_VERSION = get_opencv_version() | ||
| IS_NEW_API = OPENCV_VERSION >= version.parse("4.7.0") |
Comment on lines
+91
to
+93
| self.get_logger().info("Processing image for ArUco marker detection") | ||
| if self.img_processed_flag: | ||
| self.get_logger().info("Image already processed, waiting for new image") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.