using the simulator
#contents
This page explains the specifications and usage of the simulator RTC for the modified Educator Vehicle.
Specifications
| EV3Simulator | ||
|---|---|---|
| InPort | ||
| Name | Data Type | Description |
| velocity2D | RTC::TimedVelocity2D | Target velocity |
| angle | RTC::TimedDouble | M motor angle |
| pos_update | RTC::TimedPose2D | Current position update |
| OutPort | ||
| Name | Data Type | Description |
| odometry | RTC::TimedPose2D | Current position |
| current_vel | RTC::TimedVelocity2D | Current velocity |
| ultrasonic | RTC::RangeData | Distance measured by the ultrasonic sensor |
| gyro | RTC::TimedDouble | Angle measured by the gyro sensor |
| light_reflect | RTC::TimedDouble | Reflected light intensity measured by the color sensor |
| touch | RTC::TimedBooleanSeq | Touch sensor on/off status. The right sensor is element 0, and the left sensor is element 1. |
| Configuration Parameters | ||
| Name | Default Value | Description |
| medium_motor_speed | 1.6 | Speed of Motor M |
| blocksConfigFile | None | Name of the obstacle placement configuration file |
| touchSensorOnLength | 0.003 | Press distance required for the touch sensor to be judged as ON |
| lightReflectThreshold | 0.1 | Outputs 255 when the distance from the color sensor to an object is less than or equal to this value |
| plane_exist | 0 | Create a new ground plane when set to 1 |
| plane_x | 0 | Ground plane position (X) |
| plane_y | 0 | Ground plane position (Y) |
| plane_z | 0 | Ground plane position (Z) |
| plane_lx | 1.0 | Ground plane length |
| plane_ly | 1.0 | Ground plane width |
| plane_lz | 1.0 | Ground plane height |
| draw_time | 0.01 | Rendering period |
| sampling_time | -1 | Simulation time step. If set to a negative value, the execution context period is used. |
Usage
The simulator can be downloaded from the following link.
The executable file (EV3SimulatorComp.exe) is located in the EXE folder of the extracted archive.
Running this executable starts the RTC.
Configuration Parameters
Obstacle Configuration File
You can specify a CSV file containing obstacle placement settings using the parameter blocksConfigFile.
A sample file named test.csv is included.
Describe the position, orientation, and size of each obstacle in the file.
| Position (X) | Position (Y) | Position (Z) | Length (L) | Width (W) | Height (H) | Angle (θ) |
| 0.3 | 0.0 | 0.0 | 0.1 | 1.0 | 0.3 | 0.0 |
Any number of blocks can be configured.
Ground Plane Configuration
The modified Educator Vehicle can detect the presence or absence of a traversable surface using its ultrasonic sensor and perform avoidance behavior.
To support simulation of this control behavior, configuration parameters are provided for creating a ground plane.
Set plane_exist to 1, then configure the position and size of the ground plane.



