-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tmp] RJD-1057 (4/5): Remove non-API member functions: EntityManager’s member functions forwarded to EntityBase (2/2) #1334
Draft
TauTheLepton
wants to merge
30
commits into
RJD-1057-remove-functions-forwarded-to-entity-base-middle
Choose a base branch
from
RJD-1057-remove-functions-forwarded-to-entity-base-refactor
base: RJD-1057-remove-functions-forwarded-to-entity-base-middle
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…cessary from EntityManager
…o RJD-1057-remove-functions-forwarded-to-entity-base Signed-off-by: Mateusz Palczuk <[email protected]>
…ed-to-entity-base' into RJD-1057-remove-functions-forwarded-to-entity-base Signed-off-by: Mateusz Palczuk <[email protected]>
…o RJD-1057-remove-functions-forwarded-to-entity-base Signed-off-by: Mateusz Palczuk <[email protected]>
Signed-off-by: Mateusz Palczuk <[email protected]>
Signed-off-by: Mateusz Palczuk <[email protected]>
…le' into RJD-1057-remove-functions-forwarded-to-entity-base-with-middle Signed-off-by: Mateusz Palczuk <[email protected]>
…le' into RJD-1057-remove-functions-forwarded-to-entity-base-with-middle Signed-off-by: Mateusz Palczuk <[email protected]>
TauTheLepton
force-pushed
the
RJD-1057-remove-functions-forwarded-to-entity-base-refactor
branch
from
July 31, 2024 14:16
c9057f9
to
ff759fe
Compare
yamacir-kit
deleted the branch
RJD-1057-remove-functions-forwarded-to-entity-base-middle
September 18, 2024 01:42
yamacir-kit
deleted the
RJD-1057-remove-functions-forwarded-to-entity-base-refactor
branch
September 18, 2024 01:43
TauTheLepton
restored the
RJD-1057-remove-functions-forwarded-to-entity-base-refactor
branch
October 2, 2024 07:32
…le' into RJD-1057-remove-functions-forwarded-to-entity-base-refactor Signed-off-by: Mateusz Palczuk <[email protected]>
…ded-to-entity-base-middle' into RJD-1057-remove-functions-forwarded-to-entity-base-refactor
…le' into RJD-1057-remove-functions-forwarded-to-entity-base-refactor
dmoszynski
changed the title
[tmp] Remove non-API member functions: EntityManager’s member functions forwarded to EntityBase (2/2)
[tmp] RJD-1057 (4/5): Remove non-API member functions: EntityManager’s member functions forwarded to EntityBase (2/2)
Oct 15, 2024
…le' into RJD-1057-remove-functions-forwarded-to-entity-base-refactor
…le' into RJD-1057-remove-functions-forwarded-to-entity-base-refactor
…le' into RJD-1057-remove-functions-forwarded-to-entity-base-refactor
Quality Gate passedIssues Measures |
…le' into RJD-1057-remove-functions-forwarded-to-entity-base-refactor
…le' into RJD-1057-remove-functions-forwarded-to-entity-base-refactor
…le' into RJD-1057-remove-functions-forwarded-to-entity-base-refactor Signed-off-by: Mateusz Palczuk <[email protected]>
…ed-to-entity-base-middle' into RJD-1057-remove-functions-forwarded-to-entity-base-refactor Signed-off-by: Mateusz Palczuk <[email protected]>
Signed-off-by: Mateusz Palczuk <[email protected]>
Signed-off-by: Mateusz Palczuk <[email protected]>
Signed-off-by: Mateusz Palczuk <[email protected]>
Signed-off-by: Mateusz Palczuk <[email protected]>
Signed-off-by: Mateusz Palczuk <[email protected]>
Quality Gate passedIssues Measures |
No regressions confirmed here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
DO NOT MERGE | THIS IS A TEMPORARY PR | WHEN THE RIGHT TIME COMES, TARGET WILL BE CHANGED TO MASTER
Abstract
This pull request mainly consists of refactoring and introduces changes in the
API
andEntityManager
.Background
This pull request is an extension of the #1473.
Due to the fact that these pull requests combined would have been too large for a review, they have been split into two.
As a result of the previous PR, changes have been made to the
API
andEntityManager
classes.These changes created a great opportunity to declutter / tidy up the code of these classes.
This pull request consists of the code cleanup and refactoring. Many of the changes introduced are just changes to the order of functions inside the implementation file to keep them grouped by functionality and consistent with the header file.
Some other minor changes have been introduced as well, like the addition of the
ostream_helpers.cpp
.What is more, the functions
EntityManager::spawnEntity
and (most importantly)API::spawn
have been modified to return the Entity object pointer:Before:
scenario_simulator_v2/simulation/traffic_simulator/include/traffic_simulator/api/api.hpp
Lines 134 to 140 in 5fa7281
After:
scenario_simulator_v2/simulation/traffic_simulator/include/traffic_simulator/api/api.hpp
Lines 108 to 113 in 61d9686
This change has been applied in the whole codebase, which includes multiple cpp mock scenarios.
Cpp mock scenarios have been all changed like the following:
Before:
scenario_simulator_v2/mock/cpp_mock_scenarios/src/follow_front_entity/accelerate_and_follow.cpp
Lines 68 to 75 in 5fa7281
After:
scenario_simulator_v2/mock/cpp_mock_scenarios/src/follow_front_entity/accelerate_and_follow.cpp
Lines 68 to 74 in 61d9686
Details
Below are all changes made in this PR
API
configuration
toconfiguration_
API::init()
member functionscenario_simulator_v2/simulation/traffic_simulator/src/api/api.cpp
Lines 21 to 35 in 61d9686
setSiulationStepTime
scenario_simulator_v2/simulation/traffic_simulator/src/api/api.cpp
Lines 39 to 53 in 61d9686
getZMQSocketPort
in favor of usinggetROS2Parameter
spawn
functionsscenario_simulator_v2/simulation/traffic_simulator/include/traffic_simulator/api/api.hpp
Lines 134 to 233 in 5fa7281
have been combined in 1
spawn
functionscenario_simulator_v2/simulation/traffic_simulator/include/traffic_simulator/api/api.hpp
Lines 108 to 176 in 61d9686
FORWARD_TO_ENTITY_MANAGER
macro have been converted to standard functionsisAnyEgoSpawned
getEgoEntity
isEntityExist
getEntityNames
getEntityOrNullptr
resetBehaviorPlugin
isNpcLogicStarted
getHdmapUtils
All other changes are minor refactoring or just reordering functions in the file, which GitHub shows as changes.
EntityBase
as
scenario_simulator_v2/simulation/traffic_simulator/include/traffic_simulator/entity/entity_base.hpp
Lines 66 to 85 in 61d9686
getGoalPoses
return typeauto getGoalPoses() -> std::vector<CanonicalizedLaneletPose>
→
auto getGoalPoses() -> std::vector<geometry_msgs::msg::Pose>
All other changes are minor refactoring or just reordering functions in the file, which GitHub shows as changes.
EntityManager
configuration
toconfiguration_
getOrigin
to free functionscenario_simulator_v2/simulation/traffic_simulator/include/traffic_simulator/utils/node_parameters.hpp
Lines 42 to 43 in 61d9686
getObstacle
getWaypoints
getGoalPoses
getPedestrianParameters
getVehicleParameters
spawnEntity
function now returns a pointer to the created entity.createPublisher
createSubscription
All other changes are minor refactoring or just reordering functions in the file, which GitHub shows as changes.
MiscObjectEntity
getGoalPoses
return typeauto getGoalPoses() -> std::vector<CanonicalizedLaneletPose>
→
auto getGoalPoses() -> std::vector<geometry_msgs::msg::Pose>
PedestrianEntity
getGoalPoses
return typeauto getGoalPoses() -> std::vector<CanonicalizedLaneletPose>
→
auto getGoalPoses() -> std::vector<geometry_msgs::msg::Pose>
auto getParameters() const -> const traffic_simulator_msgs::msg::PedestrianParameters &;
VehicleEntity
getGoalPoses
return typeauto getGoalPoses() -> std::vector<CanonicalizedLaneletPose>
→
auto getGoalPoses() -> std::vector<geometry_msgs::msg::Pose>
auto getParameters() const -> const traffic_simulator_msgs::msg::VehicleParameters &;
References
INTERNAL LINK 1
INTERNAL LINK 2
Destructive Changes
--
Known Limitations
--