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

Throttle not launching in non-composed mode #101

Open
wants to merge 2 commits into
base: iron
Choose a base branch
from

Conversation

maksymdidukh
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

@maksymdidukh maksymdidukh requested a review from a team as a code owner March 5, 2024 12:31
@maksymdidukh maksymdidukh requested review from gbiggs and jhdcs March 5, 2024 12:31
Signed-off-by: maksymdidukh <maxym.didukh@logivations.com>
Signed-off-by: maksymdidukh <maxym.didukh@logivations.com>
@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'],
)

@maksymdidukh
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