Skip to content

Commit

Permalink
framwork: rename to cyber
Browse files Browse the repository at this point in the history
  • Loading branch information
GoLancer authored and Jiangtao Hu committed Dec 13, 2018
1 parent 0fa9ab4 commit 3838a94
Show file tree
Hide file tree
Showing 1,359 changed files with 6,406 additions and 5,415 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ modules/calibration/data/
# Data bag
docs/demo_guide/*.bag

# Cybertron
cybertron/log/*
# Logs
cyber/log/*
20 changes: 10 additions & 10 deletions apollo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ function check_esd_files() {

function generate_build_targets() {
if [ -z $NOT_BUILD_PERCEPTION ] ; then
BUILD_TARGETS=`bazel query //modules/... union //cybertron/...`
BUILD_TARGETS=`bazel query //modules/... union //cyber/...`
else
info 'Skip building perception module!'
BUILD_TARGETS=`bazel query //modules/... except //modules/perception/... except //modules/calibration/lidar_ex_checker/... union //cybertron/...`
BUILD_TARGETS=`bazel query //modules/... except //modules/perception/... except //modules/calibration/lidar_ex_checker/... union //cyber/...`
fi

if [ $? -ne 0 ]; then
Expand Down Expand Up @@ -175,7 +175,7 @@ function cibuild_extended() {
info "Building with $JOB_ARG for $MACHINE_ARCH"
BUILD_TARGETS="
//modules/perception/...
//cybertron/...
//cyber/...
//modules/dreamview/...
//modules/drivers/radar/conti_radar/...
//modules/drivers/radar/racobit_radar/...
Expand Down Expand Up @@ -210,7 +210,7 @@ function cibuild() {

info "Building with $JOB_ARG for $MACHINE_ARCH"
BUILD_TARGETS="
//cybertron/...
//cyber/...
//modules/canbus/...
//modules/common/...
//modules/control/...
Expand Down Expand Up @@ -412,10 +412,10 @@ function citest_basic() {

info "Building framework ..."
cd /apollo
source cybertron/setup.bash
source cyber/setup.bash

BUILD_TARGETS="
`bazel query //modules/... union //cybertron/...`
`bazel query //modules/... union //cyber/...`
"

JOB_ARG="--jobs=$(nproc) --ram_utilization_factor 80"
Expand Down Expand Up @@ -447,10 +447,10 @@ function citest_extended() {

info "Building framework ..."
cd /apollo
source cybertron/setup.bash
source cyber/setup.bash

BUILD_TARGETS="
`bazel query //modules/planning/... union //modules/common/... union //cybertron/...`
`bazel query //modules/planning/... union //modules/common/... union //cyber/...`
`bazel query //modules/prediction/... union //modules/control/...`
"

Expand All @@ -472,7 +472,7 @@ function citest_extended() {
function citest() {
info "Building framework ..."
cd /apollo
source cybertron/setup.bash
source cyber/setup.bash

citest_basic
citest_extended
Expand Down Expand Up @@ -500,7 +500,7 @@ function run_bash_lint() {

function run_lint() {
# Add cpplint rule to BUILD files that do not contain it.
for file in $(find cybertron modules -name BUILD | grep -v gnss/third_party | \
for file in $(find cyber modules -name BUILD | grep -v gnss/third_party | \
xargs grep -l -E 'cc_library|cc_test|cc_binary' | xargs grep -L 'cpplint()')
do
sed -i '1i\load("//tools:cpplint.bzl", "cpplint")\n' $file
Expand Down
126 changes: 126 additions & 0 deletions cyber/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
load("//tools:cpplint.bzl", "cpplint")

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

cc_library(
name = "cyber",
deps = [
"//cyber:cyber_core",
],
linkstatic = False,
)

cc_binary(
name = "mainboard",
srcs = glob([
"mainboard/*.cc",
"mainboard/*.h",
]),
deps = [
":cyber_core",
"//cyber/proto:dag_config_cc_proto",
],
copts = [
"-pthread",
],
linkstatic = False,
)

cc_binary(
name = "libcyber.so",
deps = [
":cyber_core",
"@fastrtps//:fastrtps",
],
#TODO: Using deps instead.
linkopts = [
"-luuid",
],
linkshared = True,
linkstatic = True,
)

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

cc_library(
name = "state",
srcs = [
"state.cc",
],
hdrs = [
"state.h",
],
)

cc_library(
name = "init",
hdrs = [
"cyber.h",
"init.h",
],
deps = [
"state",
],
)

cc_library(
name = "cyber_core",
srcs = [
"cyber.cc",
"init.cc",
],
deps = [
"//cyber:binary",
"//cyber:state",
"//cyber/base",
"//cyber/blocker:blocker_manager",
"//cyber/common",
"//cyber/component:component",
"//cyber/component:timer_component",
"//cyber/class_loader:class_loader",
"//cyber/class_loader:class_loader_manager",
"//cyber/croutine:croutine",
"//cyber/data:data",
"//cyber/event:perf_event",
"//cyber/event:perf_event_cache",
"//cyber:init",
"//cyber/logger:logger",
"//cyber/logger:async_logger",
"//cyber/message:message_traits",
"//cyber/message:raw_message_traits",
"//cyber/message:py_message_traits",
"//cyber/message:protobuf_traits",
"//cyber/message:intra_message_traits",
"//cyber/node:node",
"//cyber/proto:run_mode_conf_cc_proto",
"//cyber/parameter:parameter_client",
"//cyber/parameter:parameter_server",
"//cyber/record:record",
"//cyber/scheduler:scheduler",
"//cyber/service:client",
"//cyber/service:service",
"//cyber/service_discovery:topology_manager",
"//cyber/task:task",
"//cyber/time:time",
"//cyber/time:duration",
"//cyber/time:rate",
"//cyber/timer:timer",
"//cyber/transport:transport_lib",
"//third_party/tf2:tf2",
"@fastrtps",
],
linkopts = [
"-luuid",
"-lprotobuf",
"-lglog",
"-lgflags",
],
)


cpplint()
2 changes: 2 additions & 0 deletions cyber/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Introduction
Cyber is a collection of software frameworks for self-driving application development, providing operating system-like functionality on a heterogeneous computer. This allows you to build, test, and deploy self-driving applications more efficient.
52 changes: 26 additions & 26 deletions cybertron/base/BUILD → cyber/base/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ package(default_visibility = ["//visibility:public"])
cc_library(
name = "base",
deps = [
"//cybertron/base:any",
"//cybertron/base:atomic_fifo",
"//cybertron/base:atomic_hash_map",
"//cybertron/base:atomic_rw_lock",
"//cybertron/base:bounded_queue",
"//cybertron/base:concurrent_object_pool",
"//cybertron/base:macros",
"//cybertron/base:object_pool",
"//cybertron/base:reentrant_rw_lock",
"//cybertron/base:rw_lock_guard",
"//cybertron/base:signal",
"//cybertron/base:thread_pool",
"//cybertron/base:thread_safe_queue",
"//cybertron/base:unbounded_queue",
"//cybertron/base:wait_strategy",
"//cyber/base:any",
"//cyber/base:atomic_fifo",
"//cyber/base:atomic_hash_map",
"//cyber/base:atomic_rw_lock",
"//cyber/base:bounded_queue",
"//cyber/base:concurrent_object_pool",
"//cyber/base:macros",
"//cyber/base:object_pool",
"//cyber/base:reentrant_rw_lock",
"//cyber/base:rw_lock_guard",
"//cyber/base:signal",
"//cyber/base:thread_pool",
"//cyber/base:thread_safe_queue",
"//cyber/base:unbounded_queue",
"//cyber/base:wait_strategy",
],
)

Expand All @@ -37,7 +37,7 @@ cc_test(
"any_test.cc",
],
deps = [
"//cybertron/base:any",
"//cyber/base:any",
"@gtest//:main",
],
)
Expand All @@ -63,7 +63,7 @@ cc_test(
"atomic_hash_map_test.cc",
],
deps = [
"//cybertron/base:atomic_hash_map",
"//cyber/base:atomic_hash_map",
"@gtest//:main",
],
)
Expand All @@ -75,7 +75,7 @@ cc_library(
"atomic_rw_lock.h",
],
deps = [
"//cybertron/base:rw_lock_guard",
"//cyber/base:rw_lock_guard",
]
)

Expand All @@ -86,8 +86,8 @@ cc_test(
"atomic_rw_lock_test.cc",
],
deps = [
"//cybertron/base:atomic_rw_lock",
"//cybertron/base:reentrant_rw_lock",
"//cyber/base:atomic_rw_lock",
"//cyber/base:reentrant_rw_lock",
"@gtest//:main",
],
)
Expand All @@ -98,8 +98,8 @@ cc_library(
"bounded_queue.h",
],
deps = [
"//cybertron/base:macros",
"//cybertron/base:wait_strategy",
"//cyber/base:macros",
"//cyber/base:wait_strategy",
],
)

Expand All @@ -110,7 +110,7 @@ cc_test(
"bounded_queue_test.cc",
],
deps = [
"//cybertron/base:bounded_queue",
"//cyber/base:bounded_queue",
"@gtest//:main",
],
)
Expand All @@ -135,7 +135,7 @@ cc_library(
"object_pool.h",
],
deps = [
"//cybertron/base:macros",
"//cyber/base:macros",
],
)

Expand All @@ -146,7 +146,7 @@ cc_test(
"object_pool_test.cc",
],
deps = [
"//cybertron/base:object_pool",
"//cyber/base:object_pool",
"@gtest//:main",
],
)
Expand Down Expand Up @@ -179,7 +179,7 @@ cc_test(
"signal_test.cc",
],
deps = [
"//cybertron/base:signal",
"//cyber/base:signal",
"@gtest//:main",
],
)
Expand Down
10 changes: 5 additions & 5 deletions cybertron/base/any.h → cyber/base/any.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
* limitations under the License.
*****************************************************************************/

