Skip to content

Commit

Permalink
Remove typing to be python3.8 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Miquel Massot committed Jan 25, 2024
1 parent 159f4e7 commit bbaa200
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/zeroros/messages/geometry_msgs.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
from typing import Annotated, Literal

import numpy as np
import numpy.typing as npt

from . import Message
from .std_msgs import Header

Float64Array6x6 = Annotated[npt.NDArray[np.float64], Literal[4]]


class Vector3(Message):
def __init__(self, x: float = 0.0, y: float = 0.0, z: float = 0.0):
Expand Down Expand Up @@ -144,7 +139,7 @@ def from_json(self, json):


class PoseWithCovariance(Message):
def __init__(self, pose=Pose(), covariance: Float64Array6x6 = []):
def __init__(self, pose=Pose(), covariance=[]):
self.pose = pose # type: Pose
self.covariance = covariance # type: list

Expand All @@ -162,7 +157,7 @@ def from_json(self, json):


class TwistWithCovariance(Message):
def __init__(self, twist=Twist(), covariance: Float64Array6x6 = []):
def __init__(self, twist=Twist(), covariance=[]):
self.twist = twist # type: Twist
self.covariance = covariance # type: list

Expand Down

0 comments on commit bbaa200

Please sign in to comment.