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 Humble
- navigation2
- rtabmap_ros
- textmap (provides shared
text_similarity.hpp) - yaml-cpp, tf2, rclcpp_action
sudo apt install ros-humble-navigation2 ros-humble-nav2-bringup ros-humble-rtabmap-roscd ~/ros2_ws
colcon build --packages-select text_nav_bridge
source install/setup.bashRequires Phase 1 outputs: rtabmap.db (map) and landmarks.yaml (text landmarks).
ros2 launch text_nav_bridge text_nav.launch.py landmark_file:=/path/to/landmarks.yaml# Rosbag
ros2 bag play <your_bagfile> --clock
# Or real camera
ros2 launch rtabmap_ros realsense_infra_for_record.launch.pyThis launches:
- Static TF (RealSense D435i)
- IMU filter
- RGBD odometry
- RTAB-Map localization mode (uses existing
rtabmap.db) - Nav2 navigation stack
- text_nav_bridge node
- 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 - Compute a goal point
approach_distancemeters in front of the landmark - 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 |
|---|---|---|
landmark_file |
(required) | Path to landmarks.yaml |
use_sim_time |
true |
Use simulation time (true for rosbag) |
| Parameter | Default | Description |
|---|---|---|
landmark_file |
(required) | Path to landmarks.yaml |
match_threshold |
0.5 | Text similarity threshold (0~1) |
approach_distance |
1.5 | Stop this many meters before the landmark |
robot_frame |
camera_link |
Robot base frame |
world_frame |
map |
World coordinate frame |
| Topic | Type | Description |
|---|---|---|
/text_nav/command |
std_msgs/String | Text command to navigate to |
/textmap/markers |
visualization_msgs/MarkerArray | Landmark markers for visualization |
| Topic | Type | Description |
|---|---|---|
/text_nav/status |
std_msgs/String | Navigation status updates |
/text_nav/goal_marker |
visualization_msgs/Marker | Goal visualization in RViz |
The provided text_nav.rviz config includes:
| Display | Topic | Description |
|---|---|---|
| Map | /map |
2D occupancy grid |
| TF | — | Robot position |
| Global Plan | /plan |
Path to goal |
| Local Plan | /local_plan |
Obstacle-avoidance path |
| Local Costmap | /local_costmap/costmap |
Cost map around robot |
| Nav Goal Marker | /text_nav/goal_marker |
Goal arrow marker |
| Text Landmarks | /textmap/markers |
Text landmark labels |
Apache License 2.0