observation_space

Discussion in 'Modeling' started by Joll, Jan 17, 2019.

  1. How to see how many observation states the model has. I am a beginner.
    thanks.
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    Save the model as text file, and look at the mjModel field 'nsensordata'. Or you can examine it from your code.
     
    Joll likes this.
  3. Thank you for your reply.
    I want to simulate a car. The front wheel controls the direction and the rear wheel controls the speed. But during the simulation, the front wheels are always off the body. what should I do.
     
  4. Emo Todorov

    Emo Todorov Administrator Staff Member

    Fix your model :)

    I have no idea why the front wheels are off the body. If you modeled a hinge axis between the wheels and the body, it will be impossible for them to separate even if they wanted to.
     
  5. I want to implement a car model that can move in all directions. I want to change your code below, but it didn't work. I really appreciate if you could provide some advice on refining the model.
     

    Attached Files:

  6. Emo Todorov

    Emo Todorov Administrator Staff Member

    I have limited time to help improve models (in the same way that Microsoft does not help Visual Studio users improve their C++ programs), and that time is reserved for paying customers. I didn't see anything obviously wrong with your model, except you need two additional joints to allow steering. But models can benefit from fine-tuning even when there is nothing obviously wrong.
     
  7. Can Mujoco dynamically set the position of the body? And how to do it . Thanks
     
  8. If referring to a floating body (or any other joint primitives) you could just set the qpos data field.
    If referring to the position of a body w.r.t. its parent, modyfy body_pos and body_quat of mjmodel and call mj_setConst afterwards.
     
  9. I want to do some simple navigation experiments, and plan to use a simple two or four wheeled car as the agent . How to ask car to steer? Thank you for your help.
     
  10. Define actuators for the wheels/steering mechanism. At runtime you can then fill the d->ctrl vector. This will move the car/wheels.
     
  11. I defined two front wheels of the type of hinge. But it always rotates at runtime. How can I make it rotate within a certain range of angles.
     
  12. As noted above, you have to specify actuators for the respective degrees of freedom and fill the ctrl field of the mujoco data. Just look at the actuator section of the XML documentation. If you wand to achieve position control of the steering wheels you may want to look at the position servo section.