Simulation Data Editor for Re:sim

SEdit
Manual Part 2: Scenario Data Setting
July, 2020

Misaki design LLC

1

Contents

1. Outline of Scenario Data Setting
2. The Graphical User Interface (GUI )3
4

5. The Actions of Vehicle-Object Event17

5.1 Appear

18

5.2 Control

225.2.1 Change Control Mode

23

5.2.2 Accel/Brake, Steering Override25

3. The Trigger Data Setting

6

3.1 Details of Position Trigger

7

5.3 Send UDP Data26

3.2 Details of TTC Trigger

9

5.4 Disappear

26

4. The Actions of System Event

11

6. The Actions of Pedestrian-Object Event27

4.1 Teleportation

12

5.1 Appear

28

4.2 Change Traffic Signal

14

5.2 Control

30

4.3 Change Speed Info15

5.3 Send UDP Data

31

4.4 Send UDP Data

16

5.4 Disappear

31

7. How to use SEdit Scenario Data in Re:sim
simulation
32
2

1. Outline of Scenario Data Setting

Scenario
System Event 1

The scenario is defined as the set of the Event, which is given by

Trigger - Action

the Trigger and Action pair in SEdit.
object event and Pedestrian-Object event.
The Trigger data for three events is common, and the action data…

There are three types of the Event, the System event, Vehicle-

System Event Ns

is different among events.

Trigger - Action

The trigger data assigns the conditions when the Action happen.
It is represented by the combination of following trigger elements.

2.

Position Tigger

3.

Velocity Trigger

4.

TTC Trigger

5.

Function Extender Trigger

6.

External Trigger

Slot 1

Vehicle-Object Event

Slot 1

Trigger - Action

Pedestrian-Object Event
Trigger - Action

Slot N

Vehicle-Object Event…

Time Trigger

Pedestrian 1…

1.

Vehicle 1

Slot N

Trigger - Action

Pedestrian-Object Event
Trigger - Action

The action data specifies what to happen.

Teleportation

1.

Appear2.

Change Traffic Signal

2.

Control3.

Change Speed Info

3.

Send UDP Data

4.

Send UDP Data

4.

Disappear

The vehicle/pedestrian object have multiple events, it is called Slotin SEdit Scenario Editor.

Slot 1

Pedestrian Mp

Vehicle-Object Event
Trigger - Action

Slot 1

Pedestrian-Object Event
Trigger - Action…

1.

Vehicle Mv…

Vehicle/Pedestrian Event:…

System Event:…

The following actions are prepared in SEdit.

3

2. The Graphical User Interface (GUI )The scenario editor can be shown by selecting the “Show Scenario Editor” from the Tool menu.

Important

You should press “Apply” button when you
edit the data to reflect the data changes.
SEdit scenario editor do not automaticallychange stored data inside.

4You can save data to the file as usual.
The extension of the SEdit scenario data file is .ss.txt.

New Data

Important

Load Data

Save Data

Save Data As

Notice that to load the saved scenario data, you should open the road data file in advance.

53. The Trigger Data Setting
You can select the trigger to use by checking the checkbox.
For multiple checks, the AND/OR combination of the conditions can be set.
□ No Trigger
The action starts when the simulation starts.
□ Time Trigger
You can assign the time the action happen.
The option “time from appear” is only valid for vehicle/pedestrian-object events.
□ Position Trigger
The action will happen when the target object pass the assigned position withassigned direction. See next page for more detail how to set the trigger.
□ Velocity Trigger
If the speed of the target object is faster or lower than the assigned value, the action
will happen.
□ TTC Trigger
The TTC of the target object to the specific point or to assigned object is calculated,
and if the value of the TTC is smaller than the threshold value, the action happen.
See the following sections for more detail.
□ FuncExtend Trigger
The function extender program of “Sirius” can initiate the trigger by sending UDP command.
□ External Trigger
This is the trigger fired by the keyboard operation.

63.1 Details of Position Trigger
You can set the position trigger by following steps.
1. Check the Position Trigger checkbox
2. Press the Blue-Flag button

