-
Notifications
You must be signed in to change notification settings - Fork 258
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
Decoding RecordOptions from YAML conflicts with chrono::milliseconds #1764
Comments
@r7vme could you please make a preliminary analysis for this issue? It could be a side effect from recently merged fix for duration timepoint conversion. |
@MichaelOrlov I think related code was added in this PR #1419 . Do you know why we need static Node encode(const std::chrono::milliseconds & duration)
{
Node node;
node["milliseconds"] = duration.count();
return node;
} can be static Node encode(const std::chrono::milliseconds & duration)
{
return Node(duration.count());
} |
Likely because the similar issue as in the #1744. |
Ahh, no. Please disregard my previous comment. |
Alright, if it was intended this way then it's fine. |
|
Description
Currently, for parsing a yaml node to RecordOptions, the key "topic_polling_interval" of type std::chrono::milliseconds throws an error. Only the key "milliseconds" can be parsed to std::chrono::milliseconds.
Expected Behavior
I try to parse a yaml node
node
torosbag2_transport::RecordOptions
using this approach:ROSBAG2_TRANSPORT_PUBLIC YAML::convert<rosbag2_transport::RecordOptions>::decode(node, record_options);
The yaml node looks like this:
Actual Behavior
This line called from here (record_options.cpp) throws the following error:
The method expects the key "milliseconds". If I change the yaml node to
it works. But I don't see a reason why the additional key should be necessary.
System
The text was updated successfully, but these errors were encountered: