Skip to content

Commit

Permalink
Documented why zenoh needs to run in separate subprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
CihatAltiparmak committed Aug 18, 2024
1 parent d2f9455 commit f075566
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions launch/scenario_perception_pipeline_benchmark.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
from moveit_configs_utils import MoveItConfigsBuilder
import subprocess

"""
Zenoh router needs to use /dev/tty as stdin. We cannot set stdin in ExecuteProcess.
The functionality of launch tool doesn't allow to set stdin, Even if we use
shell=True parameter and set stdin using ros2 run rmw_zenoh_cpp rmw_zenoh < /dev/tty,
launch closes process unsoundly, it somehow trigger neither the SIGTERM nor SIGINT.
I could solve this using separate subprocess mechanism, which allows us to modify stdin of process directly.
See my comment in this issue. ( https://github.com/ros2/rmw_zenoh/issues/206#issuecomment-2257292941 )
TODO: (CihatAltiparmak) Remove this class when rmw_zenoh becomes runnable without starting router
separately or when tty option is removed from router executable
"""


class ZenohRouterStarter:
def __init__(self):
Expand Down

0 comments on commit f075566

Please sign in to comment.