Skip to content

Commit

Permalink
refactor: change load config
Browse files Browse the repository at this point in the history
  • Loading branch information
Mobilizes committed Jun 21, 2024
1 parent 870b99c commit 32f6263
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/atama/config/node/config_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ ConfigNode::ConfigNode(std::shared_ptr<rclcpp::Node> node, const std::string & p
[this, path](
atama_interfaces::srv::GetConfig::Request::SharedPtr request,
atama_interfaces::srv::GetConfig::Response::SharedPtr response) {
response->json = jitsuyo::load_config(path, "/head.json").dump();
nlohmann::json data;
if (!jitsuyo::load_config(path, "/head.json", data)) {
return;
}
response->json = data.dump();
});

set_config_service = node->create_service<atama_interfaces::srv::SaveConfig>(
Expand Down

0 comments on commit 32f6263

Please sign in to comment.