ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You can use the ExecuteProcess
action:
from launch import LaunchDescription
from launch.actions import ExecuteProcess
def generate_launch_description():
return LaunchDescription([
ExecuteProcess(cmd=['ros2', 'topic', 'pub', '/my_topic', 'std_msgs/String', 'data: 1'])
])