Tips and Known Issues#
Conventions#
See also
The linear and angular velocities returned by ArticulationView.get_velocities()
and RigidPrimView.get_velocities() are in the world frame. The body rates, which are
more commonly used in the UAV literature, can be obtained by transforming the angular velocities with
the inverse of the rotation:
from omni_drones.utils.torch import quat_rotate_inverse
view = ... # ArticulationView or RigidPrimView
pos_w, rot = view.get_world_pose(clone=True)
linvel_w, angvel_w = view.get_velocities(clone=True).split([3, 3], dim=-1)
angvel_b = quat_rotate_inverse(rot, angvel_w)
Debug Visulization#
See also
Detecting Contact#
To enable contact detection on a rigid body, one can create a RigidPrimView and
initialize it with track_contact_forces=True. After simulation starts, contact forces
can be retrieved with RigidPrimView.get_net_contact_forces(). See below for an example.
# at initialization
obstacles = RigidPrimView(
"/World/envs/env_*/obstacle_*",
reset_xform_properties=False,
shape=[self.num_envs, -1],
track_contact_forces=True
)
obstacles.initialize()
...
# during simulation
collision_force = obstacles.get_net_contact_forces() # [*view_shape, 3]
collision = collision_force.any(dim=-1, keepdim=True)
Warning
Until Isaac Sim 2022.2.1, contact detection can leads to CUDA errors when the number of environments and thus the number of rigid bodies is large. This is potentially related to buffer allocation at lower levels.