-
Notifications
You must be signed in to change notification settings - Fork 1
Initial nav2 changes for swerve #64
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 pull request implements navigation stack improvements for a swerve drive chassis upgrade, transitioning from a skid-steer platform to a 4-wheel independent swerve drive system. The changes focus on optimizing Nav2 configuration for the new chassis capabilities, fixing critical bugs in custom costmap plugins, and implementing swerve-specific control strategies.
Changes:
- Fixed critical costmap plugin bug that was clamping lethal cost threshold to 100 instead of 255, preventing proper gradient representation
- Replaced footprint-based collision checking with point robot configuration, leveraging upstream elevation mapping inflation
- Implemented rotation shim controller to enable point-turn-before-drive behavior for swerve chassis
- Updated behavior tree with forward-only recovery sequence (backup 0.3m, then spin 180°)
- Fixed "trasversability" → "traversability" spelling errors across multiple configuration files
- Increased costmap update frequencies from 1-2 Hz to 10 Hz for more responsive collision checking
- Reduced minimum turning radius from 0.80m to 0.40m to leverage tighter swerve turning capability
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Nav/navigation/params/nav2.yaml | Major configuration overhaul: implemented point robot costmap strategy, rotation shim controller, tighter planner parameters, updated velocity limits for indoor testing |
| src/Nav/navigation/launch/nav2.launch.py | Added namespace parameter to all nav2 nodes and changed default behavior tree to swerve-specific version |
| src/Nav/navigation/config/elevation_mapping/postprocessing_traversability.yaml | Fixed typo in output_topic from "trasversability_map" to "traversability_map" |
| src/Nav/navigation/behavior_trees/bt_swerve_dynamic_replanning.xml | New behavior tree with swerve-optimized recovery actions (backup + 180° spin sequence) |
| src/Nav/navigation/2026_changes.md | Comprehensive implementation guide documenting all 2026 navigation upgrades and architectural decisions |
| src/Nav/localization/config/rviz.views/basicNavMap.rviz | Updated topic reference from "/trasversability_map" to "/traversability_map" |
| src/Nav/elevation_mapping/rviz2/zed2i.rviz | Updated topic reference from "/trasversability_map" to "/traversability_map" |
| src/Nav/elevation_mapping/config/postprocessing/traversability_pipeline.yaml | Fixed typo in output_topic from "trasversability_map" to "traversability_map" |
| src/Nav/cprt_costmap_plugins/src/gridmap_layer.cpp | Critical fix: changed lethal_threshold clamp from 100 to 255, and fixed default layer_name spelling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| plugin: "cprt_costmap_plugins::GridmapLayer" | ||
| enabled: true | ||
| map_topic: "/trasversability_map" | ||
| map_topic: "/traversability_map" |
Copilot
AI
Feb 3, 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 spelling correction from "trasversability" to "traversability" should also be applied to this rviz configuration file to maintain consistency across the codebase. The file src/Nav/navigation/rviz/traversibility_gridmap.rviz still contains the misspelling on lines 225 and 251.
| # Regulated Pure Pursuit Parameters (Driving Logic) | ||
| transform_tolerance: 1.0 | ||
|
|
||
| desired_linear_vel: 0.3 # Increase to 1.0 for outdoor swerve agility |
Copilot
AI
Feb 3, 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 documentation file describes setting desired_linear_vel: 1.0 for outdoor swerve agility (line 73 of 2026_changes.md), but the actual configuration sets it to 0.3 with a comment suggesting to increase it to 1.0 later. This discrepancy between the documentation's recommendation and the actual implementation could cause confusion. Consider updating the documentation to reflect that the current implementation uses conservative values for indoor testing, matching the actual configuration.
| global_costmap: | ||
| ros__parameters: | ||
| update_frequency: 2.0 | ||
| update_frequency: 10.0 |
Copilot
AI
Feb 3, 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 documentation file states "Global costmap runs at ~2Hz (sufficient for static terrain)" at line 184 of 2026_changes.md, but the actual configuration sets the global costmap update_frequency to 10.0 Hz. This inconsistency should be resolved. Based on the PR description mentioning "Increased update frequency of costmaps so its more update to date when its used", it appears the 10Hz value is intentional, so the documentation should be updated to reflect this change.
Made a few changes to improve nav2 for the better chassis.
Some notable things:
cprt_costmap_plugins::GridmapLayerthat was clamping our 200 lethal cost threshold to 100This commit is easier to read the changes since I moved the order of some configs in nav2.yaml first: c02fbd2