D
DreamLake

Data

pose_6dof

6-DoF rigid-body pose: position + unit quaternion. Fixed 7-tuple [x, y, z, qx, qy, qz, qw].

Chunk format

  • Format: jsonl
  • Decoder: jsonlDecoder

JSONL shape

{
  ts: number
  data: [number, number, number, number, number, number, number]
  //     x       y       z       qx      qy      qz      qw
}
FieldTypeRequiredNotes
tsnumberyesSeconds.
data[x, y, z, qx, qy, qz, qw]yesTranslation (m) + unit quaternion.

Quaternion convention: qw last. Samples must be unit quaternions. Interpolation between samples uses slerpQuat to avoid non-unit intermediate orientations.

Sample data

{"ts": 0.00, "data": [0.000, 0.000, 0.150, 0.000, 0.000, 0.000, 1.000]}
{"ts": 0.05, "data": [0.012, 0.005, 0.152, 0.000, 0.087, 0.000, 0.996]}
{"ts": 0.10, "data": [0.025, 0.010, 0.156, 0.000, 0.174, 0.000, 0.985]}

Compatible timeline lanes

LaneNotes
LineChartLaneDefault. 7 curves in two groups (position / quaternion) via the dtype's default channelGroups.

Compatible standalone views

ViewNotes
PoseView3D axis gizmo + top-down XY grid. Splits the 7-tuple into position + orientation tracks internally.

Default props

FieldValue
shape[7]
channelGroups[['x','y','z'], ['qx','qy','qz','qw']]

Python generator

import numpy as np
from scipy.spatial.transform import Rotation as R
from dreamlake import Episode
 
ep = Episode.create("ep1")
pose = ep.track("robot/ee_pose", dtype="pose_6dof")
 
t, dt = 0.0, 0.02
while t < 10.0:
    x, y, z = 0.3 + 0.1 * np.cos(t), 0.1 * np.sin(t), 0.15
    qx, qy, qz, qw = R.from_euler('xyz', [0, t * 0.5, 0]).as_quat()
    pose.append({"ts": t, "data": [x, y, z, float(qx), float(qy), float(qz), float(qw)]})
    t += dt