Problem with trimesh floor (IROS/

Issue #16 open
Germán Larraín
repo owner created an issue

When running demos/IROS/example4_sinusoidal_terrain, the programs outputs values and every X lines prints "'NoneType' object has no attribute 'get_position'". The issue has to do with trying to update each actor's position by accessing the inner object's method "get_position" for each registered SimulatedBody.

In simulator.Simulation.add_trimesh_floor, the floor is created as a collision Trimesh object, graphics Trimesh object and then a SimulatedBody. The latter only stores reference of the actor (graphics object) but not the geom. Also, there really is no body so it's conceptually an inappropriate class.

Comments (3)

  1. Germán Larraín reporter

    The solution requires the following:

    • Create a class for Trimesh floor analogous to SimulatedBody for spheres, boxes, etc. (SimulatedGeom?)
    • In simulator.Simulation.add_trimesh_floor, add an instance of the mentioned class (instead of SimulatedBody), which must hold reference to the geom object (model.collision.adapters.Trimesh).
  2. Germán Larraín reporter


    • Improve coherence between "add_floor" and "add_trimesh_floor". What's the reason for the existence of OdeEngine.create_plane_geom? It's obviously wrong to call it from the Simulation class if it is not defined in physics.base.Engine (OdeEngine's super class).
    • Implement SimulatedPhysicsObject.offset_by_position using the declared abstract methods (easy). That implies removing the @abstractmethod decorator and removing the implementation in SimulatedBody.
  3. Log in to comment