27#include "gtest/gtest_prod.h"
29#include "modules/canbus/proto/canbus_conf.pb.h"
30#include "modules/canbus/proto/vehicle_parameter.pb.h"
31#include "modules/canbus_vehicle/lincoln/proto/lincoln.pb.h"
32#include "modules/common_msgs/basic_msgs/error_code.pb.h"
33#include "modules/common_msgs/chassis_msgs/chassis.pb.h"
34#include "modules/common_msgs/control_msgs/control_cmd.pb.h"
65 CanSender<::apollo::canbus::Lincoln> *
const can_sender,
66 MessageManager<::apollo::canbus::Lincoln>
67 *
const message_manager)
override;
73 bool Start()
override;
92 void Emergency()
override;
104 void Brake(
double acceleration)
override;
108 void Throttle(
double throttle)
override;
112 void Acceleration(
double acc)
override;
116 void Steer(
double angle)
override;
121 void Steer(
double angle,
double angle_spd)
override;
131 bool VerifyID()
override;
132 void ResetProtocol();
133 bool CheckChassisError();
137 void SecurityDogThreadFunc();
138 virtual bool CheckResponse(
const int32_t flags,
bool need_wait);
139 void set_chassis_error_mask(
const int32_t mask);
140 int32_t chassis_error_mask();
149 Gear66 *gear_66_ =
nullptr;
153 std::unique_ptr<std::thread> thread_;
154 bool is_chassis_error_ =
false;
156 std::mutex chassis_error_code_mutex_;
159 std::mutex chassis_mask_mutex_;
160 int32_t chassis_error_mask_ = 0;
162 bool received_vin_ =
false;
the class of Brake60 (for lincoln vehicle)
This is the interface class of vehicle controller.
virtual common::ErrorCode SetDrivingMode(const Chassis::DrivingMode &driving_mode)
set vehicle to appointed driving mode.
one of the protocol data of lincoln vehicle
one of the protocol data of lincoln vehicle
this class implements the vehicle controller for lincoln vehicle.
FRIEND_TEST(LincolnControllerTest, UpdateDrivingMode)
Chassis chassis() override
calculate and return the chassis.
void Stop() override
stop the vehicle controller.
FRIEND_TEST(LincolnControllerTest, Status)
common::ErrorCode Init(const VehicleParameter ¶ms, CanSender<::apollo::canbus::Lincoln > *const can_sender, MessageManager<::apollo::canbus::Lincoln > *const message_manager) override
initialize the lincoln vehicle controller.
FRIEND_TEST(LincolnControllerTest, SetDrivingMode)
bool Start() override
start the vehicle controller.
one of the protocol data of lincoln vehicle
one of the protocol data of lincoln vehicle
one of the protocol data of lincoln vehicle
the class of Gear66 (for lincoln vehicle)
the class of Steering64 (for lincoln vehicle)
the class of Throttle62 (for lincoln vehicle)
the class of Turnsignal68 (for lincoln vehicle)
The class of VehicleController