3#include "behaviortree_cpp/loggers/abstract_logger.h"
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
36
37
38
39
40
41
42
43
44
45
50
51
52
53
54
55
56
57 SqliteLogger(
const Tree& tree, std::filesystem::path
const& file,
bool append =
false);
59 ~SqliteLogger()
override;
71 void setAdditionalCallback(ExtraCallback func);
73 virtual void callback(Duration timestamp,
const TreeNode& node,
NodeStatus prev_status,
76 void execSqlStatement(std::string statement);
78 virtual void flush()
override;
81 sqlite3* db_ =
nullptr;
83 int64_t monotonic_timestamp_ = 0;
84 std::unordered_map<
const BT::TreeNode*, int64_t> starting_time_;
94 std::string extra_data;
97 std::deque<Transition> transitions_queue_;
98 std::condition_variable queue_cv_;
99 std::mutex queue_mutex_;
101 std::thread writer_thread_;
102 std::atomic_bool loop_ =
true;
103 std::atomic_bool writer_ready_ =
false;
105 ExtraCallback extra_func_;
The SqliteLogger is a logger that will store the tree and all the status transitions in a SQLite data...
Definition: bt_sqlite_logger.h:47
SqliteLogger(const Tree &tree, std::filesystem::path const &file, bool append=false)
To correctly read this log with Groot2, you must use the suffix ".db3". Constructor will throw otherw...
Definition: abstract_logger.h:16
Struct used to store a tree. If this object goes out of scope, the tree is destroyed.
Definition: bt_factory.h:96
Abstract base class for Behavior Tree Nodes.
Definition: tree_node.h:154
Definition: action_node.h:24
NodeStatus
Definition: basic_types.h:34