Update Robit.cpp

Fix thread variable scope issues, everything used by threads is now a global variable.