Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
d9ea4d28
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,发现更多精彩内容 >>
提交
d9ea4d28
编写于
2月 05, 2018
作者:
D
Dong Li
提交者:
Jiangtao Hu
2月 05, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added script for easier map generation from xy file
上级
948569e3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
96 addition
and
0 deletion
+96
-0
scripts/create_map_from_mobileye.sh
scripts/create_map_from_mobileye.sh
+0
-0
scripts/create_map_from_xy.sh
scripts/create_map_from_xy.sh
+96
-0
未找到文件。
scripts/create_map.sh
→
scripts/create_map
_from_mobileye
.sh
浏览文件 @
d9ea4d28
文件已移动
scripts/create_map_from_xy.sh
0 → 100755
浏览文件 @
d9ea4d28
#!/usr/bin/env bash
###############################################################################
# Copyright 2017 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.
###############################################################################
APOLLO_ROOT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/.."
&&
pwd
)
"
print_help
()
{
echo
"
$0
--xy [--map_name MAP_NAME][--left_lane_num 0][--right_lane_num 0]"
echo
"
$0
--xy set the input xy file, file that contains x,y"
echo
"
$0
--map_name set the name of the map, default is the base name of the csv file"
#echo "$0 --left_lane_num set the number of lanes at the left side of the trajectory, default is zero"
#echo "$0 --right_lane_num set the number of lanes at the right side of the trajectory, default is zero"
}
POSITIONAL
=()
g_map_name
=
""
g_xy_file
=
""
#left_lane_num="0"
#right_lane_num="0"
while
[[
$#
-gt
0
]]
;
do
key
=
"
$1
"
case
$key
in
-d
|
--dir
)
target_dir
=
"
$2
"
shift
# past argument
shift
# past value
;;
--xy
)
g_xy_file
=
"
$2
"
shift
# past argument
shift
# past value
;;
#-l|--left_lane_num)
#left_lane_num="$2"
#shift # past argument
#shift # past value
#;;
#-r|--right_lane_num)
#right_lane_num="$2"
#shift # past argument
#shift # past value
#;;
-h
|
--help
)
print_help
exit
0
;;
*
)
# unknown option
POSITIONAL+
=(
"
$1
"
)
# save it in an array for later
shift
# past argument
;;
esac
done
if
[
"
$g_xy_file
"
==
""
]
;
then
echo
"argument --xy is required"
print_help
exit
0
fi
if
[
"
$map_name
"
==
""
]
;
then
map_name
=
$(
basename
$g_xy_file
)
map_name
=
"
${
map_name
%.*
}
"
fi
generate_map
()
{
xy_file
=
$1
dir_name
=
"
${
APOLLO_ROOT_DIR
}
/modules/map/data/
$2
"
#left_num=$3
#right_num=$4
if
[
-d
${
dir_name
}
]
;
then
rm
-rf
${
dir_name
}
.last
mv
${
dir_name
}
${
dir_name
}
.last
fi
mkdir
-p
${
dir_name
}
python
${
APOLLO_ROOT_DIR
}
/modules/tools/map_gen/map_gen_single_lane.py
$xy_file
$dir_name
/base_map.txt 1.0
echo
"--map_dir=
${
dir_name
}
"
>>
modules/common/data/global_flagfile.txt
bash
${
APOLLO_ROOT_DIR
}
/scripts/generate_routing_topo_graph.sh
${
APOLLO_ROOT_DIR
}
/bazel-bin/modules/map/tools/sim_map_generator
--map_dir
=
${
dir_name
}
--output_dir
=
${
dir_name
}
}
generate_map
$g_xy_file
$map_name
$left_lane_num
$right_lane_num
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录