improving c/c++ api
yay cleanup
added leg segments in robot