-
Notifications
You must be signed in to change notification settings - Fork 61
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
base: master
Are you sure you want to change the base?
Conversation
…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]>
c9057f9
to
ff759fe
Compare
…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
…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
…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]>
No regressions confirmed here. |
…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]>
…le' into RJD-1057-remove-functions-forwarded-to-entity-base-refactor
…le' into RJD-1057-remove-functions-forwarded-to-entity-base-refactor
…ed-to-entity-base-middle' into RJD-1057-remove-functions-forwarded-to-entity-base-refactor Signed-off-by: Mateusz Palczuk <[email protected]>
This pull-request was closed automatically, because the target branch was deleted due to merging its pull-request. |
…ity-base-refactor
@TauTheLepton Could you fix typos pointed out by spell-check CI? |
Signed-off-by: Mateusz Palczuk <[email protected]>
Done Please note, that there is an error in "Documentation" check in CI. I believe it is not caused by my changes. |
…ity-base-refactor
…ity-base-refactor
…ity-base-refactor
…ity-base-refactor
|
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
--