Applying random external force to robot during RL training process

Hello, can anyone help me with applying random force to robot body during training?

Currently I’m using OmniIsaacGymEnvs as a RL framework. (GitHub - NVIDIA-Omniverse/OmniIsaacGymEnvs: Reinforcement Learning Environments for Omniverse Isaac Gym)

For example, if someone wants to train ANYmal robot(OmniIsaacGymEnvs/ at main · NVIDIA-Omniverse/OmniIsaacGymEnvs · GitHub) to walk and resist external forces (disturbances) during walking, one may apply force during training process.

My guess is implementing function to apply external force within the “pre_physics_step()” method, but I’m not sure of it.

I would like to ask what is the conventional way to do this.

Thanks in advance!