Closed naruya closed 2 years ago
Help! How to map mesh_vert to global cartesian coordinates?
We have seen that geom local coordinates can be converted to global coordinates by
geom
# local pos/rot pos = env.sim.model.geom_pos[geom_id].copy() quat = env.sim.model.geom_quat[geom_id].copy() # global pos/rot (for storing outputs) xpos = np.zeros(3, dtype=np.float64) xrot = np.identity(3, dtype=np.float64).flatten() mj_local2Global(env.sim.data, xpos, xrot, pos, quat, body_id, False)
Now what we want to do is to get the global coordinates of mesh (env.sim.model.mesh_vert). I would like to know if there are any useful methods, functions, or easy ways to achieve this. Thanks!
env.sim.model.mesh_vert
I got the solution here. https://github.com/deepmind/mujoco/issues 345
Help! How to map mesh_vert to global cartesian coordinates?
We have seen that
geom
local coordinates can be converted to global coordinates byNow what we want to do is to get the global coordinates of mesh (
env.sim.model.mesh_vert
). I would like to know if there are any useful methods, functions, or easy ways to achieve this. Thanks!