diff --git a/mock/cpp_mock_scenarios/src/respawn_ego/respawn_ego.cpp b/mock/cpp_mock_scenarios/src/respawn_ego/respawn_ego.cpp index 6c5c109f49b..8e3b2246d65 100644 --- a/mock/cpp_mock_scenarios/src/respawn_ego/respawn_ego.cpp +++ b/mock/cpp_mock_scenarios/src/respawn_ego/respawn_ego.cpp @@ -40,7 +40,7 @@ class RespawnEgoScenario : public cpp_mock_scenarios::CppScenarioNode goal_msg.pose = static_cast(goal_pose); api_.respawn("ego", message, goal_msg); })}, - has_respawned{false} + has_done_respawn{false} { start(); } @@ -56,7 +56,7 @@ class RespawnEgoScenario : public cpp_mock_scenarios::CppScenarioNode stop(cpp_mock_scenarios::Result::SUCCESS); } - if (api_.getCurrentTime() >= 10 && !has_respawned) { + if (api_.getCurrentTime() >= 10 && !has_done_respawn) { geometry_msgs::msg::PoseWithCovarianceStamped ego_pose; ego_pose.header.frame_id = "map"; ego_pose.pose.pose = static_cast( @@ -70,7 +70,7 @@ class RespawnEgoScenario : public cpp_mock_scenarios::CppScenarioNode 34564, 10.0, 0.0, api_.getHdmapUtils())); api_.respawn("ego", ego_pose, goal_pose); - has_respawned = true; + has_done_respawn = true; } } @@ -88,7 +88,7 @@ class RespawnEgoScenario : public cpp_mock_scenarios::CppScenarioNode const rclcpp::Subscription::SharedPtr new_position_subscriber; - bool has_respawned; + bool has_done_respawn; }; } // namespace cpp_mock_scenarios