Possible to create environment half water, half air?

Discussion in 'Modeling' started by robotprincess, Apr 2, 2018.

  1. I want to test a Humanoid's ability to swim, but currently we can only completely submerge the Humanoid in water just like the Swimmer. Is it possible to define different density and viscosity values for parts of the environment?

    Also, I was unable to confirm if the Humanoid can swim in water without touching the ground. I set density=5000, viscosity=0.1, gainprm=1.1, stiffness=100, but have left gravity enabled for now. What parameters do I need to change to allow the Humanoid to move with the force generated in water?
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    Density and viscosity are global, they cannot be made position-dependent. If you want to model such an effect, you can add passive user forces (with a callback) and provide your own position-dependent model.
     
  3. Is it possible for the Humanoid to swim in water without touching the ground?
     
  4. Emo Todorov

    Emo Todorov Administrator Staff Member

    No, it will sink. It is possible to generate the forces that push it forward (with an appropriate controller), but not the buoyancy forces that push it upward. So you should disable gravity to generate swimming.
     
  5. So far I have set these parameters, with gravity disabled as well: density=5000, viscosity=0.1, gainprm=1.1, stiffness=100
    I can't tell if it can't swim because I haven't trained long enough, or my parameters are wrong. Do you have any parameter advice?
    Also, what do you mean by generate forces by an appropriate controller? Does the body not generate enough force to push it forward?
     
  6. Emo Todorov

    Emo Todorov Administrator Staff Member

    I mean you need a controller capable of swimming. If you wiggle the arms and legs randomly it will not swim. Don't know what the parameters should be. People in RL have worked on simpler swimmers, maybe you can find those papers and see what parameters they used.
     
  7. I know that simple swimmers can be taught to swim, but do you think that even with the right reward function, the body of the humanoid is unable to move forward in water? I know that if you wiggle the arms and legs randomly it does not swim, but can it learn the right motions? The simple swimmer moving randomly also does not swim at first.
     
  8. Emo Todorov

    Emo Todorov Administrator Staff Member

    There are two separate questions here: is the humanoid capable of swimming given the right controller, and is a specific learning algorithm capable of discovering the right controller. The answer to the first question is most likely yes; if the simpler swimmer can swim, there is no reason the humanoid would not be able to (given that it has more degrees of freedom). The answer to the second question depends on the algorithm, how you initialize etc. For example, if you happen to guess a good controller and start from there, most learning algorithms should be able to clean it up. If you start from scratch, anything can happen.