Skip to content

Commit be0475a

Browse files
authored
Merge pull request #11 from wheelos/update
Update
2 parents 7391905 + 15911e2 commit be0475a

File tree

18 files changed

+975
-11
lines changed

18 files changed

+975
-11
lines changed

docker/build/installers/install_libtorch.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ function install_libtorch_cpp() {
133133
download_if_not_cached "${pkg_filename}" "${pkg_checksum}" "${pkg_uri}"
134134
mkdir -p /usr/local/libtorch
135135
tar -xzf "${pkg_filename}" -C /usr/local/libtorch --strip-components=1
136+
137+
# Add runtime library path
138+
ensure_ld_path "/usr/local/libtorch/lib"
139+
136140
rm -rf "${pkg_filename}"
137141

138142
ldconfig

docker/scripts/dev_start.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,17 @@ TIMEZONE_CN=(
5959

6060
# --- Constants: Container Resources ---
6161
# Resource limits (can be overridden by environment variables)
62-
DOCKER_CPUS="${DOCKER_CPUS:-6}"
62+
DOCKER_CPUS="${DOCKER_CPUS:-8}"
6363
DOCKER_MEMORY="${DOCKER_MEMORY:-8g}"
6464

6565
# --- Constants: Image Name and Versions ---
6666
# Default development image versions based on architecture and distribution
6767
# can be overridden by environment variables.
68-
DOCKER_IMAGE_REPO=${DOCKER_IMAGE_REPO:="apolloauto/apollo"}
68+
DOCKER_IMAGE_REPO=${DOCKER_IMAGE_REPO:="wheelos/apollo"}
6969
WHL_DOCKER_IMAGE_REPO=${WHL_DOCKER_IMAGE_REPO:="wheelos"}
70-
DOCKER_IMAGE_TAG_X86_64=${DOCKER_IMAGE_TAG_X86_64:="dev-x86_64-18.04-20221124_1708"}
70+
DOCKER_IMAGE_TAG_X86_64=${DOCKER_IMAGE_TAG_X86_64:="dev-x86_64-20.04-20250713_1555"}
7171
DOCKER_IMAGE_TAG_X86_64_TESTING=${DOCKER_IMAGE_TAG_X86_64_TESTING:="dev-x86_64-20.04-20250710_2109"}
72-
DOCKER_IMAGE_TAG_AARCH64=${DOCKER_IMAGE_TAG_AARCH64:="dev-aarch64-20.04-20231024_1054"}
72+
DOCKER_IMAGE_TAG_AARCH64=${DOCKER_IMAGE_TAG_AARCH64:="dev-aarch64-20.04-20250714_2123"}
7373

7474
# --- Script Global Variables (Modified by arguments/logic) ---
7575
DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG:=""} # Default empty
@@ -561,9 +561,10 @@ function main() {
561561
)
562562
563563
# Add resource limits (cpus, memory)
564+
# TODO(zero): move to CI, --memory will force OOM when the content exceeds the memory limit.
564565
local resource_opts=(
565-
--cpus="${DOCKER_CPUS}"
566-
--memory="${DOCKER_MEMORY}"
566+
# --cpus="${DOCKER_CPUS}"
567+
# --memory="${DOCKER_MEMORY}"
567568
)
568569
569570
# --- Phase 4: Run the Container ---

modules/canbus/vehicle/vehicle_controller.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ ErrorCode VehicleController::Update(const ControlCommand &control_command) {
127127
driving_mode() == Chassis::AUTO_SPEED_ONLY) {
128128
Gear(control_command.gear_location());
129129
Throttle(control_command.throttle());
130+
Speed(control_command.speed());
130131
Acceleration(control_command.acceleration());
131132
Brake(control_command.brake());
132133
SetEpbBreak(control_command);

modules/canbus/vehicle/vehicle_controller.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ class VehicleController {
125125
*/
126126
virtual void Throttle(double throttle) = 0;
127127

128+
/*
129+
* @brief drive with speed
130+
* unit: m/s
131+
*/
132+
virtual void Speed(double speed) {}
133+
128134
/*
129135
* @brief drive with new acceleration/deceleration:-7.0~7.0, unit:m/s^2,
130136
* acc:-7.0~7.0, unit:m/s^2

modules/control/controller/BUILD

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,29 @@ cc_library(
7979
],
8080
)
8181

82+
cc_library(
83+
name = "lon_speed_controller",
84+
srcs = ["lon_speed_controller.cc"],
85+
hdrs = ["lon_speed_controller.h"],
86+
copts = CONTROL_COPTS,
87+
deps = [
88+
":controller_interface",
89+
"//cyber",
90+
"//modules/common/configs:vehicle_config_helper",
91+
"//modules/common/status",
92+
"//modules/common_msgs/control_msgs:control_cmd_cc_proto",
93+
"//modules/common_msgs/control_msgs:input_debug_cc_proto",
94+
"//modules/control/common:control_gflags",
95+
"//modules/control/common:leadlag_controller",
96+
"//modules/control/common:pid_controller",
97+
"//modules/control/common:trajectory_analyzer",
98+
"//modules/control/proto:control_conf_cc_proto",
99+
"//modules/control/proto:lon_controller_conf_cc_proto",
100+
"//modules/localization/common:localization_gflags",
101+
"@com_google_absl//absl/strings",
102+
],
103+
)
104+
82105
cc_library(
83106
name = "mpc_controller",
84107
srcs = ["mpc_controller.cc"],
@@ -118,6 +141,7 @@ cc_library(
118141
":controller_interface",
119142
":lat_controller",
120143
":lon_controller",
144+
":lon_speed_controller",
121145
":mpc_controller",
122146
"@eigen",
123147
],
@@ -132,6 +156,7 @@ cc_library(
132156
":controller_interface",
133157
":lat_controller",
134158
":lon_controller",
159+
":lon_speed_controller",
135160
":mpc_controller",
136161
"//cyber",
137162
"//modules/common/util:util_tool",

modules/control/controller/controller_agent.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "modules/control/common/control_gflags.h"
2424
#include "modules/control/controller/lat_controller.h"
2525
#include "modules/control/controller/lon_controller.h"
26+
#include "modules/control/controller/lon_speed_controller.h"
2627
#include "modules/control/controller/mpc_controller.h"
2728

2829
namespace apollo {
@@ -51,6 +52,11 @@ void ControllerAgent::RegisterControllers(const ControlConf *control_conf) {
5152
ControlConf::LON_CONTROLLER,
5253
[]() -> Controller * { return new LonController(); });
5354
break;
55+
case ControlConf::LON_SPEED_CONTROLLER:
56+
controller_factory_.Register(
57+
ControlConf::LON_SPEED_CONTROLLER,
58+
[]() -> Controller * { return new LonSpeedController(); });
59+
break;
5460
default:
5561
AERROR << "Unknown active controller type:" << active_controller;
5662
}

0 commit comments

Comments
 (0)