Documentation Fix

Hi,

I would like to report a documentation issue related to a data type which generate incompatible function argument.

The definition of the apply_actor_dof_efforts method requires that the array containing the efforts be numpy.ndarray[float32]. However, the code shown in section DOF Properties and Drive Modes (docs/programming/physics.html#dof-properties-and-drive-modes) use efforts = np.full(num_dofs, 100.0).astype(float) which according to the x64 compiled version of python and numpy generates an array of dtype float64.

This behavior produces the following exception:

Traceback (most recent call last):
  File "test.py", line 163, in <module>
    gym.apply_actor_dof_efforts(envs_handles[i], actor_handles[i], efforts)
TypeError: apply_actor_dof_efforts(): incompatible function arguments. The following argument types are supported:
    1. (self: isaacgym._bindings.linux-x86_64.gym_36.Gym, arg0: isaacgym._bindings.linux-x86_64.gym_36.Env, arg1: int, arg2: numpy.ndarray[float32]) -> bool

Invoked with: <isaacgym._bindings.linux-x86_64.gym_36.Gym object at 0x7f37a03d6228>, <isaacgym._bindings.linux-x86_64.gym_36.Env object at 0x7f3737d01378>, 0, array([100., 100., 100., 100., 100., 100., 100.])

Proposed Solution:

efforts = np.full(num_dofs, 100.0).astype(np.float32)

Kindly,
Toni

Hi,

I would like to report another documentation issue related to the name of the field of an structured array

The isaacgym.gymapi.RigidBodyState class (docs/api/python/struct_py.html#isaacgym.gymapi.RigidBodyState) defines the name of the rotation field as “r”. However, the code shown in section Rigid Body States (docs/programming/physics.html#rigid-body-states) uses “q” to get the rotation:

body_states["pose"]["q"])           # all orientations (Quat: x, y, z, w)

It generates the following exception:

Traceback (most recent call last):
  File "test.py", line 204, in <module>
    print(body_states_actor["pose"]["q"])
ValueError: no field of name q

Proposed solution:

body_states["pose"]["r"])           # all orientations (Quat: x, y, z, w)

Kindly,
Toni

Hi,

I would like to report another documentation issue related to the parameters of a method.

The set_actor_root_state_tensor(self: Gym, arg0: Sim, arg1: Tensor) method receives as first parameter (ignoring the instance of the class) the simulation handler. However, the code shown in section Actor Root State Tensor (docs/programming/tensors.html#actor-root-state-tensor) only uses as parameters the buffer containing the actor root states

gym.set_actor_root_state_tensor(_root_tensor)

It generates the following exception:

Traceback (most recent call last):
  File "test.py", line 235, in <module>
    gym.set_actor_root_state_tensor(_root_tensor)
TypeError: set_actor_root_state_tensor(): incompatible function arguments. The following argument types are supported:
    1. (self: isaacgym._bindings.linux-x86_64.gym_36.Gym, arg0: isaacgym._bindings.linux-x86_64.gym_36.Sim, arg1: isaacgym._bindings.linux-x86_64.gym_36.Tensor) -> bool

Invoked with: <isaacgym._bindings.linux-x86_64.gym_36.Gym object at 0x7f93fc361618>, <isaacgym._bindings.linux-x86_64.gym_36.Tensor object at 0x7f9337306810>

Proposed solution:

gym.set_actor_root_state_tensor(sim, _root_tensor)

Kindly,
Toni

Hi,

I would like to report another documentation issue related to a wrong description of a parameter

The set_actor_root_state_tensor_indexed(self: Gym, arg0: Sim, arg1: Tensor, arg2: Tensor, arg3: int) method receives an int (arg3: int) as third parameter (ignoring the instance of the class) which according to the error shown when this parameter is used incorrectly is the size of actor index tensor

[Error] [carb.gym.plugin] Incompatible size of actor index tensor in function GymSetActorRootStateTensorIndexed: expected total size 3, received total size 1 with shape (1)

However, the documentation (docs/api/python/gym_py.html#isaacgym.gymapi.Gym.set_actor_root_state_tensor_indexed) shows the next:

 * param1 (Sim) – Simulation Handle
 * param2 (isaacgym.gymapi.Tensor) – Buffer containing actor root states
 * param2 – Buffer containing actor indices

Proposed solution:

Remove latest description and replace it by something like:

* param3 (int) – Size of the actor index tensor

Also, the similar operation for set_dof_actuation_force_tensor_indexed, set_dof_position_target_tensor_indexed and so on with other similar methods…

Kindly,
Toni

Thanks Toni!
Will pass your recommendations to the dev team :)

Hi Toni,

Thanks for pointing these out! We have fixed these issues and will be including them in our next release.

Thanks,
Kelly