3. “ALT”+ Left Click the point of map where you want to set the trigger
4. “ALT”+ Left Click another point of map to define the pass direction of target object
5. Set width of object pass judgment
6. Set Target Object ID which initiate the trigger
7. Press “Apply” button to reflect the data
Important

If target object ID = -1 for vehicle/pedestrian object event, it means that the target object is itself.

1.

2.

3.

4.
5.
6.

7

3. “ALT” + Left click to get trigger position

After Step 4, the position and direction data is set GUI.
4. “ALT” + Left click to define pass direction

Notice that these are temporally, should press “Apply” to fix the data.

pass direction

Press “Apply” button

5. Width

If the target object pass the point outside the width,
the trigger won’t fire.

8

3.2 Details of TTC Trigger

1.

2.

You can set the TTC trigger by following steps.

3.

1. Check the TTC Trigger checkbox
2. Set TTC threshold value

3. Set Target Object ID, the TTC for which is calculated
4. Select calculation reference, point on map or other object
5. In case the reference is the point on map, press Blue-Flag button and “ALT” + Left Click the map
In case the reference is another object, set object ID
6. Press “Apply” button to reflect the data

Important

4.

If target object ID = -1 for vehicle/pedestrian object event, it means that the target object is itself.
The reference object ID can not be -1 if “Calculate TTC to Object” is selected.

5.

5. “ALT” + Left click to get TTC reference point.
Yellow circle appear if “Apply” button pressed.

9Calculation of TTC is as follows.

Reference: Point on map

Reference: Other Object
vr

Reference Point

Reference Object

e

v

x

Target Object

If |e| < 1.5 and x > 0.0 and v > 0.1 , TTC is calculated as
TTC = x / v
and if TTC < TTC_threshold, the TTC trigger fire.

vrx
e

v

x

Target Object

If |e| < 1.5 and x > 0.0 and vrel=v-vrx > 0.1, TTC is given as
TTC = x / vrel
and if TTC < TTC_threshold, the TTC trigger fire.

10

4. The Actions of System EventFirstly, create system event by pressing “Add System” button.
The created system event is listed in the system event view.

“Add System” button

system event view

Important

Click the item in the system event view when setting data and apply data to distinguish which event to assign the data.

11

“ALT” + Left click to set teleportation position

4.1 Teleportation“ALT” + Left click to define the direction

This action realize the teleport of the target object with using position trigger from current position to assigned position.
Another typical usage is to set initial position of DS vehicle for “Sirius” application.

To set the teleportation goal position and direction, press “Blue-Flag” button and “ALT” + Left click on the map twice.
Press “Fit to the Lane” button if you want to set the position just on the nearest lane.
direction after teleportation“Set Teleport goal” button“Fit to the Lane” button

Press “Apply” button

Press “Fit to the Lane” button

and then “Apply” button

Target Object ID is the ID of the object to be teleported.
The option, “Move Surrounding Objects together” is checked, the surrounding object around target object is also
teleported. See next page for more detail.
If the “Teleport only once” is checked, the event do not repeat again.
The “Clear Lateral Offset” option is used to clear lateral offset after teleportation, see next page.

12

500[m]Target Object

Teleportation goal

500[m]
Lateral Offset

Surrounding Objects

Objects around Teleportation goal are disappeared
if “Move Surrounding Objects together” is checked.

System event “Teleportation” occurred
Surrounding Objects also teleport if
Target Object“Move Surrounding Objects together”
is checked

Target Object

Lateral Offset

The “Clear Lateral Offset” option is checked.

134.2 Change Traffic Signal
This action can change the signal display of assigned traffic signal( and the traffic signals relating to the same intersection).
To set the target traffic signal, press the “Blue-Flag” button and “ALT” + Left click the traffic signal you want to change the signal display.

The signal display index is the number of the row - 1 of the display
pattern table shown in the Traffic Signal Property dialog.
The “Display OFF” option is used to turn off the traffic signal, whichmeans that the intersection is no more controlled by the traffic signal.
If both of “Display OFF” and “Apply to All Signals” are checked, all the
traffic signals in the simulation turned off.
These options will not be used so frequently.

14

