Open tonynajjar opened 3 months ago
Maybe I'm misunderstanding what you want here, but wouldn't this be as easy as:
auto tb = TransformBroadcaster();
auto callback = [&tb]() -> void
{
geometry_msgs::msg::TransformStamped ts;
tb->sendTransform(ts);
};
auto timer = node->create_wall_timer(1s, callback);
That is, I'm not entirely convinced we need to have core functionality for this; it is easy enough for users to do right now.
Sorry I wasn't super clear, basically I'm asking for a similar functionality to:
node_static_map_to_odom = Node(
package="tf2_ros",
executable="static_transform_publisher",
arguments=["0", "0", "0", "0", "0", "0", "map", "odom"],
)
Something like:
node_map_to_odom = Node(
package="tf2_ros",
executable="transform_publisher",
parameters=[{"timer_period": 1.0,}], # debatable if parameter or argument
arguments=["0", "0", "0", "0", "0", "0", "map", "odom"],
)
but wouldn't this be as easy as
Yes you're right it wouldn't be so hard for the user to create but why not standardize it and avoid this work for ROS users. static_transform_publisher
, tf2_echo
, etc... are simple scripts but extremely useful. Besides, it's not as simple as that, considering the argument parsing, like is done in static_transform_broadcaster_program.cpp
I hope it's clearer what this issue is about?
Feature request
Feature description
Similarly to
static_transform_publisher
, it would be useful to have atransform_publisher
that publishes to/tf
on a timer (configurable rate). One use case of this would be to publish map -> odom artificially (e.g. if a global localizer is missing). I've seen thestatic_transform_publisher
being used for this but for me it hasn't worked out for reasons I don't know yet, but regardless, map -> odom should theoretically be on/tf
as it's not staticImplementation considerations