Skip to content

Commit

Permalink
Fix odometry trail for pose arrays of changing length
Browse files Browse the repository at this point in the history
  • Loading branch information
jwbonner committed Oct 30, 2023
1 parent 77e7d33 commit 1eccd59
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/hub/tabControllers/OdometryController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ export default class OdometryController extends TimelineVizController {
rotationConversion
);
poses.forEach((pose, index) => {
trailsTemp[index].push(pose.translation);
if (index < trailsTemp.length) {
trailsTemp[index].push(pose.translation);
}
});
while (dataIndex < data!.timestamps.length && data!.timestamps[dataIndex] < timestamp) {
dataIndex++;
Expand All @@ -293,6 +295,9 @@ export default class OdometryController extends TimelineVizController {
}
} else if (typeof field.sourceType === "string") {
let addTrail = (key: string, trailIndex = 0) => {
if (trailIndex >= trailsTemp.length) {
return;
}
let xData = window.log.getNumber(
key + "/translation/x",
timestamps[0],
Expand Down

0 comments on commit 1eccd59

Please sign in to comment.