In #106 support was added to map std_msgs/{Duration,Time} to builtin_interfaces/{Duration,Time}. However, this is not working as expected for me for a field of type std_msgs/Duration.
I cannot follow the metaprogramming easily, but AI has summarized it as:
The Factory-based conversions work for direct topic bridging. But when code is generated for custom messages containing std_msgs/Duration fields, it emits calls to the free-standing ros1_bridge::convert_1_to_2() — which doesn't have a specialization for std_msgs::Duration, only ros::Duration.
I think the argument here is that it is missing specializations like the below, but for std_msgs/{Duration,Time}.
|
template<> |
|
void |
|
convert_1_to_2( |
|
const ros::Duration & ros1_type, |
|
builtin_interfaces::msg::Duration & ros2_msg) |
|
{ |
|
ros2_msg.sec = ros1_type.sec; |
|
ros2_msg.nanosec = ros1_type.nsec; |
|
} |
There does seem to be some magic for mapping top-level topic types of std_msgs/{Duration,Time} but I don't think it works for field types?
|
auto factory = get_factory(ros1_type_name, ros2_type_name); |
|
auto ros2_pub = factory->create_ros2_publisher( |
|
ros2_node, ros2_topic_name, publisher_qos); |
In #106 support was added to map
std_msgs/{Duration,Time}tobuiltin_interfaces/{Duration,Time}. However, this is not working as expected for me for a field of typestd_msgs/Duration.I cannot follow the metaprogramming easily, but AI has summarized it as:
I think the argument here is that it is missing specializations like the below, but for
std_msgs/{Duration,Time}.ros1_bridge/src/convert_builtin_interfaces.cpp
Lines 22 to 30 in 611755f
There does seem to be some magic for mapping top-level topic types of
std_msgs/{Duration,Time}but I don't think it works for field types?ros1_bridge/src/bridge.cpp
Lines 56 to 58 in 611755f