1

I am trying to print to the screen from a node for testing reasons. std::cout is what I am using, I don't want to use RCLCPP_INFO_STREAM for this. When I run my node using ros2 run, I see my prints. When I run my node using ros2 launch, I dont see my cout statements.

Any explination?

Also I have tried and failed to find any ros2 launch (python) documentation anywhere. I was trying to see if there is a output=screen option that I could use to fix my issue.

Anirudh
  • 11
  • 1

1 Answers1

0

Can you not just add

output="screen" as an argument to you launch_ros.actions.Node

I.e. modifying the example from https://docs.ros.org/en/foxy/Tutorials/Intermediate/Launch/Creating-Launch-Files.html

from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description(): return LaunchDescription([ Node( package='turtlesim', namespace='turtlesim1', executable='turtlesim_node', name='sim', output='screen' ), ])

If I'm not understanding correctly, please share your launch file.