🦾 角色动画集合¶
tongsim.entity.action ¶
LookAtLocation
dataclass
¶
Bases: ActionBase
动作: 注视指定位置或取消注释指定位置
Attributes:
Name | Type | Description |
---|---|---|
loc |
Vector3
|
注视的目标位置。 |
is_cancel |
float
|
注视或取消注视,默认为False。 |
execute_immediately |
bool
|
是否立即执行,默认为False |
Source code in src\tongsim\entity\action\impl\aim.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
|
LookAtLocationWithDuration
dataclass
¶
Bases: ActionBase
动作: 注视指定位置,并保持指定时长后取消注视。
Attributes:
Name | Type | Description |
---|---|---|
loc |
Vector3
|
注视的目标位置。 |
time_duration |
float
|
注视保持的时长(秒)。若为 0 则立即取消注视。 |
Source code in src\tongsim\entity\action\impl\aim.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
|
LookAtObject
dataclass
¶
Bases: ActionBase
动作: 注视指定实体或取消注视。
Attributes:
Name | Type | Description |
---|---|---|
object_id |
str
|
目标实体的 ID。 |
is_cancel |
bool
|
是否取消注视。默认为 False 表示执行注视。 |
Source code in src\tongsim\entity\action\impl\aim.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
|
LookAtObjectWithDuration
dataclass
¶
Bases: ActionBase
动作: 注视指定实体并保持指定时长后取消。
Attributes:
Name | Type | Description |
---|---|---|
object_id |
str
|
目标实体的 ID。 |
time_duration |
float
|
注视保持的时长(秒)。若为 0 则立即取消。 |
Source code in src\tongsim\entity\action\impl\aim.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
|
PointAtLocation
dataclass
¶
Bases: ActionBase
动作: 指向指定位置或取消指向指定位置。
Attributes:
Name | Type | Description |
---|---|---|
loc |
Vector3
|
指向的目标位置。 |
is_cancel |
float
|
指向指定位置或取消指向指定位置,True表示取消,False表示执行。默认为False。 |
which_hand |
AnimCmdHandType
|
使用的手部, |
Source code in src\tongsim\entity\action\impl\aim.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
PointAtLocationWithDuration
dataclass
¶
Bases: ActionBase
动作: 指向指定位置,并保持指定时长后取消。
Attributes:
Name | Type | Description |
---|---|---|
loc |
Vector3
|
指向的目标位置。 |
time_duration |
float
|
指向保持的时长(秒)。若为 0 则立即取消指向。 |
which_hand |
AnimCmdHandType
|
使用的手部, |
Source code in src\tongsim\entity\action\impl\aim.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|
PointAtObject
dataclass
¶
Bases: ActionBase
动作: 指向指定实体或取消指向。
Attributes:
Name | Type | Description |
---|---|---|
object_id |
str
|
目标实体的 ID。 |
is_cancel |
bool
|
是否取消指向。默认为 False 表示执行指向。 |
which_hand |
AnimCmdHandType
|
使用的手部。 |
Source code in src\tongsim\entity\action\impl\aim.py
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
|
PointAtObjectWithDuration
dataclass
¶
Bases: ActionBase
动作: 指向指定实体并保持指定时长后取消。
Attributes:
Name | Type | Description |
---|---|---|
object_id |
str
|
目标实体的 ID。 |
time_duration |
float
|
指向保持的时长(秒)。若为 0 则立即取消。 |
which_hand |
AnimCmdHandType
|
使用的手部。 |
Source code in src\tongsim\entity\action\impl\aim.py
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
|
EatOrDrink
dataclass
¶
Bases: ActionBase
动作: 吃喝动作。
Attributes:
Name | Type | Description |
---|---|---|
which_hand |
AnimCmdHandType
|
指定举手的手部。 |
Source code in src\tongsim\entity\action\impl\gesture.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
IdleGesture
dataclass
¶
Bases: ActionBase
恢复为默认动作(Idle)。
该动作用于重置当前动画状态,将角色恢复到默认姿态。
Source code in src\tongsim\entity\action\impl\gesture.py
14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
NodHead
dataclass
¶
Bases: ActionBase
动作: 点头。
Source code in src\tongsim\entity\action\impl\gesture.py
123 124 125 126 127 128 129 130 131 132 133 |
|
NodHeadWithDuration
dataclass
¶
Bases: ActionBase
动作: 点头并保持指定时长后恢复为 Idle。
Attributes:
Name | Type | Description |
---|---|---|
duration |
float
|
持续时间(秒)。0 表示立即恢复。 |
Source code in src\tongsim\entity\action\impl\gesture.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
|
RaiseHand
dataclass
¶
Bases: ActionBase
动作: 举手。
Attributes:
Name | Type | Description |
---|---|---|
which_hand |
AnimCmdHandType
|
指定举手的手部。 |
Source code in src\tongsim\entity\action\impl\gesture.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
RaiseHandWithDuration
dataclass
¶
Bases: ActionBase
动作: 举手并保持指定时长后恢复为 Idle。
Attributes:
Name | Type | Description |
---|---|---|
which_hand |
AnimCmdHandType
|
指定举手的手部。 |
duration |
float
|
持续时间(秒)。0 表示立即恢复。 |
Source code in src\tongsim\entity\action\impl\gesture.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|
RompPlay
dataclass
¶
Bases: ActionBase
动作: 把玩当前手上的物体(需要手上有物体),若不通过 IdleGesture 取消,会一直持续把玩的动作。
Attributes:
Name | Type | Description |
---|---|---|
which_hand |
AnimCmdHandType
|
指定用哪知手。 不可使用 BOTH 同时双手。 |
decrease_boredom |
float
|
做完这个动作可以减少 agent 多少的无聊值 |
Source code in src\tongsim\entity\action\impl\gesture.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
|
RompPlayWithDuration
dataclass
¶
Bases: ActionBase
动作: 把玩当前手上的物体并保持指定时长后恢复为 Idle。
Attributes:
Name | Type | Description |
---|---|---|
which_hand |
AnimCmdHandType
|
指定用哪只手。不可使用 BOTH 同时双手。 |
decrease_boredom |
float
|
做完这个动作可以减少 agent 多少的无聊值。 |
duration |
float
|
持续时间(秒)。0 表示立即恢复 Idle。 |
Source code in src\tongsim\entity\action\impl\gesture.py
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
|
ShakeHead
dataclass
¶
Bases: ActionBase
动作: 摇头。
Source code in src\tongsim\entity\action\impl\gesture.py
160 161 162 163 164 165 166 167 168 169 170 |
|
ShakeHeadWithDuration
dataclass
¶
Bases: ActionBase
动作: 摇头并保持指定时长后恢复为 Idle。
Attributes:
Name | Type | Description |
---|---|---|
duration |
float
|
持续时间(秒)。0 表示立即恢复。 |
Source code in src\tongsim\entity\action\impl\gesture.py
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
|
WaveHand
dataclass
¶
Bases: ActionBase
动作: 挥手。
Attributes:
Name | Type | Description |
---|---|---|
which_hand |
AnimCmdHandType
|
指定挥手的手部,可选值为 |
Source code in src\tongsim\entity\action\impl\gesture.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
WaveHandWithDuration
dataclass
¶
Bases: ActionBase
动作: 挥手并保持指定时长后恢复为 Idle。
Attributes:
Name | Type | Description |
---|---|---|
which_hand |
AnimCmdHandType
|
指定挥手的手部。 |
duration |
float
|
持续时间(秒)。0 表示立即恢复。 |
Source code in src\tongsim\entity\action\impl\gesture.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
HandBack
dataclass
¶
Bases: ActionBase
动作: 手部收回。
Attributes:
Name | Type | Description |
---|---|---|
which_hand |
AnimCmdHandType
|
使用的手部。 |
Source code in src\tongsim\entity\action\impl\hand.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
|
HandReach
dataclass
¶
Bases: ActionBase
动作: 手部伸向目标位置。
Attributes:
Name | Type | Description |
---|---|---|
which_hand |
AnimCmdHandType
|
使用的手部。 |
target_location |
Vector3
|
目标位置。 |
is_reach_from_front |
bool
|
是否从前方伸手,默认 False。 |
auto_offset |
bool
|
是否自动调整到表面,默认 True。 |
Source code in src\tongsim\entity\action\impl\hand.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
HandRelease
dataclass
¶
Bases: ActionBase
动作: 释放手中的物体。
Attributes:
Name | Type | Description |
---|---|---|
which_hand |
AnimCmdHandType
|
使用的手部。 |
target_location |
Vector3
|
目标位置。 |
force_locate |
bool
|
是否强制放到特定位置,默认 True。 |
force_release |
bool
|
是否强制释放,默认 True |
auto_rotate |
bool
|
是否自动调整旋转,默认 False。 |
disable_physics |
bool
|
是否禁用物理效果,默认 False。 |
hold_if_unreachable |
bool
|
若释放失败是否继续抓握,默认 False。 |
container_id |
str | None
|
容器 ID(用于优化表现),可选。 |
Source code in src\tongsim\entity\action\impl\hand.py
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
|
PutDownToLocation
dataclass
¶
Bases: ActionBase
动作: 放下物体到指定位置。
Attributes:
Name | Type | Description |
---|---|---|
which_hand |
AnimCmdHandType
|
使用的手部。 |
target_location |
Vector3
|
目标位置。 |
disable_physics |
bool
|
松手后是否禁用物理效果,默认 False。 |
hold_if_unreachable |
bool
|
若物体无法到达目标位置,是否保持抓握,默认 False。 |
force_release |
bool
|
是否强制释放,默认 True。 |
auto_rotate |
bool
|
是否自动调整旋转,默认 False。 |
rotation |
Quaternion | None
|
调整后的旋转角度,可选。 |
force_locate |
bool
|
是否强制放到特定位置,默认 True。 |
container_id |
str | None
|
容器 ID(用于优化动作表现),可选。 |
Source code in src\tongsim\entity\action\impl\hand.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
|
TakeObject
dataclass
¶
Bases: ActionBase
动作: 拿起物体。
Attributes:
Name | Type | Description |
---|---|---|
which_hand |
AnimCmdHandType
|
使用的手部。 |
object_id |
str
|
目标物体 ID。 |
use_socket |
bool
|
是否使用 socket,默认 False。 |
force_grab |
bool
|
是否强制抓取,默认 False。 |
is_reach_from_front |
bool
|
是否从前方伸手,默认 False。 |
auto_offset |
bool
|
是否自动调整到物体表面,默认 False。 |
container_id |
str | None
|
容器 ID(用于优化动作表现),可选。 |
Source code in src\tongsim\entity\action\impl\hand.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
InputAnimation
dataclass
¶
Bases: ActionBase
动作: 输入动作(Input Animation)。
该动作用于控制角色的输入行为,比如移动方向、是否冲刺、角速度、跳跃与下蹲等。 所有参数均为可选,若不设置,则不影响对应的输入状态。
Attributes:
Name | Type | Description |
---|---|---|
move_vec |
Vector2 | None
|
是否有移动向量的输入,x表示左右移动, y表示前后移动,范围[-1, 1],None 表示未设置。 |
angular_speed |
float | None
|
角速度,表示旋转速率,单位为度/秒,None 表示不设置。 |
sprint |
bool | None
|
是否冲刺,True 表示冲刺,False 表示正常移动,None 表示未设置。 |
jump |
bool | None
|
是否跳跃,True 表示跳跃,False 表示不跳,None 表示未设置。 |
crouch |
bool | None
|
是否下蹲,True 表示下蹲,False 表示站立,None 表示未设置。 |
Source code in src\tongsim\entity\action\impl\input.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
SwitchInputAnimation
dataclass
¶
Bases: ActionBase
动作: 启动或者关闭输入控制器。
Attributes:
Name | Type | Description |
---|---|---|
is_enable |
bool
|
是否启动控制器。 |
Source code in src\tongsim\entity\action\impl\input.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
Interact
dataclass
¶
Bases: ActionBase
动作: 交互对象状态。
用于控制对象状态(如开/关),可应用于灯、按钮、机器开关等。
Attributes:
Name | Type | Description |
---|---|---|
object_id |
str
|
目标对象的唯一 ID。 |
new_object_state |
bool
|
希望设置的状态,True 表示开启/激活,False 表示关闭/停用。 |
Source code in src\tongsim\entity\action\impl\interact.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
MoveToComponent
dataclass
¶
Bases: ActionBase
动作: 移动至指定目标组件,移动速度较大时会切换为跑步动作,移动速度较小时维持走路动作。
Attributes:
Name | Type | Description |
---|---|---|
component_id |
str
|
目标的 ComponentID。 |
speed |
float
|
移动速度,单位为 cm/s,若为 0 表示使用默认速度。 |
Source code in src\tongsim\entity\action\impl\locomotion.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
MoveToLocation
dataclass
¶
Bases: ActionBase
动作: 移动至指定目标位置,移动速度较大时会切换为跑步动作,移动速度较小时维持走路动作。
Attributes:
Name | Type | Description |
---|---|---|
loc |
Vector3
|
目标世界坐标位置。 |
speed |
float
|
移动速度,单位为 cm/s,若为 0 表示使用默认速度。 |
Source code in src\tongsim\entity\action\impl\locomotion.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
MoveToObject
dataclass
¶
Bases: ActionBase
动作: 移动至指定目标,移动速度较大时会切换为跑步动作,移动速度较小时维持走路动作。
Attributes:
Name | Type | Description |
---|---|---|
object_id |
str
|
目标的 EntityID。 |
speed |
float
|
移动速度,单位为 cm/s,若为 0 表示使用默认速度。 |
Source code in src\tongsim\entity\action\impl\locomotion.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
TurnInDegree
dataclass
¶
Bases: ActionBase
动作: 原地转特定角度。
Attributes:
Name | Type | Description |
---|---|---|
degree |
float
|
需要原地转的角度。 |
Source code in src\tongsim\entity\action\impl\locomotion.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
|
TurnToComponent
dataclass
¶
Bases: ActionBase
动作: 转向至指定目标组件。
Attributes:
Name | Type | Description |
---|---|---|
component_id |
str
|
目标的 ComponentID。 |
Source code in src\tongsim\entity\action\impl\locomotion.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
TurnToLocation
dataclass
¶
Bases: ActionBase
动作: 转向目标至指定目标位置。
Attributes:
Name | Type | Description |
---|---|---|
loc |
Vector3
|
目标世界坐标位置。 |
Source code in src\tongsim\entity\action\impl\locomotion.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
|
TurnToObject
dataclass
¶
Bases: ActionBase
动作: 转向目标至指定目标。
Attributes:
Name | Type | Description |
---|---|---|
object_id |
str
|
目标的 EntityID。 |
Source code in src\tongsim\entity\action\impl\locomotion.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
|
CancelAllActions
dataclass
¶
Bases: ActionBase
动作:强制取消所有动作,包括当前正在执行的动作。
Source code in src\tongsim\entity\action\impl\standard.py
485 486 487 488 489 490 491 492 493 494 495 |
|
ClimbDown
dataclass
¶
Bases: ActionBase
动作: 爬下
Source code in src\tongsim\entity\action\impl\standard.py
67 68 69 70 71 72 73 74 75 76 77 |
|
ClimbObject
dataclass
¶
Bases: ActionBase
动作: 爬上指定物体。
Attributes:
Name | Type | Description |
---|---|---|
object_name |
str
|
目标物体名称 |
Source code in src\tongsim\entity\action\impl\standard.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
CloseDoor
dataclass
¶
Bases: ActionBase
动作: 关门或抽屉。TongSim中, 门组件 泛指 基于物理约束绑定的组件,比如旋转门,推拉门,抽屉等等。
Attributes:
Name | Type | Description |
---|---|---|
component_id |
str
|
门组件 ID。 |
which_hand |
AnimCmdHandType
|
使用哪只手 |
Source code in src\tongsim\entity\action\impl\standard.py
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 |
|
MopFloor
dataclass
¶
Bases: ActionBase
动作:使用拖把清洁地面。
注意:该动作要求 agent 右手持有拖把。
Attributes:
Name | Type | Description |
---|---|---|
dirt_id |
str
|
需要清洁的污渍 ID。 |
Source code in src\tongsim\entity\action\impl\standard.py
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 |
|
OpenDoor
dataclass
¶
Bases: ActionBase
动作: 开门或抽屉。TongSim中, 门组件 泛指 基于物理约束绑定的组件,比如旋转门,推拉门,抽屉等等。
Attributes:
Name | Type | Description |
---|---|---|
component_id |
str
|
门组件 ID。 |
which_hand |
AnimCmdHandType
|
使用哪只手 |
Source code in src\tongsim\entity\action\impl\standard.py
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 |
|
PlayAnimation
dataclass
¶
Bases: ActionBase
动作: 播放指定的动画序列。
Attributes:
Name | Type | Description |
---|---|---|
animation_name |
str
|
动画序列的名称。 |
animation_slot |
str
|
动画槽位。当前支持: [PlayAnimSequence(default), UpperBody, LowerBody,Facial] |
Source code in src\tongsim\entity\action\impl\standard.py
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
|
PourWater
dataclass
¶
Bases: ActionBase
动作: 倒水。
Attributes:
Name | Type | Description |
---|---|---|
target_id |
str
|
倒水目标对象ID(杯子) |
location |
Vector3
|
倒水的目标位置(比如杯子伸到哪) |
which_hand |
AnimCmdHandType
|
使用哪只手 |
Source code in src\tongsim\entity\action\impl\standard.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
ReadBook
dataclass
¶
Bases: ActionBase
动作: 阅读书籍, 需要手上有书
Attributes:
Name | Type | Description |
---|---|---|
duration |
int
|
阅读时间(秒)。 |
Source code in src\tongsim\entity\action\impl\standard.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
SitDownToLocation
dataclass
¶
Bases: ActionBase
动作: 坐下到指定位置。
Attributes:
Name | Type | Description |
---|---|---|
location |
Vector3
|
坐下的位置 |
Source code in src\tongsim\entity\action\impl\standard.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
|
SitDownToObject
dataclass
¶
Bases: ActionBase
动作: 坐下到指定物体。
Attributes:
Name | Type | Description |
---|---|---|
object_id |
str
|
目标物体 ID |
Source code in src\tongsim\entity\action\impl\standard.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
|
SleepDown
dataclass
¶
Bases: ActionBase
动作: 躺下睡觉
Attributes:
Name | Type | Description |
---|---|---|
object_id |
str
|
睡觉目标(床 或者 沙发) |
Source code in src\tongsim\entity\action\impl\standard.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
|
SleepUp
dataclass
¶
Bases: ActionBase
动作: 起身(从睡眠状态)。
Source code in src\tongsim\entity\action\impl\standard.py
165 166 167 168 169 170 171 172 173 174 175 |
|
SliceFood
dataclass
¶
Bases: ActionBase
动作: 切割食物。
Attributes:
Name | Type | Description |
---|---|---|
food_id |
str
|
被切割的食物 ID |
location |
Vector3
|
切割位置 |
Source code in src\tongsim\entity\action\impl\standard.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
|
StandUp
dataclass
¶
Bases: ActionBase
动作: 起立。
用于从坐下或躺下状态回到站立状态。
Source code in src\tongsim\entity\action\impl\standard.py
357 358 359 360 361 362 363 364 365 366 367 368 369 |
|
Wait
dataclass
¶
Bases: ActionBase
动作: 等待指定时间。用于动作之间的间隔或延迟处理。
Attributes:
Name | Type | Description |
---|---|---|
time_duration |
float
|
等待时间(单位: 秒),必须为非负数。 |
Source code in src\tongsim\entity\action\impl\standard.py
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 |
|
WashFace
dataclass
¶
Bases: ActionBase
动作: 洗脸。
Attributes:
Name | Type | Description |
---|---|---|
faucet_object_id |
str
|
水龙头对象名称 |
Source code in src\tongsim\entity\action\impl\standard.py
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
|
WashHands
dataclass
¶
Bases: ActionBase
动作: 洗手。
Attributes:
Name | Type | Description |
---|---|---|
faucet_object_id |
str
|
水龙头对象名称 |
Source code in src\tongsim\entity\action\impl\standard.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
|
WashObjectInHand
dataclass
¶
Bases: ActionBase
动作: 洗手中的物体。
Attributes:
Name | Type | Description |
---|---|---|
faucet_object_id |
str
|
水龙头对象名称 |
Source code in src\tongsim\entity\action\impl\standard.py
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
|
WipeQuad
dataclass
¶
Bases: ActionBase
动作:擦拭一个矩形区域。
注意:该动作想要成功擦除,要求 agent 手上有抹布等物体。
Attributes:
Name | Type | Description |
---|---|---|
which_hand |
AnimCmdHandType
|
使用的手(左手或右手)。 |
dirt_location |
Vector3
|
矩形区域的中心位置。 |
quad_extent |
float
|
半边长(单位: cm), 决定矩形的大小。 |
Source code in src\tongsim\entity\action\impl\standard.py
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 |
|