USD for Robot and World Representation¶
We have an experimental USD wrapper that can read the kinematic chain of a robot and also obstacles represented either as cuboids or meshes. Look at examples/usd_example.py for some possible applications of this api. We additionally leverage this wrapper to write robot animations to usd, which can then be rendered in NVIDIA Omniverse.
Reading World from USD¶
To read a world from the USD, we assume that all obstacles are either under a sub path or have a substring (e.g, collision) to avoid accidentally loading the robot prims as an obstacle. cuRobo represents all obstacles in the robot base frame and hence we transform each prim into the world coordinates using xform.ComputeLocalToWorldTransform https://docs.omniverse.nvidia.com/prod_kit/prod_kit/programmer_ref/usd/transforms/get-world-transforms.html#usd-api (w_T_o) and also read the world coordinates of the robot base frame (w_T_r). We then compute the relative transform and transform all obstacles. (r_T_o = w_T_r^(-1) * w_T_o). We additionally allow for reading the poses from a timecode (by default it’s at 0.0).