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

PyPI version 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 (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.

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.1.tar.gz (36.8 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.1-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ros_trviz-0.1.1.tar.gz
  • Upload date:
  • Size: 36.8 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":true}

File hashes

Hashes for ros_trviz-0.1.1.tar.gz
Algorithm Hash digest
SHA256 20a5f031a0a638ee23627a6dda7af2b064a22ac22ad8303d4791cdf35abd1153
MD5 23471de16999337236c4c9bdc46a36a8
BLAKE2b-256 9fffde2ba04b88f4a6d6d6e5979133cf7bbf180ad251fa0773343fe152e774be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ros_trviz-0.1.1-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":true}

File hashes

Hashes for ros_trviz-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d112c8b624d2c765cb6b6ff8d7bbc895836a1e8ea27e708457d745dbcc05c6f
MD5 f4b668f597f6a56c88844a9dfd2e0325
BLAKE2b-256 ed8991bc1c82e6eb9a909ae7eca2e64e14309c5e0fb0dd1900b76f77bf140717

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

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