rosotacom-dev 2.5.dev83__py3-none-any.whl → 2.5.dev85__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
rosotacom/cli.py CHANGED
@@ -7144,9 +7144,22 @@ def _smoke_rmw_spec(cfg: dict[str, Any]) -> Any:
7144
7144
  return session_gen._parse_rmw_block(shared.get("rmw"), list(peers.keys()))
7145
7145
 
7146
7146
 
7147
- def _smoke_rmw_env_value(cfg: dict[str, Any]) -> str | None:
7148
- rmw_spec = _smoke_rmw_spec(cfg)
7149
- local_impl = rmw_spec.local.impl
7147
+ def _smoke_rmw_env_value(cfg: dict[str, Any], receiver_peer_key: str) -> str | None:
7148
+ """The `RMW_IMPLEMENTATION` a publisher on this peer's local domain needs.
7149
+
7150
+ The one the session's own local processes run on, resolved by the rule the
7151
+ generator applies rather than read off `shared.rmw.local`: a session that
7152
+ names only its OTA side still runs cyclone on a bridged local domain, and a
7153
+ publisher given nothing runs on the image's default instead (#346).
7154
+ """
7155
+ shared = cfg.get("shared", {}) or {}
7156
+ shared = shared if isinstance(shared, dict) else {}
7157
+ local_domain_id = _smoke_local_domain_id(cfg, receiver_peer_key)
7158
+ local_impl = session_gen.effective_local_rmw_impl(
7159
+ _smoke_rmw_spec(cfg).local.impl,
7160
+ int(local_domain_id) if local_domain_id is not None else None,
7161
+ session_gen._parse_optional_domain_id(shared.get("ota_domain_id"), "shared.ota_domain_id"),
7162
+ )
7150
7163
  if local_impl is None:
7151
7164
  return None
7152
7165
  return str(session_gen.RMW_ALIASES.get(local_impl, local_impl))
@@ -7179,7 +7192,16 @@ def _smoke_local_domain_id(cfg: dict[str, Any], receiver_peer_key: str) -> str |
7179
7192
 
7180
7193
 
7181
7194
  def _smoke_local_config_commands(config_container_dir: str, cfg: dict[str, Any], receiver_peer_key: str) -> list[str]:
7182
- local = _smoke_rmw_spec(cfg).local
7195
+ """The DDS profile a publisher on the local domain reads, when the session renders one.
7196
+
7197
+ A session that names no local profile renders none, whatever its OTA side
7198
+ reads: on the scoped Cyclone arrangement the relay, the wrappers and the
7199
+ observers export no `CYCLONEDDS_URI` either, and a publisher on the inline
7200
+ default beside them delivers on CycloneDDS 11 once it is on their RMW
7201
+ (measured under Lyrical, #346).
7202
+ """
7203
+ spec = _smoke_rmw_spec(cfg)
7204
+ local = spec.local
7183
7205
  if not local.dds_config:
7184
7206
  return []
7185
7207
  config_file = f"{config_container_dir}/{receiver_peer_key}/local_dds.xml"
@@ -7201,7 +7223,7 @@ def _smoke_ros_setup(config_container_dir: str, cfg: dict[str, Any], receiver_pe
7201
7223
  "{ [ ! -f /opt/custom_ws/install/setup.bash ] || source /opt/custom_ws/install/setup.bash; }",
7202
7224
  "{ [ ! -f /ros2ws/install/setup.bash ] || source /ros2ws/install/setup.bash; }",
7203
7225
  ]
7204
- rmw_env = _smoke_rmw_env_value(cfg)
7226
+ rmw_env = _smoke_rmw_env_value(cfg, receiver_peer_key)
7205
7227
  if rmw_env:
7206
7228
  commands.append(f"export RMW_IMPLEMENTATION={shlex.quote(rmw_env)}")
7207
7229
  if rmw_env == "rmw_fastrtps_cpp":
