Skip to content

Commit

Permalink
Merge branch 'feat_node_tree' into node_namespace_name_collision
Browse files Browse the repository at this point in the history
  • Loading branch information
authaldo authored Feb 8, 2024
2 parents 43c8a1c + 1b65cdf commit a5bb81f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ void visualizeNodeTree(const std::shared_ptr<const TreeNode>& root, std::string
// leaf node
// push "leaf" to id stack to prevent ID collision between node and namespace with same name
ImGui::PushID("leaf");
if (ImGui::Selectable(root->name.c_str())) {
if (ImGui::Selectable(root->name.c_str(), selectedNode == root->fullName)) {

selectedNode = root->fullName;
}
ImGui::PopID();
Expand Down
10 changes: 10 additions & 0 deletions src/service_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ void ServiceWrapper::handleRequest(const RequestPtr &request) {
continue;
}

{
auto tmpclient = node->create_client<rcl_interfaces::srv::ListParameters>(serviceName);
if (!tmpclient->service_is_ready()) {
// Service is known, but not ready.
// This happens e.g. if this is the currently selected node,
// so we still have clients for the service, but the node has died.
continue;
}
}

nodeNames.push_back(extractedNodeName);
}

Expand Down

0 comments on commit a5bb81f

Please sign in to comment.