From 59d53c20e6d30037acc491c3a08b2124dcdcd8b4 Mon Sep 17 00:00:00 2001 From: gusongen Date: Sun, 7 Apr 2024 20:04:14 +0800 Subject: [PATCH] fix last_pose bug --- docs/can_bus.ipynb | 2 +- tools/data_converter/nuscenes_converter.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/can_bus.ipynb b/docs/can_bus.ipynb index 05aa346..c2a3e7c 100644 --- a/docs/can_bus.ipynb +++ b/docs/can_bus.ipynb @@ -125,7 +125,7 @@ " can_bus.extend(rotation) # [3:7] is the orientation\n", " \n", " for key in last_pose.keys():\n", - " can_bus.extend(pose[key]) # accel: [7, 10], rotation_rate: [10: 13], velocity: [13: 16]\n", + " can_bus.extend(last_pose[key]) # accel: [7, 10], rotation_rate: [10: 13], velocity: [13: 16]\n", " \n", " # the last two numbers are reserved for later calculation of rotation angle.\n", " can_bus.extend([0., 0.])\n", diff --git a/tools/data_converter/nuscenes_converter.py b/tools/data_converter/nuscenes_converter.py index 42931ab..19b8361 100755 --- a/tools/data_converter/nuscenes_converter.py +++ b/tools/data_converter/nuscenes_converter.py @@ -171,7 +171,7 @@ def _get_can_bus_info(nusc, nusc_can_bus, sample): can_bus.extend(pos) can_bus.extend(rotation) for key in last_pose.keys(): - can_bus.extend(pose[key]) # 16 elements + can_bus.extend(last_pose[key]) # 16 elements can_bus.extend([0., 0.]) return np.array(can_bus)