@@ -255,6 +255,24 @@ _DDS_LOCAL_DEFAULT_CONFIG = {
255
255
  }
256
256
 
257
257
 
258
+ def effective_local_rmw_impl(
259
+ local_impl: Optional[str], local_domain_id: Optional[int], ota_domain_id: Optional[int]
260
+ ) -> Optional[str]:
261
+ """The RMW a peer's local-domain processes run on.
262
+
263
+ The stock `domain_bridge` binary needs a deterministic DDS RMW, so a peer
264
+ that bridges its local domain into a separate OTA domain runs cyclone
265
+ locally unless the session names another. Whatever is started on that
266
+ domain beside the session has to be put on the same one: a probe publisher
267
+ that was given no `RMW_IMPLEMENTATION` ran on the image's default (Fast DDS
268
+ in the Lyrical image) next to a session on cyclone (#346).
269
+ """
270
+ bridged = local_domain_id is not None and ota_domain_id is not None and local_domain_id != ota_domain_id
271
+ if local_impl is None and bridged:
272
+ return "cyclone"
273
+ return local_impl
274
+
275
+
258
276
  def _validate_positive_seconds(value: str, ctx: str) -> None:
259
277
  text = value.strip().lower()
260
278
  match = re.fullmatch(r"(\d+(?:\.\d+)?)\s*(ms|s)?", text)
