Skip to content

Commit

Permalink
Planning : fix open space planner lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Capri2014 committed Aug 28, 2018
1 parent d0518e3 commit db7c940
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ bool DistanceApproachIPOPTInterface::get_bounds_info(int n, double* x_l,
for (std::size_t i = 1; i <= horizon_ + 1; ++i) {
for (std::size_t j = 1; j <= vObsum_; ++j) {
x_l[i * vObsum_ + j] = 0.0;
// TODO:(QiL) refine this variables limits
// TODO(QiL): refine this variables limits
x_u[i * vObsum_ + j] = 100.0;

++variable_index;
Expand All @@ -177,7 +177,7 @@ bool DistanceApproachIPOPTInterface::get_bounds_info(int n, double* x_l,
for (std::size_t i = 1; i <= horizon_ + 1; ++i) {
for (std::size_t j = 1; j <= 4 * nOb_; ++j) {
x_l[i * 4 * nOb_ + j] = 0.0;
// TODO:(QiL) refine this variables limits
// TODO(QiL): refine this variables limits
x_u[i * 4 * nOb_ + j] = 100.0;

++variable_index;
Expand Down
7 changes: 4 additions & 3 deletions modules/planning/planner/open_space/open_space_planner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ apollo::common::Status OpenSpacePlanner::Plan(
"Distance approach problem failed to solve");
}

// TODO(QiL): Step 9 : Publish trajectoryPoint in planning trajectory
// TODO(QiL): Step 9 : Publish trajectoryPoint in planning trajectory, i.e.
// Fullfil frame.
return Status::OK();
}

Expand All @@ -174,8 +175,8 @@ Status ObsHRep(const std::size_t& nOb, const Eigen::MatrixXd& vOb,
// start building H representation
// TODO(QiL) : Add basic sanity check for H representation.
for (std::size_t i = 1; i != nOb; ++i) {
Eigen::MatrixXd A_i(int(vOb(i - 1, 0)), 2);
Eigen::MatrixXd b_i(int(vOb(i - 1, 0)), 1);
Eigen::MatrixXd A_i(static_cast<int>(vOb(i - 1, 0)), 2);
Eigen::MatrixXd b_i(static_cast<int>(vOb(i - 1, 0)), 1);

// take two subsequent vertices, and computer hyperplane
for (int j = 1; j != vOb(i, 1); ++j) {
Expand Down
5 changes: 5 additions & 0 deletions modules/planning/planner/open_space/open_space_planner.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
#include "modules/planning/planner/planner.h"
#include "modules/planning/proto/planning_config.pb.h"

/*
Initially inspired by "Optimization-Based Collision Avoidance" from Xiaojing
Zhanga , Alexander Linigerb and Francesco Borrellia
*/

/**
* @namespace apollo::planning
* @brief apollo::planning
Expand Down

0 comments on commit db7c940

Please sign in to comment.