From 98ed38b2a7108929ccafa361318cb55876dd714a Mon Sep 17 00:00:00 2001 From: Ke Zhang Date: Fri, 19 May 2023 17:14:06 -0700 Subject: [PATCH] Revert "update c++ library" This reverts commit f9e56485410097c49fd89036ab6dfd7598c99207. --- invertedai_cpp/examples/initialize_body.json | 4 +-- .../invertedai/initialize_request.cc | 31 ------------------- .../invertedai/initialize_request.h | 22 ------------- 3 files changed, 1 insertion(+), 56 deletions(-) diff --git a/invertedai_cpp/examples/initialize_body.json b/invertedai_cpp/examples/initialize_body.json index e9f46ae4..6a5d25fd 100755 --- a/invertedai_cpp/examples/initialize_body.json +++ b/invertedai_cpp/examples/initialize_body.json @@ -7,7 +7,5 @@ "get_birdview": false, "get_infractions": false, "random_seed": null, - "location_of_interest": null, - "conditional_agent_states": null, - "conditional_agent_attributes": null + "location_of_interest": null } diff --git a/invertedai_cpp/invertedai/initialize_request.cc b/invertedai_cpp/invertedai/initialize_request.cc index 846382a7..e577909a 100644 --- a/invertedai_cpp/invertedai/initialize_request.cc +++ b/invertedai_cpp/invertedai/initialize_request.cc @@ -11,18 +11,6 @@ InitializeRequest::InitializeRequest(const std::string &body_str) { this->body_json_["num_agents_to_spawn"].is_number_integer() ? this->body_json_["num_agents_to_spawn"].get() : 0; - this->conditional_agent_states_.clear(); - for (const auto &element : this->body_json_["conditional_agent_states"]) { - AgentState agent_state = {element[0], element[1], element[2], element[3]}; - this->conditional_agent_states_.push_back(agent_state); - } - - this->conditional_agent_attributes_.clear(); - for (const auto &element : this->body_json_["conditional_agent_attributes"]) { - AgentAttributes agent_attribute = {element[0], element[1], element[2]}; - this->conditional_agent_attributes_.push_back(agent_attribute); - } - this->states_history_.clear(); for (const auto &elements : this->body_json_["states_history"]) { std::vector agent_states; @@ -135,15 +123,6 @@ std::vector> InitializeRequest::states_history() const { return this->states_history_; } -std::vector InitializeRequest::conditional_agent_states() const { - return this->conditional_agent_states_; -} - -std::vector -InitializeRequest::conditional_agent_attributes() const { - return this->conditional_agent_attributes_; -} - std::vector InitializeRequest::agent_attributes() const { return this->agent_attributes_; } @@ -180,16 +159,6 @@ void InitializeRequest::set_num_agents_to_spawn(int num_agents_to_spawn) { this->num_agents_to_spawn_ = num_agents_to_spawn; } -void InitializeRequest::set_conditional_agent_states( - const std::vector &conditional_agent_states) { - this->conditional_agent_states_ = conditional_agent_states; -} - -void InitializeRequest::set_conditional_agent_attributes( - const std::vector &conditional_agent_attributes) { - this->conditional_agent_attributes_ = conditional_agent_attributes; -} - void InitializeRequest::set_states_history( const std::vector> &states_history) { this->states_history_ = states_history; diff --git a/invertedai_cpp/invertedai/initialize_request.h b/invertedai_cpp/invertedai/initialize_request.h index d256db0a..86c30e36 100644 --- a/invertedai_cpp/invertedai/initialize_request.h +++ b/invertedai_cpp/invertedai/initialize_request.h @@ -15,8 +15,6 @@ class InitializeRequest { private: std::string location_; int num_agents_to_spawn_; - std::vector conditional_agent_states_; - std::vector conditional_agent_attributes_; std::vector> states_history_; std::vector agent_attributes_; std::vector> traffic_light_state_history_; @@ -48,15 +46,6 @@ class InitializeRequest { /** * Get history of agent states. */ - std::vector conditional_agent_states() const; - /** - * Get conditional agent states. - */ - std::vector conditional_agent_attributes() const; - /** - * Get conditional agent attributes. - */ - std::vector> states_history() const; /** * Get static attributes for all agents. @@ -106,17 +95,6 @@ class InitializeRequest { * inner over time, in chronological order. For best results, provide at least * 10 historical states for each agent. */ - void set_conditional_agent_states( - const std::vector &conditional_agent_states); - /** - * Optional conditional agent states when `agent_count` is passed. When - * passed, `agent_count` includes the number of conditional agents passed. - */ - void set_conditional_agent_attributes( - const std::vector &conditional_agent_attributes); - /** - * Optional agent attributes when `conditional_agent_states` is passed. - */ void set_states_history( const std::vector> &states_history); /**