mpc_python_learn/mpc_pybullet_demo/cvxpy_mpc/vehicle_model.py

24 lines
526 B
Python
Raw Normal View History

2023-10-24 03:58:21 +08:00
import numpy as np
class VehicleModel:
"""
2023-10-25 21:46:06 +08:00
Helper class that contains the parameters of the vehicle to be controlled
2023-10-25 21:17:25 +08:00
Attributes:
2023-10-25 21:46:06 +08:00
wheelbase: [m]
max_speed: [m/s]
max_acc: [m/ss]
max_d_acc: [m/sss]
max_steer: [rad]
max_d_steer: [rad/s]
2023-10-24 03:58:21 +08:00
"""
def __init__(self):
2023-10-25 21:46:06 +08:00
self.wheelbase = 0.3
self.max_speed = 1.5
self.max_acc = 1.0
self.max_d_acc = 1.0
self.max_steer = np.radians(30)
self.max_d_steer = np.radians(30)