4.3 Change Speed Info
This action can change the speed information given to the lanes.
You can assign Speed Limit and/or Actual Speed.
The target lanes should be set in the entry as shown in the figure below.
You can pick the target lanes by “ALT” + Left click by pressing “Blue-Flag” button.

15

4.4 Send UDP Data
This action can send the data by UDP packet to assigned IP address and Port number.
This function is provided to work with other application programs and the contents of data to be send is completely depend on the user.
Though the data should be pairs of integer and floating-point number, with comma-separated format as shown in the figure below.
The integer represents the index of data and the floating-point value represent the value of data.

The format of the data send by this action is illustrated as follow.
If the number of (int, float) data pair is N, the total data length would be 8*(N+1) byte.

Header
‘F’
[0]

‘U’

‘m’

‘D’

int nData=N

int index_1

float val_1

i integer data

i integer data

float data

[4]

[8]

…

[12]

…

int index_N

float val_N

i integer data

float data

[8+8*N][12+8*N]See the Re:sim source code for more detail.

When the “Repeat sending the data” is checked, the trigger is reset and fire again if the trigger condition is satisfied.

16

5. The Actions of Vehicle-Object Event
To create vehicle-object event, press “Add Vehicle” button.
The created vehicle-object is listed in the vehicle-object view.
Then click the object in the view, press “Add Slot” button.
The slot of the vehicle-object is listed in the slot view.

“Add Vehicle” button“Add Slot” button
Vehicle Object view

Slot view

Important

Click both the object in the vehicle object view and its slot when setting data and apply data to distinguish which object and slot to assign the data.

175.1 Appear
This action is used to generate a vehicle object in the simulation.
The initial position, orientation, speed, and vehicle model ID should be assigned.
In addition, vehicle route information should be provided as either Node-list type data or Path-list type data.

“Set Initial position and orientation” button“Fit to the Lane” button

The initial position and orientation can be set in the same way as setting
teleportation goal described in section 4.1.
By pressing “Apply” button after picking the points on map, the vehicleshape is drawn at the given initial position and orientation as shown below.

Important

To set Node-list type route data, complete set of road data should be prepared in advanced of scenario data setting.

18

To set Node-list type route data, press “Set” button and “ALT” + Left click of the nodes in order of the visit.
The yellow line will be drawn during picking the nodes.
To end the node picking, “ALT” + Right click, and the route info is displayed as shown below.
By pressing “Apply” button, the route data is fixed and lane-list to trace is illustrated as follow.

“ALT” + Left click to pick nodes“ALT” + Right click“Apply” button19

To set Path-list type route data, press “Set” button and “ALT” + Left click on the map to define the paths.
The yellow line will be drawn during picking.
To end this, “ALT” + Right click, and the route info is displayed as shown below.
By pressing “Apply” button, the route data is fixed and lane-list to trace is illustrated as follow.

“ALT” + Left click to pick points“ALT” + Right click“Apply” button

20

Important

The initial position and orientation can be set using “Fit to the Lane” function even for the Path-list type route, if after the route data is set.
The nearest Lane ID in this case will be -1.

Important

The control-mode of the scenario vehicle object is the agent-control.

If other control-mode should be applied, you should prepare the Control action which is explained next subsection.

21

5.2 Control
This action changes the control mode of the target vehicle object.
In addition, Acceleration/Deceleration and Steering override command can be defined bychecking the checkboxes.
You can set these three checkboxes simultaneously though the override commands havethe priority to normal control mode of vehicle object.

If “Apply again” is checked, the action is conducted again if the trigger conditions are met.

22

5.2.1 Change Control Mode
There are four control modes as shown below.

➢ Agent Logic
Vehicle object moves by Re:sim driver-agent logic.
➢ Headway Distance Control
Vehicle object conducts headway distance control against the object assignedby target object ID.
The reference headway distance for headway control is determined as follow.
H1 = Headway Distance
H2 = Headway Time × Vehicle object speed
reference headway distance = ( H1 > H2 ? H1 : H2 )If Headway Time and Headway Distance is set 0.0, the setting will be ignored.

➢ Speed Profile Control
The vehicle object speed will be varied according to the speed profile table data.
See next page for more detail.

Important

The parameters in this dialog, which is not
relevant to the selected control mode, is ignored(not used) in Re:sim program.