@@ -2276,12 +2294,7 @@ def func(
2276
2294
  def _build_local_rmw_items(peer: str) -> List[Tuple[str, Any]]:
2277
2295
  """Plugin.yaml block for local-side RMW (rmw_local + optional DDS config)."""
2278
2296
  side = rmw_spec.local
2279
- # Effective impl: the stock `domain_bridge` binary needs a
2280
- # deterministic DDS RMW. Fall back to cyclone when split-domain
2281
- # bridging is in play on this peer but the user didn't pin a local RMW.
2282
- effective_impl = side.impl
2283
- if effective_impl is None and _use_domain_bridge(peer):
2284
- effective_impl = "cyclone"
2297
+ effective_impl = effective_local_rmw_impl(side.impl, peer_local_domain_id[peer], ota_domain_id)
2285
2298
  items: List[Tuple[str, Any]] = []
2286
2299
  if effective_impl is not None:
2287
2300
  items.append(("rmw_local", effective_impl))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rosotacom-dev
3
- Version: 2.5.dev83
3
+ Version: 2.5.dev85
4
4
  Summary: Host CLI for ROS OTA communication sessions.
5
5
  Author: develNor
6
6
  License-Expression: BSD-3-Clause
@@ -6,7 +6,7 @@ rosotacom/benched_set.py,sha256=lBA1Rj04dbr2e-lIvYTWoL55_LdUpCAC-y7eIvJZ8lc,2721
6
6
  rosotacom/benchmark.py,sha256=3QoXJtWUGQPwvDWyQT_fOjx6K9G2pmvtnVurA21G2QY,76612
7
7
  rosotacom/benchmark_delta.py,sha256=qXzriBkbXOeJdlLKM4ziov1F-JfwlseYHE48S9hjFsQ,10005
8
8
  rosotacom/bundle_check.py,sha256=l_3BSuYk6juXQmsNU6jkxRbH8ayH2GkiW9ONKMQ1oJY,18270
9
- rosotacom/cli.py,sha256=bva0K-UnwzapfVpI2M4Eu_KxS--NLLftzhCv8YQ2EGg,451959
9
+ rosotacom/cli.py,sha256=7cfQ8UMdDD0uXQjKLUNF7Ife2IrH0f9ZgW5Z5Mo4eEs,453226
10
10
  rosotacom/cli_benchmark.py,sha256=LsSwy42afqLv7euMVg5l_E9G1HHI0IyNWGQ_UDfFz0Y,356428
11
11
  rosotacom/deployment.py,sha256=XVhB8JjxhAsglSEEPtiVSeV6fCG0rgGmDRulh14oIYQ,7318
12
12
  rosotacom/ffmpeg_packet.py,sha256=zB1BHgY1kexr5sETVMkm4bkVnRytj9k2t0uOYiHUZ6M,4267
@@ -201,13 +201,13 @@ rosotacom/resources/ws/session/content/network/wifi_network_analysis_2.py,sha256
201
201
  rosotacom/resources/ws/session/creation/anonymize_bag.py,sha256=jxOTKFjmde-pyoVWE9-9icpSjf4nh97-q2Eqx-BDUl8,6154
202
202
  rosotacom/resources/ws/session/creation/catmux_log_setup.sh,sha256=VyBAFqmhQcIziSnDCRDNUsT5QpbLzKWU-DqRzaj_WQs,5243
203
203
  rosotacom/resources/ws/session/creation/create_session_yaml.py,sha256=8cfzkUxK7IebIBC36Vu7lcWtogM8fG0zveBCUGeiVdU,5727
204
- rosotacom/resources/ws/session/creation/generate_session_files.py,sha256=3Sx4xTSuVKLhJpOCpU5gfvFEjjpU0hrWzcFAoO0xIMs,162694
204
+ rosotacom/resources/ws/session/creation/generate_session_files.py,sha256=HxYnS6x-rF1KIZY_5Q2b3ezP0kW4C6-sRl0en61WTKU,163292
205
205
  rosotacom/resources/ws/session/creation/run_session.py,sha256=G2hJhrmLp11gm3JZ6_C-zZcqu_reXlE_wmobB7BiCfU,16849
206
206
  rosotacom/resources/ws/session/creation/run_session_in_external_terminal.py,sha256=Ub_5f-ttUUc-rAPrZmg_Op34s8Z4C91hTyEn8fgyt-E,2633
207
207
  rosotacom/resources/ws/session/creation/strip_ansi.py,sha256=vNjpemcq4xHr0VG4x0bZqvgwEBEfOgN-b4PzbrM5nfM,851
208
- rosotacom_dev-2.5.dev83.dist-info/licenses/LICENSE.txt,sha256=FDB3-fao3lqZ94wsJHKAH7U88kAnfvZhZC8Hm5rN__g,1459
209
- rosotacom_dev-2.5.dev83.dist-info/METADATA,sha256=qMaFIUOcgQlyYNW4Cp-tJx9O26eyge_qBvxH6AASNUg,58884
210
- rosotacom_dev-2.5.dev83.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
211
- rosotacom_dev-2.5.dev83.dist-info/entry_points.txt,sha256=im11ZWqBbgjQUBz2Ik2RNfMu54wlMwgiVpsBKeI7dCI,49
212
- rosotacom_dev-2.5.dev83.dist-info/top_level.txt,sha256=BZrtQcIVDWn_pQZR3Mlssqy5SaRXHjOa6B-1D9Fy4Ao,10
213
- rosotacom_dev-2.5.dev83.dist-info/RECORD,,
208
+ rosotacom_dev-2.5.dev85.dist-info/licenses/LICENSE.txt,sha256=FDB3-fao3lqZ94wsJHKAH7U88kAnfvZhZC8Hm5rN__g,1459
209
+ rosotacom_dev-2.5.dev85.dist-info/METADATA,sha256=JB4JUfh2kQxNx1Ovf0XxVEWcWIbC7EEQfGbrXImg588,58884
210
+ rosotacom_dev-2.5.dev85.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
211
+ rosotacom_dev-2.5.dev85.dist-info/entry_points.txt,sha256=im11ZWqBbgjQUBz2Ik2RNfMu54wlMwgiVpsBKeI7dCI,49
212
+ rosotacom_dev-2.5.dev85.dist-info/top_level.txt,sha256=BZrtQcIVDWn_pQZR3Mlssqy5SaRXHjOa6B-1D9Fy4Ao,10
213
+ rosotacom_dev-2.5.dev85.dist-info/RECORD,,