TRViz (Terminal RViz for ROS 2)
Lightweight Terminal/TUI 2D Navigation & Visualization Workstation for ROS 2
Designed for Headless Robots, Remote SSH Sessions, and Embedded Platforms
🌟 Key Features
- Terminal 2D Map Visualization: OccupancyGrid (
/map) rendering with aspect-ratio correction and rotated map-origin support. - Interactive 2D Pose Estimate (
/initialpose): Set robot initial position & heading directly from the terminal without typing quaternions manually! - Interactive 2D Nav Goal (
/goal_pose): Click/drag to dispatch Nav2 goals directly inside your SSH session. - Live TF & Sensor Overlay: Real-time robot pose tracking (
/tf), LiDAR points (/scan), point clouds (/points), and frame-aware navigation paths (/plan). - Interactive Viewport: Smooth zoom (
+/-), pan (WASD or mouse drag), and auto-follow robot mode (F). - Standalone Mock Simulation: Built-in simulator (
ros2 run trviz mock_sim) for testing without a physical robot or Gazebo.
⚡ Instant One-Line Remote Execution (via PyPI & uvx)
No workspace build or manual source setup required! Run TRViz directly on your robot or workstation:
# 1. Run directly from PyPI via uvx (zero installation!)
uvx ros-trviz
# 2. Built-in subcommands (powered by wpycli)
uvx ros-trviz doctor # Diagnose ROS 2 & terminal environment
uvx ros-trviz mock # Run synthetic simulation node
uvx ros-trviz replay path/log.jsonl # Replay recorded state offline
uvx ros-trviz completion bash # Generate shell auto-completion
# 3. Traditional pip install
pip install ros-trviz
trviz --render-mode half
Smart ROS Auto-Discovery: Even if you haven't run
source /opt/ros/<distro>/setup.bash, TRViz automatically discovers installed ROS 2 distributions under/opt/ros/and configures the environment transparently.
📦 Traditional Installation & Build (ROS 2 Workspace)
Prerequisites
- ROS 2 (Jazzy, Humble, Iron, etc.)
- Python 3.10+
textual,rich,numpy,pyyaml,wpycli
# 1. Build the workspace
cd /home/wkqco/Workspace/ros/trviz
source /opt/ros/jazzy/setup.bash
colcon build --symlink-install
source install/setup.bash
🚀 Quick Start Guide
Launch Python Version
source /opt/ros/jazzy/setup.bash
source install/setup.bash
ros2 run trviz trviz
# Or use the new CLI directly:
trviz run --render-mode half
Launch High-Performance C++ Version (trviz_cpp)
source /opt/ros/jazzy/setup.bash
source install/setup.bash
ros2 run trviz_cpp trviz
⌨️ Controls & Keybindings
| Key / Mouse | Action | Description |
|---|---|---|
P |
Set Initial Pose | Step 1: Click map position $\to$ Step 2: Click to set Heading (/initialpose) |
G |
Set 2D Nav Goal | Step 1: Click map target $\to$ Step 2: Click to set Goal Heading (/goal_pose) |
Esc |
Cancel Interaction | Return to Normal mode |
F |
Toggle Follow | Automatically keep viewport centered on robot |
+ / - (or Mouse Wheel) |
Zoom In / Out | Scale viewport |
W, A, S, D (or Mouse Drag) |
Pan Viewport | Move map view |
T |
Teleop Mode | Use WASD/arrows to publish /cmd_vel |
Space / X |
Emergency Stop | Publish zero velocity while in Teleop mode |
1 |
Toggle Map Layer | Show / Hide OccupancyGrid map |
2 |
Toggle Laser Layer | Show / Hide LiDAR point cloud |
3 |
Toggle Path Layer | Show / Hide Navigation planned path |
4 |
Toggle PointCloud Layer | Show / Hide 3D PointCloud2 BEV projection |
Q |
Quit | Exit TRViz |
📂 Repository Architecture
trviz/
├── AGENTS.md # TDD and Developer / AI Agent Guide
├── CONTRIBUTING.md # Contribution Guidelines
├── LICENSE # Apache-2.0 License
├── src/
│ ├── trviz_py/ # ROS 2 Python Package (Textual based)
│ └── trviz_cpp/ # ROS 2 C++ Package (Native High-Performance TUI)
│ ├── include/trviz/ # Core math, terminal driver, visual layers, widgets, ROS node
│ ├── src/ # Implementations
│ └── test/ # GTest TDD Test Suite
🧪 Testing & TDD
Run the full automated test suites:
cd /home/wkqco/Workspace/ros/trviz
source /opt/ros/jazzy/setup.bash
colcon build
colcon test
colcon test-result --all
📄 License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Metadata
Release files for ros-trviz 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ros_trviz-0.1.1.tar.gz | 36.8 kB | Without provenance | Details for ros_trviz-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ros_trviz-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for ros_trviz-0.1.1-py3-none-any.whl |
Total release size: 76.7 kB
Release files / ros_trviz-0.1.1.tar.gz
| Download URL | ros_trviz-0.1.1.tar.gz |
|---|---|
| Size | 36.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20a5f031a0a638ee23627a6dda7af2b064a22ac22ad8303d4791cdf35abd1153
|
|
BLAKE2b-256 checksum How to use checksums |
9fffde2ba04b88f4a6d6d6e5979133cf7bbf180ad251fa0773343fe152e774be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ros_trviz-0.1.1-py3-none-any.whl
| Download URL | ros_trviz-0.1.1-py3-none-any.whl |
|---|---|
| Size | 39.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d112c8b624d2c765cb6b6ff8d7bbc895836a1e8ea27e708457d745dbcc05c6f
|
|
BLAKE2b-256 checksum How to use checksums |
ed8991bc1c82e6eb9a909ae7eca2e64e14309c5e0fb0dd1900b76f77bf140717
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for ros-trviz 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.