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:
service_name : ““
msg : ““
ServiceResponse
Ego vehicle state information and multi-Ego vehicle state information reception can be distinguished through service_name field.
Ego vehicle’s state information
service_name : “/morai_msgs/EgoState“
msg : EgoState
Multi-Ego vehicle’s state information
service_name : “/morai_msgs/MultiEgoState“
msg : list of MultiEgoState
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:
service_name : ““
msg : ““
ServiceResponse
Ego vehicle state information and multi-Ego vehicle state information reception can be distinguished through service_name field.
Ego vehicle’s state information
service_name : “/morai_msgs/EgoState“
msg : EgoState
Multi-Ego vehicle’s state information
service_name : “/morai_msgs/MultiEgoState“
msg : list of MultiEgoState
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
Link
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
Simulator Pause
Resume(Empty) returns (Result)
Simulator Pause
Simulator Map Loading