--- license: other pretty_name: ts-polyline tags: - robotics - navigation - terrasentia - polyline --- # ts-polyline TerraSentia (wheeled robot) navigation trajectories from ROS bags, packaged in a schema mirroring `adipotnis/scand-polyline`. Each row is one image frame paired with a 60-waypoint future trajectory (next 15 m of EKF odom sampled at 0.25 m steps), projected into the ZED camera as a pixel-space polyline and rendered as an overlay PNG. ## Summary - Total samples: **108491** - Bags: **22** - Frames flagged `collision`: **57156** (52.7%) - Frames flagged `reversing`: **28860** (26.6%) - Distinct collision events across all bags: **6057** ## Schema | Field | Type | Notes | |---|---|---| | `traj_id` | string | bag stem | | `robot` | string | constant `"Wheeled Robot"` | | `run_id` | int32 | per-bag index | | `sub_id` | int32 | `0` (schema parity with scand-polyline) | | `n_frames` | int32 | total frames in this bag | | `frame_idx` | int32 | per-bag frame index | | `prefix` | string | same as `traj_id` | | `image` | Image | rectified ZED left frame | | `image_overlay` | Image | same frame with projected polyline drawn | | `depth` | Image | nearest ZED registered depth frame, 16-bit PNG in millimeters (0 = invalid). Decode: `np.asarray(row['depth']).astype(np.float32) / 1000.0` to get meters. | | `traversability` | Image | nearest `/terrasentia/traversability_map` frame, mono8 PNG, 336x188 (lower res than RGB). | | `embodiments` | List[string] | `["Wheeled Robot"]` | | `polyline_xy` | List[List[float64,2]] | projected pixel polyline (in-image segment) | | `traj` | List[List[float64,3]] | up to 60 base-frame waypoints (next 15 m @ 0.25 m) | | `ground_truth` | dict | `{"Wheeled Robot": [polyline_xy]}` | | `image_width` / `image_height` | int64 | rectified frame dims | | `collision` | bool | EKF speed drop in next 5 s (and not reversing) | | `reversing` | bool | sustained reverse motion in next 5 s | ## Per-bag top-view maps Forward motion in green, reverse motion in blue, detected collision events as red dots. ### `ts_2023_04_10_20h05m59s_filtered` - frames: **4334** · collision frames: **3089** · reversing frames: **1682** · collision events: **320** ![ts_2023_04_10_20h05m59s_filtered](topview_maps/ts_2023_04_10_20h05m59s_filtered.png) ### `ts_2023_04_10_20h12m46s_filtered` - frames: **4508** · collision frames: **2687** · reversing frames: **1960** · collision events: **316** ![ts_2023_04_10_20h12m46s_filtered](topview_maps/ts_2023_04_10_20h12m46s_filtered.png) ### `ts_2023_04_11_17h47m24s_filtered` - frames: **2276** · collision frames: **1112** · reversing frames: **616** · collision events: **134** ![ts_2023_04_11_17h47m24s_filtered](topview_maps/ts_2023_04_11_17h47m24s_filtered.png) ### `ts_2023_04_11_17h51m03s` - frames: **6077** · collision frames: **3277** · reversing frames: **1130** · collision events: **298** ![ts_2023_04_11_17h51m03s](topview_maps/ts_2023_04_11_17h51m03s.png) ### `ts_2023_04_11_17h53m56s_filtered` - frames: **6478** · collision frames: **3325** · reversing frames: **1727** · collision events: **416** ![ts_2023_04_11_17h53m56s_filtered](topview_maps/ts_2023_04_11_17h53m56s_filtered.png) ### `ts_2023_04_11_17h58m32s` - frames: **9979** · collision frames: **4918** · reversing frames: **1840** · collision events: **493** ![ts_2023_04_11_17h58m32s](topview_maps/ts_2023_04_11_17h58m32s.png) ### `ts_2023_04_11_18h00m20s` - frames: **7276** · collision frames: **3524** · reversing frames: **1855** · collision events: **338** ![ts_2023_04_11_18h00m20s](topview_maps/ts_2023_04_11_18h00m20s.png) ### `ts_2023_04_11_18h02m48s_filtered` - frames: **6799** · collision frames: **3194** · reversing frames: **1951** · collision events: **414** ![ts_2023_04_11_18h02m48s_filtered](topview_maps/ts_2023_04_11_18h02m48s_filtered.png) ### `ts_2023_04_11_18h13m59s` - frames: **2983** · collision frames: **1297** · reversing frames: **537** · collision events: **120** ![ts_2023_04_11_18h13m59s](topview_maps/ts_2023_04_11_18h13m59s.png) ### `ts_2023_04_11_19h57m53s` - frames: **3693** · collision frames: **1687** · reversing frames: **950** · collision events: **135** ![ts_2023_04_11_19h57m53s](topview_maps/ts_2023_04_11_19h57m53s.png) ### `ts_2023_04_11_20h02m40s` - frames: **2022** · collision frames: **708** · reversing frames: **484** · collision events: **41** ![ts_2023_04_11_20h02m40s](topview_maps/ts_2023_04_11_20h02m40s.png) ### `ts_2023_06_25_20h32m20s` - frames: **6417** · collision frames: **3838** · reversing frames: **2181** · collision events: **417** ![ts_2023_06_25_20h32m20s](topview_maps/ts_2023_06_25_20h32m20s.png) ### `ts_2023_06_25_23h24m19s` - frames: **5280** · collision frames: **2955** · reversing frames: **1463** · collision events: **360** ![ts_2023_06_25_23h24m19s](topview_maps/ts_2023_06_25_23h24m19s.png) ### `ts_2023_06_25_23h34m37s` - frames: **7269** · collision frames: **3477** · reversing frames: **1706** · collision events: **306** ![ts_2023_06_25_23h34m37s](topview_maps/ts_2023_06_25_23h34m37s.png) ### `ts_2023_06_25_23h56m10s` - frames: **2050** · collision frames: **1391** · reversing frames: **491** · collision events: **337** ![ts_2023_06_25_23h56m10s](topview_maps/ts_2023_06_25_23h56m10s.png) ### `ts_2023_06_25_23h56m47s` - frames: **6002** · collision frames: **2645** · reversing frames: **1528** · collision events: **213** ![ts_2023_06_25_23h56m47s](topview_maps/ts_2023_06_25_23h56m47s.png) ### `ts_2023_06_26_00h04m16s` - frames: **973** · collision frames: **437** · reversing frames: **141** · collision events: **44** ![ts_2023_06_26_00h04m16s](topview_maps/ts_2023_06_26_00h04m16s.png) ### `ts_2023_06_26_00h05m52s` - frames: **2383** · collision frames: **1319** · reversing frames: **505** · collision events: **153** ![ts_2023_06_26_00h05m52s](topview_maps/ts_2023_06_26_00h05m52s.png) ### `ts_2023_06_26_00h05m58s` - frames: **4621** · collision frames: **2681** · reversing frames: **1482** · collision events: **245** ![ts_2023_06_26_00h05m58s](topview_maps/ts_2023_06_26_00h05m58s.png) ### `ts_2023_06_26_00h14m59s` - frames: **1989** · collision frames: **1204** · reversing frames: **564** · collision events: **159** ![ts_2023_06_26_00h14m59s](topview_maps/ts_2023_06_26_00h14m59s.png) ### `ts_2023_06_26_00h15m21s` - frames: **7259** · collision frames: **3984** · reversing frames: **1992** · collision events: **377** ![ts_2023_06_26_00h15m21s](topview_maps/ts_2023_06_26_00h15m21s.png) ### `ts_2023_06_26_00h25m04s` - frames: **7823** · collision frames: **4407** · reversing frames: **2075** · collision events: **421** ![ts_2023_06_26_00h25m04s](topview_maps/ts_2023_06_26_00h25m04s.png) ## Detection heuristics All event detection runs on the EKF stream using `msg.header.stamp` — the rosbag receipt timestamps for `/terrasentia/ekf` are batched in microseconds and don't reflect the true ~100 Hz sample times. The window is the 5 s of EKF following the frame. **Currently applied (Option B — sharp-decel collision, both flags independent):** - `reversing`: signed velocity along robot heading is `< -0.05 m/s` for more than 30 % of segments in the window. - `collision`: speed transitions from `> 0.5 m/s` to `< 0.1 m/s` within `0.3 s` anywhere in the window. The two flags are **not** mutually exclusive — a bump-then-back-up event fires both. **Alternative considered (Option A — strict, with mutual exclusivity):** - `reversing`: same as above. - `collision`: speed transitions from `> 0.5 m/s` to `< 0.05 m/s` within `0.5 s`, **and** stays below `0.05 m/s` for at least `1.0 s`, **and** the frame is not also `reversing`. On TerraSentia teleop this leaves `collision=True` for the rare truly-stuck events; most bumps were labeled `reversing=True` only. Built with `datasets/ts_data/bags_to_hf_polyline.py`.