Skip to content

Commit

Permalink
chore: fix issues
Browse files Browse the repository at this point in the history
- cyber:
	 - a6160493e7 fix: fix container name issue
	 - 799ed5600f chore: add env setup cmd to rcfile after container created
	 - 6c5c3267a1 chore: enable timezone mutable in container
	 - 81ab328121 chore: change aem copy dest
	 - 2e2b96521a chore: enable aem auto complete
	 - be2a9ea41e chore: change aem path in container and fix permission issue for setup.sh
	 - 28e9b37502 chore: add geographiclib and gtsam
	 - 27f9d02b77 chore: upgrade openssl to 3.0.2 in u22 env
	 - 11b24ab9c5 chore: add lib symbolic link for openssl-3
	 - 82aa48e946 fix(cyber): fix args file path found
- dreamview:
	 - 78cf80c513 merge: merge branch 9.2 dvp frontend into preview
	 - 9763d2fb72 build(dvp): build dreamview_plus frontend
	 - 60f0cfe153  build(dvp): build dreamview_plus frontend
- planning:
	 - e7ec14fa03 fix(planning): Setting use_sqp to true in open space scene

Signed-off-by: liangjinping <[email protected]>
Change-Id: Ifefaf3211235715dba13b9bce393347d6f823217
  • Loading branch information
lykling committed Dec 3, 2024
1 parent 7bc54b8 commit 7153c51
Show file tree
Hide file tree
Showing 88 changed files with 130,221 additions and 48 deletions.
12 changes: 12 additions & 0 deletions aem/aem-create
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,19 @@ execute() {
check_agreement

# load custom environment variables
local _old_apollo_env_name="${APOLLO_ENV_NAME}"
local _old_apollo_env_container_name="${APOLLO_ENV_CONTAINER_NAME}"
[[ -f "${PWD}/.env" ]] && set -a && source "${PWD}/.env" && set +a
# fix related environment variables
if [[ "${_old_apollo_env_name}" != "${APOLLO_ENV_NAME}" ]]; then
if [[ "${_old_apollo_env_container_name}" == "${APOLLO_ENV_CONTAINER_NAME}" ]]; then
# container name is not set in .env
export APOLLO_ENV_CONTAINER_NAME="${APOLLO_ENV_CONTAINER_PREFIX}${APOLLO_ENV_NAME}"
fi
fi
if [[ "${APOLLO_ENV_BACKEND}" == "host" ]]; then
export APOLLO_ENV_WORKROOT="${APOLLO_ENV_WORKSPACE}"
fi

parse_arguments "$@"

Expand Down
1 change: 1 addition & 0 deletions aem/ansible/roles/base_env/tasks/Ubuntu.18.04.x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- wget
- xz-utils
- zip
- bash-completion
state: latest
update_cache: false
when: "'apt' in ansible_facts.packages"
Expand Down
1 change: 1 addition & 0 deletions aem/ansible/roles/base_env/tasks/Ubuntu.20.04.aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- wget
- xz-utils
- zip
- bash-completion
state: latest
update_cache: false
when: "'apt' in ansible_facts.packages"
Expand Down
1 change: 1 addition & 0 deletions aem/ansible/roles/base_env/tasks/Ubuntu.20.04.x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- wget
- xz-utils
- zip
- bash-completion
state: latest
update_cache: false
when: "'apt' in ansible_facts.packages"
Expand Down
1 change: 1 addition & 0 deletions aem/ansible/roles/base_env/tasks/Ubuntu.22.04.x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- wget
- xz-utils
- zip
- bash-completion
state: latest
update_cache: false
when: "'apt' in ansible_facts.packages"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5bad53988..ba50de92a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,6 +29,9 @@ set (CMAKE_PROJECT_VERSION_MAJOR ${GTSAM_VERSION_MAJOR})
set (CMAKE_PROJECT_VERSION_MINOR ${GTSAM_VERSION_MINOR})
set (CMAKE_PROJECT_VERSION_PATCH ${GTSAM_VERSION_PATCH})

+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
+
###############################################################################
# Gather information, perform checks, set defaults

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5bad53988..259b68ea4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,6 +29,9 @@ set (CMAKE_PROJECT_VERSION_MAJOR ${GTSAM_VERSION_MAJOR})
set (CMAKE_PROJECT_VERSION_MINOR ${GTSAM_VERSION_MINOR})
set (CMAKE_PROJECT_VERSION_PATCH ${GTSAM_VERSION_PATCH})

+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx2")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx2")
+
###############################################################################
# Gather information, perform checks, set defaults

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env bash

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

# Fail on first error.
set -e

INSTALL_ATOM=${INSTALL_ATOM:-GeographicLib-2.3}

SCRIPT_DIR="$(
cd "$(dirname "${BASH_SOURCE[0]}")"
pwd -P
)"
[[ -f "${SCRIPT_DIR}/installer_base.sh" ]] && source ${SCRIPT_DIR}/installer_base.sh
[[ -f "${SCRIPT_DIR}/cmake_package_install_funcs.sh" ]] && source ${SCRIPT_DIR}/cmake_package_install_funcs.sh

