ros2 topic pub from launch file
Hello everyone,
Does anyone know if it is possible in ros2 to directly start from launch file a simple node that publishes a message?
In ROS1 it was easily possible like this:
<node pkg="rostopic" type="rostopic" name="rostopic" args="pub {pub args}"/>
(reference from: https://answers.ros.org/question/230465/publish-to-topic-via-launch-file/)
I made a few tries in ROS2 adding an action for a node with similar parameterization in my launch description, but I don't really understand in this case what is the correct package and what is the executable for ros2 (or if it is not possible at all).
Of course I know it would be possible to define my own node that does that, instead of putting all in the launch file, but if I can avoid the added overhead as it was possible in ros1, it would be preferable.
Would anyone have a simple working example of this?