Rapidly-exploring random tree based memory efficient motion planning