Production.clp (2015version)

自分たちのProduction動作を作る前に,まずはCarologistics のProductionの動作を解析します.
このページは,そのメモですので,私が理解できればそれで十分です(´-ω-`)
# CLIPS 関係の用語が間違っていたらごめんなさい.

まず,何がどういう順番で呼ばれるかを確認するために,game.clp でのProduction の扱いを見ます.

(defrule game-remove-exploration-states
  "When entering PRODUCTION phase, remove all states that are only needed in EXPLORATION."
  (phase PRODUCTION)
  ?s <- (state ?exp-state&:(eq "EXP_" (sub-string 1 4 (str-cat ?exp-state))))
  =>
  (printout warn "removing exp-state because we are in production" crlf)
  (retract ?s)
)

とのことですので,ExplorationフェーズからProductionフェーズに切り替わったときに,このfactが呼び出され,”EXP_”で始まる状態名(exp-state)が存在したとき,それらを全部削除するっぽいです.

で,Production.clp の方ですが,(たぶんほぼ)全てのルールに(phase PRODUCTION)の条件が書かれているので,読み進めるときには無視してもよさげです.

13:02:09.378357 CLIPS (agent): Using default position of C-RS2
13:02:09.378501 CLIPS (agent): Using default position of C-RS1
13:02:09.378638 CLIPS (agent): Using default position of C-CS2
13:02:09.378765 CLIPS (agent): Using default position of C-DS
13:02:09.378919 CLIPS (agent): Using default position of C-BS
13:02:09.379055 CLIPS (agent): Using default position of C-CS1
...
13:02:09.392129 CLIPS (agent): Send UpdateStationByTagMessage: id C-RS2 side INPUT frame /map trans (4.7 3.7 0) rot (0.0 0.0 0.926499071042854 0.376297052017058)
...
13:02:09.393011 CLIPS (agent): Send UpdateStationByTagMessage: id C-RS1 side INPUT frame /map trans (1.1 2.4 0) rot (0.0 0.0 -0.741296511727503 0.671177682659842)
...
13:02:09.393784 CLIPS (agent): Send UpdateStationByTagMessage: id C-CS2 side OUTPUT frame /map trans (-3.1 2.6 0) rot (0.0 0.0 0.0 1.0)
...
13:02:09.394505 CLIPS (agent): Send UpdateStationByTagMessage: id C-DS side OUTPUT frame /map trans (-0.8 5.0 0) rot (0.0 0.0 -0.084897682802416 0.99638967450229)
...
13:02:09.395146 CLIPS (agent): Send UpdateStationByTagMessage: id C-BS side INPUT frame /map trans (4.5 1.2 0) rot (0.0 0.0 0.916803108771767 0.399339529406273)
...
13:02:09.395811 CLIPS (agent): Send UpdateStationByTagMessage: id C-CS1 side INPUT frame /map trans (-4.3 5.11 0) rot (0.0 0.0 -0.0149994375063281 0.999887502109359)
...
13:02:09.714231 CLIPS (agent): navgraph-generation should be finished now
13:02:09.722535 CLIPS (agent): Stop using initial ids
13:02:09.722718 CLIPS (agent): Could not explore the machines of the other team, adding them as they would be perfectly mirrowed
13:02:09.727769 CLIPS (agent): Could not explore the machines of the other team, adding them as they would be perfectly mirrowed
13:02:09.728810 CLIPS (agent): Could not explore the machines of the other team, adding them as they would be perfectly mirrowed
13:02:09.729535 CLIPS (agent): Could not explore the machines of the other team, adding them as they would be perfectly mirrowed
13:02:09.730588 CLIPS (agent): Could not explore the machines of the other team, adding them as they would be perfectly mirrowed
13:02:09.731872 CLIPS (agent): Could not explore the machines of the other team, adding them as they would be perfectly mirrowed
13:02:09.732940 CLIPS (agent): Add Tag Nr.97 (M-CS1 INPUT) we got from another bot to Navgraph-generation
13:02:09.733084 CLIPS (agent): TODO: check which zone contains the machine, so we don't try to find a tag there again
...
13:02:09.736966 CLIPS (agent): Send UpdateStationByTagMessage: id M-RS2 side INPUT frame /map trans (-4.7 3.7 0) rot (0.0 0.0 0.376297027191611 0.926499081125694)
...
13:02:09.738441 CLIPS (agent): Send UpdateStationByTagMessage: id M-RS1 side INPUT frame /map trans (-1.1 2.4 0) rot (0.0 0.0 -0.671177699861705 0.741296496152755)
...
13:02:09.739926 CLIPS (agent): Send UpdateStationByTagMessage: id M-CS2 side OUTPUT frame /map trans (3.1 2.6 0) rot (0.0 0.0 1.0 2.67948965850286e-08)
...
13:02:09.741002 CLIPS (agent): Send UpdateStationByTagMessage: id M-DS side OUTPUT frame /map trans (0.8 5.0 0) rot (0.0 0.0 -0.99638967647235 0.0848976596810904)
...
13:02:09.742098 CLIPS (agent): Send UpdateStationByTagMessage: id M-BS side INPUT frame /map trans (-4.5 1.2 0) rot (0.0 0.0 0.399339504840629 0.916803119472028)
...
13:02:09.744612 CLIPS (agent): Send UpdateStationByTagMessage: id M-CS1 side INPUT frame /map trans (4.3 5.11 0) rot (0.0 0.0 -0.999887502457422 0.0149994143038352)
...
13:03:35.255905 CLIPS (agent): 
13:03:35.331013 CLIPS (agent): 
...
13:03:36.164284 CLIPS (agent): ***** Enabling motor *****
13:03:36.164398 CLIPS (agent): R-1
13:03:36.164444 CLIPS (agent): Calling skill drive_into_field{team="CYAN", wait=0}
13:03:36.164488 ClipsAgentThread: Calling skill drive_into_field{team="CYAN", wait=0}
13:03:36.165317 SkillerLua: Drive into field WAIT: 0.000000
13:03:36.200789 SkillerLua: Drive into field goto C-ins-in
13:03:36.200925 SkillerLua: goto INIT:init 1
13:03:36.200945 SkillerLua: goto INIT:init
13:03:36.222743 SkillerLua:  place C-ins-in
13:03:36.222828 SkillerLua: goto (4.300000, 1.000000) delta is (0.757732, -0.170742)
13:03:36.223211 SkillerLua: relgoto target_reached to (0.757732, -0.170742)
13:03:36.223273 SkillerLua: relgoto target_reached to (0.757732, -0.170742)
13:03:36.243108 FawkesMainThread: Loop time exceeded, desired: 0.066333 sec (66333 usec),  actual: 0.088247 sec
13:03:36.250677 CLIPS (agent): Skill drive_into_field is RUNNING, was: IDLE
13:04:41.852230 CLIPS (agent): PROD: FILL C-RS1 with base from BS
13:04:41.854572 CLIPS (agent): Timelog: Task fill-rs started.

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*