Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to make Python prints visible #165

Open
RemiFabre opened this issue Apr 27, 2023 · 0 comments
Open

Add an option to make Python prints visible #165

RemiFabre opened this issue Apr 27, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@RemiFabre
Copy link
Member

By default, a Python print will not be seen on the console when using a ros2 launch command.
Link to a discussion on the topic:
ros2/launch#188

This is problematic when debugging a lib that has no business having a ros logger added to it.
There is a simple fix. Currenlty the nodes are defined like this in the launch file:

kinematics_node = LifecycleNode(
        name="kinematics",
        namespace="",
        package="reachy_kdl_kinematics",
        executable="reachy_kdl_kinematics",
    )

But we define them like this, prints will be visible:

kinematics_node = LifecycleNode(
        name="kinematics",
        namespace="",
        package="reachy_kdl_kinematics",
        executable="reachy_kdl_kinematics",
        output="screen",
        emulate_tty=True,
    )

This should NOT be the default setting, as it adds other issues.
Options:

  • There could be a flag to activate this debug mode for debug sessions for [all/one/a list of] nodes.
  • Do nothing and keep this as a tip we use when in need.
@RemiFabre RemiFabre added the enhancement New feature or request label Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants