Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions .apollo.bazelrc
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
build --action_env PYTHON_BIN_PATH="/usr/bin/python3"
build --action_env PYTHON_LIB_PATH="/usr/lib/python3/dist-packages"
build --python_path="/usr/bin/python3"
# build --config=tensorrt
startup --output_user_root="/apollo/.cache/bazel"
common --distdir="/apollo/.cache/distdir"

build --action_env PYTHON_BIN_PATH="/usr/bin/python3.6"
build --action_env PYTHON_LIB_PATH="/usr/local/lib/python3.6/dist-packages"
build --python_path="/usr/bin/python3.6"
build:gpu --config=cuda
build:gpu --config=tensorrt

build --action_env CUDA_TOOLKIT_PATH="/usr/local/cuda-10.2"
build --action_env TF_CUDA_COMPUTE_CAPABILITIES="3.7,5.2,6.0,6.1,7.0,7.2,7.5"
build --action_env GCC_HOST_COMPILER_PATH="/usr/bin/x86_64-linux-gnu-gcc-7"

# This config refers to building with CUDA available.
build:using_cuda --define=using_cuda=true
build:using_cuda --action_env TF_NEED_CUDA=1
build:using_cuda --crosstool_top=@local_config_cuda//crosstool:toolchain

# This config refers to building CUDA with nvcc.
build:cuda --config=using_cuda
build:cuda --define=using_cuda_nvcc=true

build:tensorrt --action_env TF_NEED_TENSORRT=1
build:teleop --define WITH_TELEOP=true
1 change: 0 additions & 1 deletion .cache/distdir/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
- name: Pull and Create Container
run: bash docker/scripts/cyber_start.sh
- name: Build
run: docker exec -u $USER apollo_cyber_$USER bash -c "./apollo.sh build"
run: docker exec -u $USER apollo_cyber_$USER bash -c "./apollo.sh build_gpu"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ build all modules


```bash
bash apollo.sh build
bash apollo.sh build_gpu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to address if you build without perception, use apollo.sh build, if not ,use apollo.sh build_gpu

```


Expand Down
4 changes: 3 additions & 1 deletion docker/scripts/cyber_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ source "${APOLLO_ROOT_DIR}/scripts/apollo.bashrc"

# CACHE_ROOT_DIR="${APOLLO_ROOT_DIR}/.cache"

VERSION_X86_64="diamond-auto-x86_64-18.04-20201125_1739"
VERSION_X86_64="diamond-auto-x86_64-18.04-20210119_1643"
VERSION_AARCH64="diamond-auto-aarch64-18.04-20200925_1309"
VERSION_LOCAL_CYBER="local_cyber_dev"
CYBER_CONTAINER="apollo_cyber_${USER}"
CYBER_INSIDE="in_cyber_docker"

DOCKER_REPO="hotzoneauto2020/diamond-auto"
#DOCKER_REPO="sunzengpeng/ubuntu_docker"
#DOCKER_REPO="apolloauto/apollo"
DOCKER_RUN_CMD="docker run"
DOCKER_PULL_CMD="docker pull"

Expand Down
1 change: 1 addition & 0 deletions modules/control/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ cc_library(
"//modules/drivers/proto:wheelangle_cc_proto",
"//modules/drivers/proto:parking_cc_proto",
"//modules/common/adapters:adapter_gflags",
"//modules/perception/proto:obst_box_cc_proto",
"@com_github_gflags_gflags//:gflags",
],
)
Expand Down
1 change: 1 addition & 0 deletions modules/drivers/robosense/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package(default_visibility = ["//visibility:public"])
cc_binary(
name = "librobosense_driver_component.so",
linkopts = ["-shared"],
linkshared = True,
linkstatic = False,
deps = [":driver"],
)
Expand Down
1 change: 1 addition & 0 deletions modules/drivers/velodyne/driver/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package(default_visibility = ["//visibility:public"])
cc_binary(
name = "libvelodyne_driver_component.so",
linkopts = ["-shared"],
linkshared = True,
linkstatic = False,
deps = [":velodyne_driver_component_lib"],
)
Expand Down
4 changes: 4 additions & 0 deletions modules/perception/conf/lidar_poindcloud_conf.pb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
obst_output_channel: "/diamond/perception/Obstacles"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Channel name should be lower case.