➢ stop Control

See Re:sim source code for more detail.

The vehicle object will stop at assigned position.
You can pick the point of stop by “Blue-Flag” button and “ALT” + Left click on map.

23

The following figure shows the example of the speed profile data set.
“Add” button insert a row in the table and you can enter the values there.
The data set in the table can be visualized, press “Graph” button to show the time vs. velocity and distance vs. velocity graphs.
If no graph is drawn,press “Update” button.

“Add”/”Delete” the rowof the table

Use last speed
for over timeShows the graph

Important

If the time over last value given by the table, last value of speed is used as a reference value.
During the speed profile control mode, steering control of the vehicle object is done so that the vehicle object runs along the target lanes provided by the route information.

24

5.2.2 Accel/Brake, Steering Override
To override Acceleration/Deceleration and Steering inputted to the vehicle, check “Accel/Brake Input” or “Steering Input” and set
profile data to the corresponding tables.
How to set the data in the table is same as speed profile data.

Accelerate

Braking
Use last value
for over time

Important

The steering override data set in the table is relative to the initial steering angle, which is the steering angle just when the event start.

Thus the absolute steering angle will be:
Absolute steering angle = initial steering angle(angle at event start timing) + steering angle given by the steering override table25

5.3 Send UDP Data
This action can send the data by UDP packet to assigned IP address and Port number.
See Section 4.4.

5.4 Disappear
This action is used to leave the vehicle object from the simulation.
If “Apply if appeared again” is checked, this action can be occurred repeatedly.

26

6. The Actions of Pedestrian-Object Event
To create pedestrian-object event, press “Add Pedestrian” button.
The created pedestrian-object is listed in the pedestrian-object view.
Then click the object in the view, press “Add Slot” button.
The slot of the pedestrian-object is listed in the slot view.

“Add Pedestrian” button“Add Slot” button

Pedestrian Object view

Slot view

Important

Click both the object in the vehicle object view and its slot when setting data and apply data to distinguish which object and slot to assign the data.

27

6.1 Appear
This action is used to generate a pedestrian object in the simulation.
The initial position, orientation, speed, and pedestrian model ID should be assigned.
In addition, pedestrian route information should be provided as Path-list type data.

“Set Initial position andorientation” button

The initial position and orientation can be set in the same way as setting
teleportation goal described in section 4.1.
By pressing “Apply” button after picking the points on map, the pedestrianshape is drawn at the given initial position and orientation as shown below.

28

To set Path-list type route data, press “Set” button and “ALT” + Left click on the map to define the paths.
The yellow line will be drawn during picking.
To end this, “ALT” + Right click, and the route info is displayed as shown below.
By pressing “Apply” button, the route data is fixed and the trajectory of pedestrian object to follow is illustrated as follow.

“ALT” + Left click to pick points“ALT” + Right click“Apply” button29

6.2 Control
This action changes the control mode of the target pedestrian object.
There are four control modes as shown below.

➢ Agent Logic
Pedestrian object moves by Re:sim pedestrian-agent logic.

➢ Constant Speed
Pedestrian object moves at given target speed.

➢ Speed Profile Control
The pedestrian object speed will be varied according to the speed profile table data.

➢ Run Out into Street Control
The pedestrian object will move to the direction assigned by Run-Our Direction,
relative to the pedestrian path line, just like “Run-Out into the Street”

Run-Out Direction30

6.3 Send UDP Data
This action can send the data by UDP packet to assigned IP address and Port number.
See Section 4.4.

6.4 Disappear
This action is used to leave the pedestrian object from the simulation.
If “Apply if appeared again” is checked, this action can be occurred repeatedly.

31

7. How to use SEdit Scenario Data in Re:sim simulation
To use the scenario data, configure Re:sim simulation data with the scenario data file in the Re:sim Files Output dialog.
Check “Assign Scenario Data” and select the scenario file( *.ss.txt) to use.

The Re:sim scenario file *.rs.txt ( not SEdit scenario file) include necessary data for raise the scenario event.

32

The scenario vehicles and pedestrians are labeled as [snr] in Re:sim simulation, color of the polygons are light green as shown below.

33