google / google/brax

Active_pos or Active_rot is not an attribute of brax_sys in version 0.0.13? Is some other version containing it?

Open
#197 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
3.2k
Forks
349
PR merge metrics
No merged PRs in 30d

Description

Hi~
I am currently following a physics-informed work repo [Physics-informed nn](https://github.com/wuwushrek/physics_constrained_nn/issues/1) which use brax as a benchmark. In there they use `active_pos` and 'active_rot' to remove the inactive state dimension from the total state like this:
```def index_active_posrot(brax_sys):
""" This function computes the indexes of the states of the system that are active during the simulation
:param brax_sys : A brax object of class System representing a dynamical system
"""
pos_indx, quat_indx, rot_indx = [], [], []
pos_indx = brax_sys.active_pos.astype(bool)
rot_indx = brax_sys.active_rot.astype(bool)
quat_indx = jnp.sum(brax_sys.active_rot, axis=1) >= 1
quat_indx = jnp.hstack((quat_indx.reshape(-1,1), brax_sys.active_rot.astype(bool)))
return pos_indx, quat_indx, rot_indx
```

But I CANNOT find the `active_pos` and 'active_rot' as an attribute of brax_system? Could it be the problem of brax version? My brax version is `0.0.13`, and which version should I choose? And where can I found the source code of the corresponding version? Could you help us please?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.