Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
59578d0a
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
59578d0a
编写于
5月 10, 2019
作者:
J
JasonZhou404
提交者:
HongyiSun
5月 10, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: openspace: code deprecations
上级
9b4fce78
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
3 addition
and
732 deletion
+3
-732
modules/planning/open_space/constraints_formulation/BUILD
modules/planning/open_space/constraints_formulation/BUILD
+0
-28
modules/planning/open_space/constraints_formulation/open_space_ROI.cc
...ning/open_space/constraints_formulation/open_space_ROI.cc
+0
-518
modules/planning/open_space/constraints_formulation/open_space_ROI.h
...nning/open_space/constraints_formulation/open_space_ROI.h
+0
-182
modules/planning/open_space/tools/BUILD
modules/planning/open_space/tools/BUILD
+0
-0
modules/planning/open_space/tools/distance_approach_problem_wrapper.cc
...ing/open_space/tools/distance_approach_problem_wrapper.cc
+0
-0
modules/planning/open_space/tools/hybrid_a_star_wrapper.cc
modules/planning/open_space/tools/hybrid_a_star_wrapper.cc
+0
-0
modules/planning/open_space/tools/open_space_roi_wrapper.cc
modules/planning/open_space/tools/open_space_roi_wrapper.cc
+0
-0
modules/tools/open_space_visualization/distance_approach_python_interface.py
...space_visualization/distance_approach_python_interface.py
+1
-2
modules/tools/open_space_visualization/hybrid_a_star_python_interface.py
...pen_space_visualization/hybrid_a_star_python_interface.py
+1
-1
modules/tools/open_space_visualization/open_space_roi_interface.py
...ools/open_space_visualization/open_space_roi_interface.py
+1
-1
未找到文件。
modules/planning/open_space/constraints_formulation/BUILD
已删除
100644 → 0
浏览文件 @
9b4fce78
load
(
"//tools:cpplint.bzl"
,
"cpplint"
)
package
(
default_visibility
=
[
"//visibility:public"
])
cc_library
(
name
=
"open_space_ROI"
,
srcs
=
[
"open_space_ROI.cc"
,
],
hdrs
=
[
"open_space_ROI.h"
,
],
copts
=
[
"-DMODULE_NAME=
\\\"
planning
\\\"
"
],
deps
=
[
"//cyber/common:log"
,
"//modules/common/configs:vehicle_config_helper"
,
"//modules/common/vehicle_state/proto:vehicle_state_proto"
,
"//modules/map/hdmap:hdmap_util"
,
"//modules/map/pnc_map"
,
"//modules/planning/common:frame"
,
"//modules/planning/common:indexed_queue"
,
"//modules/planning/common:obstacle"
,
"//modules/planning/common:planning_gflags"
,
"@eigen"
,
],
)
cpplint
()
modules/planning/open_space/constraints_formulation/open_space_ROI.cc
已删除
100644 → 0
浏览文件 @
9b4fce78
此差异已折叠。
点击以展开。
modules/planning/open_space/constraints_formulation/open_space_ROI.h
已删除
100644 → 0
浏览文件 @
9b4fce78
/******************************************************************************
* Copyright 2018 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
/**
* @file
**/
#pragma once
#include <algorithm>
#include <memory>
#include <string>
#include <vector>
#include "Eigen/Dense"
#include "cyber/common/log.h"
#include "modules/common/configs/proto/vehicle_config.pb.h"
#include "modules/common/configs/vehicle_config_helper.h"
#include "modules/common/math/vec2d.h"
#include "modules/common/vehicle_state/proto/vehicle_state.pb.h"
#include "modules/map/hdmap/hdmap_util.h"
#include "modules/map/pnc_map/path.h"
#include "modules/map/pnc_map/pnc_map.h"
#include "modules/map/proto/map_id.pb.h"
#include "modules/planning/common/frame.h"
#include "modules/planning/common/indexed_queue.h"
#include "modules/planning/common/obstacle.h"
#include "modules/planning/common/planning_gflags.h"
namespace
apollo
{
namespace
planning
{
class
OpenSpaceROI
{
public:
explicit
OpenSpaceROI
(
const
PlannerOpenSpaceConfig
&
planner_open_space_config
);
bool
GenerateRegionOfInterest
(
Frame
*
frame
);
const
size_t
obstacles_num
()
{
return
obstacles_num_
;
}
const
Eigen
::
MatrixXi
&
obstacles_edges_num
()
{
return
obstacles_edges_num_
;
}
const
std
::
vector
<
std
::
vector
<
common
::
math
::
Vec2d
>>
&
obstacles_vertices_vec
()
{
return
obstacles_vertices_vec_
;
}
const
Eigen
::
MatrixXd
&
obstacles_A
()
{
return
obstacles_A_
;
}
const
Eigen
::
MatrixXd
&
obstacles_b
()
{
return
obstacles_b_
;
}
const
double
origin_heading
()
{
return
origin_heading_
;
}
const
common
::
math
::
Vec2d
&
origin_point
()
{
return
origin_point_
;
}
const
std
::
vector
<
double
>
&
ROI_xy_boundary
()
{
return
ROI_xy_boundary_
;
}
const
std
::
vector
<
double
>
&
open_space_end_pose
()
{
return
open_space_end_pose_
;
}
private:
// @brief main process to compute and load info needed by open space planner
bool
GetOpenSpaceInfo
();
// @brief generate the path by vehicle location and return the target parking
// spot on that path
bool
GetMapInfo
(
hdmap
::
ParkingSpaceInfoConstPtr
*
target_parking_spot
,
std
::
shared_ptr
<
hdmap
::
Path
>
*
nearby_path
);
// @brief search target parking spot on the path by vehicle location, if
// no return a nullptr in target_parking_spot
void
SearchTargetParkingSpotOnPath
(
std
::
shared_ptr
<
hdmap
::
Path
>
*
nearby_path
,
hdmap
::
ParkingSpaceInfoConstPtr
*
target_parking_spot
);
// @brief if not close enough to parking spot, return false
bool
CheckDistanceToParkingSpot
(
std
::
shared_ptr
<
hdmap
::
Path
>
*
nearby_path
,
hdmap
::
ParkingSpaceInfoConstPtr
*
target_parking_spot
);
// @brief "Region of Interest", load open space xy boundary and parking
// space boundary from pnc map (only for T shape parking space) to
// ROI_xy_boundary_ and ROI_parking_boundary_
bool
GetOpenSpaceROI
();
// @brief Represent the obstacles in vertices and load it into
// obstacles_vertices_vec_ in clock wise order. Take different approach
// towards warm start and distance approach
bool
VPresentationObstacle
();
// @brief Transform the vertice presentation of the obstacles into linear
// inequality as Ax>b
bool
HPresentationObstacle
();
// @brief Helper function for HPresentationObstacle()
bool
ObsHRep
(
const
size_t
&
obstacles_num
,
const
Eigen
::
MatrixXi
&
obstacles_edges_num
,
const
std
::
vector
<
std
::
vector
<
common
::
math
::
Vec2d
>>
&
obstacles_vertices_vec
,
Eigen
::
MatrixXd
*
A_all
,
Eigen
::
MatrixXd
*
b_all
);
private:
const
hdmap
::
HDMap
*
hdmap_
=
nullptr
;
ThreadSafeIndexedObstacles
*
obstacles_by_frame_
;
// @brief obstacles total num including perception obstacles and parking space
// boundary
size_t
obstacles_num_
=
0
;
common
::
VehicleState
vehicle_state_
;
// @brief the dimension needed for A and b matrix dimension in H
// representation
Eigen
::
MatrixXi
obstacles_edges_num_
;
// @brief in the order of [x_min, x_max, y_min, y_max];
std
::
vector
<
double
>
ROI_xy_boundary_
;
// @brief vectors in the order of left parking bound, parking end bound, right
// parking bound, opposite lane. And the vertices order is counter-clockwise
// the viewing angle and the vertice sequence
//
// 8------------------------7 <- up_boundary
//
// left_boundary |-> 1-------2 5----------6 <-| right_boundary
// |-> | | <-|
// | |
// | |
// |3------4|
// ^
// down_boundary
// ROI_parking_boundary_ in form of {{1,2,3},{3,4},{4,5,6},{7,8}}
std
::
vector
<
std
::
vector
<
common
::
math
::
Vec2d
>>
ROI_parking_boundary_
;
// @brief open_space end configuration in order of x, y, heading and speed.
// Speed is set to be always zero now for parking
std
::
vector
<
double
>
open_space_end_pose_
;
// @brief vector storing the vertices of obstacles in counter-clock-wise order
std
::
vector
<
std
::
vector
<
common
::
math
::
Vec2d
>>
obstacles_vertices_vec_
;
// @brief Linear inequality representation of the obstacles Ax>b
Eigen
::
MatrixXd
obstacles_A_
;
Eigen
::
MatrixXd
obstacles_b_
;
// @brief origin heading for planning space rotation
double
origin_heading_
=
0.0
;
// @brief origin point for scaling down the numeric value of the optimization
// problem in order of x , y
common
::
math
::
Vec2d
origin_point_
;
// @brief parking_spot_heading_ is heading the direction pointing away from
// the lane
double
parking_spot_heading_
=
0.0
;
// @brief parking_spot_id from routing
std
::
string
target_parking_spot_id_
=
""
;
PlannerOpenSpaceConfig
planner_open_space_config_
;
apollo
::
common
::
VehicleParam
vehicle_params_
;
};
}
// namespace planning
}
// namespace apollo
modules/
tools/open_space_visualization
/BUILD
→
modules/
planning/open_space/tools
/BUILD
浏览文件 @
59578d0a
文件已移动
modules/
tools/open_space_visualization
/distance_approach_problem_wrapper.cc
→
modules/
planning/open_space/tools
/distance_approach_problem_wrapper.cc
浏览文件 @
59578d0a
文件已移动
modules/
tools/open_space_visualization
/hybrid_a_star_wrapper.cc
→
modules/
planning/open_space/tools
/hybrid_a_star_wrapper.cc
浏览文件 @
59578d0a
文件已移动
modules/
tools/open_space_visualization
/open_space_roi_wrapper.cc
→
modules/
planning/open_space/tools
/open_space_roi_wrapper.cc
浏览文件 @
59578d0a
文件已移动
modules/tools/open_space_visualization/distance_approach_python_interface.py
浏览文件 @
59578d0a
...
...
@@ -23,8 +23,7 @@ from ctypes import POINTER
import
math
lib
=
cdll
.
LoadLibrary
(
'/apollo/bazel-bin/modules/tools/open_space_visualization/distance_approach_problem_wrapper_lib.so'
)
'/apollo/bazel-bin/modules/planning/open_space/tools/distance_approach_problem_wrapper_lib.so'
)
class
DistancePlanner
(
object
):
def
__init__
(
self
):
...
...
modules/tools/open_space_visualization/hybrid_a_star_python_interface.py
浏览文件 @
59578d0a
...
...
@@ -23,7 +23,7 @@ from ctypes import POINTER
import
math
lib
=
cdll
.
LoadLibrary
(
'/apollo/bazel-bin/modules/
tools/open_space_visualization
/hybrid_a_star_wrapper_lib.so'
)
'/apollo/bazel-bin/modules/
planning/open_space/tools
/hybrid_a_star_wrapper_lib.so'
)
class
HybridAStarPlanner
(
object
):
...
...
modules/tools/open_space_visualization/open_space_roi_interface.py
浏览文件 @
59578d0a
...
...
@@ -21,7 +21,7 @@ import math
from
ctypes
import
cdll
,
c_ushort
,
c_int
,
c_char_p
,
c_double
,
POINTER
lib
=
cdll
.
LoadLibrary
(
'/apollo/bazel-bin/modules/
tools/open_space_visualization
/open_space_roi_wrapper_lib.so'
)
'/apollo/bazel-bin/modules/
planning/open_space/tools
/open_space_roi_wrapper_lib.so'
)
class
open_space_roi
(
object
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录