ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Raposa's profile - activity

2023-06-19 13:25:53 -0500 received badge  Famous Question (source)
2023-06-19 13:25:53 -0500 received badge  Notable Question (source)
2023-06-19 13:25:53 -0500 received badge  Popular Question (source)
2022-08-17 20:17:29 -0500 received badge  Nice Question (source)
2021-09-20 03:32:06 -0500 received badge  Famous Question (source)
2021-09-13 08:08:27 -0500 marked best answer 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?

2021-09-13 08:08:26 -0500 received badge  Scholar (source)
2021-09-13 08:08:18 -0500 received badge  Supporter (source)
2021-09-10 09:01:28 -0500 asked a question ros2 topic pub from launch file

ros2 topic pub from launch file Hello everyone, Does anyone know if it is possible in ros2 to directly start from launc

2021-08-22 02:06:56 -0500 received badge  Notable Question (source)
2021-08-21 04:12:30 -0500 received badge  Popular Question (source)
2021-08-20 13:34:25 -0500 received badge  Student (source)
2021-08-20 03:03:19 -0500 asked a question Changing default namespace in ROS2

Changing default namespace in ROS2 Hi everyone, Does anybody know if there is an easy way to set a namespace for all th