User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
cs:ai:start [2018/02/23 18:29]
Mike Bykhovtsev Tweak
cs:ai:start [2018/02/24 00:15]
Mike Bykhovtsev
Line 30: Line 30:
 {{ :​cs:​ai:​gate_ai.png?​nolink |}} {{ :​cs:​ai:​gate_ai.png?​nolink |}}
 ===== Things to know when developing AI ===== ===== Things to know when developing AI =====
-  * When inheriting **SubscribeState** instead of **SmachState**,​ you need to use **self.exit("​outcome"​)** instead of **return "​outcome"​**+  * When inheriting ​from **SubscribeState** instead of **SmachState**,​ you need to use **self.exit("​outcome"​)** instead of **return "​outcome"​** 
 +  * Every python script that is going to run any state machine **must have** in its main function these lines of code below. 
 +<code python>​ 
 +while rospy.get_time() == 0: 
 +    continue 
 +</​code>​
   * Every time you create control_wrapper instance, you need to set depth value again.   * Every time you create control_wrapper instance, you need to set depth value again.
   * If your state is using control wrapper to move, right before final outcome make sure to set changed yaw/​roll/​pitch/​forward to 0.   * If your state is using control wrapper to move, right before final outcome make sure to set changed yaw/​roll/​pitch/​forward to 0.