Skip to content

Commit

Permalink
LGSVL Simulator change (part 5)
Browse files Browse the repository at this point in the history
Add new config files for running LGSVL Simulator.
  • Loading branch information
rongguodong authored and xiaoxq committed May 18, 2020
1 parent a95004b commit eac672b
Show file tree
Hide file tree
Showing 4 changed files with 296 additions and 0 deletions.
160 changes: 160 additions & 0 deletions modules/dreamview/conf/hmi_modes/mkz_lgsvl.pb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
cyber_modules {
key: "Camera"
value: {
dag_files: "/apollo/modules/drivers/camera/dag/camera.dag"
dag_files: "/apollo/modules/drivers/video/dag/video.dag"
}
}
cyber_modules {
key: "Canbus"
value: {
dag_files: "/apollo/modules/canbus/dag/canbus.dag"
}
}
cyber_modules {
key: "Control"
value: {
dag_files: "/apollo/modules/control/dag/control.dag"
}
}
cyber_modules {
key: "GPS"
value: {
dag_files: "/apollo/modules/drivers/gnss/dag/gnss.dag"
}
}
cyber_modules {
key: "Guardian"
value: {
dag_files: "/apollo/modules/guardian/dag/guardian.dag"
}
}
cyber_modules {
key: "Localization"
value: {
dag_files: "/apollo/modules/localization/dag/dag_streaming_rtk_localization.dag"
}
}
cyber_modules {
key: "Perception"
value: {
dag_files: "/apollo/modules/perception/production/dag/dag_streaming_perception_lgsvl.dag"
}
}
cyber_modules {
key: "Traffic Light"
value: {
dag_files: "/apollo/modules/perception/production/dag/dag_streaming_perception_trafficlights.dag"
}
}
cyber_modules {
key: "Planning"
value: {
dag_files: "/apollo/modules/planning/dag/planning.dag"
}
}
cyber_modules {
key: "Storytelling"
value: {
dag_files: "/apollo/modules/storytelling/dag/storytelling.dag"
}
}
cyber_modules {
key: "Prediction"
value: {
dag_files: "/apollo/modules/prediction/dag/prediction.dag"
}
}
cyber_modules {
key: "Radar"
value: {
dag_files: "/apollo/modules/drivers/radar/conti_radar/dag/conti_radar.dag"
}
}
cyber_modules {
key: "Routing"
value: {
dag_files: "/apollo/modules/routing/dag/routing.dag"
}
}
cyber_modules {
key: "Transform"
value: {
dag_files: "/apollo/modules/transform/dag/static_transform.dag"
}
}
cyber_modules {
key: "Velodyne"
value: {
dag_files: "/apollo/modules/drivers/velodyne/dag/velodyne.dag"
}
}
cyber_modules {
key: "Third Party Perception"
value: {
dag_files: "/apollo/modules/third_party_perception/dag/third_party_perception.dag"
}
}
modules {
key: "Recorder"
value: {
start_command: "/apollo/scripts/record_bag.py --start"
stop_command: "/apollo/scripts/record_bag.py --stop"
process_monitor_config {
command_keywords: "cyber_recorder record"
}
}
}
monitored_components {
key: "Recorder"
value: {
process {
command_keywords: "cyber_recorder record"
}
resource {
disk_spaces {
# For logs.
path: "/apollo/data"
insufficient_space_warning: 8
insufficient_space_error: 2
}
disk_spaces {
# For records.
path: "/media/apollo/internal_nvme"
insufficient_space_warning: 128
insufficient_space_error: 32
}
}
}
}
monitored_components {
key: "GPS"
value: {
process {
command_keywords: "mainboard"
command_keywords: "/apollo/modules/drivers/gnss/dag/gnss.dag"
}
# We also have a special GPSMonitor to check message status.
}
}
monitored_components {
key: "Localization"
value: {
# Special LocalizationMonitor.
}
}
# Disbale ESD-CAN for a while as in some cars we are using B-CAN.
# monitored_components {
# key: "ESD-CAN"
# value: {
# # Special EsdCanMonitor.
# }
# }
monitored_components {
key: "Lidar 128"
value: {
channel {
name: "/apollo/sensor/lidar128/compensator/PointCloud2"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sensor_name: "velodyne128"
enable_hdmap: true
lidar_query_tf_offset: 200
lidar2novatel_tf2_child_frame_id: "velodyne128"
output_channel_name: "/perception/inner/SegmentationObjects"
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
module_config {
module_library : "/apollo/bazel-bin/modules/perception/onboard/component/libperception_component_lidar.so"

components {
class_name : "SegmentationComponent"
config {
name: "Velodyne128Segmentation"
config_file_path: "/apollo/modules/perception/production/conf/perception/lidar/velodyne128_segmentation_conf_lgsvl.pb.txt"
flag_file_path: "/apollo/modules/perception/production/conf/perception/perception_common.flag"
readers {
channel: "/apollo/sensor/lidar128/compensator/PointCloud2"
}
}
}

components {
class_name : "SegmentationComponent"
config {
name: "Velodyne16Segmentation"
config_file_path: "/apollo/modules/perception/production/conf/perception/lidar/velodyne16_segmentation_conf.pb.txt"
readers {
channel: "/apollo/sensor/lidar16/compensator/PointCloud2"
}
}
}

components {
class_name : "RecognitionComponent"
config {
name: "RecognitionComponent"
config_file_path: "/apollo/modules/perception/production/conf/perception/lidar/recognition_conf.pb.txt"
readers {
channel: "/perception/inner/SegmentationObjects"
}
}
}

components {
class_name: "RadarDetectionComponent"
config {
name: "FrontRadarDetection"
config_file_path: "/apollo/modules/perception/production/conf/perception/radar/front_radar_component_conf.pb.txt"
readers {
channel: "/apollo/sensor/radar/front"
}
}
}

components {
class_name: "RadarDetectionComponent"
config {
name: "RearRadarDetection"
config_file_path: "/apollo/modules/perception/production/conf/perception/radar/rear_radar_component_conf.pb.txt"
readers {
channel: "/apollo/sensor/radar/rear"
}
}
}

components {
class_name: "FusionComponent"
config {
name: "SensorFusion"
config_file_path: "/apollo/modules/perception/production/conf/perception/fusion/fusion_component_conf.pb.txt"
readers {
channel: "/perception/inner/PrefusedObjects"
}
}
}

}
60 changes: 60 additions & 0 deletions scripts/bootstrap_lgsvl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env bash

###############################################################################
# Copyright 2020 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.
###############################################################################

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DREAMVIEW_URL="http://localhost:8888"

cd "${DIR}/.."

# Make sure supervisord has correct coredump file limit.
ulimit -c unlimited

source "${DIR}/apollo_base.sh"

function start() {
nohup cyber_launch start modules/drivers/tools/image_decompress/launch/image_decompress.launch &
./scripts/monitor.sh start
./scripts/dreamview.sh start
if [ $? -eq 0 ]; then
sleep 2 # wait for some time before starting to check
http_status="$(curl -o /dev/null -I -L -s -w '%{http_code}' ${DREAMVIEW_URL})"
if [ $http_status -eq 200 ]; then
echo "Dreamview is running at" $DREAMVIEW_URL
else
echo "Failed to start Dreamview. Please check /apollo/data/log or /apollo/data/core for more information"
fi
fi
}

function stop() {
./scripts/dreamview.sh stop
./scripts/monitor.sh stop
cyber_launch stop modules/drivers/tools/image_decompress/launch/image_decompress.launch
}

case $1 in
start)
start
;;
stop)
stop
;;
*)
start
;;
esac

0 comments on commit eac672b

Please sign in to comment.