if ldconfig -p | grep libGeographicLib.so | grep -q /usr/lib; then
info "libGeographicLib was already installed"
exit 0
fi

# fallback
# SRC_URI="${SRC_URI:-https://jaist.dl.sourceforge.net/project/geographiclib/distrib-C%2B%2B/${PN}-${PV}.tar.gz}"
SRC_URI="${SRC_URI:-https://apollo-system.cdn.bcebos.com/archive/10.0/${PN}-${PV}.tar.gz}"

if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then
# Being sourced, do nothing
:
else
install_package "$@"
fi
68 changes: 68 additions & 0 deletions aem/ansible/roles/legacy_scripts/files/installers/install_gtsam.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/usr/bin/env bash

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

# Fail on first error.
set -e

INSTALL_ATOM=${INSTALL_ATOM:-gtsam-4.2}

SCRIPT_DIR="$(
cd "$(dirname "${BASH_SOURCE[0]}")"
pwd -P
)"
[[ -f "${SCRIPT_DIR}/installer_base.sh" ]] && source ${SCRIPT_DIR}/installer_base.sh
[[ -f "${SCRIPT_DIR}/cmake_package_install_funcs.sh" ]] && source ${SCRIPT_DIR}/cmake_package_install_funcs.sh

if ldconfig -p | grep libgtsam.so | grep -q /usr/lib; then
info "gtsam was already installed"
exit 0
fi

# fallback
# SRC_URI="${SRC_URI:-https://github.com/borglab/gtsam/archive/refs/tags/${PV}.tar.gz} -> ${PN}-${PV}.tar.gz}"
SRC_URI="${SRC_URI:-https://apollo-system.cdn.bcebos.com/archive/10.0/${PN}-${PV}.tar.gz}"
PATCHES=(
"${FILESDIR}/gtsam-4.2_compilation_flags_$(uname -m).patch"
)

src_prepare_pre() {
# apt_get_update_and_install libboost-all-dev
apt_get_update_and_install apollo-neo-3rd-boost
# TODO: pack to 3rd-boost release tarball
boost_cmake_files_url='https://apollo-system.cdn.bcebos.com/archive/10.0/3rd-boost_1.74.0_cmake_files.tar.gz'
curl -sSL "${boost_cmake_files_url}" | tar xz -C /opt/apollo/neo/packages/3rd-boost/latest
}

cmake_src_configure() {
mkdir -p "${WORKDIR}/${PF}_build"
pushd "${WORKDIR}/${PF}_build"
cmake ${WORKDIR}/${PF} \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DBoost_NO_SYSTEM_PATHS="true" \
-DBOOST_ROOT="${BOOST_ROOT:-/opt/apollo/neo/packages/3rd-boost/latest}" \
-DCMAKE_BUILD_TYPE=Release
popd
}

if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then
# Being sourced, do nothing
:
else
install_package "$@"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ fi
# Note: use for replacing boringssl in grpc

PV_NUM=$(echo "${PV}" | sed 's/[^0-9.]*//g')
SRC_URI="${SRC_URI:-https://www.openssl.org/source/old/${PV_NUM}/${PN}-${PV}.tar.gz}"
#SRC_URI="${SRC_URI:-https://www.openssl.org/source/old/${PV_NUM}/${PN}-${PV}.tar.gz}"
SRC_URI="${SRC_URI:-https://apollo-system.cdn.bcebos.com/archive/10.0/${PN}-${PV}.tar.gz}"

