-
Notifications
You must be signed in to change notification settings - Fork 43
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
Only representable values should be possible to set as parameters #145
Comments
Theoretically, this should already be the case. We have checks in place exactly for this reason. For instance: Terminal 1:
Terminal 2:
Can you give more details on how to reproduce the error? |
I was not able to figure out which parameter this is coming from because my normal way of reading parameters (to search for where it is coming from) is broken by this. However I was able to write this simple program that builds and runs on Humble and produces the same result: #include <cmath>
#include <rclcpp/rclcpp.hpp>
int main(int argc, char * argv[])
{
rclcpp::init(argc, argv);
auto const node = std::make_shared<rclcpp::Node>(
"invalid_param",
rclcpp::NodeOptions().automatically_declare_parameters_from_overrides(true)
);
node->declare_parameter("f", double{NAN});
rclcpp::spin(node);
rclcpp::shutdown();
return 0;
} Based on the error produced my theory is that something in MoveIt is setting one of the sentinal values of double as a default for some parameter. |
OK, I just confirmed that yes, this is the same problem as ros2/rosidl#351 . I also confirmed that this is not a problem on Rolling anymore. So I'm going to close this out as a dup. |
Bug report
Required Info:
Steps to reproduce the issue
I reproduced this using the tutorials for moveit2 on Humble.
I found this issue, but I'm unsure if it is related: ros2/rosidl#351
Expected behavior
Only representable values should be possible to set as parameters. If it is possible to set a value for a parameter, it should be possible to read that value.
Actual behavior
Crash when trying to read parameters
The text was updated successfully, but these errors were encountered: