Applying force tensors with multiple assets in environment

Hello,

I am looking at the apply_forces.py example and attempting to modify it to apply a force to the ant when there is another asset in the environment. I maintained the code as was, but added a ball asset from Isaac gym’s stock assets in assets/urdf/objects/ball.urdf. The ball loads and is seen underneath the ant; however, once the ball is inside of the environment, the ant seems to undergo a single instance of torque being applied, as it twists around, but the force tensor is never applied to lift the ant as it spins around in the air. Then Isaac gym stops responding.

Is it not possible to apply a force tensor if there are multiple assets in the environment?

Hi,

It should be possible to apply a force tensor with multiple assets in the environment. You can take a look at our Ingenuity example for reference. Please make sure the shape and indexing of your force tensor matches with what Isaac Gym is expecting, it should be (num_envs, num_bodies_per_env, 3).

Ok, thank you! I had the incorrect number of bodies in the environment for the shape for the tensor.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.