Esempio n. 1
0
    def heading(self):
        """The heading value converted from orientation."""

        # XXX: changing the orientation should invalidate this
        if self.heading_ is None:
            yaw = yaw_from_quaternion(self.orientation)
            self.heading_ = Heading(yaw)

        return self.heading_
Esempio n. 2
0
 def pose(self) -> Pose:
     pos, orn = self._client.getBasePositionAndOrientation(self._bullet_id)
     heading = Heading(yaw_from_quaternion(orn))
     # NOTE: we're inefficiently creating a new Pose object on every call here,
     # but it's too risky to change this because our clients now rely on this behavior.
     return Pose.from_explicit_offset(
         [0, 0, 0],
         np.array(pos),
         heading,
         local_heading=Heading(0),
     )
Esempio n. 3
0
    def pose(self) -> Pose:
        pos, orn = self._client.getBasePositionAndOrientation(self._bullet_id)
        heading = Heading(yaw_from_quaternion(orn))

        pose = Pose.from_explicit_offset(
            [0, 0, 0],
            np.array(pos),
            heading,
            local_heading=Heading(0),
        )
        return pose
Esempio n. 4
0
    def heading(self):
        if self.heading_ is None:
            yaw = yaw_from_quaternion(self.orientation)
            self.heading_ = Heading(yaw)

        return self.heading_