Open adrshsrvstv opened 1 year ago
If you are using ReplicaCAD, then one possibility is to look up the translation of an object in the respective JSON-scene configuration file in the folder "configs/scenes". However, I would also be interested in getting the global coordinates and the scale (for example of a table mesh) from the simulation, e.g. in order to place objects on a tabletop. The scale is not contained in the JSON configuration files.
Hey @adrshsrvstv,
@Ukias is correct that the transform information in the JSON could be used to get object transform information outside of the simulator API.
Depending on the specifics of your situation, there are a few options to get this kind of information within the simulator:
--enable-physics
to add a primitive at the click location. Add a line of code to print that location).output for object's scene node: mesh_bb = Range({0, 0, 0}, {0, 0, 0}). (Not working)
transform is not precise enough. I need the top of a table. I want to place objects exactly on a table.
Repository with problem of the table mesh:
For me solved by adding the maximum of root_scene_node.cumulative__bb to the translation of the root_scene_node.
I am trying to initialize a scene with different objects at different (but fixed) points several times for a benchmark. How do I find the global coordinates in the scene so I could add an object there - for example, the coordinates of the table top in one of the apartment scenes?