-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StdIn Not Handled in ExecuteProcess
?
#735
Comments
I actually didn't realize we had But I will say that this whole thing is an anti-pattern, in my opinion. The point of But maybe others have a different opinion. |
I don't think I made my use case super clear - the example launch is a
simplified version of a launch file I'd like to use to start up some nodes
while also playing back bag data. I would find it convenient to be able to
pause/start the bag process at will.
I suppose I could run that in a separate terminal, but there's some default
args I will always want to pass to the bag process, and it's convenient to
do that from a launch file. Furthermore, there are certain topics I'd like
to conditionally remap based on launch configurations, and this becomes
really clunky without a dedicated script to generate the playback command.
…On Fri, Sep 15, 2023, 5:26 AM Chris Lalancette ***@***.***> wrote:
I actually didn't realize we had ProcessStdin. So maybe there is a bug
here.
But I will say that this whole thing is an anti-pattern, in my opinion.
The point of launch is to run multiple processes, so which process should
stdin be forwarded to? It's totally unclear. I guess we could have some
kind of 'marker' where one and only one process can process stdin, but at
that point why not just open another terminal?
But maybe others have a different opinion.
—
Reply to this email directly, view it on GitHub
<#735 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIW4W2IO3OCHIIG7AL5SG73X2RCQLANCNFSM6AAAAAA4ZCFETI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi @mwcondino, I am in the same situation, having a lunch file containing, among other things, a ros2 bag play with a bunch of remappings and the like. Like you, stdin is disabled so I cannot pause/resume/ at will. I did find a work-around using rqt. Just type rqt and a GUI will pop up. Then go to the tab Plugins->Services->Service Caller. The downside is that it's quite cumbersome since you have to select the action each time from a drop-down list. But it is not that bad if you only have to do it rarely. Perhaps there is a way to make a list of services you want to call and just double-click them... Maybe.... Hope this is useful. |
Bug report
Required Info:
ros-humble-launch=1.0.3-1jammy.20221019.125253
. Also checked on1.0.4-1jammy.20230718.195748
Steps to reproduce issue
Run this file with
ros2 launch ./test.launch.py
test.launch.py:
Once that is running, press space - the expected behavior is that the space character would be forwarded to the
ExecuteProcess
action which is playing back the bag (any bag will work for this test, so long as the name matches up).However, when I press space (or really any character), I get this warning:
Expected behavior
The
ProcessStdin
event should forward data to the matching process.Actual behavior
It looks like there's just a warning message. From looking into the code here, it appears as if the function is not really implemented, unless I'm missing something.
I think that
ExecuteProcess
may need some updating to correctly pipe data passed into the__on_process_stdin_event
function to the underlying subprocess.The text was updated successfully, but these errors were encountered: