-
Notifications
You must be signed in to change notification settings - Fork 411
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
ros2 param list crash #1930
Comments
Your options
are essentially disabling remote ROS 2 parameters on the node, so it makes sense that it fixes the problem (as from the This clearly looks like a bug, although I do have some considerations.
|
class FooNode : public rclcpp::Node {
public:
FooNode() : Node("foo") { }
};
int main(int argc, char **argv)
{
rclcpp::init(argc, argv);
auto node = std::make_shared<FooNode>();
rclcpp::Rate delai(0.1);
delai.sleep();
rclcpp::shutdown();
return 0;
}
This design pattern is often use when dealing with plugins (and clear logs) @SteveMacenski |
Its generally a bad pattern none the less. We have a couple of spots where it is unavoidable but we worked hard to reduce it to just those places and instead make smart use of internal executors |
Any update? |
@BriceRenaudeau I confirmed that this problem can be observed on master branch as well. but i just dont have enough resource to dig deeper yet. |
I see lastest https://github.com/ros2/ros2cli does not stuck in your case, I modify your code like this: #include <rclcpp/rclcpp.hpp>
class FooNode : public rclcpp::Node
{
public:
FooNode() : Node("foo")
{
client_node = std::make_shared<rclcpp::Node>("bar");
client_node2 = std::make_shared<rclcpp::Node>("bar2");
}
std::shared_ptr<rclcpp::Node> client_node;
std::shared_ptr<rclcpp::Node> client_node2;
};
int main(int argc, char **argv)
{
rclcpp::init(argc, argv);
auto node = std::make_shared<FooNode>();
rclcpp::spin(node);
rclcpp::shutdown();
return 0;
} when run
you can see So in my option, someone may has fixed it in the master branch of https://github.com/ros2/ros2cli. |
Thanks, that's good news. |
last time (#1930 (comment)) i was checking on this, this problem could be observed. |
@fujitatomoya PR: |
@llapx thanks for checking on this. i think we need to backport ros2/ros2cli#646 to humble/galactic/foxy. |
humble already applied, galactic and foxy should be backported. |
this issue has been addressed, closing. |
Bug report
When creating a sub-node from a node using the default constructor, the command
ros2 param list
crashes at the sub-node line.This kind of architecture is often used in Nav2 (_rclcpp sub-node, BT _client_node, ...)
Steps to reproduce issue
Expected behavior
The parameters are listed correctly when using the command
ros2 param list
.Actual behavior
Additional information
if you declare the sub-node with the next options, the issue doesn't appear.
I know that we need to spin the sub-node to make it works, but it could be good to have the command line not stuck at the sub-node.
The text was updated successfully, but these errors were encountered: