Robot does not respect collision constraints while being controlled with position actuators.

Discussion in 'Simulation' started by pvk, Nov 8, 2019.

  1. pvk

    pvk

    Hi!

    I am new to MuJoCo and I am trying to control a robot model that I made with the Schunk 3-finger hand. I am controlling the joint positions using mujoco-py interface similar to the script shown here. I continuously increase the joint values in every simulation step. I see the following results (video is attached), which do not respect collision constraints and the robot penetrates itself.

    What is the right way of controlling such a robot?

    I have a mocap body attached to the hand. My end goal is that the robot goes down, grasps the object and comes back up. I was able to simulate this using just MuJoCo simulation using slider controls and mocap control manually. But I would like to have a script for the same. Any input will be highly appreciated.

    Thanks!
     

    Attached Files:

    • sdh.mp4
      File size:
      381.7 KB
      Views:
      111
  2. You are not controlling the robot, you are just setting its state. You need to add actuators and fill the relevant fields in mj_data. Refer to the documentation for that.
     
    pvk likes this.
  3. pvk

    pvk

    Thanks! It works now. Do you have any inputs about controlling the mocap box attached to the hand? I use set_mocap_pos, but it moves the mocap box and not the hand. Thank you very much in advance!