Skip to content

Conversation

@papertowel123
Copy link

Reason for change:

Here is a part of a launch file, where we trying to launch throttle as a node:

            Node(
                package="topic_tools",
                executable="throttle",
                name="throttle_odom",
                respawn=True,
                output="screen",
                emulate_tty=True,
                arguments=log_levels,
                parameters=[
                    *get_config(
                        os.path.join(
                            dir, "throttle-params.yaml"
                        )
                    ),
                ],
            ), 

yaml:

/**:
  throttle_odom:
    ros__parameters:
      throttle_type: "messages"
      input_topic: "odometry/filtered"
      output_topic: "~/odometry/filtered"
      msgs_per_sec: 1.0

We face this error while executing the launch file:
image

Changes in this PR:

  • changed the we use args in main()

Results:

image
image
ros2 topic echo /odometry/filtered
image

@papertowel123 papertowel123 requested a review from a team as a code owner March 5, 2024 12:31
@papertowel123 papertowel123 requested review from gbiggs and jhdcs March 5, 2024 12:31
Signed-off-by: maksymdidukh <[email protected]>
Signed-off-by: maksymdidukh <[email protected]>
@benjinne
Copy link

This also works if you need a temporary fix:

Node(
package='topic_tools',
executable='throttle',
name='throttle',
output='screen',
arguments=['messages', 'odom', '10.0', 'odom/throttle'],
)

@papertowel123
Copy link
Author

This also works if you need a temporary fix:

Node( package='topic_tools', executable='throttle', name='throttle', output='screen', arguments=['messages', 'odom', '10.0', 'odom/throttle'], )

Thanks, but we already merged the PR into our fork, so no need for temporary fix))

Copy link
Member

@MichaelOrlov MichaelOrlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maksymdidukh The change looks pretty trivial. Allowing to start with no CLI arguments by default.
However, I am curious what will be the default configuration for throttle in this case?
Will not it cause undefined behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants