Tinca/Docs/Widgets/Laser Scan

Laser Scan

PRO
DISPLAY · 10 FIELDS · 4×3 DEFAULT

2D lidar scan visualization with distance gradient coloring

When to reach for it

Laser Scan draws the raw lidar return as a live 2D scatter, one point per range reading. Use it for SLAM and Nav2 debugging, or an obstacle-avoidance check when you want raw returns, not a processed map. For a position trail and tap-to-send nav goals instead, Map 2D (Pro) is the better pick.

Worked example: TurtleBot 4 RPLIDAR

Scan Topic /scan, Message Type sensor_msgs/msg/LaserScan, the TurtleBot 4's RPLIDAR default. Drop Max Range (m) from the 30 m default to something room-sized, say 10, so a stray return through an open doorway doesn't blow out the scale. Turn on Show Range Stats for the nearest-point and per-sector numbers next to the scatter.

Watch out for
  • Max Range (m) and Min Range (m)filter the data itself, not just the viewport: returns outside that band are dropped before they're drawn. Set Max Range (m)below your lidar's real range and distant points vanish, they don't zoom out of frame.
  • The subscription caps at 15 Hz and keeps only the latest scan, not a queue: a faster lidar still only shows its newest sweep at redraw time, not every scan it publishes.
  • Pinch-to-zoom is view state only, never saved to config: leave the widget and come back and it resets to 1x.

Configuration fields

Scan Topictopic

The topic this widget reads data from. While connected, tap to pick from the topics the robot advertises.

Message Typestring

The ROS message type for this topic, e.g. sensor_msgs/msg/Image. Usually auto-filled when you choose a topic.

Auto-Fit Viewportboolean

Scale the view to the farthest returned point. Max Range acts as a ceiling.

Max Range (m)number
Min Range (m)number
Show Range Statsboolean

Live readout of the nearest point + per-sector minimums (front / back / left / right). Uses extra space when the widget is bigger than 2×2.

Point Sizeslider
1 to 6, step 0.5
Distance Gradientboolean

Color each point by its distance, near to far, instead of one flat color.

Point Colorselect

Color of the scan points when Distance Gradient is off.

Auto (Theme)RedGreenBlueWhite
Show Scan Linesboolean

Draw a faint ray from the sensor to each point.