a set of code snippets with r&d for bipolar painter robot