跳转至

车辆控制 Vehicle Control


SetPose

bool SetPose(const char *mainVehicleId, SimOne_Data_Pose_Control *pPose)

设置主车位置
Set the main vehicle's pose.

参数:

名称 类型 说明
mainVehicleId const char * 主车的ID
Id of the main vehicle.
pPose SimOne_Data_Pose_Control * 要设置的位置(输入)
The pose to set (input).

返回值:

类型 说明
bool 如果设置成功,则返回true,否则返回false
Returns true if the pose is successfully set, false otherwise.

SetDrive

bool SetDrive(const char *mainVehicleId, SimOne_Data_Control *pControl)

主车控制
Set vehicle drive control.

参数:

名称 类型 说明
mainVehicleId const char * 主车的ID
Id of the main vehicle.
pControl SimOne_Data_Control * 车辆控制数据
Vehicle control data.

返回值:

类型 说明
bool 如果控制设置成功,则返回true,否则返回false
Returns true if the control setting is successful, false otherwise.

SetDriveMode

bool SetDriveMode(const char *mainVehicleId, ESimOne_Drive_Mode driveMode)

主车控制模式
Set the driving mode of the vehicle dynamics.

参数:

名称 类型 说明
mainVehicleId const char * 主车的ID
Id of the main vehicle.
driveMode ESimOne_Drive_Mode 车辆驾驶控制模式
Vehicle driving control mode.

返回值:

类型 说明
bool 如果模式设置成功,则返回true,否则返回false
Returns true if the mode is successfully set, false otherwise.

SetTrajectory

bool SetTrajectory(const char *mainVehicleId, SimOne_Data_Trajectory *pTrajectory)

预测轨迹设置
Set vehicle waypoints.

参数:

名称 类型 说明
mainVehicleId const char * 车辆索引,从场景编辑的配置顺序开始,从0开始
Vehicle index, configuration order from scenario editing, starting from 0.
pTrajectory SimOne_Data_Trajectory * 车辆轨迹数据
Vehicle trajectory data.

返回值:

类型 说明
bool 如果轨迹设置成功,则返回true,否则返回false
Returns true if the trajectory is successfully set, false otherwise.

SetDriveTrajectory

bool SetDriveTrajectory(const char *mainVehicleId, SimOne_Data_Control_Trajectory *pControlTrajectory)

主车控制:通过规划轨迹进行控制
Set vehicle drive control by planning trajectory.

参数:

名称 类型 说明
mainVehicleId const char * 主车的ID
Id of the main vehicle.
pControlTrajectory SimOne_Data_Control_Trajectory * 车辆规划轨迹
Vehicle planning trajectory.

返回值:

类型 说明
bool 如果设置成功,则返回true,否则返回false
Returns true if the setting is successful, false otherwise.

SetVehicleToInitState

bool SetVehicleToInitState(const char *mainVehicleId)

重置主车到初始状态
Reset the main vehicle state to the initial state.

参数:

名称 类型 说明
mainVehicleId const char * 主车的ID
Id of the main vehicle.

返回值:

类型 说明
bool 如果主车状态成功重置,则返回true,否则返回false
Returns true if the main vehicle's state is successfully reset, false otherwise.

SetVehicleInitState

bool SetVehicleInitState(const char *mainVehicleId, SimOne_Vehicle_Init_State initState)

设置主车初始状态
Set the main vehicle initial state.

参数:

名称 类型 说明
mainVehicleId const char * 主车的ID
Id of the main vehicle.
initState SimOne_Vehicle_Init_State 主车的初始状态
Initial state of the main vehicle.

返回值:

类型 说明
bool 如果主车初始状态设置成功,则返回true,否则返回false
Returns true if the main vehicle's initial state is successfully set, false otherwise.

SetRoadCoefficient

bool SetRoadCoefficient(const char *mainVehicleId, SimOne_Data_Road_Coefficient roadCoeff)

设置路面摩擦系数
Set the main vehicle initial state.

参数:

名称 类型 说明
mainVehicleId const char * 主车的ID
Id of the main vehicle.
roadCoeff SimOne_Data_Road_Coefficient

返回值:

类型 说明
bool 如果路面摩擦系数设置成功,则返回true,否则返回false
Returns true if the main vehicle's initial state is successfully set, false otherwise.