Skip to main content
Skip table of contents

gRPC Procedures


Procedure Definition

Ego

SetEgoCtrlCmd(EgoCtrlCmd) returns (ServiceResponse)

Ego vehicle control

SetEgo(SetEgoParam) returns (Result)

Initial setting after spawning Ego vehicle

SendEgoCruiseCtrl(EgoCruiseCtrl) returns (Empty)

Cruise Mode setting of Ego vehicle

Connect (stream ServiceRequest) returns (stream ServiceResponse)

Enable MORAI SIM to receive vehicle status information from Connect and MORAI SIM.

Through Return message, the status information of Multi-Ego vehicle can be received.

ServiceRequest

When calling Connect(…) procedure, ServiceRequest’s each field is as follows:

ServiceResponse

Ego vehicle state information and multi-Ego vehicle state information reception can be distinguished through service_name field.


MultiEgo

SendMultiEgoCtrlCmd(MultiEgoCtrlCmdList) returns (ServiceResponse)

Multi-Ego vehicle control

SendMultiEgoEventCmd(MultiEgoEventCmdRequestList) returns (MultiEgoEventCmdResponseList)

Multi-Ego vehicle Event control

SendCreateMultiEgoVehicle(CreateMultiEgoVehicleRequestList) returns (ActorResponseList)

If there is an NPC vehicle with the same unique_id in the simulator at the time of the NPC vehicle creation request, NPC vehicle is created by randomly allocating unique_id.

SendDeleteMultiEgoVehicle(DeleteMultiEgoVehicleRequest) returns (ServiceResponse)

Destroy all Multi-ego vehicles

SendDeleteTargetMultiEgoVehicle(TargetUniqueId) returns (Empty)

Destroy Multi-Ego vehicles with only allocated unique_id

Connect (stream ServiceRequest) returns (stream ServiceResponse)

Enable MORAI SIM to receive vehicle status information from Connect and MORAI SIM.

Through Return message, the status information of Multi-Ego vehicle can be received.

ServiceRequest

When calling Connect(…) procedure, ServiceRequest’s each field is as follows:

ServiceResponse

Ego vehicle state information and multi-Ego vehicle state information reception can be distinguished through service_name field.


Built-in Scenario

LoadSimScenario(Scenario) returns (Empty)

Scenario Loading (Morai’s own format)


Open Scenario

Start(StartRequest) returns (ServiceResponse)

OpenSCENARIO service Start Command

Stop(StopRequest) returns (ServiceResponse)

OpenSCENARIO service Stop Command


GetLeftLink(LinkInfo) returns (GetLinkResponse)

Certain Link’s left link query

GetRightLink(LinkInfo) returns (GetLinkResponse)

Certain Link’s right angle link query

GetToLinks(LinkInfo) returns (GetLinkResponseList)

Certain Link’s front link query

GetFromLinks(LinkInfo) returns (GetLinkResponseList)

Certain Link’s rear angle link query

GetVehiclesOnLink(LinkInfo) returns (GetVehiclesOnLinkResponseList)

Return unique_id if certain vehicle is present


SpawnPoint

CreateSpawnPoint(CreateSpawnPointList) returns (ActorResponseList)

Create Spawn Point

EnableSpawnPoint(EnableSpawnPointList) returns (ActorResponseList)

Spawn Point Enable/Disable

SetSpawnPoint(SetSpawnPointList) returns (ActorResponseList)

Set Spawn Point

SetPedestrianSpawnPoint(SetPedestrianSpawnPointList) returns (ActorResponseList)

Set Pedestrian Spawn Point


Traffic

GetTrafficLightInfoByLink(LinkInfo) returns (TLInfo)

Get Traffic Light id and state of certain spot through Link ID

GetTrafficLightInfoByUid(TargetUniqueId) returns (TLInfo)

Get Traffic Light id and state of certain spot through Traffic Light ID

GetIntscnTLInfo(TargetUniqueId) returns (TLInfoList)

Get Traffic Light id and state through IntscnID

SetTrafficLightState(TLStateParamList) returns (ActorResponseList)

Change the state(light color) of a traffic light


Intersection

SetIntersectionState(IntscnStateParamList) returns (ActorResponseList)

Change the state of intersection

SetIntersectionSchedule(IntscnScheduleParamList) returns (ActorResponseList)

Change the schedule of intersection


FaultStatus

SetFaultStatusOnCtrl(FaultInjectionCtrlList) returns (ActorResponseList)

Fault takes places for vehicle [Accel, Brake, Steering]

SetFaultStatusOnTire(FaultInjectionTireList) returns (ActorResponseList)

Fault takes place for vehicle Tire

SetFaultStatusOnSensor(FaultInjectionSensorList) returns (ActorResponseList)

Fault takes place for Sensor attached to the vehicle


Friction

CreateMapObject(CreateMapObjectList) returns (ActorResponseList)

Create friction-controlled objects (e.g., water puddles)

SetFrictionOnArea(FrictionControlAreaList) returns (ActorResponseList)

Configuring Friction-Controllable Objects


Sensor

AddSensor(SensorSettingList) returns (SensorResponseList)

attach the sensor to the vehicle

RemoveSensor(RemoveSensorList) returns (SensorResponseList)

remove the sensor attached to the vehicle

SetGroundTruthSensor(SetGroundTruthSensorList) returns(Result)

GT(Ground Truth) sensor setting

GetGroundTruthData(TargetSensorList) returns(GroundTruthList)

Get GT(Ground Truth) sensor Data


Pedestrian

CreatePedestrian(PedestrianSpawnList) returns (ActorResponseList)

Create pedestrian on simulator scene

SendStartPedestrian(PedestrianActionList) returns (ActorResponseList)

start pedestrian animation


Obstacle / Object

CreateObstacle(ObstacleSpawnList) returns (ActorResponseList)

spawn obstacles

DeleteSpawnObstacles(CategoryObstacles) returns (Empty)

remove obstacle

ObjectPause(ObjectPauseList) returns (Result)

pause / resume certain object allocated with unique_id


Driving Path

SendVehicleRoutes(RouteList) returns (VehicleRouteResultList)

set the vehicle’s driving path based on mgeo link id

SendVehicleDestinations(DestinationList) returns (VehicleRouteResultList)

set the vehicle’s driving path based on the coordinates

SendVehiclePathOffset(PathOffsetList) returns (Empty)

set the extent of vehicle’s lane center maintenance

GetVehicleAuxState(TargetUniqueIdList) returns (VehicleAuxStateInfoList)

Get vehicle’s Aux state


Simulator

Pause(Empty) returns (Result)

Simulator Pause

Resume(Empty) returns (Result)

Simulator Pause

LoadMap(Map) returns (Result)

Simulator Map Loading

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.