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

Environment variables not set for actions inside RosTimer #376

Open
tonynajjar opened this issue Aug 22, 2023 · 0 comments
Open

Environment variables not set for actions inside RosTimer #376

tonynajjar opened this issue Aug 22, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@tonynajjar
Copy link

Bug report

Required Info:

  • Operating System:
    • Ubuntu 22
  • Installation type:
    • binaries
  • Version or commit hash:
    • Humble
  • DDS implementation:
    • Cyclone
  • Client library (if applicable):

Steps to reproduce issue

from launch import LaunchDescription
from launch.actions import (
    GroupAction,
    SetEnvironmentVariable,
)
from launch_ros.actions import Node, RosTimer

def generate_launch_description():  # noqa: D103
    ld = LaunchDescription()
    ld.add_action(
        GroupAction(
            actions=[
                SetEnvironmentVariable(name="ROS_DOMAIN_ID", value="2"),
                RosTimer(
                    period=1.0,
                    actions=[
                        # Gets ROS_DOMAIN_ID of 0
                        Node(
                            package="demo_nodes_py",
                            executable="talker",
                            output="screen",
                        ),
                    ],
                ),
                # Gets ROS_DOMAIN_ID of 2
                Node(
                    package="demo_nodes_py",
                    executable="listener",
                    output="screen",
                ),
            ]
        )
    )

    return ld

Expected behavior

Both nodes get the same ROS_DOMAIN_ID of 2

Actual behavior

The node in RosTimer does not get ROS_DOMAIN_ID set

Additional information


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants