CLI for TinyNav
Project description
tinynav-cli
A lightweight command-line interface for TinyNav.
Install
pip install tinynav
Commands
tinynav init
tinynav doctor
tinynav example
tinynav tunnel [--serial <serial>]
tinynav nav status
tinynav nav start --map-name <map_name>
tinynav nav go [--pois 2,1,0]
tinynav nav stop
tinynav map status
tinynav map start_record
tinynav map stop_record
tinynav map build --rosbag-name <rosbag_name>
tinynav map edit_pois --map-name <map_name>
tinynav map list
tinynav sensors
tinynav sensors --preview
tinynav version
Development
uv sync --dev
uv run tinynav --help
uv run python -m build
uv run twine check dist/*
Typical flow
tinynav init
tinynav doctor
tinynav example
tinynav initprepares the container environment and builds models.tinynav doctorprints a machine report for debugging.tinynav examplelaunches the rosbag example workflow inside the running container.tinynav tunnel [--serial <serial>]requests a tunnel config from the Uniflex tunnel API, uses the local machine hostname as the default serial when omitted, ensurescloudflaredis installed, runs the returnedinstall_command, and saves the JSON response to${XDG_DATA_HOME:-$HOME/.local/share}/tinynav/tunnel.json.tinynav sensorschecks connected sensors inside the running container, including RealSense detection and whether a ROS 2loopernode is present.tinynav sensors --previewlaunches the sensor preview workflow inside the running container via/tinynav/scripts/run_sensors_preview.sh.tinynav versionprints the CLI version.
tinynav map commands
The tinynav map workflow uses three runtime states inferred directly from ros2 node list.
No separate state file is used.
Map states
idle- default state when neither recording nor map building is active
recording- detected when
ros2 node listcontains/rosbag2_recorder
- detected when
building- detected when
ros2 node listcontains/build_map_node
- detected when
State priority:
/build_map_node→building/rosbag2_recorder→recording- otherwise →
idle
Commands
tinynav map status- reports one of
idle,recording, orbuilding
- reports one of
tinynav map start_record- allowed only in
idle - starts the recording workflow in a tmux session inside the container
- allowed only in
tinynav map stop_record- allowed only in
recording - stops the recording workflow
- allowed only in
tinynav map list- allowed only in
idle - lists rosbags in a formatted table with size, built status, and POI count
- allowed only in
tinynav map build --rosbag-name <rosbag_name>- allowed only in
idle - starts the map build workflow in a tmux session inside the container
- allowed only in
tinynav map edit_pois --map-name <map_name>- allowed only in
idle - starts the POI editor for an existing map in a tmux session inside the container
- opens
http://localhost:8080/in the default browser when possible - reads and writes
pois.jsonunder the selected map directory
- allowed only in
Planned data layout
All map-related outputs live under the TinyNav XDG data directory:
- rosbags:
${XDG_DATA_HOME:-$HOME/.local/share}/tinynav/rosbags/ - maps:
${XDG_DATA_HOME:-$HOME/.local/share}/tinynav/maps/
The intent is:
- recording outputs go under
rosbags/ - map build outputs go under
maps/ map buildconsumes a rosbag name fromrosbags/and produces a map directory inmaps/
tinynav nav commands
The tinynav nav workflow is managed inside a tmux session in the running container.
The CLI currently uses the session name tinynav_nav.
Nav states
idle- no navigation tmux session exists
starting- tmux session exists but required ROS nodes are not all visible yet
running- required ROS nodes are all present
Required ROS nodes:
/perception_node/planning_node/map_node/cmd_vel_control_node
Commands
tinynav nav status- reports one of
idle,starting, orrunning
- reports one of
tinynav nav start --map-name <map_name>- allowed only in
idle - starts navigation panes in a tmux session inside the container
- passes the selected map path to
map_node.py
- allowed only in
tinynav nav go [--pois 2,1,0]- uses the map name recorded by the running nav tmux session
- loads
maps/<map_name>/pois.json - if
--poisis provided, reorders the outer keys to match the requested POI id sequence - keeps each POI object's inner
idunchanged - publishes the payload to
/mapping/cmd_poisasstd_msgs/String
tinynav nav stop- stops the tmux-managed navigation workflow inside the container
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters