Skip to content

Commit 36b6300

Browse files
Bump cvxpy from 1.4.3 to 1.5.1 in /requirements (#1016)
* Bump cvxpy from 1.4.3 to 1.5.1 in /requirements Bumps [cvxpy](https://github.com/cvxpy/cvxpy) from 1.4.3 to 1.5.1. - [Release notes](https://github.com/cvxpy/cvxpy/releases) - [Commits](cvxpy/cvxpy@v1.4.3...v1.5.1) --- updated-dependencies: - dependency-name: cvxpy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * fix cvxpy update issue --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Atsushi Sakai <[email protected]>
1 parent ed5004b commit 36b6300

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

PathTracking/model_predictive_speed_and_steer_control/model_predictive_speed_and_steer_control.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
77
"""
88
import matplotlib.pyplot as plt
9+
import time
910
import cvxpy
1011
import math
1112
import numpy as np
1213
import sys
1314
import pathlib
14-
from utils.angle import angle_mod
1515
sys.path.append(str(pathlib.Path(__file__).parent.parent.parent))
1616

17+
from utils.angle import angle_mod
18+
1719
from PathPlanning.CubicSpline import cubic_spline_planner
1820

1921
NX = 4 # x = x, y, v, yaw
@@ -281,7 +283,7 @@ def linear_mpc_control(xref, xbar, x0, dref):
281283
constraints += [cvxpy.abs(u[1, :]) <= MAX_STEER]
282284

283285
prob = cvxpy.Problem(cvxpy.Minimize(cost), constraints)
284-
prob.solve(solver=cvxpy.ECOS, verbose=False)
286+
prob.solve(solver=cvxpy.CLARABEL, verbose=False)
285287

286288
if prob.status == cvxpy.OPTIMAL or prob.status == cvxpy.OPTIMAL_INACCURATE:
287289
ox = get_nparray_from_matrix(x.value[0, :])
@@ -545,6 +547,7 @@ def get_switch_back_course(dl):
545547

546548
def main():
547549
print(__file__ + " start!!")
550+
start = time.time()
548551

549552
dl = 1.0 # course tick
550553
# cx, cy, cyaw, ck = get_straight_course(dl)
@@ -560,6 +563,9 @@ def main():
560563
t, x, y, yaw, v, d, a = do_simulation(
561564
cx, cy, cyaw, ck, sp, dl, initial_state)
562565

566+
elapsed_time = time.time() - start
567+
print(f"calc time:{elapsed_time:.6f} [sec]")
568+
563569
if show_animation: # pragma: no cover
564570
plt.close("all")
565571
plt.subplots()
@@ -582,6 +588,7 @@ def main():
582588

583589
def main2():
584590
print(__file__ + " start!!")
591+
start = time.time()
585592

586593
dl = 1.0 # course tick
587594
cx, cy, cyaw, ck = get_straight_course3(dl)
@@ -593,6 +600,9 @@ def main2():
593600
t, x, y, yaw, v, d, a = do_simulation(
594601
cx, cy, cyaw, ck, sp, dl, initial_state)
595602

603+
elapsed_time = time.time() - start
604+
print(f"calc time:{elapsed_time:.6f} [sec]")
605+
596606
if show_animation: # pragma: no cover
597607
plt.close("all")
598608
plt.subplots()

requirements/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
numpy == 1.26.4
22
scipy == 1.13.0
33
matplotlib == 3.8.4
4-
cvxpy == 1.4.3
4+
cvxpy == 1.5.1
55
pytest == 8.2.0 # For unit test
66
pytest-xdist == 3.6.1 # For unit test
77
mypy == 1.10.0 # For unit test

runtests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ echo "Run test suites! "
55
# -Werror: warning as error
66
# --durations=0: show ranking of test durations
77
# -l (--showlocals); show local variables when test failed
8-
pytest -n auto tests -l -Werror --durations=0
8+
pytest tests -l -Werror --durations=0

0 commit comments

Comments
 (0)