Skip to content

Commit 4b81ea3

Browse files
committed
docs: describe moving Nav2 observation demo
Signed-off-by: SamuelFoo <fooenzesamuel@gmail.com>
1 parent 24aa7ad commit 4b81ea3

2 files changed

Lines changed: 37 additions & 25 deletions

File tree

discourse/3-layered-global-occupancy-map.md

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ observations, can be added later.
2424
* The Rust map server composes a static occupancy grid and active observations
2525
into `/map`
2626
* The Nav2 demo converts scans from three robots into point regions and displays
27-
the combined map
27+
the source contributions and combined map
2828
* The observation messages live in `rmf_layered_map_msgs`, leaving
2929
`rmf_prototype_msgs` unchanged
3030

@@ -126,32 +126,32 @@ occupied space is not accidentally erased by another active source.
126126

127127
# Three-Robot Nav2 Demo
128128

129-
The launch file starts three stationary robots in different free corners of the
130-
warehouse and spawns one deterministic Gazebo box near each robot. Each
131-
observation node subscribes to its robot's local `sensor_msgs/LaserScan`,
132-
filters invalid or out-of-range returns, and publishes the remaining scan
133-
endpoints as point regions.
129+
The launch file starts three robots in different free corners of the
130+
warehouse, cycles them through fixed Nav2 goals, and spawns one deterministic
131+
Gazebo box near each robot. Each observation node subscribes to its robot's
132+
local `sensor_msgs/LaserScan`, filters invalid or out-of-range returns, and
133+
publishes the remaining scan endpoints as point regions.
134134

135-
Each scan is a replacement snapshot: `reset_source` removes the source's
136-
preceding points before the new points are added, and a short TTL removes the
137-
source if it stops publishing. The observation-frame pose is recorded in the
138-
shared `map` frame so the map server can transform the scan-local regions before
139-
rasterizing them.
135+
Each scan is added to a rolling observation history until its TTL expires. An
136+
update may set `reset_source` so the new scan replaces all active observations
137+
from that source instead of being added to its history. The observation-frame
138+
pose is recorded in the shared `map` frame so the map server can transform the
139+
scan-local regions before rasterizing them.
140140

141-
The demo launches Nav2 localization but does not launch Nav2 planning or control
142-
components, RMF planning, or navigation goals. Three robot-local RViz windows
143-
are enabled by default, and another RViz window displays the combined global
144-
`/map`.
141+
The demo launches Nav2 localization, planning, and control for the fixed goal
142+
loops, but does not launch RMF planning. Robot-local RViz windows show Nav2
143+
state, while another RViz window displays the combined global `/map`. The
144+
combined view overlays incoming region updates as colored markers grouped by
145+
source, with the same retention behavior as the map contributions.
145146

146147
The scan-to-region conversion is deliberately simple so its information loss
147-
and publication cost are visible. `beam_stride` reduces the number of point
148-
regions, `publish_period_sec` throttles replacement snapshots, and
149-
`max_observation_range` limits represented returns. `ttl_sec` controls how
150-
quickly stale snapshots expire. Each publisher logs its number of input beams
151-
and output regions so message density, update rate, and visual fidelity can be
152-
compared. The current demo publishes occupied endpoints only; it does not
153-
convert raycast clearing into free-space regions or compress adjacent points
154-
into larger regions.
148+
and publication cost are visible. Scan sampling reduces the number of point
149+
regions, publication throttling limits the snapshot rate, and the observation
150+
range limits represented returns. The TTL controls how quickly stale snapshots
151+
expire. Each publisher logs its number of input beams and output regions so
152+
message density, update rate, and visual fidelity can be compared. The current
153+
demo publishes occupied endpoints only; it does not convert raycast clearing
154+
into free-space regions or compress adjacent points into larger regions.
155155

156156
# Example Flow
157157

@@ -187,3 +187,5 @@ The committed server and demo tests cover:
187187
* multiple robot sources being stitched into one composed grid
188188
* filtering invalid and out-of-range laser returns
189189
* preserving original beam angles when scan points are sampled
190+
* converting point and rectangle updates into source-colored markers
191+
* retaining markers until TTL expiry and replacing them on source reset

map_server/rmf_layered_map_server_demo/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,22 @@ This demo publishes a synthetic static grid and a temporary rectangle with a fiv
1010
ros2 launch rmf_layered_map_server_demo demo.launch.py
1111
```
1212

13+
Use `use_rviz:=False` for a headless run.
14+
1315
## Three-Robot Nav2 Observation Demo
1416

15-
This demo combines laser observations from three stationary Nav2 robots in the global `/map`:
17+
This demo combines laser observations from three moving Nav2 robots in the global `/map`:
1618

1719
```bash
1820
ros2 launch rmf_layered_map_server_demo nav2_observations.launch.py
1921
```
2022

21-
Use `use_nav2_rviz:=False` to open only the combined-map view. Use `spawn_clutter:=False` to run against the unmodified warehouse world.
23+
By default, the demo opens three robot-local RViz windows and one combined-map view, moves the robots between fixed goals, spawns demo obstacles, and retains scans for five seconds.
24+
25+
* Set `use_nav2_rviz:=False` or `use_global_rviz:=False` to disable either RViz view.
26+
* Set `move_robots:=False` to disable robot movement.
27+
* Set `spawn_clutter:=False` to use the unmodified warehouse world.
28+
* Set `reset_source:=True` to show only the latest scan from each robot.
29+
* Use `map` and `params_file` to override the warehouse map and shared Nav2 parameters.
30+
* `beam_stride:=1` and `publish_period_sec:=0.5` control scan sampling.
31+
* `max_observation_range:=2.5` and `ttl_sec:=5.0` control range and retention.

0 commit comments

Comments
 (0)