Comments (21)
用Overlap id可以找到哪些路是connecting road, 然后每个路有successor predecessor可以找到incoming和successor。这些信息都在hdmap文件里,您有其他需要的信息吗?
from apollo.
但我目前只有base_map.bin文件,但是路口具体的车道的前后左右是没有的
from apollo.
主要找不到路口每个车道的位置关系
from apollo.
commonroad的路口前继,后继没有具体位置关系
from apollo.
您需要的是类似这样的吗,蓝色的是junction,然后画出了junction里的lane,以及junction lane的pred/succ
from apollo.
但是目前应该是抓不到这些信息的,从base_map文件中
from apollo.
我需要以lane的位置信息表示junction
from apollo.
但是目前应该是抓不到这些信息的,从base_map文件中
那个图就是从base map文件画出来的。要不您举个例子什么是“以lane的位置信息表示junction”
from apollo.
就是左边这个,他数字对应的是lane_id,其他是对应的位置关系,在路口的左右还是前后,这在apollo的地图中似乎找不到
from apollo.
可以通过base_map.bin知道通过lane A(红色)进入路口内的lane B(黄色)然后出路口后到达lane C(蓝色)。您需要的是这个关系吗
from apollo.
对
from apollo.
map_relation.zip
这是分析HD Map并画出上面那幅图的代码,您看看。
from apollo.
from baidu_apollo_proto.proto_v8.modules.common_msgs.map_msgs.map_pb2 import Map,这个接口在哪里了
from apollo.
这是中心线,我处理的是车道线
from apollo.
from baidu_apollo_proto.proto_v8.modules.common_msgs.map_msgs.map_pb2 import Map,这个接口在哪里了
这是中心线,我处理的是车道线
from baidu_apollo_proto.proto_v8.modules.common_msgs.map_msgs.map_pb2 import Map
from matplotlib import pyplot as plt
map = Map()
map.ParseFromString(open("borregas_ave.bin", "rb").read())
plotted_lanes = set()
def get_overlap_ids(obj):
return [overlap.id for overlap in obj.overlap_id]
def get_left_lane_boundary(lane):
points = []
for p in lane.left_boundary.curve.segment[0].line_segment.point:
points.append((p.x, p.y))
return points
def get_right_lane_boundary(lane):
points = []
for p in lane.right_boundary.curve.segment[0].line_segment.point:
points.append((p.x, p.y))
return points
def label_lane(lane):
points = lane.central_curve.segment[0].line_segment.point
plt.text(points[0].x, points[0].y, lane.id.id)
def plot_lane_boundary(lane, color):
lhs = get_left_lane_boundary(lane)
rhs = get_right_lane_boundary(lane)
lane_points = lhs + rhs[::-1]
lane_points.append(lane_points[0])
plt.fill(
[p[0] for p in lane_points],
[p[1] for p in lane_points],
alpha=0.5,
color=color,
)
lane_objs = dict()
for lane in map.lane:
lane_objs[lane.id.id] = lane
for junc in map.junction:
junc_ids = get_overlap_ids(junc)
points = junc.polygon.point
x = [point.x for point in points]
y = [point.y for point in points]
x.append(x[0])
y.append(y[0])
plt.fill(x, y, alpha=0.5)
for lane in map.lane:
if lane.id.id in plotted_lanes:
continue
lane_ids = get_overlap_ids(lane)
if any(junc_id in lane_ids for junc_id in junc_ids):
label_lane(lane)
plot_lane_boundary(lane, "black")
plotted_lanes.add(lane.id.id)
# predecessor
for pred in lane.predecessor_id:
pred_lane = lane_objs[pred.id]
label_lane(pred_lane)
plot_lane_boundary(pred_lane, "red")
plotted_lanes.add(pred_lane.id.id)
# successor
for succ in lane.successor_id:
succ_lane = lane_objs[succ.id]
label_lane(succ_lane)
plot_lane_boundary(succ_lane, "blue")
plt.text(x[0], y[0], succ.id)
plotted_lanes.add(succ_lane.id.id)
break
plt.show()
from apollo.
ok,thanks
from apollo.
borregas_ave.zip
我需要的是将这个地图文件转为xml格式的示例文件,他在路口目前是只能手动输入
https://gitlab.lrz.de/tum-cps/commonroad-apollo-interface
这个里面的commonroad_connect.py有很大的参考意义,但目前还没有太好的进展,
https://gitlab.lrz.de/tum-cps/commonroad-scenarios/-/tree/2020a_scenarios/scenarios/interactive/SUMO/CHN_Cho-2_5_I-1-1?ref_type=heads
最终需要的是这种文件
from apollo.
#15384 (comment)
这个每个lanelet在xml中都可以提取出来;主要还是路口需要做具体的标注
from apollo.
from apollo.
我看了看您发的python代码,里面这部分
def parse_lane(scenario, lane):
step = 10.
for lane_id_, data in lane.items():
lanelet_ = Lanelet(
np.array(data['left_boundary']),
np.array(data['central_boundary']),
np.array(data['right_boundary']),
lane_id_,
data['pred_ids'],
data['succ_ids'],
data['l_ids'][0],
data['l_ids'][1],
data['r_ids'][0],
data['r_ids'][1],
data['speed_limit']
)
# add one lanelet to the scenario.
scenario.add_objects(lanelet_)
就可以把Apollo的lane变成Common Road里的lanelet了吧?Left boundary, central, right boundary都可以通过上面代码读到。
from apollo.
对
from apollo.
Related Issues (20)
- Apollo9.0编译报错 HOT 3
- Avoiding Lane Closeness in Curved Path Generation
- What is the difference between GetRoadWidth and GetLaneWidth in reference_line.cc? HOT 1
- apollo9.0 运行camera_detection_single_stage报Eigen对齐错误
- A kind reminder: shell-command-injection-from-environment in gen.js
- 请问,这类codeql的提示值得处理吗?
- modules/perception/camera_detection_bev/detector/petr/bev_obstacle_detector.h中的k_data
- Apollo LiDAR perception model fails to detect obstacles under foggy and rainy conditions.
- HDMaps compatible with Apollo open datasets from San Fracisco and Daoxiang Lake
- apollo map shift HOT 3
- Localization module launch error due to missing imu transform HOT 5
- Some questions about `buildtool` HOT 1
- Failed to load default routing. Please make sure the file exists at /apollo/modules/map/data/demo_default_cycle_routing.txt HOT 3
- Planning module frequently fails to make a driving plan HOT 3
- PathDecider in Planning Module
- How to convert XODR files to Apollo 9.0 maps HOT 2
- apollo7.0 piecewise-jerk qp planning problem
- 如何调整坐标系使lidar检测障碍物与点云匹配
- Is it possible to point out a GPS coordinate and vehicle will build a route to this point without a HD map? HOT 1
- 使用apollo官方脚本安装docker时报错curl download.docker.com/linux/ubntu/gpg 链接超时 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo.