Easy Navigation
Loading...
Searching...
No Matches
ConfigurationFingerprint.hpp
Go to the documentation of this file.
1// Copyright 2026 Intelligent Robotics Lab
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
17
18#ifndef EASYNAV_SYSTEM__SAFETY__CONFIGURATIONFINGERPRINT_HPP_
19#define EASYNAV_SYSTEM__SAFETY__CONFIGURATIONFINGERPRINT_HPP_
20
21#include <map>
22#include <string>
23
24#include "rclcpp_lifecycle/lifecycle_node.hpp"
25
26namespace easynav::safety
27{
28
30using Nodes = std::map<std::string, rclcpp_lifecycle::LifecycleNode::SharedPtr>;
31
33std::string configuration_dump(const Nodes & nodes);
34
36std::string sha256_hex(const std::string & data);
37
40std::string loaded_plugins(const Nodes & nodes);
41
43std::string log_directory();
44
46std::string dump_file_name(const std::string & ns, const std::string & hash);
47
50std::string save_dump(const std::string & dump, const std::string & path);
51
52} // namespace easynav::safety
53
54#endif // EASYNAV_SYSTEM__SAFETY__CONFIGURATIONFINGERPRINT_HPP_
Definition CommandGuard.hpp:36
std::string sha256_hex(const std::string &data)
SHA-256 of data, in hex.
Definition ConfigurationFingerprint.cpp:153
std::string save_dump(const std::string &dump, const std::string &path)
Writes dump to path, unless it already exists.
Definition ConfigurationFingerprint.cpp:219
std::string configuration_dump(const Nodes &nodes)
Every parameter of nodes, one "node/parameter=value" per line, sorted.
Definition ConfigurationFingerprint.cpp:128
std::string log_directory()
ROS's log directory ($ROS_LOG_DIR, else $ROS_HOME/log, else ~/.ros/log), or "".
Definition ConfigurationFingerprint.cpp:197
std::string dump_file_name(const std::string &ns, const std::string &hash)
"easynav_configuration_[<ns>_]<hash>.txt", for the EasyNav in namespace ns.
Definition ConfigurationFingerprint.cpp:210
std::map< std::string, rclcpp_lifecycle::LifecycleNode::SharedPtr > Nodes
EasyNav nodes by name.
Definition ConfigurationFingerprint.hpp:30
std::string loaded_plugins(const Nodes &nodes)
The loaded plugins: every "<alias>.plugin" listed in a "*_types" parameter, one "\n node: alias [cla...
Definition ConfigurationFingerprint.cpp:168