Skip to content

Commit a54764b

Browse files
committed
fix ROS grammar tests and validators
1 parent 0bcab7d commit a54764b

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

plugins/de.fraunhofer.ipa.ros.xtext.tests/resources/basic_msgs/common_msgs.ros

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ PackageSet{
3030
TopicSpec Wrench{ message { Vector3 force Vector3 torque }},
3131
TopicSpec WrenchStamped{ message { Header header Wrench wrench }}
3232
}},
33-
Package actionlib_msgs{ spec {
33+
Package actionlib_msgs{ Specs {
3434
TopicSpec GoalID{ message { time stamp string id }},
3535
TopicSpec GoalStatus{ message { GoalID goal_id uint8 status uint8 PENDING=0 uint8 ACTIVE=1 uint8 PREEMPTED=2 uint8 SUCCEEDED=3 uint8 ABORTED=4 uint8 REJECTED=5 uint8 PREEMPTING=6 uint8 RECALLING=7 uint8 RECALLED=8 uint8 LOST=9 string text }},
3636
TopicSpec GoalStatusArray{ message { Header header GoalStatus[] status_list }}
3737
}},
38-
Package diagnostic_msgs{ spec {
38+
Package diagnostic_msgs{ Specs {
3939
TopicSpec DiagnosticArray{ message { Header header DiagnosticStatus[] status }},
4040
TopicSpec DiagnosticStatus{ message { byte OK=0 byte WARN=1 byte ERROR=2 byte STALE=3 byte level string name string message string hardware_id KeyValue[] values }},
4141
TopicSpec KeyValue{ message { string key string value }},
4242
ServiceSpec AddDiagnostics{ request { string load_namespace } response { bool success string message } },
4343
ServiceSpec SelfTest{ request { } response { string id byte passed DiagnosticStatus[] status } }
4444
}},
45-
Package nav_msgs{ spec {
45+
Package nav_msgs{ Specs {
4646
TopicSpec GetMapAction{ message { GetMapActionGoal action_goal GetMapActionResult action_result GetMapActionFeedback action_feedback }},
4747
TopicSpec GetMapActionFeedback{ message { Header header "actionlib_msgs.GoalStatus" status GetMapFeedback feedback }},
4848
TopicSpec GetMapActionGoal{ message { Header header "actionlib_msgs.GoalID" goal_id GetMapGoal goal }},
@@ -59,7 +59,7 @@ PackageSet{
5959
ServiceSpec GetPlan{ request { "geometry_msgs.PoseStamped" start "geometry_msgs.PoseStamped" goal float32 tolerance } response { "nav_msgs.Path" plan } },
6060
ServiceSpec SetMap{ request { "nav_msgs.OccupancyGrid" map "geometry_msgs.PoseWithCovarianceStamped" initial_pose } response { bool success } }
6161
}},
62-
Package sensor_msgs{ spec {
62+
Package sensor_msgs{ Specs {
6363
TopicSpec BatteryState{ message { uint8 POWER_SUPPLY_STATUS_UNKNOWN=0 uint8 POWER_SUPPLY_STATUS_CHARGING=1 uint8 POWER_SUPPLY_STATUS_DISCHARGING=2 uint8 POWER_SUPPLY_STATUS_NOT_CHARGING=3 uint8 POWER_SUPPLY_STATUS_FULL=4 uint8 POWER_SUPPLY_HEALTH_UNKNOWN=0 uint8 POWER_SUPPLY_HEALTH_GOOD=1 uint8 POWER_SUPPLY_HEALTH_OVERHEAT=2 uint8 POWER_SUPPLY_HEALTH_DEAD=3 uint8 POWER_SUPPLY_HEALTH_OVERVOLTAGE=4 uint8 POWER_SUPPLY_HEALTH_UNSPEC_FAILURE=5 uint8 POWER_SUPPLY_HEALTH_COLD=6 uint8 POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE=7 uint8 POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE=8 uint8 POWER_SUPPLY_TECHNOLOGY_UNKNOWN=0 uint8 POWER_SUPPLY_TECHNOLOGY_NIMH=1 uint8 POWER_SUPPLY_TECHNOLOGY_LION=2 uint8 POWER_SUPPLY_TECHNOLOGY_LIPO=3 uint8 POWER_SUPPLY_TECHNOLOGY_LIFE=4 uint8 POWER_SUPPLY_TECHNOLOGY_NICD=5 uint8 POWER_SUPPLY_TECHNOLOGY_LIMN=6 Header header float32 voltage float32 current float32 charge float32 capacity float32 design_capacity float32 percentage uint8 power_supply_status uint8 power_supply_health uint8 power_supply_technology bool present float32[] cell_voltage string location string serial_number }},
6464
TopicSpec CameraInfo{ message { Header header uint32 height uint32 width string distortion_model float64[] D float64[] K float64[] R float64[] P uint32 binning_x uint32 binning_y RegionOfInterest roi }},
6565
TopicSpec ChannelFloat32{ message { string name float32[] values }},
@@ -89,22 +89,22 @@ PackageSet{
8989
TopicSpec TimeReference{ message { Header header time time_ref string source }},
9090
ServiceSpec SetCameraInfo{ request { "sensor_msgs.CameraInfo" camera_info } response { bool success string status_message } }
9191
}},
92-
Package shape_msgs{ spec {
92+
Package shape_msgs{ Specs {
9393
TopicSpec Mesh{ message { MeshTriangle[] triangles "geometry_msgs.Point"[] vertices }},
9494
TopicSpec MeshTriangle{ message { uint32[] vertex_indices }},
9595
TopicSpec Plane{ message { float64[] coef }},
9696
TopicSpec SolidPrimitive{ message { uint8 BOX=1 uint8 SPHERE=2 uint8 CYLINDER=3 uint8 CONE=4 uint8 type float64[] dimensions uint8 BOX_X=0 uint8 BOX_Y=1 uint8 BOX_Z=2 uint8 SPHERE_RADIUS=0 uint8 CYLINDER_HEIGHT=0 uint8 CYLINDER_RADIUS=1 uint8 CONE_HEIGHT=0 uint8 CONE_RADIUS=1 }}
9797
}},
98-
Package stereo_msgs{ spec {
98+
Package stereo_msgs{ Specs {
9999
TopicSpec DisparityImage{ message { Header header "sensor_msgs.Image" image float32 f float32 T "sensor_msgs.RegionOfInterest" valid_window float32 min_disparity float32 max_disparity float32 delta_d }}
100100
}},
101-
Package trajectory_msgs{ spec {
101+
Package trajectory_msgs{ Specs {
102102
TopicSpec JointTrajectory{ message { Header header string[] joint_names JointTrajectoryPoint[] points }},
103103
TopicSpec JointTrajectoryPoint{ message { float64[] positions float64[] velocities float64[] accelerations float64[] effort duration time_from_start }},
104104
TopicSpec MultiDOFJointTrajectory{ message { Header header string[] joint_names MultiDOFJointTrajectoryPoint[] points }},
105105
TopicSpec MultiDOFJointTrajectoryPoint{ message { "geometry_msgs.Transform"[] transforms "geometry_msgs.Twist"[] velocities "geometry_msgs.Twist"[] accelerations duration time_from_start }}
106106
}},
107-
Package visualization_msgs{ spec {
107+
Package visualization_msgs{ Specs {
108108
TopicSpec ImageMarker{ message { uint8 CIRCLE=0 uint8 LINE_STRIP=1 uint8 LINE_LIST=2 uint8 POLYGON=3 uint8 POINTS=4 uint8 ADD=0 uint8 REMOVE=1 Header header string ns int32 id int32 type int32 action "geometry_msgs.Point" position float32 scale "std_msgs.ColorRGBA" outline_color uint8 filled "std_msgs.ColorRGBA" fill_color duration lifetime "geometry_msgs.Point"[] points "std_msgs.ColorRGBA"[] outline_colors }},
109109
TopicSpec InteractiveMarker{ message { Header header "geometry_msgs.Pose" pose string name string description float32 scale MenuEntry[] menu_entries InteractiveMarkerControl[] controls }},
110110
TopicSpec InteractiveMarkerControl{ message { string name "geometry_msgs.Quaternion" orientation uint8 INHERIT=0 uint8 FIXED=1 uint8 VIEW_FACING=2 uint8 orientation_mode uint8 NONE=0 uint8 MENU=1 uint8 BUTTON=2 uint8 MOVE_AXIS=3 uint8 MOVE_PLANE=4 uint8 ROTATE_AXIS=5 uint8 MOVE_ROTATE=6 uint8 MOVE_3D=7 uint8 ROTATE_3D=8 uint8 MOVE_ROTATE_3D=9 uint8 interaction_mode bool always_visible Marker[] markers bool independent_marker_orientation string description }},

plugins/de.fraunhofer.ipa.ros.xtext.tests/resources/basic_msgs/ros_core.ros

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ PackageSet{
3232
TopicSpec UInt8{ message { uint8 data }},
3333
TopicSpec UInt8MultiArray{ message { MultiArrayLayout layout uint8[] data }}
3434
}},
35-
Package std_srvs{ spec {
35+
Package std_srvs{ Specs {
3636
ServiceSpec Empty{ request { } response { } },
3737
ServiceSpec SetBool{ request { bool data } response { bool success string message } },
3838
ServiceSpec Trigger{ request { } response { bool success string message } }

plugins/de.fraunhofer.ipa.ros.xtext.tests/resources/test.ros

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ PackageSet {
1515
Parameter { name array_tets type Array {type String}},
1616
Parameter { name base64_test type Base64},
1717
Parameter { name double_test type Double},
18-
Parameter {name int_test type Integer},
19-
Parameter {name list_test type List {Integer,Integer,String}},
20-
Parameter {name struc_test type Struc
18+
Parameter { name int_test type Integer},
19+
Parameter { name list_test type List {Integer,Integer,String}},
20+
Parameter { name struc_test type Struct
2121
{first_element Integer ,
2222
second_element List { Integer, String},
2323
third_element String ,
24-
last_element Struc { hola Integer, what String}}
24+
last_element Struct { hola Integer, what String}}
2525
}
2626
}}
2727
}}}

plugins/de.fraunhofer.ipa.ros.xtext.tests/resources/test_error.ros

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ PackageSet {
1515
Parameter { name array_tets type Array {type String}},
1616
Parameter { name base64_test type Base64},
1717
Parameter { name double_test type Double},
18-
Parameter {name int_test type Integer},
19-
Parameter {name list_test type List {Integer,Integer,String}},
20-
Parameter {name struc_test type Struc
18+
Parameter { name int_test type Integer},
19+
Parameter { name list_test type List {Integer,Integer,String}},
20+
Parameter { name struc_test type Struct
2121
{first_element Integer ,
2222
second_element List { Integer, String},
2323
third_element String ,
24-
last_element Struc { hola Integer, what String}}
24+
last_element Struct { hola Integer, what String}}
2525
}
2626
}}
2727
}}}

0 commit comments

Comments
 (0)