Map 2D

PRO
DISPLAY · 39 FIELDS · 4×3 DEFAULT

Live robot map: occupancy grid, costmaps, lidar overlay, paths, and tap-and-hold nav goals, anchored via TF

When to reach for it

Map 2D is the robot's map on your phone: the occupancy grid, the robot and its trail, with optional costmaps, planned paths, a lidar overlay and the footprint, and nav goals you place by hand, without opening RViz. For a close-range obstacle view that needs no map or TF, use Laser Scan (Pro); for a numeric readout with no pan or zoom to manage, use Pose Display (Pro).

Worked example: TurtleBot 4 with Nav2

Defaults already match a stock Nav2 setup: Topic /odom for the trail, Occupancy Grid on from /map, and Goal Mode Action on /navigate_to_pose. Hold the map where the robot should go, drag to set the direction it should face, and release to send a NavigateToPose goal. Turn on Nav Paths and the planner's route on /plan draws over the map live; add /local_plan as Local Path Topic to see the local planner too.

Watch out for
  • Odometry positions live at pose.pose.position, not pose.position. A missing trail is almost always this field path.
  • In Goal Mode Topic, the goal is a plain PoseStamped on /goal_pose, and E-Stop cannot cancel it: stop the robot with its own hardware E-Stop. Action mode sends a goal E-Stop can cancel. A blank Action Name or Nav Goal Topic turns goals off.
  • The view auto-recenters on every pose until you pan; a crosshair button then appears and auto-follow stays off until you tap it, which reads as the map fighting your pan.
  • Pure odometry drifts. If the trail diverges from reality, point Topic at a SLAM-corrected pose like /amcl_pose, or enable GPS Position Layer.

Configuration fields

Topictopic

A nav_msgs/msg/Odometry or geometry_msgs/msg/PoseWithCovarianceStamped topic, usually /odom. It drives the robot trail.

Message Typestring

Message type of the trail topic. Usually auto-filled when you pick the topic.

Position Fieldfield-path

Field path to the x/y position in the message (e.g. pose.pose.position).

Orientation Fieldfield-path

Field path to the orientation quaternion, used to draw the robot heading.

Anchor Frameframe

The frame the map view is fixed to, like rviz's Fixed Frame. Auto picks map, then odom, and falls back to drawing topics in their own frames.

Occupancy Gridboolean

Draw the robot's map from an OccupancyGrid topic.

Map Topictopic

A nav_msgs/msg/OccupancyGrid topic, usually /map. Its _updates topic is read automatically.

Map Colorsselect

Color scheme for map cells. Tinca follows your theme. Classic uses the same colors as rviz2, so maps look the way they do on your desktop.

Tinca (theme)Classic
Costmap 1boolean

Overlay a costmap on the map, colored with the standard rviz costmap palette.

Costmap 1 Topictopic

A nav_msgs/msg/OccupancyGrid topic, like /global_costmap/costmap. Keepout and speed masks work too.

Opacityslider

shown when Costmap 1 is on

Opacity of this overlay.

0.05 to 1, step 0.05
Costmap 2boolean

Overlay a costmap on the map, colored with the standard rviz costmap palette.

Costmap 2 Topictopic

A nav_msgs/msg/OccupancyGrid topic, like /global_costmap/costmap. Keepout and speed masks work too.

Opacityslider

shown when Costmap 2 is on

Opacity of this overlay.

0.05 to 1, step 0.05
Nav Pathsboolean

Overlay planned paths from Path topics, such as Nav2 global and local plans.

Path Topictopic

A nav_msgs/msg/Path topic for the planned route, like /plan.

Local Path Topictopic

An optional second nav_msgs/msg/Path topic, like /local_plan. Leave blank to skip it.

Path Colorselect

Color of the planned path line.

GreenBlueGoldRed
Laser Scanboolean

Overlay lidar points on the map, placed in the world via TF.

Scan Topictopic

A sensor_msgs/msg/LaserScan topic, usually /scan.

Footprintboolean

Draw the robot's footprint polygon outline.

Footprint Topictopic

A geometry_msgs/msg/PolygonStamped topic, like /local_costmap/published_footprint.

GPS Position Layerboolean

Overlay a second trail from GPS fixes, projected onto the map.

GPS Topictopic

A sensor_msgs/msg/NavSatFix topic, like /gps/fix.

GPS Trail Colorselect

Color of the GPS trail.

BlueGreenGoldRed
GPS Max Trail Pointsslider

How many GPS points the trail keeps before old ones drop off.

50 to 500, step 50
Robot Trailboolean

Draw a fading trail of past robot positions.

Trail Colorselect

Color of the robot position trail.

GoldGreenRedBlue
Max Trail Pointsslider

How many past positions the trail keeps before the oldest fade out.

50 to 1000, step 50
Goal Modeselect

Hold the map to place a goal, drag to set the direction the robot should face, and release to send. Action sends a NavigateToPose goal that E-Stop sends a cancel to. Topic publishes a PoseStamped, which E-Stop cannot cancel.

ActionTopic
Action Nameaction-topic

A nav2_msgs/action/NavigateToPose action, usually /navigate_to_pose.

Nav Goal Topictopic

A geometry_msgs/msg/PoseStamped topic, usually /goal_pose. Leave blank to turn goals off. E-Stop cannot cancel a topic goal, so stop the robot with its own hardware E-Stop.

Goal Message Typestring

Message type for nav goals, usually geometry_msgs/msg/PoseStamped.

Goal Frameframe

Frame the goal is stamped in. Auto stamps the anchor frame, or map when no TF is available. An explicit frame is transformed at publish time.

Show Goal Markerboolean

Show a marker where you last sent a nav goal.

Show Gridboolean

Draw the reference grid behind the map.

Meters per Grid Cellslider

Size of one reference grid square, in meters. Real maps read their scale from the map data; this only affects the reference grid.

0.1 to 10, step 0.1
Two-Finger Rotationboolean

Rotate the map with a two-finger twist. Snaps back to north when released close to north.

Layer Orderlayer-order

Drawing order of the map layers. The base map always stays at the bottom and the robot pose on top.