An In-Memory Physics Environment as a World Model for Robot Motion Planning