save_pcd_file: false
save_pcd_path_front: "/apollo/modules/perception/data/lidar_front.pcd"
save_pcd_path_rear: "/apollo/modules/perception/data/lidar_rear.pcd"
24 changes: 24 additions & 0 deletions modules/perception/conf/tracker_config.pb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "HmObjectTracker"
version: "1.1.0"
matcher_method: HUNGARIAN_MATCHER
filter_method: KALMAN_FILTER
track_cached_history_size_maximum: 5
track_consecutive_invisible_maximum: 1
track_visible_ratio_minimum: 0.6
collect_age_minimum: 0
collect_consecutive_invisible_maximum: 0
acceleration_noise_maximum: 5
speed_noise_maximum: 0.4
match_distance_maximum: 4.0
location_distance_weight: 0.6
direction_distance_weight: 0.2
bbox_size_distance_weight: 0.1
point_num_distance_weight: 0.1
histogram_distance_weight: 0.5
histogram_bin_size: 10
use_adaptive: true
measurement_noise: 0.4
initial_velocity_noise: 5.0
xy_propagation_noise: 10.0
z_propagation_noise: 10.0
breakdown_threshold_maximum: 10.0
17 changes: 17 additions & 0 deletions modules/perception/dag/lidar_point_pillars.dag
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Define all coms in DAG streaming.
module_config {
module_library : "/apollo/bazel-bin/modules/perception/lidar_point_pillars/point_pillars_detection.so"
components {
class_name : "PointPillarsDetection"
config {
name : "point_detect"
config_file_path: "/apollo/modules/perception/conf/lidar_poindcloud_conf.pb.txt"
readers {
channel: "/diamond/sensor/lidar/front/PointCloud2"
}
readers {
channel: "/diamond/sensor/lidar/rear/PointCloud2"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
module_config {
module_library : "/apollo/bazel-bin/modules/perception/lidar_pointcloudcluster/lidar_pointcloudcluster.so"
components {
class_name : "lidar_pointcloudcluster"
class_name : "Lidar_pointcloudcluster"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Class name naming style

config {
name : "lidar_front"
config_file_path: "/apollo/modules/perception/conf/lidar_poindcloud_conf.pb.txt"
readers {
channel: "/diamond/sensor/lidar/front/PointCloud2"
}
Expand Down
Binary file added modules/perception/data/obst_record.00000
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
7 changes: 7 additions & 0 deletions modules/perception/launch/lidar_point_pillars.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<cyber>
<module>
<name>common</name>
<dag_conf>/apollo/modules/perception/dag/lidar_point_pillars.dag</dag_conf>
<process_name>lidar_point_pillars</process_name>
</module>
</cyber>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<cyber>
<module>
<name>common</name>
<dag_conf>/apollo/modules/perception/lidar_pointcloudcluster/lidar_pointcloudcluster.dag</dag_conf>
<dag_conf>/apollo/modules/perception/dag/lidar_pointcloudcluster.dag</dag_conf>
<process_name>lidar_pointcloudcluster</process_name>
</module>
</cyber>
139 changes: 139 additions & 0 deletions modules/perception/lidar_point_pillars/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_binary")
load("@local_config_cuda//cuda:build_defs.bzl", "cuda_library")
load("//tools:cpplint.bzl", "cpplint")

package(default_visibility = ["//visibility:public"])

cc_binary(
name = "point_pillars_detection.so",
linkopts = ["-shared"],
linkshared = True,
linkstatic = False,
deps = [":point_pillars_detection"],
)

cc_library(
name = "point_pillars_detection",
srcs = [
"point_pillars_detection.cc",
],
hdrs = [
"point_pillars_detection.h",
],
deps = [
":point_pillars",
"//cyber",
"//modules/drivers/proto:pointcloud_cc_proto",
"//modules/perception/proto:obst_box_cc_proto",
"//modules/perception/proto:lidar_pointcloud_conf_cc_proto",
"//modules/perception/lidar_pointcloud_tracking:hm_tracker",
"//modules/perception/lidar_pointcloud_tracking/common:object",
"//modules/perception/lidar_pointcloud_tracking:min_box",
"//modules/common/time",
"@eigen",
"@pcl",
"@local_config_vtk//:vtk",
],
alwayslink = True,
)

cc_library(
name = "params",
hdrs = ["params.h"],
)

cc_library(
name = "point_pillars",
srcs = [
"point_pillars.cc",
],
hdrs = [
"point_pillars.h",
],
deps = [
":anchor_mask_cuda",
":common",
":nms_cuda",
":params",
":postprocess_cuda",
":preprocess_points",
":scatter_cuda",
"//cyber/common",
"//third_party:libtorch",
"@local_config_cuda//cuda:cudart",
"@local_config_tensorrt//:tensorrt",
],
alwayslink = True,
)

cc_library(
name = "preprocess_points",
srcs = [
"preprocess_points.cc",
],
hdrs = [
"preprocess_points.h",
],
deps = [
":common",
":preprocess_points_cuda",
],
)

cc_library(
name = "common",
hdrs = ["common.h"],
)

cuda_library(
name = "anchor_mask_cuda",
srcs = ["anchor_mask_cuda.cu"],
hdrs = ["anchor_mask_cuda.h"],
deps = [
":common",
"@local_config_cuda//cuda:cudart",
],
)

cuda_library(
name = "nms_cuda",
srcs = ["nms_cuda.cu"],
hdrs = ["nms_cuda.h"],
deps = [
":common",
"@local_config_cuda//cuda:cudart",
],
)

cuda_library(
name = "postprocess_cuda",
srcs = ["postprocess_cuda.cu"],
hdrs = ["postprocess_cuda.h"],
deps = [
":common",
":nms_cuda",
"@local_config_cuda//cuda:cudart",
],
)

cuda_library(
name = "preprocess_points_cuda",
srcs = ["preprocess_points_cuda.cu"],
hdrs = ["preprocess_points_cuda.h"],
deps = [
":common",
"@local_config_cuda//cuda:cudart",
],
)

cuda_library(
name = "scatter_cuda",
srcs = ["scatter_cuda.cu"],
hdrs = ["scatter_cuda.h"],
deps = [
":common",
"@local_config_cuda//cuda:cudart",
],
)

cpplint()
Loading