ros-tooling / topic_tools

Tools for directing, throttling, selecting, and otherwise manipulating ROS 2 topics at a meta-level.
Apache License 2.0
71 stars 33 forks source link

Throttle not launching in non-composed mode #101

Open maksymdidukh opened 6 months ago

maksymdidukh commented 6 months ago

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:

Results:

image image ros2 topic echo /odometry/filtered image

benjinne commented 6 months ago

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 commented 6 months ago

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))