Text-command-driven robot navigation for ROS 2. Reads text landmarks generated by TextMap (Phase 1) and converts user text commands into Nav2 NavigateToPose actions.
- ROS 2 (tested on Humble; source compiles on Iron/Jazzy/Kilted/Rolling)
- navigation2
- rtabmap_ros
- textmap (provides shared
text_similarity.hpp) - yaml-cpp, tf2, rclcpp_action
sudo apt install ros-${ROS_DISTRO}-navigation2 ros-${ROS_DISTRO}-nav2-bringup ros-${ROS_DISTRO}-rtabmap-roscd ~/ros2_ws
colcon build --packages-select text_nav_bridge
source install/setup.bashRequires Phase 1 outputs: rtabmap_db/<bag_name>.db (map) and landmarks/<bag_name>.yaml (text landmarks).
ros2 launch text_nav_bridge text_nav.launch.py bag_name:=rosbag2_2026_01_08-15_03_00A single bag_name argument resolves both the landmark file and rtabmap DB:
src/text_nav_bridge/landmarks/<bag_name>.yamlsrc/text_nav_bridge/rtabmap_db/<bag_name>.db
# Rosbag
ros2 bag play <your_bagfile> --clock
# Or real camera
ros2 launch rtabmap_ros realsense_infra_for_record.launch.pySpawns RTAB-Map localization (loading the bag's .db) + Nav2 + text_nav_bridge + RViz.
ros2 topic pub --once /text_nav/command std_msgs/msg/String "data: 'restroom'"The node will:
- Find the best matching landmark from
landmarks.yaml - Ray-march along the robot-to-landmark line on the Nav2
/mapcostmap and pick the last free cell as the navigation goal - Send a
NavigateToPosegoal to Nav2
ros2 topic echo /text_nav/statusdata: "NAVIGATING: heading to 'restroom'"
data: "NAVIGATING: distance_remaining=2.31m"
data: "SUCCESS: Navigation completed"
| Argument | Default | Description |
|---|---|---|
bag_name |
(required) | Rosbag name (e.g. rosbag2_2026_01_08-15_03_00) |
use_sim_time |
true |
Use simulation time (true for rosbag) |
data_dir |
resolved from install share | Directory containing landmarks/ and rtabmap_db/ |
match_threshold |
0.5 |
Text similarity threshold (0~1) |
robot_frame |
camera_link |
Robot base frame id |
world_frame |
map |
World/map frame id |
static_tfs_file |
<pkg>/config/realsense_d455_tfs.yaml |
YAML of static TFs to inject (see realsense_d455_tfs.yaml for the schema). Pass '' when /tf_static is already provided by the bag or camera driver. |
| Topic | Type | Description |
|---|---|---|
/text_nav/command |
std_msgs/String | Text command to navigate to |
/map |
nav_msgs/OccupancyGrid | Costmap used for ray-march goal selection (transient_local) |
| Topic | Type | Description |
|---|---|---|
/text_nav/status |
std_msgs/String | Navigation status updates |
/text_nav/goal_marker |
visualization_msgs/Marker | Goal visualization in RViz |
/textmap/markers |
visualization_msgs/MarkerArray | Loaded landmarks republished for RViz (1 Hz) |
RViz config: rviz/text_nav.rviz.
Apache License 2.0