diff --git a/src/proto/message_translation/tbots_protobuf.cpp b/src/proto/message_translation/tbots_protobuf.cpp index cc21417cd7..087f70b1ce 100644 --- a/src/proto/message_translation/tbots_protobuf.cpp +++ b/src/proto/message_translation/tbots_protobuf.cpp @@ -4,16 +4,16 @@ #include "software/logger/logger.h" -std::unique_ptr createWorld(const World& world) +std::unique_ptr createWorldProto(const World& world) { // create msg auto world_msg = std::make_unique(); - *(world_msg->mutable_time_sent()) = *createCurrentTimestamp(); - *(world_msg->mutable_field()) = *createField(world.field()); - *(world_msg->mutable_friendly_team()) = *createTeam(world.friendlyTeam()); - *(world_msg->mutable_enemy_team()) = *createTeam(world.enemyTeam()); - *(world_msg->mutable_ball()) = *createBall(world.ball()); - *(world_msg->mutable_game_state()) = *createGameState(world.gameState()); + *(world_msg->mutable_time_sent()) = *createCurrentTimestampProto(); + *(world_msg->mutable_field()) = *createFieldProto(world.field()); + *(world_msg->mutable_friendly_team()) = *createTeamProto(world.friendlyTeam()); + *(world_msg->mutable_enemy_team()) = *createTeamProto(world.enemyTeam()); + *(world_msg->mutable_ball()) = *createBallProto(world.ball()); + *(world_msg->mutable_game_state()) = *createGameStateProto(world.gameState()); if (world.getDribbleDisplacement().has_value()) { *(world_msg->mutable_dribble_displacement()) = @@ -22,17 +22,17 @@ std::unique_ptr createWorld(const World& world) return world_msg; } -std::unique_ptr createWorldWithSequenceNumber( +std::unique_ptr createWorldWithSequenceNumberProto( const World& world, const uint64_t sequence_number) { // create msg auto world_msg = std::make_unique(); - *(world_msg->mutable_time_sent()) = *createCurrentTimestamp(); - *(world_msg->mutable_field()) = *createField(world.field()); - *(world_msg->mutable_friendly_team()) = *createTeam(world.friendlyTeam()); - *(world_msg->mutable_enemy_team()) = *createTeam(world.enemyTeam()); - *(world_msg->mutable_ball()) = *createBall(world.ball()); - *(world_msg->mutable_game_state()) = *createGameState(world.gameState()); + *(world_msg->mutable_time_sent()) = *createCurrentTimestampProto(); + *(world_msg->mutable_field()) = *createFieldProto(world.field()); + *(world_msg->mutable_friendly_team()) = *createTeamProto(world.friendlyTeam()); + *(world_msg->mutable_enemy_team()) = *createTeamProto(world.enemyTeam()); + *(world_msg->mutable_ball()) = *createBallProto(world.ball()); + *(world_msg->mutable_game_state()) = *createGameStateProto(world.gameState()); world_msg->set_sequence_number(sequence_number); if (world.getDribbleDisplacement().has_value()) { @@ -43,7 +43,7 @@ std::unique_ptr createWorldWithSequenceNumber( } -std::unique_ptr createTeam(const Team& team) +std::unique_ptr createTeamProto(const Team& team) { // create msg auto team_msg = std::make_unique(); @@ -51,7 +51,7 @@ std::unique_ptr createTeam(const Team& team) std::for_each(robots.begin(), robots.end(), [&](const Robot& robot) - { *(team_msg->add_team_robots()) = *createRobot(robot); }); + { *(team_msg->add_team_robots()) = *createRobotProto(robot); }); auto goalie_id = team.getGoalieId(); if (goalie_id.has_value()) @@ -62,13 +62,13 @@ std::unique_ptr createTeam(const Team& team) return team_msg; } -std::unique_ptr createRobot(const Robot& robot) +std::unique_ptr createRobotProto(const Robot& robot) { // create msg auto robot_msg = std::make_unique(); robot_msg->set_id(robot.id()); *(robot_msg->mutable_current_state()) = *createRobotStateProto(robot); - *(robot_msg->mutable_timestamp()) = *createTimestamp(robot.timestamp()); + *(robot_msg->mutable_timestamp()) = *createTimestampProto(robot.timestamp()); for (RobotCapability capability : robot.getUnavailableCapabilities()) { @@ -96,17 +96,17 @@ std::unique_ptr createRobot(const Robot& robot) return robot_msg; } -std::unique_ptr createBall(const Ball& ball) +std::unique_ptr createBallProto(const Ball& ball) { // create msg auto ball_msg = std::make_unique(); - *(ball_msg->mutable_current_state()) = *createBallState(ball); - *(ball_msg->mutable_timestamp()) = *createTimestamp(ball.timestamp()); + *(ball_msg->mutable_current_state()) = *createBallStateProto(ball); + *(ball_msg->mutable_timestamp()) = *createTimestampProto(ball.timestamp()); return ball_msg; } -std::unique_ptr createField(const Field& field) +std::unique_ptr createFieldProto(const Field& field) { // create msg auto field_msg = std::make_unique(); @@ -146,7 +146,7 @@ std::unique_ptr createRobotStateProto( return robot_state_msg; } -std::unique_ptr createGameState(const GameState& game_state) +std::unique_ptr createGameStateProto(const GameState& game_state) { auto game_state_msg = std::make_unique(); @@ -283,7 +283,7 @@ std::unique_ptr createGameState(const GameState& game_sta auto ball_state = game_state.getBall(); if (ball_state.has_value()) { - *(game_state_msg->mutable_ball()) = *createBall(ball_state.value()); + *(game_state_msg->mutable_ball()) = *createBallProto(ball_state.value()); } auto ball_placement_point = game_state.getBallPlacementPoint(); @@ -296,7 +296,7 @@ std::unique_ptr createGameState(const GameState& game_sta return game_state_msg; } -std::unique_ptr createBallState(const Ball& ball) +std::unique_ptr createBallStateProto(const Ball& ball) { auto position = createPointProto(ball.position()); auto velocity = createVectorProto(ball.velocity()); @@ -309,15 +309,15 @@ std::unique_ptr createBallState(const Ball& ball) return ball_state_msg; } -std::unique_ptr createTimestamp(const Timestamp& timestamp) +std::unique_ptr createTimestampProto(const Timestamp& timestamp) { auto timestamp_msg = std::make_unique(); timestamp_msg->set_epoch_timestamp_seconds(timestamp.toSeconds()); return timestamp_msg; } -std::unique_ptr createNamedValue(const std::string name, - float value) +std::unique_ptr createNamedValueProto(const std::string name, + float value) { auto named_value_msg = std::make_unique(); named_value_msg->set_name(name); @@ -325,7 +325,7 @@ std::unique_ptr createNamedValue(const std::string name, return named_value_msg; } -std::unique_ptr createPlotJugglerValue( +std::unique_ptr createPlotJugglerValueProto( const std::map& values) { auto plot_juggler_value_msg = std::make_unique(); @@ -340,7 +340,7 @@ std::unique_ptr createPlotJugglerValue( return plot_juggler_value_msg; } -std::unique_ptr createDebugShapes( +std::unique_ptr createDebugShapesProto( const std::vector& debug_shapes) { auto debug_shape_list_msg = std::make_unique(); @@ -349,7 +349,7 @@ std::unique_ptr createDebugShapes( return debug_shape_list_msg; } -std::unique_ptr createCurrentTimestamp() +std::unique_ptr createCurrentTimestampProto() { auto timestamp_msg = std::make_unique(); const auto clock_time = std::chrono::system_clock::now(); @@ -378,7 +378,7 @@ BallState createBallState(const TbotsProto::BallState ball_state) ball_state.distance_from_ground()); } -std::unique_ptr createPassVisualization( +std::unique_ptr createPassVisualizationProto( const std::vector& passes_with_rating) { auto pass_visualization_msg = std::make_unique(); @@ -401,7 +401,8 @@ std::unique_ptr createPassVisualization( return pass_visualization_msg; } -std::unique_ptr createWorldStateReceivedTrigger() +std::unique_ptr +createWorldStateReceivedTriggerProto() { auto world_state_received_trigger_msg = std::make_unique(); @@ -409,7 +410,7 @@ std::unique_ptr createWorldStateReceivedT return world_state_received_trigger_msg; } -std::unique_ptr createCostVisualization( +std::unique_ptr createCostVisualizationProto( const std::vector& costs, int num_rows, int num_cols) { auto cost_visualization_msg = std::make_unique(); diff --git a/src/proto/message_translation/tbots_protobuf.h b/src/proto/message_translation/tbots_protobuf.h index 50ab53c374..2a58515edb 100644 --- a/src/proto/message_translation/tbots_protobuf.h +++ b/src/proto/message_translation/tbots_protobuf.h @@ -10,6 +10,7 @@ #include "software/ai/passing/pass_with_rating.h" #include "software/world/world.h" +/** testing */ /** * Returns a TbotsProto::World proto given a World. * @@ -18,7 +19,7 @@ * @return The unique_ptr to a TbotsProto::World proto containing the field, friendly * team, enemy team, ball, and the game state. */ -std::unique_ptr createWorld(const World& world); +std::unique_ptr createWorldProto(const World& world); /** * Returns a TbotsProto::World proto with a sequence number given a World and a sequence @@ -30,7 +31,7 @@ std::unique_ptr createWorld(const World& world); * @return The unique_ptr to a TbotsProto::World proto containing the field, friendly * team, enemy team, ball, game state, and the sequence number. */ -std::unique_ptr createWorldWithSequenceNumber( +std::unique_ptr createWorldWithSequenceNumberProto( const World& world, const uint64_t sequence_number); /** @@ -41,7 +42,7 @@ std::unique_ptr createWorldWithSequenceNumber( * @return The unique_ptr to a TbotsProto::Team proto containing a list of robots and * goalie ID */ -std::unique_ptr createTeam(const Team& team); +std::unique_ptr createTeamProto(const Team& team); /** * Returns a TbotsProto::Robot proto given a Robot. @@ -51,7 +52,7 @@ std::unique_ptr createTeam(const Team& team); * @return The unique_ptr to a TbotsProto::Robot proto containing the robot ID and robot * state */ -std::unique_ptr createRobot(const Robot& robot); +std::unique_ptr createRobotProto(const Robot& robot); /** * Returns a TbotsProto::Ball proto given a Ball. @@ -61,7 +62,7 @@ std::unique_ptr createRobot(const Robot& robot); * @return The unique_ptr to a TbotsProto::Ball proto containing the ball state and the * ball acceleration */ -std::unique_ptr createBall(const Ball& ball); +std::unique_ptr createBallProto(const Ball& ball); /** * Returns a TbotsProto::Field proto given a Field. @@ -71,7 +72,7 @@ std::unique_ptr createBall(const Ball& ball); * @return The unique_ptr to a TbotsProto::Field proto containing the Ball ID and Ball * state */ -std::unique_ptr createField(const Field& field); +std::unique_ptr createFieldProto(const Field& field); /** * Returns (Robot, Game, Ball) State given a (Robot, Game, Ball) @@ -83,8 +84,8 @@ std::unique_ptr createField(const Field& field); std::unique_ptr createRobotStateProto(const Robot& robot); std::unique_ptr createRobotStateProto( const RobotState& robot_state); -std::unique_ptr createGameState(const GameState& game_state); -std::unique_ptr createBallState(const Ball& ball); +std::unique_ptr createGameStateProto(const GameState& game_state); +std::unique_ptr createBallStateProto(const Ball& ball); /** * Returns a TbotsProto::Timestamp proto given a timestamp. @@ -94,7 +95,7 @@ std::unique_ptr createBallState(const Ball& ball); * @return The unique_ptr to a TbotsProto::Timestamp proto containing the timestamp with * the same time zone as the timestamp argument. */ -std::unique_ptr createTimestamp(const Timestamp& timestamp); +std::unique_ptr createTimestampProto(const Timestamp& timestamp); /** * Returns a TbotsProto::NamedValue proto given a name and value. @@ -105,15 +106,15 @@ std::unique_ptr createTimestamp(const Timestamp& timestam * @return The unique_ptr to a TbotsProto::NamedValue proto containing data with * specified name and value */ -std::unique_ptr createNamedValue(const std::string name, - float value); +std::unique_ptr createNamedValueProto(const std::string name, + float value); /** * Returns a TbotsProto::PlotJugglerValue proto containing the name * value pairs of the map. * * Could use LOG(PLOTJUGGLER) to plot the values. Example: - * LOG(PLOTJUGGLER) << *createPlotJugglerValue({ + * LOG(PLOTJUGGLER) << *createPlotJugglerValueProto({ * {"vx", velocity.x()}, * {"vy", velocity.y()} * }); @@ -123,7 +124,7 @@ std::unique_ptr createNamedValue(const std::string name, * @return The unique_ptr to a TbotsProto::PlotJugglerValue proto containing data with * specified names and values */ -std::unique_ptr createPlotJugglerValue( +std::unique_ptr createPlotJugglerValueProto( const std::map& values); /** @@ -141,7 +142,7 @@ std::unique_ptr createPlotJugglerValue( * @return The unique_ptr to a TbotsProto::DebugShapes::DebugShape proto */ template -std::unique_ptr createDebugShape( +std::unique_ptr createDebugShapeProto( const Shape& shape, const std::string& unique_id, const std::string& debug_text = "") { auto debug_shape = std::make_unique(); @@ -155,10 +156,10 @@ std::unique_ptr createDebugShape( * Returns a TbotsProto::DebugShapes proto containing the debug shapes * * Could use LOG(VISUALIZE) to plot these values. Example: - * LOG(VISUALIZE) << *createDebugShapes({ - * *createDebugShape(circle, unique_id1, optional_text), - * *createDebugShape(polygon, unique_id2, optional_text), - * *createDebugShape(stadium, unique_id3, optional_text) + * LOG(VISUALIZE) << *createDebugShapesProto({ + * *createDebugShapeProto(circle, unique_id1, optional_text), + * *createDebugShapeProto(polygon, unique_id2, optional_text), + * *createDebugShapeProto(stadium, unique_id3, optional_text) * }); * * @param debug_shapes A list of debug shapes proto to plot @@ -166,7 +167,7 @@ std::unique_ptr createDebugShape( * @return The unique_ptr to a TbotsProto::DebugShapes proto containing data with * specified names and shapes */ -std::unique_ptr createDebugShapes( +std::unique_ptr createDebugShapesProto( const std::vector& debug_shapes); /** @@ -185,7 +186,7 @@ std::unique_ptr createShapeProto(const Stadium& stadium); * * @return The unique_ptr to a TbotsProto::Timestamp with the current UTC time */ -std::unique_ptr createCurrentTimestamp(); +std::unique_ptr createCurrentTimestampProto(); /** * Return RobotState given the TbotsProto::RobotState protobuf @@ -210,7 +211,7 @@ BallState createBallState(const TbotsProto::BallState ball_state); * * @return The unique_ptr to a PassVisualization proto */ -std::unique_ptr createPassVisualization( +std::unique_ptr createPassVisualizationProto( const std::vector& passes_with_rating); /** @@ -220,7 +221,8 @@ std::unique_ptr createPassVisualization( * a boolean value for whether world state proto has been received * */ -std::unique_ptr createWorldStateReceivedTrigger(); +std::unique_ptr +createWorldStateReceivedTriggerProto(); /** * Returns a cost visualization given a vector of costs @@ -231,7 +233,7 @@ std::unique_ptr createWorldStateReceivedT * * @return The unique_ptr to a CostVisualization proto */ -std::unique_ptr createCostVisualization( +std::unique_ptr createCostVisualizationProto( const std::vector& costs, int num_rows, int num_cols); /** diff --git a/src/proto/message_translation/tbots_protobuf_test.cpp b/src/proto/message_translation/tbots_protobuf_test.cpp index 9cdde04170..200672801a 100644 --- a/src/proto/message_translation/tbots_protobuf_test.cpp +++ b/src/proto/message_translation/tbots_protobuf_test.cpp @@ -112,7 +112,7 @@ class TbotsProtobufTest : public ::testing::Test TEST(TbotsProtobufTest, timestamp_msg_test) { - auto timestamp_msg = createCurrentTimestamp(); + auto timestamp_msg = createCurrentTimestampProto(); TbotsProtobufTest::assertSaneTimestamp(*timestamp_msg); } @@ -137,7 +137,7 @@ TEST(TbotsProtobufTest, ball_state_msg_test) auto velocity = Vector(4.20, 4.20); Ball ball(position, velocity, Timestamp::fromSeconds(0)); - auto ball_state_msg = createBallState(ball); + auto ball_state_msg = createBallStateProto(ball); TbotsProtobufTest::assertBallStateMessageFromBall(ball, *ball_state_msg); } diff --git a/src/software/ai/passing/cost_function.cpp b/src/software/ai/passing/cost_function.cpp index 7b5506911a..7746ff7ca7 100644 --- a/src/software/ai/passing/cost_function.cpp +++ b/src/software/ai/passing/cost_function.cpp @@ -475,5 +475,5 @@ void samplePassesForVisualization(const World& world, } } - LOG(VISUALIZE) << *createCostVisualization(costs, num_rows, num_cols); + LOG(VISUALIZE) << *createCostVisualizationProto(costs, num_rows, num_cols); } diff --git a/src/software/ai/passing/pass_generator.cpp b/src/software/ai/passing/pass_generator.cpp index ab9618d9f4..861405123b 100644 --- a/src/software/ai/passing/pass_generator.cpp +++ b/src/software/ai/passing/pass_generator.cpp @@ -36,7 +36,7 @@ PassWithRating PassGenerator::getBestPass(const World& world, { for (const Point& receiving_position : receiving_positions) { - debug_shapes.push_back(*createDebugShape( + debug_shapes.push_back(*createDebugShapeProto( Stadium(world.friendlyTeam().getRobotById(robot_id)->position(), receiving_position, 0.02), std::to_string(debug_shapes.size()) + "pg")); @@ -44,10 +44,10 @@ PassWithRating PassGenerator::getBestPass(const World& world, } std::stringstream stream; stream << "BP:" << std::fixed << std::setprecision(3) << best_pass.rating; - debug_shapes.push_back( - *createDebugShape(Circle(best_pass.pass.receiverPoint(), 0.05), - std::to_string(debug_shapes.size()) + "pg", stream.str())); - LOG(VISUALIZE) << *createDebugShapes(debug_shapes); + debug_shapes.push_back(*createDebugShapeProto( + Circle(best_pass.pass.receiverPoint(), 0.05), + std::to_string(debug_shapes.size()) + "pg", stream.str())); + LOG(VISUALIZE) << *createDebugShapesProto(debug_shapes); } // Generate sample passes across the field for cost visualization diff --git a/src/software/ai/passing/receiver_position_generator.hpp b/src/software/ai/passing/receiver_position_generator.hpp index bd3086c652..eb9ac80d2e 100644 --- a/src/software/ai/passing/receiver_position_generator.hpp +++ b/src/software/ai/passing/receiver_position_generator.hpp @@ -214,18 +214,18 @@ void ReceiverPositionGenerator::visualizeBestReceivingPositionsAndZone { for (unsigned int i = 0; i < top_zones.size(); i++) { - debug_shapes.push_back(*createDebugShape(pitch_division_->getZone(top_zones[i]), - std::to_string(i + 1), - std::to_string(i + 1))); + debug_shapes.push_back( + *createDebugShapeProto(pitch_division_->getZone(top_zones[i]), + std::to_string(i + 1), std::to_string(i + 1))); - debug_shapes.push_back(*createDebugShape( + debug_shapes.push_back(*createDebugShapeProto( Circle( best_receiving_positions.find(top_zones[i])->second.pass.receiverPoint(), 0.15), std::to_string(i + 1) + "rpg", std::to_string(i + 1) + "rpg")); } - LOG(VISUALIZE) << *createDebugShapes(debug_shapes); + LOG(VISUALIZE) << *createDebugShapesProto(debug_shapes); } template diff --git a/src/software/backend/backend.cpp b/src/software/backend/backend.cpp index e3ceb9a8b7..0c4e5821bd 100644 --- a/src/software/backend/backend.cpp +++ b/src/software/backend/backend.cpp @@ -9,7 +9,7 @@ void Backend::receiveRobotStatus(TbotsProto::RobotStatus msg) { SensorProto sensor_msg; *(sensor_msg.add_robot_status_msgs()) = msg; - *(sensor_msg.mutable_backend_received_time()) = *createCurrentTimestamp(); + *(sensor_msg.mutable_backend_received_time()) = *createCurrentTimestampProto(); Subject::sendValueToObservers(sensor_msg); } @@ -17,7 +17,7 @@ void Backend::receiveSSLWrapperPacket(SSLProto::SSL_WrapperPacket msg) { SensorProto sensor_msg; *(sensor_msg.mutable_ssl_vision_msg()) = msg; - *(sensor_msg.mutable_backend_received_time()) = *createCurrentTimestamp(); + *(sensor_msg.mutable_backend_received_time()) = *createCurrentTimestampProto(); Subject::sendValueToObservers(sensor_msg); } @@ -25,7 +25,7 @@ void Backend::receiveSSLReferee(SSLProto::Referee msg) { SensorProto sensor_msg; *(sensor_msg.mutable_ssl_referee_msg()) = msg; - *(sensor_msg.mutable_backend_received_time()) = *createCurrentTimestamp(); + *(sensor_msg.mutable_backend_received_time()) = *createCurrentTimestampProto(); Subject::sendValueToObservers(sensor_msg); } diff --git a/src/software/backend/unix_simulator_backend.cpp b/src/software/backend/unix_simulator_backend.cpp index 66c7d33aaf..9eaf971b09 100644 --- a/src/software/backend/unix_simulator_backend.cpp +++ b/src/software/backend/unix_simulator_backend.cpp @@ -90,7 +90,7 @@ void UnixSimulatorBackend::onValueReceived(TbotsProto::PrimitiveSet primitives) { primitive_output->sendProto(primitives); - LOG(VISUALIZE) << *createNamedValue( + LOG(VISUALIZE) << *createNamedValueProto( "Primitive Hz", static_cast(FirstInFirstOutThreadedObserver< TbotsProto::PrimitiveSet>::getDataReceivedPerSecond())); @@ -100,7 +100,7 @@ void UnixSimulatorBackend::onValueReceived(World world) { world_output->sendProto(*createWorldWithSequenceNumber(world, sequence_number++)); - LOG(VISUALIZE) << *createNamedValue( + LOG(VISUALIZE) << *createNamedValueProto( "World Hz", static_cast( FirstInFirstOutThreadedObserver::getDataReceivedPerSecond())); diff --git a/src/software/er_force_simulator_main.cpp b/src/software/er_force_simulator_main.cpp index 92606942cc..7155b3100d 100644 --- a/src/software/er_force_simulator_main.cpp +++ b/src/software/er_force_simulator_main.cpp @@ -145,7 +145,7 @@ int main(int argc, char** argv) if (!has_sent_world_state_trigger) { auto world_state_received_trigger_msg = - *createWorldStateReceivedTrigger(); + *createWorldStateReceivedTriggerProto(); world_state_received_trigger.sendProto( world_state_received_trigger_msg); has_sent_world_state_trigger = true; diff --git a/src/software/simulated_tests/simulated_er_force_sim_play_test_fixture.cpp b/src/software/simulated_tests/simulated_er_force_sim_play_test_fixture.cpp index 3f7d1bad72..246d67a56b 100644 --- a/src/software/simulated_tests/simulated_er_force_sim_play_test_fixture.cpp +++ b/src/software/simulated_tests/simulated_er_force_sim_play_test_fixture.cpp @@ -92,7 +92,7 @@ void SimulatedErForceSimPlayTestFixture::updatePrimitives( double duration_ms = ::TestUtil::millisecondsSince(start_tick_time); registerFriendlyTickTime(duration_ms); - auto world_msg = createWorld(world_with_updated_game_state); + auto world_msg = createWorldProto(world_with_updated_game_state); simulator_to_update->setYellowRobotPrimitiveSet(*primitive_set_msg, std::move(world_msg)); } diff --git a/src/software/simulated_tests/simulated_er_force_sim_test_fixture.cpp b/src/software/simulated_tests/simulated_er_force_sim_test_fixture.cpp index f825628c46..12844927c0 100644 --- a/src/software/simulated_tests/simulated_er_force_sim_test_fixture.cpp +++ b/src/software/simulated_tests/simulated_er_force_sim_test_fixture.cpp @@ -533,7 +533,7 @@ bool SimulatedErForceSimTestFixture::tickTest( { *friendly_world = friendly_sensor_fusion.getWorld().value(); *enemy_world = enemy_sensor_fusion.getWorld().value(); - LOG(VISUALIZE) << *createWorld(*friendly_world); + LOG(VISUALIZE) << *createWorldProto(*friendly_world); validation_functions_done = validateAndCheckCompletion( terminating_function_validators, non_terminating_function_validators); diff --git a/src/software/world/ball_state_test.cpp b/src/software/world/ball_state_test.cpp index 099473f140..927e1daf07 100644 --- a/src/software/world/ball_state_test.cpp +++ b/src/software/world/ball_state_test.cpp @@ -64,7 +64,7 @@ TEST(BallStateTest, construct_with_protobuf) { BallState ball_state_1(Point(1, -2.3), Vector(0, 0.4), 0.1); Ball ball(ball_state_1, Timestamp()); - std::unique_ptr ball_state_proto = createBallState(ball); + std::unique_ptr ball_state_proto = createBallStateProto(ball); BallState ball_state_2(*ball_state_proto); EXPECT_TRUE(ball_state_1 == ball_state_2); diff --git a/src/software/world/ball_test.cpp b/src/software/world/ball_test.cpp index 4d0870a994..4b9ddba2e4 100644 --- a/src/software/world/ball_test.cpp +++ b/src/software/world/ball_test.cpp @@ -58,7 +58,7 @@ TEST_F(BallTest, construct_with_initial_state) TEST_F(BallTest, construct_with_protobuf) { Ball original_ball(Point(1.0, 1.0), Vector(2.0, 2.0), Timestamp::fromSeconds(3.0)); - std::unique_ptr ball_proto = createBall(original_ball); + std::unique_ptr ball_proto = createBallProto(original_ball); Ball proto_converted_ball(*ball_proto); EXPECT_EQ(original_ball, proto_converted_ball); diff --git a/src/software/world/field_test.cpp b/src/software/world/field_test.cpp index 15b98f179b..04b7ae5dea 100644 --- a/src/software/world/field_test.cpp +++ b/src/software/world/field_test.cpp @@ -209,7 +209,7 @@ TEST_F(FieldTest, construct_with_parameters) TEST_F(FieldTest, construct_with_protobuf) { Field original_field = Field::createSSLDivisionAField(); - auto field_proto = createField(original_field); + auto field_proto = createFieldProto(original_field); Field proto_converted_field(*field_proto); EXPECT_EQ(original_field, proto_converted_field); diff --git a/src/software/world/game_state_test.cpp b/src/software/world/game_state_test.cpp index 2ad740e47f..e850476b84 100644 --- a/src/software/world/game_state_test.cpp +++ b/src/software/world/game_state_test.cpp @@ -69,7 +69,7 @@ TEST(GameStateTest, construct_with_protobuf) { GameState original_game_state; original_game_state.updateRefereeCommand(RefereeCommand::DIRECT_FREE_US); - auto proto_game_state = createGameState(original_game_state); + auto proto_game_state = createGameStateProto(original_game_state); GameState proto_converted_game_state(*proto_game_state); EXPECT_EQ(original_game_state, proto_converted_game_state); diff --git a/src/software/world/robot_test.cpp b/src/software/world/robot_test.cpp index e3bda4b593..4ae2e5f79f 100644 --- a/src/software/world/robot_test.cpp +++ b/src/software/world/robot_test.cpp @@ -79,7 +79,7 @@ TEST_F(RobotTest, construct_with_protobuf) current_time, std::set{RobotCapability::Chip, RobotCapability::Move, RobotCapability::Kick, RobotCapability::Dribble}); - auto robot_proto = createRobot(original_robot); + auto robot_proto = createRobotProto(original_robot); Robot proto_converted_robot(*robot_proto); EXPECT_THAT( diff --git a/src/software/world/team_test.cpp b/src/software/world/team_test.cpp index c0e55065f8..9941ed5a20 100644 --- a/src/software/world/team_test.cpp +++ b/src/software/world/team_test.cpp @@ -85,7 +85,7 @@ TEST_F(TeamTest, construct_with_protobuf) std::vector robot_list = {robot_0, robot_1, robot_2}; Team original_team = Team(robot_list); - auto proto_team = createTeam(original_team); + auto proto_team = createTeamProto(original_team); Team proto_converted_team(*proto_team); // Proto representation of Team does not store the robot_expiry_buffer_duration, so we diff --git a/src/software/world/world_test.cpp b/src/software/world/world_test.cpp index 76059fd78b..5a26b2d361 100644 --- a/src/software/world/world_test.cpp +++ b/src/software/world/world_test.cpp @@ -65,7 +65,7 @@ TEST_F(WorldTest, construction_with_parameters) TEST_F(WorldTest, construct_with_protobuf) { - auto world_proto = createWorld(world); + auto world_proto = createWorldProto(world); World proto_converted_world(*world_proto); // Can not compare the two World objects since TbotsProto::Team does not store the