Skip to content

Commit

Permalink
[refactoring] simulator compatibility test
Browse files Browse the repository at this point in the history
1. organizing test structure
2. renaming modules
  • Loading branch information
SoohyeokPark-MORAI committed Jun 9, 2022
1 parent 64a588b commit e79f976
Show file tree
Hide file tree
Showing 107 changed files with 2,372 additions and 0 deletions.
85 changes: 85 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
cmake_minimum_required(VERSION 3.5)
project(morai_msgs)


find_package(ament_cmake REQUIRED)
find_package(std_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(rosidl_default_generators REQUIRED)

set(msg_files
"msg/CollisionData.msg"
"msg/CtrlCmd.msg"
"msg/EgoVehicleStatus.msg"
"msg/ERP42Info.msg"
"msg/EventInfo.msg"
"msg/GetTrafficLightStatus.msg"
"msg/GhostMessage.msg"
"msg/GPSMessage.msg"
"msg/IntersectionControl.msg"
"msg/IntersectionStatus.msg"
"msg/IntscnTL.msg"
"msg/Lamps.msg"
"msg/MapSpec.msg"
"msg/MapSpecIndex.msg"
"msg/MoraiSimProcHandle.msg"
"msg/MoraiSimProcStatus.msg"
"msg/MoraiSrvResponse.msg"
"msg/MoraiTLIndex.msg"
"msg/MoraiTLInfo.msg"
"msg/MultiEgoSetting.msg"
"msg/NpcGhostCmd.msg"
"msg/NpcGhostInfo.msg"
"msg/ObjectStatus.msg"
"msg/ObjectStatusList.msg"
"msg/PRCtrlCmd.msg"
"msg/PREvent.msg"
"msg/PRStatus.msg"
"msg/RadarTrack.msg"
"msg/RadarTracks.msg"
"msg/ReplayInfo.msg"
"msg/SaveSensorData.msg"
"msg/ScenarioLoad.msg"
"msg/SensorPosControl.msg"
"msg/SetTrafficLight.msg"
"msg/SyncModeAddObj.msg"
"msg/SyncModeCmd.msg"
"msg/SyncModeCmdResponse.msg"
"msg/SyncModeCtrlCmd.msg"
"msg/SyncModeInfo.msg"
"msg/SyncModeRemoveObj.msg"
"msg/SyncModeResultResponse.msg"
"msg/SyncModeScenarioLoad.msg"
"msg/SyncModeSetGear.msg"
"msg/TrafficLight.msg"
"msg/VehicleCollision.msg"
"msg/VehicleCollisionData.msg"
"msg/VehicleSpec.msg"
"msg/VehicleSpecIndex.msg"
"msg/WaitForTick.msg"
"msg/WaitForTickResponse.msg"
)

set(srv_files
"srv/MoraiEventCmdSrv.srv"
"srv/MoraiMapSpecSrv.srv"
"srv/MoraiScenarioLoadSrv.srv"
"srv/MoraiSimProcSrv.srv"
"srv/MoraiSyncModeCmdSrv.srv"
"srv/MoraiSyncModeCtrlCmdSrv.srv"
"srv/MoraiSyncModeSetGearSrv.srv"
"srv/MoraiSyncModeSLSrv.srv"
"srv/MoraiTLInfoSrv.srv"
"srv/MoraiVehicleSpecSrv.srv"
"srv/MoraiWaitForTickSrv.srv"
"srv/PREventSrv.srv"
)

rosidl_generate_interfaces(${PROJECT_NAME}
${msg_files}
${srv_files}
DEPENDENCIES std_msgs geometry_msgs builtin_interfaces
)

ament_package()
7 changes: 7 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/CollisionData.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
std_msgs/Header header

float64 global_offset_x
float64 global_offset_y
float64 global_offset_z

ObjectStatus[] collision_object
9 changes: 9 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/CtrlCmd.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
int32 longl_cmd_type

float64 accel
float64 brake
float64 steering

float64 velocity
float64 acceleration

13 changes: 13 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/ERP42Info.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
int32 longl_cmd_type

float32 position_x
float32 position_y
float32 position_z

float32 roll
float32 pitch
float32 yaw

float32 velocity
float32 steering

10 changes: 10 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/EgoVehicleStatus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
std_msgs/Header header
int32 unique_id
geometry_msgs/Vector3 acceleration
geometry_msgs/Vector3 position
geometry_msgs/Vector3 velocity

float64 heading
float64 accel
float64 brake
float64 wheel_angle
5 changes: 5 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/EventInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
int8 option
int32 ctrl_mode
int32 gear
Lamps lamps
bool set_pause
9 changes: 9 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/GPSMessage.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
std_msgs/Header header

float64 latitude
float64 longitude
float64 altitude

float64 east_offset
float64 north_offset
int16 status
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
std_msgs/Header header

string traffic_light_index
int16 traffic_light_type
int16 traffic_light_status
4 changes: 4 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/GhostMessage.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
geometry_msgs/Vector3 position
geometry_msgs/Vector3 rotation
float64 velocity
float64 steering_angle
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
std_msgs/Header header
int32 intersection_index
int16 intersection_status
float32 intersection_status_time
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
std_msgs/Header header
int32 intersection_index
int16 intersection_status
float32 intersection_status_time
5 changes: 5 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/IntscnTL.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
std_msgs/Header header

string[] idx
int32[] state
float32[] delta_time
4 changes: 4 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/Lamps.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
std_msgs/Header header

int8 turn_signal
int8 emergency_signal
11 changes: 11 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/MapSpec.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
int32 plane_coordinate_system
int32 utm_num

geometry_msgs/Vector3 utm_offset

string ellipse
float64 central_latitude
float64 central_meridian
float64 scale_factor
float64 false_easting
float64 false_northing
1 change: 1 addition & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/MapSpecIndex.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bool load_map_data
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
uint8 sim_process_status

int16 replay_option
string rosbag_file_name
int16 replay_target_option

int32 replay_speed
int32 start_time
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
std_msgs/Header header

builtin_interfaces/Time latest_command_time
uint8 command_result
uint8 current_mode
uint8 current_status

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bool result
1 change: 1 addition & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/MoraiTLIndex.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
string idx
3 changes: 3 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/MoraiTLInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
std_msgs/Header header
string idx
int16 status
12 changes: 12 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/MultiEgoSetting.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
int32 number_of_ego_vehicle
int32 camera_index
int32[] ego_index
float64[] global_position_x
float64[] global_position_y
float64[] global_position_z
float32[] global_roll
float32[] global_pitch
float32[] global_yaw
float32[] velocity
int8[] gear
int8[] ctrl_mode
3 changes: 3 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/NpcGhostCmd.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
std_msgs/Header header

NpcGhostInfo[] npc_list
5 changes: 5 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/NpcGhostInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
int32 unique_id
string name

geometry_msgs/Vector3 position
geometry_msgs/Vector3 rpy
9 changes: 9 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/ObjectStatus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
int32 unique_id
int32 type
string name
float64 heading

geometry_msgs/Vector3 velocity
geometry_msgs/Vector3 acceleration
geometry_msgs/Vector3 size
geometry_msgs/Vector3 position
11 changes: 11 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/ObjectStatusList.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
std_msgs/Header header

int32 num_of_npcs
int32 num_of_pedestrian
int32 num_of_obstacle

ObjectStatus[] npc_list
ObjectStatus[] pedestrian_list
ObjectStatus[] obstacle_list


3 changes: 3 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/PRCtrlCmd.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
float64 longitudinal_velocity
float64 latitudinal_velocity
float64 angular_velocity
1 change: 1 addition & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/PREvent.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bool mount_vehicle
7 changes: 7 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/PRStatus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
std_msgs/Header header

float32 position_x
float32 position_y
float32 position_z
float64 heading
bool mount_status
23 changes: 23 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/RadarTrack.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This message relates only to FMCW radar.
# All variables below are relative to the radar's frame of reference.
# This message is not meant to be used alone but as part of a stamped or array message.

# Object classifications (Additional vendor-specific classifications are permitted starting from 32000 eg. Car)

int8 uuid

# Note: The z component of these fields is ignored for 2D tracking.
geometry_msgs/Point position # x, y, z coordinates of the centroid of the object being tracked.
geometry_msgs/Vector3 velocity # The velocity of the object in each spatial dimension.
geometry_msgs/Vector3 acceleration # The acceleration of the object in each spatial dimension.
geometry_msgs/Vector3 size # The object size as represented by the radar sensor eg. length, width, height OR the diameter of an ellipsoid in the x, y, z, dimensions
# and is from the sensor frame's view.
uint16 classification # An optional classification of the object (see above)

float32[] position_covariance # Upper-triangle covariance about the x, y, z axes
float32[] velocity_covariance # Upper-triangle covariance about the x, y, z axes
float32[] acceleration_covariance # Upper-triangle covariance about the x, y, z axes
float32[] size_covariance # Upper-triangle covariance about the x, y, z axes

float32 amplitude

3 changes: 3 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/RadarTracks.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
std_msgs/Header header

RadarTrack[] tracks
21 changes: 21 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/ReplayInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
std_msgs/Header header

float64 ego_acc
float64 ego_brake
float64 ego_steer

geometry_msgs/Quaternion orientation

geometry_msgs/Vector3 linear_acceleration

geometry_msgs/Vector3 angular_velocity

int32 num_of_npcs
int32 num_of_pedestrian
int32 num_of_obstacle

ObjectStatus[] npc_list

ObjectStatus[] pedestrian_list

ObjectStatus[] obstacle_list
3 changes: 3 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/SaveSensorData.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bool is_custom_file_name
string custom_file_name
string file_dir
8 changes: 8 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/ScenarioLoad.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
string file_name
bool load_network_connection_data
bool delete_all
bool load_ego_vehicle_data
bool load_surrounding_vehicle_data
bool load_pedestrian_data
bool load_obstacle_data
bool set_pause
9 changes: 9 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/SensorPosControl.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
int16[] sensor_index

float32[] pose_x
float32[] pose_y
float32[] pose_z
float32[] roll
float32[] pitch
float32[] yaw

2 changes: 2 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/SetTrafficLight.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
string traffic_light_index
int16 traffic_light_status
4 changes: 4 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/SyncModeAddObj.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
string name
geometry_msgs/Vector3 position
float64 heading
uint64 frame
3 changes: 3 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/SyncModeCmd.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
string user_id
bool start_sync_mode
uint32 time_step
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
string user_id
uint64 frame
bool result
uint32 time_step
5 changes: 5 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/SyncModeCtrlCmd.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
uint64 frame

CtrlCmd command

bool sensor_capture
5 changes: 5 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/SyncModeInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
string master_id
bool status
uint64 frame

bool can_send_tick
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
int32 unique_id
uint64 frame
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bool result
10 changes: 10 additions & 0 deletions tools/simulator_test/morai_ros2_msgs/msg/SyncModeScenarioLoad.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
uint64 frame

string file_name
bool load_network_connection_data
bool delete_all
bool load_ego_vehicle_data
bool load_surrounding_vehicle_data
bool load_pedestrian_data
bool load_obstacle_data
bool set_pause
Loading

0 comments on commit e79f976

Please sign in to comment.