Synchronous Mode ROS Message Specifications
This section describes about the Synchronous Mode ROS Message Specifications.
Synchronous Mode Call Service
Start/Stop the Synchronous Mode is only available in ROS.
When the Synchronous Mode is ON, keyboard and Game-wheel control are not available.
SyncModeCmd Service Provider (User → Sim)
Service Name : /SyncModeCmd
srv : morai_msgs/MoraiSyncModeCmdSrv
Request Message Type : morai_msgs/SyncModeCmd
string user_id : Specify user_id to send Tick of Synchronous Mode. (If the string is empty, the user_id is automatically generated in the response message.)
bool start_sync_mode : Start Synchronous Mode (True) / Stop Synchronous Mode (False)
uint32 time_step : This is the time step (ms) being processed when sending a Tick, and it must be specified as a multiple of the fixed time step of 20ms. When Tick is sent, the number of frames are calculated as time_step / 20 at once.
Response Message Type : morai_msgs/SyncModeCmdResponse
string user_id : Returns user_id that can send Ticks in Synchronous Mode (if start_sync_mode is true and user_id is an empty string, a user_id is automatically generated and returned).
uint64 frame : Counts the current frame.
bool result : The success or failure of the request.
uint32 time_step : set time step (ms).
Synchronous Mode Tick Transmission Service
SyncModeWaitForTick Service Provider (User → Sim)
Service Name : /SyncModeWaitForTick
srv : morai_msgs/MoraiWaitForTickSrv
Request Message Type : morai_msgs/WaitForTick
string user_id : Specify user_id to send Tick of Synchronous Mode.
uint64 frame : Requested frame value.
Response Message Type : morai_msgs/WaitForTickResponse
bool tick_status : Whether the command for the received Tick has been processed.
bool pause_status : Access Scenario Editor / Scenario Save & Load / Pause or not the simulator based on the Pause mode status.
If pause_status is True, the tick_status is False since the the command of received Tick is not processed.
uint64 frame : Counts the current frame.
morai_msgs/EgoVehicleStatus vehicle_status : Vehicle status information after the requested Tick computation.
string time : The current real-world date and time in string format.
Synchronous Mode Vehicle Control Service
SyncModeCtrlCmd Service Provider (User → Sim)
Service Name : /SyncModeCtrlCmd
srv : morai_msgs/MoraiSyncModeCtrlCmdSrv
Request Message Type : morai_msgs/SyncModeCtrlCmd
morai_msgs/CtrlCmd command : Ego-vehicle control command.
uint64 frame : Requested frame value.
bool sensor_capture : Sensor Capture Mode (Save Sensor Data) is running.
The sensor data is saved in the following path: [Simulator Launcher Path]\MoraiLauncher_Win\MoraiLauncher_Win_Data\SaveFile\SensorData\SynchronousMode. [SyncMode start date].
Response Message Type : morai_msgs/SyncModeResultResponse
bool result : The success or failure of the request.
Synchronous Mode Gear Control Service
SyncModeSetGear Service Provider (User → Sim)
Service Name : /SyncModeSetGear
srv : morai_msgs/MoraiSyncModeSetGearSrv
Request Message Type : morai_msgs/SyncModeSetGear
int32 gear : Ego-vehicle change gear control.
uint64 frame : Requested frame value.
Response Message Type : morai_msgs/SyncModeResultResponse
bool result : The success or failure of the request.
Synchronous Mode Scenario Load Service
SyncModeScenarioLoad Service Provider (User → Sim)
Service Name : /SyncModeScenarioLoad
srv : morai_msgs/SyncModeSLSrv
Request Message Type : morai_msgs/SyncModeScenarioLoad
uint64 frame : Requested frame value.
string file_name : The Scenario file name to load.
bool delete_all : Whether the Scenario data is loaded after deleted. (Ego-vehicle is excluded)
bool load_network_connection : Whether the network is connected.
bool load_ego_vehicle_data : Whether the scenario of the Ego-vehicle is loaded.
bool load_surrounding_vehicle_data : Whether the scenario of the Sur-vehicle is loaded.
bool load_pedestrian_data : Whether the scenario of pedestrian is loaded.
bool load_obstacle_data : Whether the obstacle scenario is loaded.
bool set_pause : Whether the simulator is paused after the scenario is loaded.
Response Message Type : morai_msgs/SyncModeResultResponse
bool result : The success or failure of the request.
Synchronous Mode Status Information Publisher
SyncMode Info Publisher (Sim → User)
Topic Name : /SyncModeInfo
msg : morai_msgs/SyncModeInfo
Type description : Synchronous Mode Status Message.
bool can_send_tick : Whether the /SyncModeWaitForTick service can be requested.
uint64 frame : Counts the current frame.
bool status : Synchronous Mode status.
string master_id : user_id that /SyncModeWaitForTick service can be requested.
Synchronous Mode Object Addition Subscriber
SyncMode Add Object ServiceProvider (User → Sim)
Topic Name : /SyncModeAddObject
msg : morai_msgs/SyncModeAddObject
Type description : Object add message in Synchronous Mode.
string name : Object name to be spawn.
geometry/Vector3 position : Vector position of object to spawn.
float64 heading : Object heading value to spawn.
uint64 frame : Requested frame value.
Synchronous Mode Object Removal Subscriber
SyncMode Remove Object ServiceProvider (User → Sim)
Topic Name : /SyncModeRemoveObject
msg : morai_msgs/SyncModeRemoveObject
Type description : Object delete message in Synchronous Mode.
int32 unique_id : unique id value of the object to delete.
uint64 frame : Requested frame value.