src_configure() {
pushd "${WORKDIR}/${PF}"
Expand All @@ -45,6 +46,9 @@ src_configure() {
}

pkg_install_post() {
if [[ -d "${INSTALL_PREFIX}/lib64" ]] && [[ ! -e "${INSTALL_PREFIX}/lib" ]]; then
ln -snf lib64 "${INSTALL_PREFIX}/lib"
fi
ok "Done installing ${PN}-${PV}"
}

Expand Down
3 changes: 3 additions & 0 deletions aem/ansible/roles/legacy_scripts/files/installers/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ magma-2.5.4.tar.gz 7948438 7734fb417ae0c367b418dea15096aef2e278a423e527c615aab47
opencv-4.4.0.tar.gz 88887103 bb95acd849e458be7f7024d17968568d1ccd2f0681d47fd60d34ffb4b8c52563
openh264-2.1.1.tar.gz 60239654 af173e90fce65f80722fa894e1af0d6b07572292e76de7b65273df4c0a8be678
openssl-1.1.1w.tar.gz 9893384 cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8
openssl-3.0.2.tar.gz 15038141 98e91ccead4d4756ae3c9cde5e09191a8e586d9f4d50838e7ec09d6411dfdb63
osqp-0.5.0.tar.gz 928438 e0932d1f7bc56dbe526bee4a81331c1694d94c570f8ac6a6cb413f38904e0f64
patchelf-0.12.tar.gz 103075 3dca33fb862213b3541350e1da262249959595903f559eae0fbc68966e9c3f56
patchelf-0.14.3.tar.gz 123722 827a8ca914c69413f1ca0d967a637980a24edf000a938531a77e663317c853bb
Expand All @@ -32,3 +33,5 @@ protobuf-3.14.0.tar.gz 5319779 d0f5f605d0d656007ce6c8b5a82df3037e1d8fe8b121ed42e
protobuf-3.21.12.tar.gz 5141502 930c2c3b5ecc6c9c12615cf5ad93f1cd6e12d0aba862b572e076259970ac3a53
qdldl-0.1.4.tar.gz 17380 4eaed3b2d66d051cea0a57b0f80a81fc04ec72c8a906f8020b2b07e31d3b549c
vtk-8.2.0.tar.gz 35511819 34c3dc775261be5e45a8049155f7228b6bd668106c72a3c435d95730d17d57bb
GeographicLib-2.3.tar.gz 1701815 3114847839453ee6bbe2228e41dc73cad6de6160055442b747adc9c76f0a3198
gtsam-4.2.tar.gz 29684572 9ff8846d0a83a245c284cb5760ec2d74535ef9b5885183ccfefd7ff122eba60e
11 changes: 11 additions & 0 deletions aem/ansible/roles/ordinary_modules/tasks/Ubuntu.18.04.x86_64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Install openssl
become: true
ansible.builtin.shell:
cmd: /opt/apollo/installers/install_openssl.sh
executable: /bin/bash
args: []
environment:
INSTALL_ATOM: "openssl-1.1.1w"
INSTALL_PREFIX: "/opt/apollo/pkgs/openssl"
11 changes: 11 additions & 0 deletions aem/ansible/roles/ordinary_modules/tasks/Ubuntu.20.04.aarch64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Install openssl
become: true
ansible.builtin.shell:
cmd: /opt/apollo/installers/install_openssl.sh
executable: /bin/bash
args: []
environment:
INSTALL_ATOM: "openssl-1.1.1w"
INSTALL_PREFIX: "/opt/apollo/pkgs/openssl"
11 changes: 11 additions & 0 deletions aem/ansible/roles/ordinary_modules/tasks/Ubuntu.20.04.x86_64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Install openssl
become: true
ansible.builtin.shell:
cmd: /opt/apollo/installers/install_openssl.sh
executable: /bin/bash
args: []
environment:
INSTALL_ATOM: "openssl-1.1.1w"
INSTALL_PREFIX: "/opt/apollo/pkgs/openssl"
11 changes: 11 additions & 0 deletions aem/ansible/roles/ordinary_modules/tasks/Ubuntu.22.04.x86_64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Install openssl
become: true
ansible.builtin.shell:
cmd: /opt/apollo/installers/install_openssl.sh
executable: /bin/bash
args: []
environment:
INSTALL_ATOM: "openssl-3.0.2"
INSTALL_PREFIX: "/opt/apollo/pkgs/openssl"
42 changes: 33 additions & 9 deletions aem/ansible/roles/ordinary_modules/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,26 @@
INSTALL_ATOM: "openh264-2.1.1"
INSTALL_PREFIX: "/opt/apollo/sysroot"

- name: install GeographicLib
become: true
ansible.builtin.shell:
cmd: /opt/apollo/installers/install_GeographicLib.sh
executable: /bin/bash
args: []
environment:
INSTALL_ATOM: "GeographicLib-2.3"
INSTALL_PREFIX: "/usr"

- name: install gtsam
become: true
ansible.builtin.shell:
cmd: /opt/apollo/installers/install_gtsam.sh
executable: /bin/bash
args: []
environment:
INSTALL_ATOM: "gtsam-4.2"
INSTALL_PREFIX: "/usr"

# support for modules/audio
#- name: Install fftw3 (for modules/audio)
# become: true
Expand All @@ -122,12 +142,16 @@
# state: latest
# update_cache: false

- name: Install openssl
become: true
ansible.builtin.shell:
cmd: /opt/apollo/installers/install_openssl.sh
executable: /bin/bash
args: []
environment:
INSTALL_ATOM: "openssl-1.1.1w"
INSTALL_PREFIX: "/opt/apollo/pkgs/openssl"
- name: install packages by OS
ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', params) }}"
vars:
params:
files:
- "{{ ansible_distribution }}.{{ ansible_distribution_version }}.{{ ansible_architecture }}.yml"
- "{{ ansible_distribution }}.{{ ansible_distribution_version }}.yml"
- "{{ ansible_distribution }}.{{ ansible_architecture }}.yml"
- "{{ ansible_distribution }}.yml"
- "{{ ansible_os_family }}.yml"
- "default.yaml"
paths:
- 'tasks'
14 changes: 14 additions & 0 deletions aem/auto_complete.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# usage: source auto_complete.bash

COMMANDS="start start_cpu start_gpu enter remove stopall bootstrap build install init profile create list update setup_host usage -h --help"

function _complete_func() {
COMPREPLY=()
local cur="${COMP_WORDS[COMP_CWORD]}"
local cmds="$(echo ${COMMANDS} | xargs)"

COMPREPLY=($(compgen -W "${cmds}" -- ${cur}))

}

complete -F _complete_func -o default aem
Loading

0 comments on commit 7153c51

Please sign in to comment.