message: setting behavior status in prediction settings
diff: @@ -32,20 +32,28 @@ PredictionSettings::PredictionSettings(
  void PredictionSettings::ApplySettings(
  bark::world::ObservedWorld& observed_world) const {
  - observed_world.SetEgoBehaviorModel(
  - BehaviorModelPtr(ego_prediction_model_->Clone()));
  + // TODO: Clean up HACK to keep Behavior Status
  + auto ego_behavior_model_ptr =
  + BehaviorModelPtr(ego_prediction_model_->Clone());
  + ego_behavior_model_ptr->SetBehaviorStatus(
  + observed_world.GetEgoBehaviorModel()->GetBehaviorStatus());
  + observed_world.SetEgoBehaviorModel(ego_behavior_model_ptr);
  +
  if (default_prediction_model_) {
  for (const auto& agent : observed_world.GetOtherAgents()) {
  if (agent.second->GetBehaviorStatus() == BehaviorStatus::VALID &&
  agent.second->IsValidAtTime(observed_world.GetWorldTime())) {
  if (specific_prediction_agents_.count(agent.first) == 0) {
  - observed_world.SetBehaviorModel(
  - agent.first,
  - BehaviorModelPtr(default_prediction_model_->Clone()));
  - // LOG(INFO) << "using " << agent.first << " as multi-agent";
  + auto other_behavior_model_ptr =
  + BehaviorModelPtr(default_prediction_model_->Clone());
  + other_behavior_model_ptr->SetBehaviorStatus(
  + default_prediction_model_->GetBehaviorStatus());
  + observed_world.SetBehaviorModel(agent.first,
  + other_behavior_model_ptr);
  + // VLOG(1) << "using " << agent.first << " as multi-agent";
  }
  } else {
  - // LOG(INFO) << "using BehaviorNotStarted for " << agent.first << " (not
  + // VLOG(1) << "using BehaviorNotStarted for " << agent.first << " (not
  // started yet)";
  observed_world.SetBehaviorModel(
  agent.first, std::make_shared<BehaviorNotStarted>(nullptr));
  @@ -55,8 +63,11 @@ void PredictionSettings::ApplySettings(
  if (specific_prediction_model_) {
  for (const auto& agent_id : specific_prediction_agents_) {
  // LOG(INFO) << "setting specific model for " << agent_id;
  - observed_world.SetBehaviorModel(
  - agent_id, BehaviorModelPtr(specific_prediction_model_->Clone()));
  + auto other_behavior_model_ptr =
  + BehaviorModelPtr(specific_prediction_model_->Clone());
  + other_behavior_model_ptr->SetBehaviorStatus(
  + default_prediction_model_->GetBehaviorStatus());
  + observed_world.SetBehaviorModel(agent_id, other_behavior_model_ptr);
  }
  }
  }
  