feat(perception+costs): pedestrian-intent cost layer (shadow mode) - #502
Open
shreyjoshi2004 wants to merge 14 commits into
Open
feat(perception+costs): pedestrian-intent cost layer (shadow mode)#502shreyjoshi2004 wants to merge 14 commits into
shreyjoshi2004 wants to merge 14 commits into
Conversation
The image-shape unpack shadowed the YOLO bbox width/height, so every PedestrianInfo carried the full image dimensions. Rename the image-shape locals to img_h/img_w so they no longer clobber the bbox dims. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…mode) Add design for a new cost layer that activates the unused /pedestrians intent pipeline: extend PedestrianInfo with metric position, populate it in the perception node, and publish /grid/pedestrian from a new pedestrian_costmap_node. Shadow mode — not wired into grid_summation yet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fold in deep-stress-test findings vs codebase, recent commits, Nova docs: - §5.1: document + fix pre-existing variable-shadowing bug in the producer (width/height fields currently carry image dims, not bbox dims) - §6: split into pure-logic module + thin node for testability; pin grid conventions against the Nova-UTD#493/Nova-UTD#494 x-y-flip and origin-swap regressions; adopt lane_controlled style (callbacks, clock, int16->int8) - §7: correct the "one-line" live-wiring claim — routing one grid to both steering and speed needs a dedicated grid_summation branch - §8: new package-wiring section (entry point, launch, deps, params, README) since the lane_controlled template is itself unregistered/dead code - §10/§11: pytest-style pure-function tests + producer regression test; doc follow-ups Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…s, README) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Final-review follow-up: a degenerate bbox (estimate_depth -> 0) or a detection at/behind the camera plane yields pos_x <= 0, which maps to the ego cell under the default zero camera offset. Skip such poses so the shadow grid never paints a phantom obstacle on the vehicle itself. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
shreyjoshi2004
force-pushed
the
feature_pedestrian_cost_layer
branch
from
June 13, 2026 20:50
da9ed48 to
0117c40
Compare
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.
Summary
Activates the dormant pedestrian-intent perception pipeline by projecting intent detections into a metric cost grid
/grid/pedestrian, published in shadow mode — observable in RViz but not registered ingrid_summation_node, so the planned path is unaffected this round.PedestrianInfo.msggains metricpos_x/pos_y(base_link).pedestrian_geometry.py— monocular pinhole projection (estimate_depth,project_to_base_link); the producer populatespos_x/pos_y, withcam_offset_x/cam_offset_yparams (default 0.0) for a measured extrinsic later.costs/pedestrian_costmap.py(distance_to_cost,pose_to_grid_coords,paint_disk) — no ROS imports, fully unit-tested.pedestrian_costmap_nodepublishing/grid/pedestrian(151×151 @ 0.4 m/cell, base_link, origin (-20.0, -30.0)) — matches the sibling cost layers' grid contract (Add lane-aware cost layer and fix grid_summation_node x/y and reshape bugs #493/fix(costs): correct grid output size and origin for all costmap nodes #494). Non-forward/degenerate poses are skipped so they can't paint a phantom cost on the ego cell.package.xmldeps, param yaml, standalone launch, README, and a shadow Node definition inlaunch_node_definitions.py.This branch is stacked on the bugfix in #501. Until #501 merges into
dev, this PR's diff also contains #501's bugfix commit (plus the planning-doc commits). Once #501 merges, GitHub drops the overlap automatically — merge #501 first.Out of scope (Phase 3, separate PR)
Registering
/grid/pedestrianingrid_summation_node(routing into steering + speed cost), real camera extrinsics / pinhole re-validation, and tuningd_max_m/inflation_radius_m/publish_rate_hzon real/sim data.Test Plan
grep pedestrian grid_summation_node.py→ no matches.colcon build navigator_msgs(verifypos_x/pos_yexist),colcon build costs+ros2 pkg executables costs | grep pedestrian_costmap_node,ros2 launch costs pedestrian_costmap.launch.pythenros2 topic hz /grid/pedestrian(~15 Hz) andros2 topic echo --field info(resolution 0.4, width/height 151, origin -20.0/-30.0). Could not run in the macOS authoring env.🤖 Generated with Claude Code