Skip to content

Commit

Permalink
Planning: define inference input output object
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonZhou404 authored and xiaoxq committed May 19, 2020
1 parent 55938da commit 9564687
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@ namespace planning {

BirdviewImgFeatureRenderer::BirdviewImgFeatureRenderer() {}

// TODO(Jinyun): take map name from upstream and move to conf
static const char ROADMAP_IMG_PATH[] =
"/apollo/modules/planning/data/sunnyvale_with_two_offices.png";
static const char SPEEDLIMITMAP_IMG_PATH[] =
"/apollo/modules/planning/data/sunnyvale_with_two_offices_speedlimit.png";

bool BirdviewImgFeatureRenderer::Init(const PlanningSemanticMapConfig& config) {
config_ = config;

// TODO(Jinyun): take map name from upstream and move to conf
std::string ROADMAP_IMG_PATH =
"/apollo/modules/planning/data/"
"sunnyvale_with_two_offices.png";
std::string SPEEDLIMITMAP_IMG_PATH =
"/apollo/modules/planning/data/"
"sunnyvale_with_two_offices_speedlimit.png";
bool roadmap_img_status = LoadRoadMap(ROADMAP_IMG_PATH);
bool speedlimit_img_status = LoadSpeedlimitMap(SPEEDLIMITMAP_IMG_PATH);

Expand Down
3 changes: 3 additions & 0 deletions modules/planning/learning_based/model_inference/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ cc_library(
name = "model_inference",
hdrs = ["model_inference.h"],
copts = ["-DMODULE_NAME=\\\"planning\\\""],
deps = [
"//modules/planning/proto:learning_data_proto"
],
)

cc_library(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include <string>

#include "modules/planning/proto/learning_data.pb.h"

namespace apollo {
namespace planning {

Expand Down Expand Up @@ -51,7 +53,7 @@ class ModelInference {
/**
* @brief inference a learned model
*/
virtual bool Inference() = 0;
virtual bool Inference(LearningDataFrame* learning_data_frame) = 0;
};

} // namespace planning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class TrajectoryConvRnnInference : public ModelInference {
/**
* @brief inference a learned model
*/
bool Inference() override;
bool Inference(LearningDataFrame* learning_data_frame) override;
};

} // namespace planning
Expand Down

0 comments on commit 9564687

Please sign in to comment.