diff --git a/btcpp_logo.png b/btcpp_logo.png new file mode 100644 index 000000000..a01e03d6b Binary files /dev/null and b/btcpp_logo.png differ diff --git a/btcpp_logo.svg b/btcpp_logo.svg new file mode 100644 index 000000000..fffa7d927 --- /dev/null +++ b/btcpp_logo.svg @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fa4a3b68c..5a30af0c7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,7 +1,7 @@ ###################################################### # TESTS -include_directories(include) +include_directories(include ${PROJECT_SOURCE_DIR}/3rdparty) set(BT_TESTS src/action_test_node.cpp diff --git a/tests/gtest_factory.cpp b/tests/gtest_factory.cpp index be4c06832..a176b4476 100644 --- a/tests/gtest_factory.cpp +++ b/tests/gtest_factory.cpp @@ -77,7 +77,7 @@ static const char* xml_text_subtree = R"( static const char* xml_text_subtree_part1 = R"( - + @@ -88,7 +88,7 @@ static const char* xml_text_subtree_part1 = R"( static const char* xml_text_subtree_part2 = R"( - + @@ -168,7 +168,7 @@ TEST(BehaviorTreeFactory, Subtree) TEST(BehaviorTreeFactory, Issue7) { const std::string xml_text_issue = R"( - + )"; @@ -183,7 +183,7 @@ TEST(BehaviorTreeFactory, Issue7) static const char* xml_ports_subtree = R"( - + diff --git a/tests/gtest_logger_zmq.cpp b/tests/gtest_logger_zmq.cpp index 7ccfa70c0..d9b19719d 100644 --- a/tests/gtest_logger_zmq.cpp +++ b/tests/gtest_logger_zmq.cpp @@ -7,7 +7,7 @@ TEST(LoggerZMQ, ZMQLoggerDeletesCleanlyAfterTickingTree) { // GIVEN we create a behavior tree through the BT factory and attach a ZMQ publisher to it static constexpr auto XML = R"( - + @@ -30,7 +30,7 @@ TEST(LoggerZMQ, ZMQLoggerDeletesCleanlyAfterNotTickingTree) { // GIVEN we create a behavior tree through the BT factory and attach a ZMQ publisher to it static constexpr auto XML = R"( - + diff --git a/tests/gtest_switch.cpp b/tests/gtest_switch.cpp index ba0e8cba5..fd33a020b 100644 --- a/tests/gtest_switch.cpp +++ b/tests/gtest_switch.cpp @@ -44,9 +44,9 @@ struct SwitchTest : testing::Test BT::NodeConfig simple_switch_config_; SwitchTest() : - action_1("action_1", milliseconds(100)), - action_42("action_42", milliseconds(100)), - action_def("action_default", milliseconds(100)) + action_1("action_1", milliseconds(200)), + action_42("action_42", milliseconds(200)), + action_def("action_default", milliseconds(200)) { BT::PortsRemapping input; input.insert(std::make_pair("variable", "{my_var}")); @@ -78,7 +78,7 @@ TEST_F(SwitchTest, DefaultCase) ASSERT_EQ(NodeStatus::RUNNING, action_def.status()); ASSERT_EQ(NodeStatus::RUNNING, state); - std::this_thread::sleep_for(milliseconds(110)); + std::this_thread::sleep_for(milliseconds(300)); state = root->executeTick(); ASSERT_EQ(NodeStatus::IDLE, action_1.status()); @@ -97,7 +97,7 @@ TEST_F(SwitchTest, Case1) ASSERT_EQ(NodeStatus::IDLE, action_def.status()); ASSERT_EQ(NodeStatus::RUNNING, state); - std::this_thread::sleep_for(milliseconds(110)); + std::this_thread::sleep_for(milliseconds(300)); state = root->executeTick(); ASSERT_EQ(NodeStatus::IDLE, action_1.status()); @@ -116,7 +116,7 @@ TEST_F(SwitchTest, Case2) ASSERT_EQ(NodeStatus::IDLE, action_def.status()); ASSERT_EQ(NodeStatus::RUNNING, state); - std::this_thread::sleep_for(milliseconds(110)); + std::this_thread::sleep_for(milliseconds(300)); state = root->executeTick(); ASSERT_EQ(NodeStatus::IDLE, action_1.status()); @@ -135,7 +135,7 @@ TEST_F(SwitchTest, CaseNone) ASSERT_EQ(NodeStatus::RUNNING, action_def.status()); ASSERT_EQ(NodeStatus::RUNNING, state); - std::this_thread::sleep_for(milliseconds(110)); + std::this_thread::sleep_for(milliseconds(300)); state = root->executeTick(); ASSERT_EQ(NodeStatus::IDLE, action_1.status()); @@ -154,7 +154,7 @@ TEST_F(SwitchTest, CaseSwitchToDefault) ASSERT_EQ(NodeStatus::IDLE, action_def.status()); ASSERT_EQ(NodeStatus::RUNNING, state); - std::this_thread::sleep_for(milliseconds(10)); + std::this_thread::sleep_for(milliseconds(20)); state = root->executeTick(); ASSERT_EQ(NodeStatus::RUNNING, action_1.status()); ASSERT_EQ(NodeStatus::IDLE, action_42.status()); @@ -163,22 +163,22 @@ TEST_F(SwitchTest, CaseSwitchToDefault) // Switch Node does not feels changes. Only when tick. // (not reactive) - std::this_thread::sleep_for(milliseconds(10)); + std::this_thread::sleep_for(milliseconds(20)); bb->set("my_var", ""); - std::this_thread::sleep_for(milliseconds(10)); + std::this_thread::sleep_for(milliseconds(20)); ASSERT_EQ(NodeStatus::RUNNING, action_1.status()); ASSERT_EQ(NodeStatus::IDLE, action_42.status()); ASSERT_EQ(NodeStatus::IDLE, action_def.status()); ASSERT_EQ(NodeStatus::RUNNING, root->status()); - std::this_thread::sleep_for(milliseconds(10)); + std::this_thread::sleep_for(milliseconds(20)); state = root->executeTick(); ASSERT_EQ(NodeStatus::IDLE, action_1.status()); ASSERT_EQ(NodeStatus::IDLE, action_42.status()); ASSERT_EQ(NodeStatus::RUNNING, action_def.status()); ASSERT_EQ(NodeStatus::RUNNING, state); - std::this_thread::sleep_for(milliseconds(110)); + std::this_thread::sleep_for(milliseconds(300)); state = root->executeTick(); ASSERT_EQ(NodeStatus::IDLE, action_1.status()); @@ -198,14 +198,14 @@ TEST_F(SwitchTest, CaseSwitchToAction2) ASSERT_EQ(NodeStatus::RUNNING, state); bb->set("my_var", "42"); - std::this_thread::sleep_for(milliseconds(10)); + std::this_thread::sleep_for(milliseconds(20)); state = root->executeTick(); ASSERT_EQ(NodeStatus::IDLE, action_1.status()); ASSERT_EQ(NodeStatus::RUNNING, action_42.status()); ASSERT_EQ(NodeStatus::IDLE, action_def.status()); ASSERT_EQ(NodeStatus::RUNNING, state); - std::this_thread::sleep_for(milliseconds(110)); + std::this_thread::sleep_for(milliseconds(300)); state = root->executeTick(); ASSERT_EQ(NodeStatus::IDLE, action_1.status()); @@ -226,7 +226,7 @@ TEST_F(SwitchTest, ActionFailure) ASSERT_EQ(NodeStatus::IDLE, action_def.status()); ASSERT_EQ(NodeStatus::RUNNING, state); - std::this_thread::sleep_for(milliseconds(110)); + std::this_thread::sleep_for(milliseconds(300)); state = root->executeTick(); ASSERT_EQ(NodeStatus::FAILURE, state); diff --git a/tests/gtest_wakeup.cpp b/tests/gtest_wakeup.cpp index 1de1c46d7..feabf2f95 100644 --- a/tests/gtest_wakeup.cpp +++ b/tests/gtest_wakeup.cpp @@ -28,7 +28,7 @@ TEST(WakeUp, BasicTest) { static const char* xml_text = R"( - + diff --git a/tests/navigation_test.cpp b/tests/navigation_test.cpp index 073ee6436..54fd28c23 100644 --- a/tests/navigation_test.cpp +++ b/tests/navigation_test.cpp @@ -7,7 +7,7 @@ using namespace BT; // clang-format off static const char* xml_text = R"( - + diff --git a/tests/trees/child/child/child_child_no_include.xml b/tests/trees/child/child/child_child_no_include.xml index 6412de607..64f93ac7c 100644 --- a/tests/trees/child/child/child_child_no_include.xml +++ b/tests/trees/child/child/child_child_no_include.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/trees/child/child_include_child.xml b/tests/trees/child/child_include_child.xml index ab833f869..dcae8c341 100644 --- a/tests/trees/child/child_include_child.xml +++ b/tests/trees/child/child_include_child.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/trees/child/child_include_parent.xml b/tests/trees/child/child_include_parent.xml index 8312376df..4600a00e1 100644 --- a/tests/trees/child/child_include_parent.xml +++ b/tests/trees/child/child_include_parent.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/trees/child/child_include_sibling.xml b/tests/trees/child/child_include_sibling.xml index 56523b750..c39a6e295 100644 --- a/tests/trees/child/child_include_sibling.xml +++ b/tests/trees/child/child_include_sibling.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/trees/child/child_no_include.xml b/tests/trees/child/child_no_include.xml index 7f9b7c5c9..cdd98f7df 100644 --- a/tests/trees/child/child_no_include.xml +++ b/tests/trees/child/child_no_include.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/trees/parent_include_child.xml b/tests/trees/parent_include_child.xml index 196e5621e..39695dd1d 100644 --- a/tests/trees/parent_include_child.xml +++ b/tests/trees/parent_include_child.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/trees/parent_include_child_include_child.xml b/tests/trees/parent_include_child_include_child.xml index d6f8651d6..215cdac44 100644 --- a/tests/trees/parent_include_child_include_child.xml +++ b/tests/trees/parent_include_child_include_child.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/trees/parent_include_child_include_parent.xml b/tests/trees/parent_include_child_include_parent.xml index f6234da7c..49a8d9128 100644 --- a/tests/trees/parent_include_child_include_parent.xml +++ b/tests/trees/parent_include_child_include_parent.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/trees/parent_include_child_include_sibling.xml b/tests/trees/parent_include_child_include_sibling.xml index ecf595897..c5625e522 100644 --- a/tests/trees/parent_include_child_include_sibling.xml +++ b/tests/trees/parent_include_child_include_sibling.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/trees/parent_no_include.xml b/tests/trees/parent_no_include.xml index dedc05144..73ced4dd8 100644 --- a/tests/trees/parent_no_include.xml +++ b/tests/trees/parent_no_include.xml @@ -1,4 +1,4 @@ - + diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 163e70348..c73ee3780 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.5) -include_directories(${CMAKE_SOURCE_DIR}/3rdparty) +include_directories(${PROJECT_SOURCE_DIR}/3rdparty) add_executable(bt3_log_cat bt_log_cat.cpp ) target_link_libraries(bt3_log_cat ${BEHAVIOR_TREE_LIBRARY} ) diff --git a/tools/bt_recorder.cpp b/tools/bt_recorder.cpp index cfca00c64..36d391750 100644 --- a/tools/bt_recorder.cpp +++ b/tools/bt_recorder.cpp @@ -62,7 +62,8 @@ int main(int argc, char* argv[]) zmq::message_t msg; try { - subscriber.recv(update, zmq::recv_flags::none); + auto ret = subscriber.recv(update, zmq::recv_flags::none); + (void)ret; } catch (zmq::error_t& e) {