simulator usage
#contents
This page describes the specifications and usage of the Raspberry Pi Mouse simulator RTC.
Specifications
| RaspberryPiMouseSimulator | ||
|---|---|---|
| InPort | ||
| Name | Data Type | Description |
| target_velocity_in | RTC::TimedVelocity2D | Target velocity |
| pose_update | RTC::TimedPose2D | Update current position |
| OutPort | ||
| Name | Data Type | Description |
| current_velocity_out | RTC::TimedVelocity2D | Current velocity |
| current_pose_out | RTC::TimedPose2D | Current position |
| ir_sensor_out | RTC::TimedShortSeq | Reproduced values corresponding to data acquired from the distance sensors |
| ir_sensor_metre_out | RTC::TimedDoubleSeq | Distance measured by the distance sensors |
| Configuration Parameters | ||
| Name | Default Value | Description |
| sampling_time | -1 | Simulation time step. If set to a negative value, the execution context period is used. |
| draw_time | 0.01 | Rendering interval |
| sensor_param | 1394,792,525,373,299,260,222,181,135,100,81,36,17,16 | Parameters used to convert measured distances into raw sensor data. Values correspond to distances of 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.15, 0.20, 0.25, and 0.30 [m]. |
| blocksConfigFile | None | Name of the obstacle placement configuration file |
Usage
You can download the simulator from the following link.
The simulator used in RT Middleware workshops has different settings. Please download it from the workshop page instead.
The executable file (RaspberryPiMouseSimulatorComp.exe) is located in the EXE folder of the extracted archive.
Running this executable starts the RTC.
Data Ports
Distance Sensor Data Output
There are two ports that output distance sensor data: ir_sensor_out and ir_sensor_metre_out.
Since RaspberryPiMouseRTC directly outputs distance sensor data, ir_sensor_out reproduces sensor values based on the distances measured in the simulator.
ir_sensor_metre_out outputs the measured distance values in meters.
Configuration Parameters
Obstacle Configuration File
The blocksConfigFile parameter can be used to specify a CSV file that defines obstacle placement.
A sample file named test.csv is included.
Specify 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.



