Skip to content

Commit 039f1ee

Browse files
Docs for Loopback Simulator C++ migration (#897)
* Docs for Loopback Simulator C++ migration Signed-off-by: Tony Najjar <tony.najjar@dexory.com> * Update odom_publish_dur parameter description for clarity and improve performance note for Loopback Simulator migration to C++ Signed-off-by: Tony Najjar <tony.najjar@dexory.com> * Update migration/Kilted.rst Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: Tony Najjar <tony.najjar.1997@gmail.com> --------- Signed-off-by: Tony Najjar <tony.najjar@dexory.com> Signed-off-by: Tony Najjar <tony.najjar.1997@gmail.com> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
1 parent 45d4a54 commit 039f1ee

2 files changed

Lines changed: 65 additions & 3 deletions

File tree

configuration/packages/configuring-loopback-sim.rst

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,34 +86,68 @@ Parameters
8686
============== ==============
8787
Type Default
8888
-------------- --------------
89-
string 0.1
89+
double 0.1
9090
============== ==============
9191

9292
Description
9393
The duration between publishing scan (in sec)
9494

95+
:odom_publish_dur:
96+
97+
============== =================
98+
Type Default
99+
-------------- -----------------
100+
double <update_duration>
101+
============== =================
102+
103+
Description
104+
The duration between publishing odometry (in sec). Defaults to ``update_duration``.
105+
95106
:publish_map_odom_tf:
96107

97108
============== ==============
98109
Type Default
99110
-------------- --------------
100-
string true
111+
bool true
101112
============== ==============
102113

103114
Description
104115
Whether or not to publish tf from ``map_frame_id`` to ``odom_frame_id``
105116

117+
:publish_scan:
118+
119+
============== ==============
120+
Type Default
121+
-------------- --------------
122+
bool true
123+
============== ==============
124+
125+
Description
126+
Whether or not to publish a fake laser scan.
127+
106128
:publish_clock:
107129

108130
============== ==============
109131
Type Default
110132
-------------- --------------
111-
string true
133+
bool true
112134
============== ==============
113135

114136
Description
115137
Whether or not to publish simulated clock to ``/clock``
116138

139+
:speed_factor:
140+
141+
============== ==============
142+
Type Default
143+
-------------- --------------
144+
double 1.0
145+
============== ==============
146+
147+
Description
148+
Speed factor for the simulated clock, e.g. ``2.0`` runs simulation at 2x wall time.
149+
Only used when ``publish_clock`` is ``true``. Dynamically reconfigurable.
150+
117151
:scan_range_min:
118152

119153
============== ==============
@@ -181,6 +215,17 @@ Parameters
181215
Whether to use ``inf`` for out-of-range values.
182216
If ``false``, values are set to ``scan_range_max - 0.1`` instead.
183217

218+
:scan_noise_std:
219+
220+
============== ==============
221+
Type Default
222+
-------------- --------------
223+
double 0.01
224+
============== ==============
225+
226+
Description
227+
Standard deviation of Gaussian noise added to scan ranges (in meters).
228+
184229
Example
185230
*******
186231
.. code-block:: yaml
@@ -192,9 +237,13 @@ Example
192237
map_frame_id: "map"
193238
scan_frame_id: "base_scan" # tb4_loopback_simulator.launch.py remaps to 'rplidar_link'
194239
update_duration: 0.02
240+
publish_scan: true
241+
publish_clock: true
242+
speed_factor: 1.0
195243
scan_range_min: 0.05
196244
scan_range_max: 30.0
197245
scan_angle_min: -3.1415
198246
scan_angle_max: 3.1415
199247
scan_angle_increment: 0.02617
200248
scan_use_inf: true
249+
scan_noise_std: 0.01

migration/Kilted.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,3 +925,16 @@ ValidatePath / IsPathValid parameter changes
925925
`PR #6027 <https://github.com/ros-navigation/navigation2/pull/6027>`_ renames the ``check_full_path`` parameter to ``stop_at_first_collision`` in both the ``ValidatePath`` BT node and the ``IsPathValid`` service definition. The boolean semantics are inverted: ``check_full_path=false`` (old default) is equivalent to ``stop_at_first_collision=true`` (new default).
926926

927927
Additionally, a new ``max_lookahead_distance`` parameter (default ``-1.0``) has been added to both the BT node and the service. When set to a positive value, only the portion of the path within that distance ahead of the robot is validated, improving efficiency when full path validation is not necessary.
928+
929+
Nav2 Loopback Simulator converted to C++
930+
----------------------------------------
931+
932+
`PR #6062 <https://github.com/ros-navigation/navigation2/pull/6062>`_ converts ``nav2_loopback_sim`` from Python to C++ for improved performance and consistency with the rest of the Nav2 stack. This results in roughly a 2x improvement in CPU consumption.
933+
934+
Key changes:
935+
936+
- The ``clock_publisher`` is no longer a separate node. It is now embedded within the ``loopback_simulator`` node. Launch files that previously launched both nodes should be updated to launch only the ``loopback_simulator`` node.
937+
- A new ``speed_factor`` parameter (default ``1.0``) controls the simulated clock speed (e.g. ``2.0`` for 2x). This parameter is dynamically reconfigurable.
938+
- New parameters ``publish_scan``, ``odom_publish_dur``, and ``scan_noise_std`` are available.
939+
940+
See :ref:`configuring_loopback_sim` for full parameter documentation.

0 commit comments

Comments
 (0)