Skip to main content

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

License TDD ROS 2


🌟 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 (with uvx)

No workspace build or manual source setup required! Run TRViz directly on your robot or workstation:

# 1. Run directly from GitHub repository over SSH
uvx --from git+https://github.com/wkqco33/trviz.git#subdirectory=src/trviz_py trviz

# 2. Or run locally from workspace source
uvx --from ./src/trviz_py trviz

# 3. Built-in subcommands (powered by wpycli)
uvx --from ./src/trviz_py trviz doctor             # Diagnose ROS 2 & terminal environment
uvx --from ./src/trviz_py trviz mock               # Run synthetic simulation node
uvx --from ./src/trviz_py trviz replay path/log.jsonl # Replay recorded state
uvx --from ./src/trviz_py trviz completion bash    # Generate shell auto-completion

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ros_trviz-0.1.0.tar.gz (36.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ros_trviz-0.1.0-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file ros_trviz-0.1.0.tar.gz.

File metadata

  • Download URL: ros_trviz-0.1.0.tar.gz
  • Upload date:
  • Size: 36.9 kB
  • Tags: Source
  • Uploaded using 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":null}

File hashes

Hashes for ros_trviz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ad01e88579a854e0bc23a86fbb09d887ec7baf99032eb6f2f5d1e16d7b640366
MD5 87bceccf5ad4a2134a1d6b1af4295010
BLAKE2b-256 4fc45ef41f5018d5d59b43141e30f92a97d2280e887e2a6a37cd6328c21b25f7

See more details on using hashes here.

File details

Details for the file ros_trviz-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ros_trviz-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 39.9 kB
  • Tags: Python 3
  • Uploaded using 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":null}

File hashes

Hashes for ros_trviz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22c04002eec1da0cb62758ecc76896d42e6a17b78248a321a160fd11247b7cc3
MD5 91fafe627f64ff4a3753e76a306df115
BLAKE2b-256 6f178152b067c1161814704fc6ac0927f06d18ffc0536c4426e91729c33102a5

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page