This commit is contained in:
Naruse
2025-04-15 19:36:05 +08:00
parent dd51fb491d
commit ec8972d5d6
121 changed files with 30598 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
from pydantic import BaseModel
from rail_proto.lib import MotionInfo,Vector
class Motion(BaseModel):
x: float
y: float
z: float
rotY: float
def ToProto(self) -> MotionInfo:
return MotionInfo(
pos=Vector(
x=int(self.x*1000),
y=int(self.y*1000),
z=int(self.z*1000)
),
rot=Vector(
x=0,
y=int(self.rotY*1000),
z=0
)
)