ros2 launch: Forward keystrokes to child node

asked 2021-12-09 07:42:42 -0600

bergercookie gravatar image

updated 2021-12-09 07:43:21 -0600

I want to create a launchfile, which launches a keyboard teleop node. When I launch it I want the keystrokes that I type in the terminal of the launch process to be forwarded to the aforementioned teleop node so that it translates them to velocity commands.

This used to be simple in ROS1, i.e., keystrokes on roslaunch's terminal were automatically forwarded to the child nodes, however this doesn't seem to be the case in ROS2.

I would suspect that this would include a combination of RegisterEventHandler, EmitEvent and ProcessIO with the goal of tying the stdin of roslaunch to the stdin of the corresponding teleop node, but currently I can't find any suitable events to do this.

https://github.com/ros2/launch/tree/m...

Any hints on how this is done?

edit retag flag offensive close merge delete

Comments

Did you find any solution to this? I'm facing a similar problem.

bjoernolav gravatar image bjoernolav  ( 2022-03-29 07:45:59 -0600 )edit