MCPcopy Create free account
hub / github.com/MAC-VO/MAC-VO / AttitudeData

Class AttitudeData

DataLoader/Interface.py:141–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139
140@dataclass(kw_only=True)
141class AttitudeData(Collatable):
142 # Transformation from body frame to sensor frame
143 T_BS: pp.LieTensor # torch.float32, pp.SE3 of shape Bx7
144 time_ns: torch.Tensor # torch.int64 of shape BxNx1
145 gravity: list[float] # gravity constant
146
147 @property
148 def time_delta(self) -> torch.Tensor: return self.time_ns[:, 1:] - self.time_ns[:, :-1]
149 @property
150 def time_ms(self) -> torch.Tensor : return self.time_ns.double() / 1000.
151 @property
152 def frame_gravity(self) -> float:
153 assert len(self.gravity) == 1, "frame_gravity can only be used on unbatched data"
154 return self.gravity[0]
155
156 # Ground truth velocity, position and rotation
157 gt_vel: torch.Tensor # torch.float32 of shape BxNx3
158 gt_pos: torch.Tensor # torch.float32 of shape BxNx3
159 gt_rot: pp.LieTensor # torch.float32 of shape BxNx4, pp.SO3 rotation.
160
161 # Initial condition for IMU preintegration
162 init_vel: torch.Tensor # torch.float32 of shape Bx1x3
163 init_pos: torch.Tensor # torch.float32 of shape Bx1x3
164 init_rot: pp.LieTensor # torch.float32 of shape Bx1x4, pp.SO3 rotation.
165
166
167@dataclass(kw_only=True)

Callers 6

frameRangeQueryMethod · 0.85
__getitem__Method · 0.85
frameRangeQueryMethod · 0.85
__getitem__Method · 0.85
__getitem__Method · 0.85
frameRangeQueryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected