Domain Layer - Entities
controller.domain.entities.motion_plan
运动规划方案实体
MotionPlan
dataclass
MotionPlan(name: str, points: List[dict] = list())
运动规划方案实体。
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
name |
str
|
方案名称。 |
points |
List[dict]
|
节点列表。 |
add_point
add_point(point_data: dict)
添加节点。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
point_data
|
dict
|
节点数据。 |
必需 |
源代码位于: src/controller/controller/domain/entities/motion_plan.py
20 21 22 23 24 25 26 | |
remove_point
remove_point(index: int)
删除节点。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
index
|
int
|
节点索引。 |
必需 |
源代码位于: src/controller/controller/domain/entities/motion_plan.py
28 29 30 31 32 33 34 35 | |
move_point_up
move_point_up(index: int) -> bool
上移节点。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
index
|
int
|
节点索引。 |
必需 |
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
bool |
bool
|
是否成功移动。 |
源代码位于: src/controller/controller/domain/entities/motion_plan.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
move_point_down
move_point_down(index: int) -> bool
下移节点。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
index
|
int
|
节点索引。 |
必需 |
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
bool |
bool
|
是否成功移动。 |
源代码位于: src/controller/controller/domain/entities/motion_plan.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
update_point
update_point(index: int, point_data: dict)
更新节点。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
index
|
int
|
节点索引。 |
必需 |
point_data
|
dict
|
新的节点数据。 |
必需 |
源代码位于: src/controller/controller/domain/entities/motion_plan.py
67 68 69 70 71 72 73 74 75 | |