Function SimOneAPI::SetDriveMode

Function Documentation

bool SimOneAPI :: SetDriveMode ( const char * mainVehicleId , ESimOne_Drive_Mode driveMode )

主车控制模式

Set the driving mode of the vehicle dynamics.

此函数用于设置主车的驾驶模式,可以是API控制模块、SimOneDriver控制模块或两者的组合

This function is used to set the driving mode of the main vehicle, which can be controlled by the API module, SimOneDriver module, or a combination of both.

  • ESimOne_Drive_Mode_API: 由API控制模块驾驶

    Driving by API controlling module.

  • ESimOne_Drive_Mode_Driver: 由SimOneDriver控制模块驾驶

    Driving by SimOneDriver controlling module.

  • ESimOne_Drive_Mode_API_Lateral: 横向控制由API模块,纵向控制由SimOneDriver模块

    Lateral control under API module, longitudinal control under SimOneDriver module.

  • ESimOne_Drive_Mode_API_Longitudinal: 横向控制由SimOneDriver模块,纵向控制由API模块

    Lateral control under SimOneDriver module, longitudinal control under API module.

参数 :
  • mainVehicleId [in]

    主车的ID

    Id of the main vehicle.

  • driveMode [in]

    车辆驾驶控制模式

    Vehicle driving control mode.

返回 :

如果模式设置成功,则返回true,否则返回false

Returns true if the mode is successfully set, false otherwise.