merge ring_buf.c changes in failed attempt at obstacles
add map parser and obstacle logic