#ifndef CYBERTRON_BASE_ANY_H_
#define CYBERTRON_BASE_ANY_H_
#ifndef CYBER_BASE_ANY_H_
#define CYBER_BASE_ANY_H_

#include <memory>
#include <typeinfo>
#include <utility>

namespace apollo {
namespace cybertron {
namespace cyber {
namespace data {

class BadAnyCast : public std::bad_cast {
Expand Down Expand Up @@ -215,7 +215,7 @@ inline ValueType AnyCast(const Any& operand) {
}

} // namespace data
} // namespace cybertron
} // namespace cyber
} // namespace apollo

#endif // CYBERTRON_BASE_ANY_H_
#endif // CYBER_BASE_ANY_H_
6 changes: 3 additions & 3 deletions cybertron/base/any_test.cc → cyber/base/any_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#include <thread>
#include <utility>

#include "cybertron/base/any.h"
#include "cyber/base/any.h"
#include "gtest/gtest.h"

namespace apollo {
namespace cybertron {
namespace cyber {
namespace data {
class Foo {
public:
Expand Down Expand Up @@ -124,5 +124,5 @@ TEST(AnyTest, cast_test) {
}

} // namespace data
} // namespace cybertron
} // namespace cyber
} // namespace apollo
Loading

0 comments on commit 3838a94

Please sign in to comment.