diff --git a/panther_manager/behavior_trees/lights.xml b/panther_manager/behavior_trees/lights.xml index 09bcb1a1e..a4609da72 100644 --- a/panther_manager/behavior_trees/lights.xml +++ b/panther_manager/behavior_trees/lights.xml @@ -49,7 +49,7 @@ current_anim_id = CHARGING_BATTERY_ANIM_ID"/> param="" repeating="true" service_name="lights/controller/set/animation" - _skipIf="(!e_stop_state) || (current_anim_id == E_STOP_ANIM_ID)" + _skipIf="(!e_stop_state) || current_anim_id == E_STOP_ANIM_ID" _onSuccess="current_anim_id = E_STOP_ANIM_ID"/> service = { - {"service_name", "set_bool"}, {"data", "wrong_bool"}}; - - using std_srvs::srv::SetBool; - CreateService( - "set_bool", - [&](const SetBool::Request::SharedPtr request, SetBool::Response::SharedPtr response) { - ServiceCallback(request, response, true, true); - }); - RegisterNodeWithParams("CallSetBoolService"); - - EXPECT_THROW({ CreateTree("CallSetBoolService", service); }, BT::LogicError); -} - int main(int argc, char ** argv) { testing::InitGoogleTest(&argc, argv); diff --git a/panther_manager/test/plugins/test_call_set_led_animation_service_node.cpp b/panther_manager/test/plugins/test_call_set_led_animation_service_node.cpp index 9c2b13a43..03bf01378 100644 --- a/panther_manager/test/plugins/test_call_set_led_animation_service_node.cpp +++ b/panther_manager/test/plugins/test_call_set_led_animation_service_node.cpp @@ -171,26 +171,6 @@ TEST_F(TestCallSetLedAnimationService, WrongSetLedAnimationCallServiceFailure) EXPECT_EQ(status, BT::NodeStatus::FAILURE); } -TEST_F(TestCallSetLedAnimationService, WrongRepeatingServiceValueDefined) -{ - std::map service = { - {"service_name", "set_led_animation"}, {"id", "0"}, {"param", ""}, {"repeating", "wrong_bool"}}; - - RegisterNodeWithParams("CallSetLedAnimationService"); - - EXPECT_THROW({ CreateTree("CallSetLedAnimationService", service); }, BT::LogicError); -} - -TEST_F(TestCallSetLedAnimationService, WrongIdServiceValueDefined) -{ - std::map service = { - {"service_name", "set_led_animation"}, {"id", "-5"}, {"param", ""}, {"repeating", "true"}}; - - RegisterNodeWithParams("CallSetLedAnimationService"); - - EXPECT_THROW({ CreateTree("CallSetLedAnimationService", service); }, BT::LogicError); -} - int main(int argc, char ** argv) { testing::InitGoogleTest(&argc, argv);