modeled after ROS locomotion handler