Adding obstacle variables and classes
fixed the synchronization issues