Compute World Poses From a Sensor Mount Transform Tree
Last updated: November 29, 2026
Quick Overview
Given a tree of 2D frames where each node stores its parent and a local offset (dx, dy, dtheta) in the parent's frame, compute every frame's world pose (x, y, theta).
Applied Intuition
November 29, 20260
0
0 solved
Given a tree of 2D frames where each node stores its parent and a local offset (dx, dy, dtheta) in the parent's frame, compute every frame's world pose (x, y, theta).
Sensor simulation at Applied Intuition depends on transform trees like world to vehicle to lidar mount. This screen checks tree traversal and getting the rotation math right, since applying an offset in the wrong frame is the classic bug.
What the Interviewer Expects
- Build a children map from parent pointers
- Traverse from the root with DFS or BFS
- Rotate the child offset by the parent heading before adding
- Accumulate headings down the tree
- Avoid recursion limits on deep chains
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you extend this to 3D with quaternions?
- How would you answer the transform between any two frames, not only to world?
- How would you handle transforms that change over time, like a steering wheel or a pan-tilt camera?
- How would you detect a cycle in malformed input?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
nodes maps frame name to (parent, dx, dy, dtheta); the root has parent None and its offset is its world pose. Angles in radians. Output maps each frame to (x, y, theta)....
High-Level Design
A child's world position is the parent's position plus the child's offset rotated by the parent's heading: , ,...
Submit Your Answer
Applied Intuition Software Engineer Interview Guide
Interview process, tips, and preparation timeline