Skip to content

Commit

Permalink
use_sim_time used in concealer initialization
Browse files Browse the repository at this point in the history
Signed-off-by: Paweł Lech <[email protected]>
  • Loading branch information
pawellech1 committed Mar 5, 2024
1 parent 7ef5cdc commit 5d86907
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions simulation/traffic_simulator/src/entity/ego_entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ static auto getParameter(const std::string & name, T value = {})
{
rclcpp::Node node{"get_parameter", "simulation"};

node.declare_parameter<T>(name, value);
if (!node.has_parameter(name)) {
node.declare_parameter<T>(name, value);
}
node.get_parameter<T>(name, value);

return value;
Expand All @@ -67,7 +69,9 @@ auto EgoEntity::makeFieldOperatorApplication(const Configuration & configuration
: Configuration::Pathname(rviz_config).string()),
"scenario_simulation:=true", "use_foa:=false",
"perception/enable_traffic_light:=" +
std::string((architecture_type >= "awf/universe/20230906") ? "true" : "false"))
std::string((architecture_type >= "awf/universe/20230906") ? "true" : "false"),
"use_sim_time:=" +
std::string(getParameter<bool>("use_sim_time") ? "true" : "false"))
: std::make_unique<
concealer::FieldOperatorApplicationFor<concealer::AutowareUniverse>>();
} else {
Expand Down

0 comments on commit 5d86907

Please sign in to comment.