Skip to content

Commit

Permalink
Proposal for Path/Trajectory separation
Browse files Browse the repository at this point in the history
  • Loading branch information
m-decoster committed Feb 6, 2024
1 parent 179d2ff commit 3ca5049
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions airo-typing/airo_typing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,25 +84,27 @@


@dataclass
class JointTrajectory:
positions: JointPathType
class JointPathContainer:
positions: Optional[JointPathType] = None
velocities: Optional[JointPathType] = None
accelerations: Optional[JointPathType] = None
efforts: Optional[JointPathType] = None
times: Optional[TimesType] = None # time from start of trajectory | assumed 0->1 if None


@dataclass
class DualArmJointTrajectory:
positions_left: JointPathType
positions_right: JointPathType
velocities_left: Optional[JointPathType] = None
velocities_right: Optional[JointPathType] = None
accelerations_left: Optional[JointPathType] = None
accelerations_right: Optional[JointPathType] = None
efforts_left: Optional[JointPathType] = None
efforts_right: Optional[JointPathType] = None
times: Optional[TimesType] = None # time from start of trajectory | assumed 0->1 if None
class SingleArmTrajectory:
path: JointPathContainer
gripper_path: Optional[JointPathContainer]
times: TimesType # time (seconds) from start of trajectory


@dataclass
class DualArmTrajectory:
path_left: JointPathContainer
path_right: JointPathContainer
gripper_left: Optional[JointPathContainer]
gripper_right: Optional[JointPathContainer]
times: TimesType # time (seconds) from start of trajectory


PosePathType = np.ndarray
Expand Down

0 comments on commit 3ca5049

Please sign in to comment.