Skip to content

Commit

Permalink
(pykdl_ros) add typing to internal variable
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Sep 20, 2023
1 parent 0e577a8 commit fce22bf
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pykdl_ros/src/pykdl_ros/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def __init__(self, frame: kdl.Frame, stamp: Time, frame_id: str):
assert isinstance(frame, kdl.Frame)
assert isinstance(stamp, Time)
assert isinstance(frame_id, str)
self.frame = frame
self.header = Header(frame_id=frame_id, stamp=stamp)
self.frame: kdl.Frame = frame
self.header: Header = Header(frame_id=frame_id, stamp=stamp)

def __repr__(self):
pos = f"(x={self.frame.p.x()}, y={self.frame.p.y()}, z={self.frame.p.z()})"
Expand Down Expand Up @@ -95,8 +95,8 @@ def __init__(self, twist: kdl.Twist, stamp: Time, frame_id: str):
assert isinstance(twist, kdl.Twist)
assert isinstance(stamp, Time)
assert isinstance(frame_id, str)
self.twist = twist
self.header = Header(frame_id=frame_id, stamp=stamp)
self.twist: kdl.Twist = twist
self.header: Header = Header(frame_id=frame_id, stamp=stamp)

def __repr__(self):
vel = f"(x={self.twist.vel.x()}, y={self.twist.vel.y()}, z={self.twist.vel.z()})"
Expand Down Expand Up @@ -166,8 +166,8 @@ def __init__(self, vector: kdl.Vector, stamp: Time, frame_id: str):
assert isinstance(vector, kdl.Vector)
assert isinstance(stamp, Time)
assert isinstance(frame_id, str)
self.vector = vector
self.header = Header(frame_id=frame_id, stamp=stamp)
self.vector: kdl.Vector = vector
self.header: Header = Header(frame_id=frame_id, stamp=stamp)

def __repr__(self):
xyz = f"(x={self.vector.x()}, y={self.vector.y()}, z={self.vector.z()})"
Expand Down Expand Up @@ -239,8 +239,8 @@ def __init__(self, wrench: kdl.Wrench, stamp: Time, frame_id: str):
assert isinstance(wrench, kdl.Wrench)
assert isinstance(stamp, Time)
assert isinstance(frame_id, str)
self.wrench = wrench
self.header = Header(frame_id=frame_id, stamp=stamp)
self.wrench: kdl.Wrench = wrench
self.header: Header = Header(frame_id=frame_id, stamp=stamp)

def __repr__(self):
force = f"(x={self.wrench.force.x()}, y={self.wrench.force.y()}, z={self.wrench.force.z()})"
Expand Down

0 comments on commit fce22bf

Please sign in to comment.