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 Both sides next revision
cs:ai:start [2018/02/23 18:30]
Mike Bykhovtsev Tweak
cs:ai:start [2018/02/24 00:15]
Mike Bykhovtsev
Line 31: Line 31:
 ===== Things to know when developing AI ===== ===== Things to know when developing AI =====
   * When inheriting from **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.