fastsim.utils
Utility classes for pose math, asset resolution, structured logging, visualization, and kinematics helpers used throughout the framework.
Pose
7 个方法Immutable 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
静态类2 个方法Static 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
静态类5 个方法Structured logger with level-colored console output.
PoseUtil
静态类7 个方法Static quaternion and rotation math helpers (wxyz convention throughout).
quat_to_matrix_wxyzstaticmethodConvert a wxyz quaternion to a 3×3 rotation matrix.
| 参数名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
q | list | — | [qw, qx, qy, qz] quaternion. |
matrix_to_quat_wxyzstaticmethodConvert a 3×3 rotation matrix to a wxyz quaternion.
| 参数名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
matrix | np.ndarray | — | 3×3 rotation matrix. |
Visualizer
静态类2 个方法Static 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.
| 参数名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
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
静态类1 个方法Lightweight 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.