Hello,
I'm trying to test the robotic gripping application using the new engine Mujoco.
I find that the created composite cannot be detected by proximity sensors(the return value of the function sim.handleProximitySensor() is always '-1'). However, most gripper use the proximity sensors to get the object. What would be the best way to solve this problem?
Thank you in advance.
Best regards.
Proximity sensor does not detect mujoco composites
Re: Proximity sensor does not detect mujoco composites
What does it have to do with Composites?
Re: Proximity sensor does not detect mujoco composites
Hello,
yes, this is correct. MuJoCo composites are visualized as drawing object and thus are invisible to proximity sensors, collision detection or distance calculations.
There is no elegant workaround for that currently. Two dirty workarounds would be to add some code to the part where the drawing objects are updated, i.e. in the sensing section:
yes, this is correct. MuJoCo composites are visualized as drawing object and thus are invisible to proximity sensors, collision detection or distance calculations.
There is no elegant workaround for that currently. Two dirty workarounds would be to add some code to the part where the drawing objects are updated, i.e. in the sensing section:
- by getting the positions of the composite surface nodes, and applying those positions to pre-created dummies. Then detecting those dummies (which need to be detectable). Use simMujoco.getCompositeInfo(prefix,0) to get the positions of the surface nodes.
- by getting the triangles of the composite surface (with simMujoco.getCompositeInfo(prefix,2) ), and creating a shape from that (sim.createMeshShape ). That might be quite slow I am afraid