← 返回
开发者工具 中文

Pywayne Visualization Rerun Utils

Static 3D visualization utilities wrapping Rerun SDK for adding point clouds, trajectories, cameras, planes, and chessboards. Use when visualizing 3D data in...
静态3D可视化工具,封装Rerun SDK,用于添加点云、轨迹、相机、平面和棋盘格。在可视化3D数据时使用...
wangyendt
开发者工具 clawhub v0.1.0 1 版本 99865.8 Key: 无需
★ 0
Stars
📥 744
下载
💾 25
安装
1
版本
#latest

概述

Pywayne Visualization Rerun Utils

pywayne.visualization.rerun_utils.RerunUtils provides static methods for adding 3D elements to a Rerun viewer.

Quick Start

import numpy as np
import rerun as rr
from pywayne.visualization.rerun_utils import RerunUtils

# Initialize Rerun (called once globally)
rr.init('my_app', spawn=True)

# Use static methods to add elements
RerunUtils.add_point_cloud(points, colors=[255, 0, 0])
RerunUtils.add_trajectory(trajectory)
RerunUtils.add_camera(pose, image='path/to/image.jpg')

Point Cloud

# Single color (default: red)
RerunUtils.add_point_cloud(points)

# Multi-color points
colors = np.random.randint(0, 255, (100, 3))
RerunUtils.add_point_cloud(points, colors=colors, label='colored')

# Data format: points (N, 3)

Trajectory

# Single-color trajectory (default: green)
RerunUtils.add_trajectory(trajectory)

# Multi-color trajectory
colors = np.array([[0, 255, 0], [255, 0, 0]], dtype=np.float32)
RerunUtils.add_trajectory(trajectory, colors=colors, label='path')

# Data format: traj_endpoints (N, 3)

Camera

# Camera only (no image)
RerunUtils.add_camera(pose, label='main_camera')

# Camera with image
RerunUtils.add_camera(pose, image='path/to/image.jpg', label='rgb_camera')

# Data format: camera_pose (4, 4) or (4, 7)

Plane

# Plane by center and normal
RerunUtils.add_plane_from_center_and_normal(center, normal, half_size=1.0)

# Plane from SE3 transformation matrix
RerunUtils.add_plane_from_Twp(Twp, half_size=1.0)

Chessboard

# Standard chessboard
RerunUtils.add_chessboard_from_Twp()

# Custom chessboard with colors
RerunUtils.add_chessboard_from_Twp(
    rows=9, cols=6, cell_size=0.025,
    Twp=pose_matrix,
    color1=np.array([255, 0, 0]),  # Red
    color2=np.array([0, 0, 255])   # Blue
    label='calib_board'
)

Internal Helper

# Get quaternion from v1 to v2 (used internally for plane rotation)
quat = RerunUtils._get_quaternion_from_v1_and_v2(v1, v2)

Important Notes

  • Initialization: Call rr.init('name', spawn=True) once before using methods
  • Static methods: All methods are static class methods, no instance needed
  • Dependencies: Requires Rerun SDK (auto-downloaded via gettool)
  • Data types: All position inputs must be float32
  • Coordinates: Rerun uses ViewCoordinates.RDF (robot-centric coordinate system)
  • SE3 poses: Support (4, 4) or (4, 7) matrix formats
  • Color format: RGB as numpy arrays with shape (3,)

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-29 10:43 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,655
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,952
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,566