← Back to Pull requests

Keep do_transform_vector3 from zeroing the transform's translation #1008

Open
unknown opened this pull request with 142 lines diff across 1 files
View on GitHub
unknown unknown commented on Nov 12, 2026 06:56 UTC
Author

Description

do_transform_vector3() ignores the translation by setting it to zero on the TransformStamped passed in:

transform.transform.translation.x = 0.0
transform.transform.translation.y = 0.0
transform.transform.translation.z = 0.0

That changes the caller's transform. Using the same transform afterwards gives wrong results, for example:

t = buffer.lookup_transform('map', 'base_link', Time())
vel = tf2_geometry_msgs.do_transform_vector3(vel, t)
pt = tf2_geometry_msgs.do_transform_point(pt, t)   # translation is now missing

This change builds the matrix from the rotation alone and leaves the input untouched. The result for the vector is the same as before.

The same code is on humble, jazzy and kilted, so this may be worth backporting.

Tests

New test test_transform_vector3_keeps_transform transforms a vector, then checks the transform still has its translation and that do_transform_point() with it still translates. It fails on the current code and passes with the fix.

In a ros:rolling-ros-base container: test_tf2_geometry_msgs.py 2 passed, ament_flake8 clean.

Diff: 142 lines (+106 / -36) across 1 files Reviewer: Rahul-cs50 Review duration: 32602m
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.33) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 142 lines diff across 1 files
0.33
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
46%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.297
Real PR Conversation Timeline
1 comments
"Review active on #1008"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 46.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 32.7% (LOW) · Higher = larger blast radius
32.7%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 46.7% · Lower = rushed or shallow review
46.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 17.4% · Safe to merge
17.4%
Repository