fastsim.utils
Utility classes for pose math, asset resolution, structured logging, visualization, and kinematics helpers used throughout the framework.
Pose
7 methodsImmutable 6-DOF pose: 3D position + quaternion orientation (wxyz convention).
Pose supports composition via the * operator and inversion, making it convenient for frame transformations. Quaternion convention is w-first (wxyz).
Asset
static-only2 methodsStatic helpers for resolving URL-scheme asset paths and loading config dicts from files.
resolve_url_pathstaticmethodResolve a URL-scheme asset path to an absolute filesystem path.
Log
static-only5 methodsStructured logger with level-colored console output.
PoseUtil
static-only7 methodsStatic quaternion and rotation math helpers (wxyz convention throughout).
multiply_quat_wxyzstaticmethodMultiply two wxyz quaternions: q1 ⊗ q2.
quat_to_matrix_wxyzstaticmethodConvert a wxyz quaternion to a 3×3 rotation matrix.
| Name | Type | Default | Description |
|---|---|---|---|
q | list | — | [qw, qx, qy, qz] quaternion. |
matrix_to_quat_wxyzstaticmethodConvert a 3×3 rotation matrix to a wxyz quaternion.
| Name | Type | Default | Description |
|---|---|---|---|
matrix | np.ndarray | — | 3×3 rotation matrix. |
Visualizer
static-only2 methodsStatic scene visualization helpers for debug rendering of poses and bounding boxes.
visualize_posestaticmethodDraw an XYZ axis triad at the given pose in the simulation viewport.
visualize_bounding_box_with_cornersstaticmethodDraw a wireframe bounding box defined by its 8 corner points.
| Name | Type | Default | Description |
|---|---|---|---|
corners | np.ndarray | — | (8, 3) array of corner positions in world frame. |
coloropt | list|None | None | Optional [r, g, b] color in [0, 1] range. |
KinematicsSolver
static-only1 methodLightweight IK/FK solver that works without a full planner instance.
KinematicsSolver is suitable for quick one-off IK queries outside the normal motion planning pipeline. It does not perform collision checking.
solvestaticmethodSolve IK for a named robot and target EE pose without collision checking.