From 08ff046101a0e230e27df6fff742fc9b2dc1d051 Mon Sep 17 00:00:00 2001 From: Russell Mull Date: Fri, 3 May 2024 13:46:56 -0700 Subject: [PATCH] Verify standard ROS messages are correctly collected --- integration-test/go.sh | 14 +- integration-test/inner.sh | 13 + integration-test/inner_verify.sh | 8 + .../messages/geometry_msgs/msg/Accel.json | 4 + .../geometry_msgs/msg/AccelStamped.json | 10 + .../msg/AccelWithCovariance.json | 14 + .../msg/AccelWithCovarianceStamped.json | 20 + .../messages/geometry_msgs/msg/Inertia.json | 10 + .../geometry_msgs/msg/InertiaStamped.json | 16 + .../messages/geometry_msgs/msg/Point.json | 5 + .../messages/geometry_msgs/msg/Point32.json | 5 + .../geometry_msgs/msg/PointStamped.json | 11 + .../messages/geometry_msgs/msg/Polygon.json | 7 + .../geometry_msgs/msg/PolygonStamped.json | 13 + .../messages/geometry_msgs/msg/Pose.json | 4 + .../messages/geometry_msgs/msg/Pose2D.json | 5 + .../messages/geometry_msgs/msg/PoseArray.json | 16 + .../geometry_msgs/msg/PoseStamped.json | 10 + .../geometry_msgs/msg/PoseWithCovariance.json | 14 + .../msg/PoseWithCovarianceStamped.json | 20 + .../geometry_msgs/msg/Quaternion.json | 6 + .../geometry_msgs/msg/QuaternionStamped.json | 12 + .../messages/geometry_msgs/msg/Transform.json | 4 + .../geometry_msgs/msg/TransformStamped.json | 10 + .../messages/geometry_msgs/msg/Twist.json | 4 + .../geometry_msgs/msg/TwistStamped.json | 10 + .../msg/TwistWithCovariance.json | 14 + .../msg/TwistWithCovarianceStamped.json | 20 + .../messages/geometry_msgs/msg/Vector3.json | 5 + .../geometry_msgs/msg/Vector3Stamped.json | 11 + .../messages/geometry_msgs/msg/Wrench.json | 4 + .../geometry_msgs/msg/WrenchStamped.json | 10 + .../messages/nav_msgs/msg/GridCells.json | 12 + .../messages/nav_msgs/msg/MapMetaData.json | 10 + .../messages/nav_msgs/msg/OccupancyGrid.json | 17 + .../messages/nav_msgs/msg/Odometry.json | 35 ++ .../messages/nav_msgs/msg/Path.json | 29 ++ .../messages/std_msgs/msg/Bool.json | 3 + .../messages/std_msgs/msg/Byte.json | 3 + .../messages/std_msgs/msg/ByteMultiArray.json | 6 + .../messages/std_msgs/msg/Char.json | 3 + .../messages/std_msgs/msg/ColorRGBA.json | 6 + .../messages/std_msgs/msg/Empty.json | 1 + .../messages/std_msgs/msg/Float32.json | 3 + .../std_msgs/msg/Float32MultiArray.json | 7 + .../messages/std_msgs/msg/Float64.json | 3 + .../std_msgs/msg/Float64MultiArray.json | 7 + .../messages/std_msgs/msg/Header.json | 4 + .../messages/std_msgs/msg/Int16.json | 3 + .../std_msgs/msg/Int16MultiArray.json | 7 + .../messages/std_msgs/msg/Int32.json | 3 + .../std_msgs/msg/Int32MultiArray.json | 7 + .../messages/std_msgs/msg/Int64.json | 3 + .../std_msgs/msg/Int64MultiArray.json | 7 + .../messages/std_msgs/msg/Int8.json | 3 + .../messages/std_msgs/msg/Int8MultiArray.json | 7 + .../std_msgs/msg/MultiArrayDimension.json | 5 + .../std_msgs/msg/MultiArrayLayout.json | 4 + .../messages/std_msgs/msg/String.json | 3 + .../messages/std_msgs/msg/UInt16.json | 3 + .../std_msgs/msg/UInt16MultiArray.json | 7 + .../messages/std_msgs/msg/UInt32.json | 3 + .../std_msgs/msg/UInt32MultiArray.json | 7 + .../messages/std_msgs/msg/UInt64.json | 3 + .../std_msgs/msg/UInt64MultiArray.json | 7 + .../messages/std_msgs/msg/UInt8.json | 3 + .../std_msgs/msg/UInt8MultiArray.json | 7 + integration-test/specs/geometry_msgs.speqtr | 400 ++++++++++++++++++ .../interactions.speqtr} | 0 integration-test/specs/nav_msgs.speqtr | 115 +++++ integration-test/specs/std_msgs.speqtr | 268 ++++++++++++ 71 files changed, 1344 insertions(+), 9 deletions(-) create mode 100755 integration-test/inner_verify.sh create mode 100644 integration-test/messages/geometry_msgs/msg/Accel.json create mode 100644 integration-test/messages/geometry_msgs/msg/AccelStamped.json create mode 100644 integration-test/messages/geometry_msgs/msg/AccelWithCovariance.json create mode 100644 integration-test/messages/geometry_msgs/msg/AccelWithCovarianceStamped.json create mode 100644 integration-test/messages/geometry_msgs/msg/Inertia.json create mode 100644 integration-test/messages/geometry_msgs/msg/InertiaStamped.json create mode 100644 integration-test/messages/geometry_msgs/msg/Point.json create mode 100644 integration-test/messages/geometry_msgs/msg/Point32.json create mode 100644 integration-test/messages/geometry_msgs/msg/PointStamped.json create mode 100644 integration-test/messages/geometry_msgs/msg/Polygon.json create mode 100644 integration-test/messages/geometry_msgs/msg/PolygonStamped.json create mode 100644 integration-test/messages/geometry_msgs/msg/Pose.json create mode 100644 integration-test/messages/geometry_msgs/msg/Pose2D.json create mode 100644 integration-test/messages/geometry_msgs/msg/PoseArray.json create mode 100644 integration-test/messages/geometry_msgs/msg/PoseStamped.json create mode 100644 integration-test/messages/geometry_msgs/msg/PoseWithCovariance.json create mode 100644 integration-test/messages/geometry_msgs/msg/PoseWithCovarianceStamped.json create mode 100644 integration-test/messages/geometry_msgs/msg/Quaternion.json create mode 100644 integration-test/messages/geometry_msgs/msg/QuaternionStamped.json create mode 100644 integration-test/messages/geometry_msgs/msg/Transform.json create mode 100644 integration-test/messages/geometry_msgs/msg/TransformStamped.json create mode 100644 integration-test/messages/geometry_msgs/msg/Twist.json create mode 100644 integration-test/messages/geometry_msgs/msg/TwistStamped.json create mode 100644 integration-test/messages/geometry_msgs/msg/TwistWithCovariance.json create mode 100644 integration-test/messages/geometry_msgs/msg/TwistWithCovarianceStamped.json create mode 100644 integration-test/messages/geometry_msgs/msg/Vector3.json create mode 100644 integration-test/messages/geometry_msgs/msg/Vector3Stamped.json create mode 100644 integration-test/messages/geometry_msgs/msg/Wrench.json create mode 100644 integration-test/messages/geometry_msgs/msg/WrenchStamped.json create mode 100644 integration-test/messages/nav_msgs/msg/GridCells.json create mode 100644 integration-test/messages/nav_msgs/msg/MapMetaData.json create mode 100644 integration-test/messages/nav_msgs/msg/OccupancyGrid.json create mode 100644 integration-test/messages/nav_msgs/msg/Odometry.json create mode 100644 integration-test/messages/nav_msgs/msg/Path.json create mode 100644 integration-test/messages/std_msgs/msg/Bool.json create mode 100644 integration-test/messages/std_msgs/msg/Byte.json create mode 100644 integration-test/messages/std_msgs/msg/ByteMultiArray.json create mode 100644 integration-test/messages/std_msgs/msg/Char.json create mode 100644 integration-test/messages/std_msgs/msg/ColorRGBA.json create mode 100644 integration-test/messages/std_msgs/msg/Empty.json create mode 100644 integration-test/messages/std_msgs/msg/Float32.json create mode 100644 integration-test/messages/std_msgs/msg/Float32MultiArray.json create mode 100644 integration-test/messages/std_msgs/msg/Float64.json create mode 100644 integration-test/messages/std_msgs/msg/Float64MultiArray.json create mode 100644 integration-test/messages/std_msgs/msg/Header.json create mode 100644 integration-test/messages/std_msgs/msg/Int16.json create mode 100644 integration-test/messages/std_msgs/msg/Int16MultiArray.json create mode 100644 integration-test/messages/std_msgs/msg/Int32.json create mode 100644 integration-test/messages/std_msgs/msg/Int32MultiArray.json create mode 100644 integration-test/messages/std_msgs/msg/Int64.json create mode 100644 integration-test/messages/std_msgs/msg/Int64MultiArray.json create mode 100644 integration-test/messages/std_msgs/msg/Int8.json create mode 100644 integration-test/messages/std_msgs/msg/Int8MultiArray.json create mode 100644 integration-test/messages/std_msgs/msg/MultiArrayDimension.json create mode 100644 integration-test/messages/std_msgs/msg/MultiArrayLayout.json create mode 100644 integration-test/messages/std_msgs/msg/String.json create mode 100644 integration-test/messages/std_msgs/msg/UInt16.json create mode 100644 integration-test/messages/std_msgs/msg/UInt16MultiArray.json create mode 100644 integration-test/messages/std_msgs/msg/UInt32.json create mode 100644 integration-test/messages/std_msgs/msg/UInt32MultiArray.json create mode 100644 integration-test/messages/std_msgs/msg/UInt64.json create mode 100644 integration-test/messages/std_msgs/msg/UInt64MultiArray.json create mode 100644 integration-test/messages/std_msgs/msg/UInt8.json create mode 100644 integration-test/messages/std_msgs/msg/UInt8MultiArray.json create mode 100644 integration-test/specs/geometry_msgs.speqtr rename integration-test/{smoke.speqtr => specs/interactions.speqtr} (100%) create mode 100644 integration-test/specs/nav_msgs.speqtr create mode 100644 integration-test/specs/std_msgs.speqtr diff --git a/integration-test/go.sh b/integration-test/go.sh index fc46158..b788be8 100755 --- a/integration-test/go.sh +++ b/integration-test/go.sh @@ -45,12 +45,8 @@ docker run -t --rm \ -v ~/.config/modality_cli:/root/.config/modality_cli \ modality-ros2-integration-test - -docker run -t --rm --net=host \ - -e PATH=/ \ - -e MODALITY_AUTH_TOKEN=${modality_auth_token} \ - --entrypoint /bin/bash \ - -v ./smoke.speqtr:/smoke.speqtr \ - ${reflector_image} \ - -c "conform spec eval --file /smoke.speqtr --dry-run" - +docker run -t --rm --net=host -e PATH=/ -e MODALITY_AUTH_TOKEN=${modality_auth_token} \ + -v ./specs:/specs \ + -v ./inner_verify.sh:/inner_verify.sh \ + --entrypoint /bin/bash ${reflector_image} \ + -c "/inner_verify.sh" diff --git a/integration-test/inner.sh b/integration-test/inner.sh index 2d6d139..2f1fdc0 100755 --- a/integration-test/inner.sh +++ b/integration-test/inner.sh @@ -3,6 +3,19 @@ source /opt/ros/humble/setup.bash export LD_PRELOAD=/libmodality_ros_hook.so:/opt/ros/humble/lib/librmw_fastrtps_cpp.so +set -ex + +( + cd /messages + for msg_file in $(find . -name "*.json"); do + schema=$(dirname ${msg_file})/$(basename ${msg_file} .json) + schema=$(echo ${schema} | sed "s/\\.\\///" ) + topic=${schema} + ros2 topic pub -t 1 -w 0 ${topic} ${schema} "$(cat ${msg_file})" + done +) + + /opt/ros/humble/lib/demo_nodes_py/listener & sleep 1 /opt/ros/humble/lib/demo_nodes_py/talker & diff --git a/integration-test/inner_verify.sh b/integration-test/inner_verify.sh new file mode 100755 index 0000000..29b8358 --- /dev/null +++ b/integration-test/inner_verify.sh @@ -0,0 +1,8 @@ +set -ex + +modality workspace sync-indices +modality query *@* + +for s in /specs/*; do + conform spec eval --file ${s} --dry-run +done diff --git a/integration-test/messages/geometry_msgs/msg/Accel.json b/integration-test/messages/geometry_msgs/msg/Accel.json new file mode 100644 index 0000000..70a9e49 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/Accel.json @@ -0,0 +1,4 @@ +{ + linear: { x: 1.0, y: 2.0, z: 3.0 }, + angular: { x: 4.0, y: 5.0, z: 6.0 } +} diff --git a/integration-test/messages/geometry_msgs/msg/AccelStamped.json b/integration-test/messages/geometry_msgs/msg/AccelStamped.json new file mode 100644 index 0000000..a970ddd --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/AccelStamped.json @@ -0,0 +1,10 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + accel: { + linear: { x: 1.0, y: 2.0, z: 3.0 }, + angular: { x: 4.0, y: 5.0, z: 6.0 } + } +} diff --git a/integration-test/messages/geometry_msgs/msg/AccelWithCovariance.json b/integration-test/messages/geometry_msgs/msg/AccelWithCovariance.json new file mode 100644 index 0000000..f17c11b --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/AccelWithCovariance.json @@ -0,0 +1,14 @@ +{ + accel: { + linear: { x: 1.0, y: 2.0, z: 3.0 }, + angular: { x: 4.0, y: 5.0, z: 6.0 } + }, + covariance: [ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 + ] +} diff --git a/integration-test/messages/geometry_msgs/msg/AccelWithCovarianceStamped.json b/integration-test/messages/geometry_msgs/msg/AccelWithCovarianceStamped.json new file mode 100644 index 0000000..2f13e47 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/AccelWithCovarianceStamped.json @@ -0,0 +1,20 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43}, + frame_id: "test" + }, + accel: { + accel: { + linear: { x: 1.0, y: 2.0, z: 3.0 }, + angular: { x: 4.0, y: 5.0, z: 6.0 } + }, + covariance: [ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 + ] + } +} diff --git a/integration-test/messages/geometry_msgs/msg/Inertia.json b/integration-test/messages/geometry_msgs/msg/Inertia.json new file mode 100644 index 0000000..9182153 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/Inertia.json @@ -0,0 +1,10 @@ +{ + m: 1.0, + com: { x: 2.0, y: 3.0, z: 4.0}, + ixx: 5.0, + ixy: 6.0, + ixz: 7.0, + iyy: 8.0, + iyz: 9.0, + izz: 10.0 +} diff --git a/integration-test/messages/geometry_msgs/msg/InertiaStamped.json b/integration-test/messages/geometry_msgs/msg/InertiaStamped.json new file mode 100644 index 0000000..9bba8a7 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/InertiaStamped.json @@ -0,0 +1,16 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43}, + frame_id: "test" + }, + inertia: { + m: 1.0, + com: { x: 2.0, y: 3.0, z: 4.0}, + ixx: 5.0, + ixy: 6.0, + ixz: 7.0, + iyy: 8.0, + iyz: 9.0, + izz: 10.0 + } +} diff --git a/integration-test/messages/geometry_msgs/msg/Point.json b/integration-test/messages/geometry_msgs/msg/Point.json new file mode 100644 index 0000000..a2418fa --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/Point.json @@ -0,0 +1,5 @@ +{ + x: 1.0, + y: 2.0, + z: 3.0 +} diff --git a/integration-test/messages/geometry_msgs/msg/Point32.json b/integration-test/messages/geometry_msgs/msg/Point32.json new file mode 100644 index 0000000..a2418fa --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/Point32.json @@ -0,0 +1,5 @@ +{ + x: 1.0, + y: 2.0, + z: 3.0 +} diff --git a/integration-test/messages/geometry_msgs/msg/PointStamped.json b/integration-test/messages/geometry_msgs/msg/PointStamped.json new file mode 100644 index 0000000..9b3ec13 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/PointStamped.json @@ -0,0 +1,11 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + point: { + x: 1.0, + y: 2.0, + z: 3.0 + } +} diff --git a/integration-test/messages/geometry_msgs/msg/Polygon.json b/integration-test/messages/geometry_msgs/msg/Polygon.json new file mode 100644 index 0000000..d702287 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/Polygon.json @@ -0,0 +1,7 @@ +{ + points: [ + {x: 1, y: 2, z: 3}, + {x: 4, y: 5, z: 6}, + {x: 7, y: 8, z: 9} + ] +} diff --git a/integration-test/messages/geometry_msgs/msg/PolygonStamped.json b/integration-test/messages/geometry_msgs/msg/PolygonStamped.json new file mode 100644 index 0000000..6dd4049 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/PolygonStamped.json @@ -0,0 +1,13 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + polygon: { + points: [ + {x: 1, y: 2, z: 3}, + {x: 4, y: 5, z: 6}, + {x: 7, y: 8, z: 9} + ] + } +} diff --git a/integration-test/messages/geometry_msgs/msg/Pose.json b/integration-test/messages/geometry_msgs/msg/Pose.json new file mode 100644 index 0000000..079968f --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/Pose.json @@ -0,0 +1,4 @@ +{ + position: { x: 1.0, y: 2.0, z: 3.0 }, + orientation: { x: 4.0, y: 5.0, z: 6.0, w: 7.0 } +} diff --git a/integration-test/messages/geometry_msgs/msg/Pose2D.json b/integration-test/messages/geometry_msgs/msg/Pose2D.json new file mode 100644 index 0000000..69e7433 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/Pose2D.json @@ -0,0 +1,5 @@ +{ + x: 1.0, + y: 2.0, + theta: 3.0 +} diff --git a/integration-test/messages/geometry_msgs/msg/PoseArray.json b/integration-test/messages/geometry_msgs/msg/PoseArray.json new file mode 100644 index 0000000..00a22f8 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/PoseArray.json @@ -0,0 +1,16 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43}, + frame_id: "test" + }, + poses: [ + { + position: { x: 1.0, y: 2.0, z: 3.0 }, + orientation: { x: 4.0, y: 5.0, z: 6.0, w: 7.0 } + }, + { + position: { x: 8.0, y: 9.0, z: 10.0 }, + orientation: { x: 11.0, y: 12.0, z: 13.0, w: 14.0 } + } + ] +} diff --git a/integration-test/messages/geometry_msgs/msg/PoseStamped.json b/integration-test/messages/geometry_msgs/msg/PoseStamped.json new file mode 100644 index 0000000..1e603ce --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/PoseStamped.json @@ -0,0 +1,10 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + pose: { + position: { x: 1.0, y: 2.0, z: 3.0 }, + orientation: { x: 4.0, y: 5.0, z: 6.0, w: 7.0 } + } +} diff --git a/integration-test/messages/geometry_msgs/msg/PoseWithCovariance.json b/integration-test/messages/geometry_msgs/msg/PoseWithCovariance.json new file mode 100644 index 0000000..42ef8f9 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/PoseWithCovariance.json @@ -0,0 +1,14 @@ +{ + pose: { + position: { x: 1.0, y: 2.0, z: 3.0 }, + orientation: { x: 4.0, y: 5.0, z: 6.0, w: 7.0 } + }, + covariance: [ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 + ] +} diff --git a/integration-test/messages/geometry_msgs/msg/PoseWithCovarianceStamped.json b/integration-test/messages/geometry_msgs/msg/PoseWithCovarianceStamped.json new file mode 100644 index 0000000..26183aa --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/PoseWithCovarianceStamped.json @@ -0,0 +1,20 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + pose: { + pose: { + position: { x: 1.0, y: 2.0, z: 3.0 }, + orientation: { x: 4.0, y: 5.0, z: 6.0, w: 7.0 } + }, + covariance: [ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 + ] + } +} diff --git a/integration-test/messages/geometry_msgs/msg/Quaternion.json b/integration-test/messages/geometry_msgs/msg/Quaternion.json new file mode 100644 index 0000000..9806655 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/Quaternion.json @@ -0,0 +1,6 @@ +{ + x: 1.0, + y: 2.0, + z: 3.0, + w: 4.0, +} diff --git a/integration-test/messages/geometry_msgs/msg/QuaternionStamped.json b/integration-test/messages/geometry_msgs/msg/QuaternionStamped.json new file mode 100644 index 0000000..b63161c --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/QuaternionStamped.json @@ -0,0 +1,12 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + quaternion: { + x: 1.0, + y: 2.0, + z: 3.0, + w: 4.0, + } +} diff --git a/integration-test/messages/geometry_msgs/msg/Transform.json b/integration-test/messages/geometry_msgs/msg/Transform.json new file mode 100644 index 0000000..ecd1061 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/Transform.json @@ -0,0 +1,4 @@ +{ + translation: { x: 1.0, y: 2.0, z: 3.0 }, + rotation: { x: 4.0, y: 5.0, z: 6.0, w: 7.0 } +} diff --git a/integration-test/messages/geometry_msgs/msg/TransformStamped.json b/integration-test/messages/geometry_msgs/msg/TransformStamped.json new file mode 100644 index 0000000..aa341d7 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/TransformStamped.json @@ -0,0 +1,10 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + transform: { + translation: { x: 1.0, y: 2.0, z: 3.0 }, + rotation: { x: 4.0, y: 5.0, z: 6.0, w: 7.0 } + } +} diff --git a/integration-test/messages/geometry_msgs/msg/Twist.json b/integration-test/messages/geometry_msgs/msg/Twist.json new file mode 100644 index 0000000..70a9e49 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/Twist.json @@ -0,0 +1,4 @@ +{ + linear: { x: 1.0, y: 2.0, z: 3.0 }, + angular: { x: 4.0, y: 5.0, z: 6.0 } +} diff --git a/integration-test/messages/geometry_msgs/msg/TwistStamped.json b/integration-test/messages/geometry_msgs/msg/TwistStamped.json new file mode 100644 index 0000000..2174326 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/TwistStamped.json @@ -0,0 +1,10 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + twist: { + linear: { x: 1.0, y: 2.0, z: 3.0 }, + angular: { x: 4.0, y: 5.0, z: 6.0 } + } +} diff --git a/integration-test/messages/geometry_msgs/msg/TwistWithCovariance.json b/integration-test/messages/geometry_msgs/msg/TwistWithCovariance.json new file mode 100644 index 0000000..e16f1f5 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/TwistWithCovariance.json @@ -0,0 +1,14 @@ +{ + twist: { + linear: { x: 1.0, y: 2.0, z: 3.0 }, + angular: { x: 4.0, y: 5.0, z: 6.0 } + }, + covariance: [ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 + ] +} diff --git a/integration-test/messages/geometry_msgs/msg/TwistWithCovarianceStamped.json b/integration-test/messages/geometry_msgs/msg/TwistWithCovarianceStamped.json new file mode 100644 index 0000000..18c38cb --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/TwistWithCovarianceStamped.json @@ -0,0 +1,20 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + twist: { + twist: { + linear: { x: 1.0, y: 2.0, z: 3.0 }, + angular: { x: 4.0, y: 5.0, z: 6.0 } + }, + covariance: [ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 + ] + } +} diff --git a/integration-test/messages/geometry_msgs/msg/Vector3.json b/integration-test/messages/geometry_msgs/msg/Vector3.json new file mode 100644 index 0000000..a2418fa --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/Vector3.json @@ -0,0 +1,5 @@ +{ + x: 1.0, + y: 2.0, + z: 3.0 +} diff --git a/integration-test/messages/geometry_msgs/msg/Vector3Stamped.json b/integration-test/messages/geometry_msgs/msg/Vector3Stamped.json new file mode 100644 index 0000000..9c2f3c4 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/Vector3Stamped.json @@ -0,0 +1,11 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + vector: { + x: 1.0, + y: 2.0, + z: 3.0 + } +} diff --git a/integration-test/messages/geometry_msgs/msg/Wrench.json b/integration-test/messages/geometry_msgs/msg/Wrench.json new file mode 100644 index 0000000..3a7650d --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/Wrench.json @@ -0,0 +1,4 @@ +{ + force: { x: 1.0, y: 2.0, z: 3.0 }, + torque: { x: 4.0, y: 5.0, z: 6.0 } +} diff --git a/integration-test/messages/geometry_msgs/msg/WrenchStamped.json b/integration-test/messages/geometry_msgs/msg/WrenchStamped.json new file mode 100644 index 0000000..208b6e4 --- /dev/null +++ b/integration-test/messages/geometry_msgs/msg/WrenchStamped.json @@ -0,0 +1,10 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + wrench: { + force: { x: 1.0, y: 2.0, z: 3.0 }, + torque: { x: 4.0, y: 5.0, z: 6.0 } + } +} diff --git a/integration-test/messages/nav_msgs/msg/GridCells.json b/integration-test/messages/nav_msgs/msg/GridCells.json new file mode 100644 index 0000000..1051c31 --- /dev/null +++ b/integration-test/messages/nav_msgs/msg/GridCells.json @@ -0,0 +1,12 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + cell_width: 1.0, + cell_height: 2.0, + cells: [ + { x: 1.0, y: 2.0, z: 3.0 }, + { x: 4.0, y: 5.0, z: 6.0 } + ] +} diff --git a/integration-test/messages/nav_msgs/msg/MapMetaData.json b/integration-test/messages/nav_msgs/msg/MapMetaData.json new file mode 100644 index 0000000..e071286 --- /dev/null +++ b/integration-test/messages/nav_msgs/msg/MapMetaData.json @@ -0,0 +1,10 @@ +{ + map_load_time: { sec: 42, nanosec: 43 }, + resolution: 1.0, + width: 2, + height: 3, + origin: { + position: { x: 1.0, y: 2.0, z: 3.0 }, + orientation: { x: 4.0, y: 5.0, z: 6.0, w: 7.0 } + } +} diff --git a/integration-test/messages/nav_msgs/msg/OccupancyGrid.json b/integration-test/messages/nav_msgs/msg/OccupancyGrid.json new file mode 100644 index 0000000..548daeb --- /dev/null +++ b/integration-test/messages/nav_msgs/msg/OccupancyGrid.json @@ -0,0 +1,17 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + info: { + map_load_time: { sec: 42, nanosec: 43 }, + resolution: 1.0, + width: 2, + height: 3, + origin: { + position: { x: 1.0, y: 2.0, z: 3.0 }, + orientation: { x: 4.0, y: 5.0, z: 6.0, w: 7.0 } + } + }, + data: [1, 2, 3, 4] +} diff --git a/integration-test/messages/nav_msgs/msg/Odometry.json b/integration-test/messages/nav_msgs/msg/Odometry.json new file mode 100644 index 0000000..602d0aa --- /dev/null +++ b/integration-test/messages/nav_msgs/msg/Odometry.json @@ -0,0 +1,35 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + child_frame_id: "frame", + pose: { + pose: { + position: { x: 1.0, y: 2.0, z: 3.0 }, + orientation: { x: 4.0, y: 5.0, z: 6.0, w: 7.0 } + }, + covariance: [ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 + ] + }, + twist: { + twist: { + linear: { x: 1.0, y: 2.0, z: 3.0 }, + angular: { x: 4.0, y: 5.0, z: 6.0 } + }, + covariance: [ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 + ] + } +} \ No newline at end of file diff --git a/integration-test/messages/nav_msgs/msg/Path.json b/integration-test/messages/nav_msgs/msg/Path.json new file mode 100644 index 0000000..032c80a --- /dev/null +++ b/integration-test/messages/nav_msgs/msg/Path.json @@ -0,0 +1,29 @@ +{ + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + poses: [ + { + header: { + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" + }, + pose: { + position: { x: 1.0, y: 2.0, z: 3.0 }, + orientation: { x: 4.0, y: 5.0, z: 6.0, w: 7.0 } + } + }, + { + header: { + stamp: { sec: 142, nanosec: 143 }, + frame_id: "test2" + }, + pose: { + position: { x: 10.0, y: 20.0, z: 30.0 }, + orientation: { x: 40.0, y: 50.0, z: 60.0, w: 70.0 } + } + }, + + ] +} diff --git a/integration-test/messages/std_msgs/msg/Bool.json b/integration-test/messages/std_msgs/msg/Bool.json new file mode 100644 index 0000000..1ea6c37 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Bool.json @@ -0,0 +1,3 @@ +{ + data: true +} diff --git a/integration-test/messages/std_msgs/msg/Byte.json b/integration-test/messages/std_msgs/msg/Byte.json new file mode 100644 index 0000000..6310538 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Byte.json @@ -0,0 +1,3 @@ +{ + data: [0x01] +} diff --git a/integration-test/messages/std_msgs/msg/ByteMultiArray.json b/integration-test/messages/std_msgs/msg/ByteMultiArray.json new file mode 100644 index 0000000..7ce2ea1 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/ByteMultiArray.json @@ -0,0 +1,6 @@ +{ + layout: { + dim: [{label: "Dimension", size: 0, stride: 1}], + data_offset: 0, + } +} diff --git a/integration-test/messages/std_msgs/msg/Char.json b/integration-test/messages/std_msgs/msg/Char.json new file mode 100644 index 0000000..bcf4858 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Char.json @@ -0,0 +1,3 @@ +{ + data: 63 +} diff --git a/integration-test/messages/std_msgs/msg/ColorRGBA.json b/integration-test/messages/std_msgs/msg/ColorRGBA.json new file mode 100644 index 0000000..6172281 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/ColorRGBA.json @@ -0,0 +1,6 @@ +{ + r: 1.0, + g: 2.0, + b: 3.0, + a: 4.0 +} diff --git a/integration-test/messages/std_msgs/msg/Empty.json b/integration-test/messages/std_msgs/msg/Empty.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Empty.json @@ -0,0 +1 @@ +{} diff --git a/integration-test/messages/std_msgs/msg/Float32.json b/integration-test/messages/std_msgs/msg/Float32.json new file mode 100644 index 0000000..e242905 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Float32.json @@ -0,0 +1,3 @@ +{ + data: 1.0 +} diff --git a/integration-test/messages/std_msgs/msg/Float32MultiArray.json b/integration-test/messages/std_msgs/msg/Float32MultiArray.json new file mode 100644 index 0000000..f7831a7 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Float32MultiArray.json @@ -0,0 +1,7 @@ +{ + layout: { + dim: [{label: "Dimension", size: 4, stride: 1}], + data_offset: 0, + }, + data: [1.0, 2.0, 3.0, 4.0] +} diff --git a/integration-test/messages/std_msgs/msg/Float64.json b/integration-test/messages/std_msgs/msg/Float64.json new file mode 100644 index 0000000..e242905 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Float64.json @@ -0,0 +1,3 @@ +{ + data: 1.0 +} diff --git a/integration-test/messages/std_msgs/msg/Float64MultiArray.json b/integration-test/messages/std_msgs/msg/Float64MultiArray.json new file mode 100644 index 0000000..f7831a7 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Float64MultiArray.json @@ -0,0 +1,7 @@ +{ + layout: { + dim: [{label: "Dimension", size: 4, stride: 1}], + data_offset: 0, + }, + data: [1.0, 2.0, 3.0, 4.0] +} diff --git a/integration-test/messages/std_msgs/msg/Header.json b/integration-test/messages/std_msgs/msg/Header.json new file mode 100644 index 0000000..6988767 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Header.json @@ -0,0 +1,4 @@ +{ + stamp: { sec: 42, nanosec: 43 }, + frame_id: "test" +} \ No newline at end of file diff --git a/integration-test/messages/std_msgs/msg/Int16.json b/integration-test/messages/std_msgs/msg/Int16.json new file mode 100644 index 0000000..cfc5e31 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Int16.json @@ -0,0 +1,3 @@ +{ + data: 1 +} diff --git a/integration-test/messages/std_msgs/msg/Int16MultiArray.json b/integration-test/messages/std_msgs/msg/Int16MultiArray.json new file mode 100644 index 0000000..7f9e27e --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Int16MultiArray.json @@ -0,0 +1,7 @@ +{ + layout: { + dim: [{label: "Dimension", size: 4, stride: 1}], + data_offset: 0, + }, + data: [1, 2, 3, 4] +} diff --git a/integration-test/messages/std_msgs/msg/Int32.json b/integration-test/messages/std_msgs/msg/Int32.json new file mode 100644 index 0000000..cfc5e31 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Int32.json @@ -0,0 +1,3 @@ +{ + data: 1 +} diff --git a/integration-test/messages/std_msgs/msg/Int32MultiArray.json b/integration-test/messages/std_msgs/msg/Int32MultiArray.json new file mode 100644 index 0000000..7f9e27e --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Int32MultiArray.json @@ -0,0 +1,7 @@ +{ + layout: { + dim: [{label: "Dimension", size: 4, stride: 1}], + data_offset: 0, + }, + data: [1, 2, 3, 4] +} diff --git a/integration-test/messages/std_msgs/msg/Int64.json b/integration-test/messages/std_msgs/msg/Int64.json new file mode 100644 index 0000000..cfc5e31 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Int64.json @@ -0,0 +1,3 @@ +{ + data: 1 +} diff --git a/integration-test/messages/std_msgs/msg/Int64MultiArray.json b/integration-test/messages/std_msgs/msg/Int64MultiArray.json new file mode 100644 index 0000000..7f9e27e --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Int64MultiArray.json @@ -0,0 +1,7 @@ +{ + layout: { + dim: [{label: "Dimension", size: 4, stride: 1}], + data_offset: 0, + }, + data: [1, 2, 3, 4] +} diff --git a/integration-test/messages/std_msgs/msg/Int8.json b/integration-test/messages/std_msgs/msg/Int8.json new file mode 100644 index 0000000..cfc5e31 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Int8.json @@ -0,0 +1,3 @@ +{ + data: 1 +} diff --git a/integration-test/messages/std_msgs/msg/Int8MultiArray.json b/integration-test/messages/std_msgs/msg/Int8MultiArray.json new file mode 100644 index 0000000..7f9e27e --- /dev/null +++ b/integration-test/messages/std_msgs/msg/Int8MultiArray.json @@ -0,0 +1,7 @@ +{ + layout: { + dim: [{label: "Dimension", size: 4, stride: 1}], + data_offset: 0, + }, + data: [1, 2, 3, 4] +} diff --git a/integration-test/messages/std_msgs/msg/MultiArrayDimension.json b/integration-test/messages/std_msgs/msg/MultiArrayDimension.json new file mode 100644 index 0000000..0057960 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/MultiArrayDimension.json @@ -0,0 +1,5 @@ +{ + label: "Dimension", + size: 4, + stride: 1 +} diff --git a/integration-test/messages/std_msgs/msg/MultiArrayLayout.json b/integration-test/messages/std_msgs/msg/MultiArrayLayout.json new file mode 100644 index 0000000..a3e6da8 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/MultiArrayLayout.json @@ -0,0 +1,4 @@ +{ + dim: [{label: "Dimension", size: 4, stride: 1}], + data_offset: 0, +} diff --git a/integration-test/messages/std_msgs/msg/String.json b/integration-test/messages/std_msgs/msg/String.json new file mode 100644 index 0000000..83f0e73 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/String.json @@ -0,0 +1,3 @@ +{ + data: "Hello" +} diff --git a/integration-test/messages/std_msgs/msg/UInt16.json b/integration-test/messages/std_msgs/msg/UInt16.json new file mode 100644 index 0000000..cfc5e31 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/UInt16.json @@ -0,0 +1,3 @@ +{ + data: 1 +} diff --git a/integration-test/messages/std_msgs/msg/UInt16MultiArray.json b/integration-test/messages/std_msgs/msg/UInt16MultiArray.json new file mode 100644 index 0000000..7f9e27e --- /dev/null +++ b/integration-test/messages/std_msgs/msg/UInt16MultiArray.json @@ -0,0 +1,7 @@ +{ + layout: { + dim: [{label: "Dimension", size: 4, stride: 1}], + data_offset: 0, + }, + data: [1, 2, 3, 4] +} diff --git a/integration-test/messages/std_msgs/msg/UInt32.json b/integration-test/messages/std_msgs/msg/UInt32.json new file mode 100644 index 0000000..cfc5e31 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/UInt32.json @@ -0,0 +1,3 @@ +{ + data: 1 +} diff --git a/integration-test/messages/std_msgs/msg/UInt32MultiArray.json b/integration-test/messages/std_msgs/msg/UInt32MultiArray.json new file mode 100644 index 0000000..7f9e27e --- /dev/null +++ b/integration-test/messages/std_msgs/msg/UInt32MultiArray.json @@ -0,0 +1,7 @@ +{ + layout: { + dim: [{label: "Dimension", size: 4, stride: 1}], + data_offset: 0, + }, + data: [1, 2, 3, 4] +} diff --git a/integration-test/messages/std_msgs/msg/UInt64.json b/integration-test/messages/std_msgs/msg/UInt64.json new file mode 100644 index 0000000..cfc5e31 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/UInt64.json @@ -0,0 +1,3 @@ +{ + data: 1 +} diff --git a/integration-test/messages/std_msgs/msg/UInt64MultiArray.json b/integration-test/messages/std_msgs/msg/UInt64MultiArray.json new file mode 100644 index 0000000..7f9e27e --- /dev/null +++ b/integration-test/messages/std_msgs/msg/UInt64MultiArray.json @@ -0,0 +1,7 @@ +{ + layout: { + dim: [{label: "Dimension", size: 4, stride: 1}], + data_offset: 0, + }, + data: [1, 2, 3, 4] +} diff --git a/integration-test/messages/std_msgs/msg/UInt8.json b/integration-test/messages/std_msgs/msg/UInt8.json new file mode 100644 index 0000000..cfc5e31 --- /dev/null +++ b/integration-test/messages/std_msgs/msg/UInt8.json @@ -0,0 +1,3 @@ +{ + data: 1 +} diff --git a/integration-test/messages/std_msgs/msg/UInt8MultiArray.json b/integration-test/messages/std_msgs/msg/UInt8MultiArray.json new file mode 100644 index 0000000..7f9e27e --- /dev/null +++ b/integration-test/messages/std_msgs/msg/UInt8MultiArray.json @@ -0,0 +1,7 @@ +{ + layout: { + dim: [{label: "Dimension", size: 4, stride: 1}], + data_offset: 0, + }, + data: [1, 2, 3, 4] +} diff --git a/integration-test/specs/geometry_msgs.speqtr b/integration-test/specs/geometry_msgs.speqtr new file mode 100644 index 0000000..4f395db --- /dev/null +++ b/integration-test/specs/geometry_msgs.speqtr @@ -0,0 +1,400 @@ +behavior "Accel" + nominal case "Message Occcured" + geometry_msgs/msg/Accel@_ros2cli_* as e + and e.linear.x = 1.0 + and e.linear.y = 2.0 + and e.linear.z = 3.0 + and e.angular.x = 4.0 + and e.angular.y = 5.0 + and e.angular.z = 6.0 + end +end + +behavior "AccelStamped" + nominal case "Message Occcured" + geometry_msgs/msg/AccelStamped@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.accel.linear.x = 1.0 + and e.accel.linear.y = 2.0 + and e.accel.linear.z = 3.0 + and e.accel.angular.x = 4.0 + and e.accel.angular.y = 5.0 + and e.accel.angular.z = 6.0 + end +end + +behavior "AccelWithCovariance" + nominal case "Message Occcured" + geometry_msgs/msg/AccelWithCovariance@_ros2cli_* as e + and e.accel.linear.x = 1.0 + and e.accel.linear.y = 2.0 + and e.accel.linear.z = 3.0 + and e.accel.angular.x = 4.0 + and e.accel.angular.y = 5.0 + and e.accel.angular.z = 6.0 + and not exists(e.covariance.0) + end +end + +behavior "AccelWithCovarianceStamped" + nominal case "Message Occcured" + geometry_msgs/msg/AccelWithCovarianceStamped@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.accel.accel.linear.x = 1.0 + and e.accel.accel.linear.y = 2.0 + and e.accel.accel.linear.z = 3.0 + and e.accel.accel.angular.x = 4.0 + and e.accel.accel.angular.y = 5.0 + and e.accel.accel.angular.z = 6.0 + and not exists(e.accel.covariance.0) + end +end + +behavior "Inertia" + nominal case "Message Occcured" + geometry_msgs/msg/Inertia@_ros2cli_* as e + and e.m = 1.0 + and e.com.x = 2.0 + and e.com.y = 3.0 + and e.com.z = 4.0 + and e.ixx = 5.0 + and e.ixy = 6.0 + and e.ixz = 7.0 + and e.iyy = 8.0 + and e.iyz = 9.0 + and e.izz = 10.0 + end +end + +behavior "InertiaStamped" + nominal case "Message Occcured" + geometry_msgs/msg/InertiaStamped@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.inertia.m = 1.0 + and e.inertia.com.x = 2.0 + and e.inertia.com.y = 3.0 + and e.inertia.com.z = 4.0 + and e.inertia.ixx = 5.0 + and e.inertia.ixy = 6.0 + and e.inertia.ixz = 7.0 + and e.inertia.iyy = 8.0 + and e.inertia.iyz = 9.0 + and e.inertia.izz = 10.0 + end +end + +behavior "Point32" + nominal case "Message Occcured" + geometry_msgs/msg/Point32@_ros2cli_* as e + and e.x = 1.0 + and e.y = 2.0 + and e.z = 3.0 + end +end + +behavior "Point" + nominal case "Message Occcured" + geometry_msgs/msg/Point@_ros2cli_* as e + and e.x = 1.0 + and e.y = 2.0 + and e.z = 3.0 + end +end + +behavior "PointStamped" + nominal case "Message Occcured" + geometry_msgs/msg/PointStamped@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.point.x = 1.0 + and e.point.y = 2.0 + and e.point.z = 3.0 + end +end + +behavior "Polygon" + nominal case "Message Occcured" + geometry_msgs/msg/Polygon@_ros2cli_* as e + and e.points.0.x = 1.0 + and e.points.0.y = 2.0 + and e.points.0.z = 3.0 + and e.points.1.x = 4.0 + and e.points.1.y = 5.0 + and e.points.1.z = 6.0 + and e.points.2.x = 7.0 + and e.points.2.y = 8.0 + and e.points.2.z = 9.0 + end +end + + +behavior "PolygonStamped" + nominal case "Message Occcured" + geometry_msgs/msg/PolygonStamped@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.polygon.points.0.x = 1.0 + and e.polygon.points.0.y = 2.0 + and e.polygon.points.0.z = 3.0 + and e.polygon.points.1.x = 4.0 + and e.polygon.points.1.y = 5.0 + and e.polygon.points.1.z = 6.0 + and e.polygon.points.2.x = 7.0 + and e.polygon.points.2.y = 8.0 + and e.polygon.points.2.z = 9.0 + end +end + +behavior "Pose2D" + nominal case "Message Occcured" + geometry_msgs/msg/Pose2D@_ros2cli_* as e + and e.x = 1.0 + and e.y = 2.0 + and e.theta = 3.0 + end +end + +# TODO none of the poses are coming through +# behavior "PoseArray" +# nominal case "Message Occcured" +# geometry_msgs/msg/PoseArray@_ros2cli_* as e +# and e.poses.0.position.x = 1.0 +# and e.poses.0.position.y = 2.0 +# and e.poses.0.position.z = 3.0 +# and e.poses.0.orientation.x = 4.0 +# and e.poses.0.orientation.y = 5.0 +# and e.poses.0.orientation.z = 6.0 +# and e.poses.0.orientation.w = 7.0 +# and e.poses.1.position.x = 8.0 +# and e.poses.1.position.y = 9.0 +# and e.poses.1.position.z = 10.0 +# and e.poses.1.orientation.x = 11.0 +# and e.poses.1.orientation.y = 12.0 +# and e.poses.1.orientation.z = 13.0 +# and e.poses.1.orientation.w = 14.0 +# end +# end + +behavior "Pose" + nominal case "Message Occcured" + geometry_msgs/msg/Pose@_ros2cli_* as e + and e.position.x = 1.0 + and e.position.y = 2.0 + and e.position.z = 3.0 + and e.orientation.x = 4.0 + and e.orientation.y = 5.0 + and e.orientation.z = 6.0 + and e.orientation.w = 7.0 + end +end + +behavior "PoseStamped" + nominal case "Message Occcured" + geometry_msgs/msg/PoseStamped@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.pose.position.x = 1.0 + and e.pose.position.y = 2.0 + and e.pose.position.z = 3.0 + and e.pose.orientation.x = 4.0 + and e.pose.orientation.y = 5.0 + and e.pose.orientation.z = 6.0 + and e.pose.orientation.w = 7.0 + end +end + +behavior "PoseWithCovariance" + nominal case "Message Occcured" + geometry_msgs/msg/PoseWithCovariance@_ros2cli_* as e + and e.pose.position.x = 1.0 + and e.pose.position.y = 2.0 + and e.pose.position.z = 3.0 + and e.pose.orientation.x = 4.0 + and e.pose.orientation.y = 5.0 + and e.pose.orientation.z = 6.0 + and e.pose.orientation.w = 7.0 + and not exists(e.pose.covariance.0) + end +end + +behavior "PoseWithCovarianceStamped" + nominal case "Message Occcured" + geometry_msgs/msg/PoseWithCovarianceStamped@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.pose.pose.position.x = 1.0 + and e.pose.pose.position.y = 2.0 + and e.pose.pose.position.z = 3.0 + and e.pose.pose.orientation.x = 4.0 + and e.pose.pose.orientation.y = 5.0 + and e.pose.pose.orientation.z = 6.0 + and e.pose.pose.orientation.w = 7.0 + and not exists(e.pose.covariance.0) + end +end + +behavior "Quaternion" + nominal case "Message Occcured" + geometry_msgs/msg/Quaternion@_ros2cli_* as e + and e.x = 1.0 + and e.y = 2.0 + and e.z = 3.0 + and e.w = 4.0 + end +end + +behavior "QuaternionStamped" + nominal case "Message Occcured" + geometry_msgs/msg/QuaternionStamped@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.quaternion.x = 1.0 + and e.quaternion.y = 2.0 + and e.quaternion.z = 3.0 + and e.quaternion.w = 4.0 + end +end + +behavior "Transform" + nominal case "Message Occcured" + geometry_msgs/msg/Transform@_ros2cli_* as e + and e.translation.x = 1.0 + and e.translation.y = 2.0 + and e.translation.z = 3.0 + and e.rotation.x = 4.0 + and e.rotation.y = 5.0 + and e.rotation.z = 6.0 + and e.rotation.w = 7.0 + end +end + +behavior "TransformStamped" + nominal case "Message Occcured" + geometry_msgs/msg/TransformStamped@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.transform.translation.x = 1.0 + and e.transform.translation.y = 2.0 + and e.transform.translation.z = 3.0 + and e.transform.rotation.x = 4.0 + and e.transform.rotation.y = 5.0 + and e.transform.rotation.z = 6.0 + and e.transform.rotation.w = 7.0 + end +end + +behavior "Twist" + nominal case "Message Occcured" + geometry_msgs/msg/Twist@_ros2cli_* as e + and e.linear.x = 1.0 + and e.linear.y = 2.0 + and e.linear.z = 3.0 + and e.angular.x = 4.0 + and e.angular.y = 5.0 + and e.angular.z = 6.0 + end +end + +behavior "TwistStamped" + nominal case "Message Occcured" + geometry_msgs/msg/TwistStamped@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.twist.linear.x = 1.0 + and e.twist.linear.y = 2.0 + and e.twist.linear.z = 3.0 + and e.twist.angular.x = 4.0 + and e.twist.angular.y = 5.0 + and e.twist.angular.z = 6.0 + end +end + +behavior "TwistWithCovariance" + nominal case "Message Occcured" + geometry_msgs/msg/TwistWithCovariance@_ros2cli_* as e + and e.twist.linear.x = 1.0 + and e.twist.linear.y = 2.0 + and e.twist.linear.z = 3.0 + and e.twist.angular.x = 4.0 + and e.twist.angular.y = 5.0 + and e.twist.angular.z = 6.0 + and not exists(e.covariance.0) + end +end + +behavior "TwistWithCovarianceStamped" + nominal case "Message Occcured" + geometry_msgs/msg/TwistWithCovarianceStamped@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.twist.twist.linear.x = 1.0 + and e.twist.twist.linear.y = 2.0 + and e.twist.twist.linear.z = 3.0 + and e.twist.twist.angular.x = 4.0 + and e.twist.twist.angular.y = 5.0 + and e.twist.twist.angular.z = 6.0 + and not exists(e.twist.covariance.0) + end +end + +behavior "Vector3" + nominal case "Message Occcured" + geometry_msgs/msg/Vector3@_ros2cli_* as e + and e.x = 1.0 + and e.y = 2.0 + and e.z = 3.0 + end +end + +behavior "Vector3Stamped" + nominal case "Message Occcured" + geometry_msgs/msg/Vector3Stamped@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.vector.x = 1.0 + and e.vector.y = 2.0 + and e.vector.z = 3.0 + end +end + +behavior "Wrench" + nominal case "Message Occcured" + geometry_msgs/msg/Wrench@_ros2cli_* as e + and e.force.x = 1.0 + and e.force.y = 2.0 + and e.force.z = 3.0 + and e.torque.x = 4.0 + and e.torque.y = 5.0 + and e.torque.z = 6.0 + end +end + +behavior "WrenchStamped" + nominal case "Message Occcured" + geometry_msgs/msg/WrenchStamped@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.wrench.force.x = 1.0 + and e.wrench.force.y = 2.0 + and e.wrench.force.z = 3.0 + and e.wrench.torque.x = 4.0 + and e.wrench.torque.y = 5.0 + and e.wrench.torque.z = 6.0 + end +end diff --git a/integration-test/smoke.speqtr b/integration-test/specs/interactions.speqtr similarity index 100% rename from integration-test/smoke.speqtr rename to integration-test/specs/interactions.speqtr diff --git a/integration-test/specs/nav_msgs.speqtr b/integration-test/specs/nav_msgs.speqtr new file mode 100644 index 0000000..1853a52 --- /dev/null +++ b/integration-test/specs/nav_msgs.speqtr @@ -0,0 +1,115 @@ +behavior "GridCells" + nominal case "Message Occcured" + nav_msgs/msg/GridCells@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.cell_width = 1.0 + and e.cell_height = 2.0 + and e.cells.0.x = 1.0 + and e.cells.0.y = 2.0 + and e.cells.0.z = 3.0 + and e.cells.1.x = 4.0 + and e.cells.1.y = 5.0 + and e.cells.1.z = 6.0 + end +end + +behavior "MapMetaData" + nominal case "Message Occcured" + nav_msgs/msg/MapMetaData@_ros2cli_* as e + and e.map_load_time.sec = 42 + and e.map_load_time.nanosec = 43 + and e.resolution = 1.0 + and e.width = 2 + and e.height = 3 + and e.origin.position.x = 1.0 + and e.origin.position.y = 2.0 + and e.origin.position.z = 3.0 + and e.origin.orientation.x = 4.0 + and e.origin.orientation.y = 5.0 + and e.origin.orientation.z = 6.0 + and e.origin.orientation.w = 7.0 + end +end + +behavior "OccupancyGrid" + nominal case "Message Occcured" + nav_msgs/msg/OccupancyGrid@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.info.map_load_time.sec = 42 + and e.info.map_load_time.nanosec = 43 + and e.info.resolution = 1.0 + and e.info.width = 2 + and e.info.height = 3 + and e.info.origin.position.x = 1.0 + and e.info.origin.position.y = 2.0 + and e.info.origin.position.z = 3.0 + and e.info.origin.orientation.x = 4.0 + and e.info.origin.orientation.y = 5.0 + and e.info.origin.orientation.z = 6.0 + and e.info.origin.orientation.w = 7.0 + and e.data.0 = 1 + and e.data.1 = 2 + and e.data.2 = 3 + and e.data.3 = 4 + end +end + +behavior "Odometry" + nominal case "Message Occcured" + nav_msgs/msg/Odometry@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + and e.child_frame_id = "frame" + and e.pose.pose.position.x = 1.0 + and e.pose.pose.position.y = 2.0 + and e.pose.pose.position.z = 3.0 + and e.pose.pose.orientation.x = 4.0 + and e.pose.pose.orientation.y = 5.0 + and e.pose.pose.orientation.z = 6.0 + and e.pose.pose.orientation.w = 7.0 + and not exists(e.pose.pose.covariance.0) + and e.twist.twist.linear.x = 1.0 + and e.twist.twist.linear.y = 2.0 + and e.twist.twist.linear.z = 3.0 + and e.twist.twist.angular.x = 4.0 + and e.twist.twist.angular.y = 5.0 + and e.twist.twist.angular.z = 6.0 + and not exists(e.twist.covariance.0) + end +end + +behavior "Path" + nominal case "Message Occcured" + nav_msgs/msg/Path@_ros2cli_* as e + and e.header.stamp.sec = 42 + and e.header.stamp.nanosec = 43 + and e.header.frame_id = "test" + + and e.poses.0.header.stamp.sec = 42 + and e.poses.0.header.stamp.nanosec = 43 + and e.poses.0.header.frame_id = "test" + and e.poses.0.pose.position.x = 1.0 + and e.poses.0.pose.position.y = 2.0 + and e.poses.0.pose.position.z = 3.0 + and e.poses.0.pose.orientation.x = 4.0 + and e.poses.0.pose.orientation.y = 5.0 + and e.poses.0.pose.orientation.z = 6.0 + and e.poses.0.pose.orientation.w = 7.0 + + and e.poses.1.header.stamp.sec = 142 + and e.poses.1.header.stamp.nanosec = 143 + and e.poses.1.header.frame_id = "test2" + and e.poses.1.pose.position.x = 10.0 + and e.poses.1.pose.position.y = 20.0 + and e.poses.1.pose.position.z = 30.0 + and e.poses.1.pose.orientation.x = 40.0 + and e.poses.1.pose.orientation.y = 50.0 + and e.poses.1.pose.orientation.z = 60.0 + and e.poses.1.pose.orientation.w = 70.0 + end +end \ No newline at end of file diff --git a/integration-test/specs/std_msgs.speqtr b/integration-test/specs/std_msgs.speqtr new file mode 100644 index 0000000..596ee43 --- /dev/null +++ b/integration-test/specs/std_msgs.speqtr @@ -0,0 +1,268 @@ +behavior "Bool" + nominal case "Message Occcured" + std_msgs/msg/Bool@_ros2cli_* as e + and e.data = true + end +end + +behavior "Char" + nominal case "Message Occcured" + std_msgs/msg/Char@_ros2cli_* as e + and e.data = 63 + end +end + +behavior "ColorRGBA" + nominal case "Message Occcured" + std_msgs/msg/ColorRGBA@_ros2cli_* as e + and e.r = 1.0 + and e.g = 2.0 + and e.b = 3.0 + and e.a = 4.0 + end +end + +behavior "Empty" + nominal case "Message Occcured" + std_msgs/msg/Empty@_ros2cli_* as e + end +end + +behavior "Header" + nominal case "Message Occcured" + std_msgs/msg/Header@_ros2cli_* as e + and e.stamp.sec = 42 + and e.stamp.nanosec = 43 + and e.frame_id = "test" + end +end + +behavior "Float32" + nominal case "Message Occcured" + std_msgs/msg/Float32@_ros2cli_* as e + and e.data = 1.0 + end +end + +behavior "Float64" + nominal case "Message Occcured" + std_msgs/msg/Float64@_ros2cli_* as e + and e.data = 1.0 + end +end + +behavior "Byte" + nominal case "Message Occcured" + std_msgs/msg/Byte@_ros2cli_* as e + and e.data = 1 + end +end + +behavior "Int8" + nominal case "Message Occcured" + std_msgs/msg/Int8@_ros2cli_* as e + and e.data = 1 + end +end + +behavior "Int16" + nominal case "Message Occcured" + std_msgs/msg/Int16@_ros2cli_* as e + and e.data = 1 + end +end + +behavior "Int32" + nominal case "Message Occcured" + std_msgs/msg/Int32@_ros2cli_* as e + and e.data = 1 + end +end + +behavior "Int64" + nominal case "Message Occcured" + std_msgs/msg/Int64@_ros2cli_* as e + and e.data = 1 + end +end + +behavior "UInt8" + nominal case "Message Occcured" + std_msgs/msg/UInt8@_ros2cli_* as e + and e.data = 1 + end +end + +behavior "UInt16" + nominal case "Message Occcured" + std_msgs/msg/UInt16@_ros2cli_* as e + and e.data = 1 + end +end + +behavior "UInt32" + nominal case "Message Occcured" + std_msgs/msg/UInt32@_ros2cli_* as e + and e.data = 1 + end +end + +behavior "UInt64" + nominal case "Message Occcured" + std_msgs/msg/UInt64@_ros2cli_* as e + and e.data = 1 + end +end + +# ByteMultiArray: There is currently no way to send byte array data from the ros2 cli +# https://github.com/ros2/ros2cli/issues/760 +# TODO getting e.dim.0.layout.label etc. +behavior "ByteMultiArray" + nominal case "Message Occcured" + std_msgs/msg/ByteMultiArray@_ros2cli_* as e + and e.layout.dim.0.label = "Dimension" + and e.layout.dim.0.size = 0 + and e.layout.dim.0.stride = 1 + and e.layout.data_offset = 0 + end +end + +behavior "Float32MultiArray" + nominal case "Message Occcured" + std_msgs/msg/Float32MultiArray@_ros2cli_* as e + and e.layout.dim.0.label = "Dimension" + and e.layout.dim.0.size = 4 + and e.layout.dim.0.stride = 1 + and e.layout.data_offset = 0 + and e.data.0 = 1.0 + and e.data.1 = 2.0 + and e.data.2 = 3.0 + and e.data.3 = 4.0 + end +end + +behavior "Float64MultiArray" + nominal case "Message Occcured" + std_msgs/msg/Float64MultiArray@_ros2cli_* as e + and e.layout.dim.0.label = "Dimension" + and e.layout.dim.0.size = 4 + and e.layout.dim.0.stride = 1 + and e.layout.data_offset = 0 + and e.data.0 = 1.0 + and e.data.1 = 2.0 + and e.data.2 = 3.0 + and e.data.3 = 4.0 + end +end + +behavior "Int8MultiArray" + nominal case "Message Occcured" + std_msgs/msg/Int8MultiArray@_ros2cli_* as e + and e.layout.dim.0.label = "Dimension" + and e.layout.dim.0.size = 4 + and e.layout.dim.0.stride = 1 + and e.layout.data_offset = 0 + and e.data.0 = 1 + and e.data.1 = 2 + and e.data.2 = 3 + and e.data.3 = 4 + end +end + +behavior "Int16MultiArray" + nominal case "Message Occcured" + std_msgs/msg/Int16MultiArray@_ros2cli_* as e + and e.layout.dim.0.label = "Dimension" + and e.layout.dim.0.size = 4 + and e.layout.dim.0.stride = 1 + and e.layout.data_offset = 0 + and e.data.0 = 1 + and e.data.1 = 2 + and e.data.2 = 3 + and e.data.3 = 4 + end +end + +behavior "Int32MultiArray" + nominal case "Message Occcured" + std_msgs/msg/Int32MultiArray@_ros2cli_* as e + and e.layout.dim.0.label = "Dimension" + and e.layout.dim.0.size = 4 + and e.layout.dim.0.stride = 1 + and e.layout.data_offset = 0 + and e.data.0 = 1 + and e.data.1 = 2 + and e.data.2 = 3 + and e.data.3 = 4 + end +end + +behavior "Int64MultiArray" + nominal case "Message Occcured" + std_msgs/msg/Int64MultiArray@_ros2cli_* as e + and e.layout.dim.0.label = "Dimension" + and e.layout.dim.0.size = 4 + and e.layout.dim.0.stride = 1 + and e.layout.data_offset = 0 + and e.data.0 = 1 + and e.data.1 = 2 + and e.data.2 = 3 + and e.data.3 = 4 + end +end + +behavior "UInt8MultiArray" + nominal case "Message Occcured" + std_msgs/msg/UInt8MultiArray@_ros2cli_* as e + and e.layout.dim.0.label = "Dimension" + and e.layout.dim.0.size = 4 + and e.layout.dim.0.stride = 1 + and e.layout.data_offset = 0 + and e.data.0 = 1 + and e.data.1 = 2 + and e.data.2 = 3 + and e.data.3 = 4 + end +end + +behavior "UInt16MultiArray" + nominal case "Message Occcured" + std_msgs/msg/UInt16MultiArray@_ros2cli_* as e + and e.layout.dim.0.label = "Dimension" + and e.layout.dim.0.size = 4 + and e.layout.dim.0.stride = 1 + and e.layout.data_offset = 0 + and e.data.0 = 1 + and e.data.1 = 2 + and e.data.2 = 3 + and e.data.3 = 4 + end +end + +behavior "UInt32MultiArray" + nominal case "Message Occcured" + std_msgs/msg/UInt32MultiArray@_ros2cli_* as e + and e.layout.dim.0.label = "Dimension" + and e.layout.dim.0.size = 4 + and e.layout.dim.0.stride = 1 + and e.layout.data_offset = 0 + and e.data.0 = 1 + and e.data.1 = 2 + and e.data.2 = 3 + and e.data.3 = 4 + end +end + +behavior "UInt64MultiArray" + nominal case "Message Occcured" + std_msgs/msg/UInt64MultiArray@_ros2cli_* as e + and e.layout.dim.0.label = "Dimension" + and e.layout.dim.0.size = 4 + and e.layout.dim.0.stride = 1 + and e.layout.data_offset = 0 + and e.data.0 = 1 + and e.data.1 = 2 + and e.data.2 = 3 + and e.data.3 = 4 + end +end \ No newline at end of file