Open ori-gadot opened 1 month ago
Hi @ori-gadot, I just noticed you set the env_spacing to be 0.0:
scene = CartpoleSceneCfg(num_envs=64, env_spacing=0.0)
That may be the reason all the environments are located at the same origin, idk if that solves any of the other issues you have. I hope it helps.
Hi @SantiDiazC , I appreciate your suggestion. This is intentional. In some cases, identical environments with different origins produce slightly different simulation results. To eliminate this variability and examine the pure randomized physics properties of the robot, I deliberately set the environments' spacing to zero.
@ori-gadot Thank you for opening this issue. We have reported this issue to the PhysX team, and a fix for this will be available in the upcoming Isaac Sim patch-fix release this month.
@ori-gadot do you find that this issue is resolved by upgrading to isaac sim 4.1?
Bug Description: Randomizing joint friction is not working.
Steps to Reproduce: Run the script: source/standalone/tutorials/03_envs/create_cartpole_base_env.py with the following changes:
Remove all events from the EventCfg class. Add the following event:
`
`
Change the CartpoleSceneCfg initialization as follows:
scene = CartpoleSceneCfg(num_envs=64, env_spacing=0.0)
Modify the simulation loop to inject zero efforts and reset the pole joint to a 0.1 position:
`
`
These changes will result in all environments being located at the same origin and the pole falling downwards due to gravity. The issue is that all environments behave the same, indicating that the DoF friction randomization did not take place.
Further Investigation:
Replacing friction_distribution_params with armature_distribution_params results in clearly different outcomes for different actors. This indicates that the overall process is legitimate, the events get triggered, and the joint armature values are indeed changed.
Changing the initial value of the joint friction in the actuators variable of the ArticulationCfg in the CARTPOLE_CFG configuration (source/extensions/omni.isaac.lab_assets/omni/isaac/lab_assets/cartpole.py) alters the physical simulation results. This suggests that the simulation is affected by different joint friction values.
Setting the DoF friction values directly using root_physx_view.set_dof_friction_coefficients was not effective either. Additionally, reading the values using root_physx_view.get_dof_friction_coefficients shows the values as changed, but they do not affect the simulation as expected.