mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
Add type checking for robot_type
This commit is contained in:
@@ -59,6 +59,15 @@ class Config:
|
||||
self.robot_width = 0.5 # [m] for collision check
|
||||
self.robot_length = 1.2 # [m] for collision check
|
||||
|
||||
@property
|
||||
def robot_type(self):
|
||||
return self._robot_type
|
||||
|
||||
@robot_type.setter
|
||||
def robot_type(self, value):
|
||||
if not isinstance(value, RobotType):
|
||||
raise TypeError("robot_type must be an instance of RobotType")
|
||||
self._robot_type = value
|
||||
|
||||
def motion(x, u, dt):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user