| 139 | |
| 140 | @dataclass(kw_only=True) |
| 141 | class 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) |
no outgoing calls
no test coverage detected