diff --git a/Changelog.md b/Changelog.md index f61925af..f4ce6c00 100644 --- a/Changelog.md +++ b/Changelog.md @@ -107,6 +107,38 @@ 1. Bumps in garden : ci_matching_branch/bump_garden_ign-msgs9 * [Pull request #203](https://github.com/gazebosim/gz-msgs/pull/203) +## Gazebo Msgs 8.x + +### Gazebo Msgs 8.7.0 (2022-09-27) + +1. ign -> gz Redirect Gz Headers + * [Pull request #300](https://github.com/gazebosim/gz-msgs/pull/300) + * [Pull request #307](https://github.com/gazebosim/gz-msgs/pull/307) + +1. Add parameter component message definitions + * [Pull request #241](https://github.com/gazebosim/gz-msgs/pull/241) + * [Pull request #298](https://github.com/gazebosim/gz-msgs/pull/298) + +1. Remove redunant namespace references + * [Pull request #293](https://github.com/gazebosim/gz-msgs/pull/293) + +### Gazebo Msgs 8.6.0 (2022-08-02) + +1. Increase `Utility` test coverage + * [Pull request #283](https://github.com/gazebosim/gz-msgs/pull/283) + +1. Change `IGN_DESIGNATION` to `GZ_DESIGNATION` + * [Pull request #282](https://github.com/gazebosim/gz-msgs/pull/282) + * [Pull request #284](https://github.com/gazebosim/gz-msgs/pull/284) + +1. Add entity wrench message + * [Pull request #274](https://github.com/gazebosim/gz-msgs/pull/274) + +1. Ignition -> Gazebo + * [Pull request #273](https://github.com/gazebosim/gz-msgs/pull/273) + +1. Add `ACTOR` and `WORLD` types to entity + * [Pull request #275](https://github.com/gazebosim/gz-msgs/pull/275) ### Gazebo Msgs 8.5.0 (2022-06-23) @@ -125,8 +157,6 @@ 1. Generator: Add missing std namespace to string arguments * [Pull request #242](https://github.com/gazebosim/gz-msgs/pull/242) -## Gazebo Msgs 8.x - ### Gazebo Msgs 8.4.0 (2022-04-06) 1. Add Dataframe msg @@ -374,6 +404,19 @@ ## Gazebo Msgs 5.x +### Gazebo Msgs 5.10.0 (2022-10-10) + +1. Ignition to Gazebo renaming. + * [Pull request #282](https://github.com/gazebosim/gz-msgs/pull/282) + * [Pull request #293](https://github.com/gazebosim/gz-msgs/pull/293) + * [Pull request #300](https://github.com/gazebosim/gz-msgs/pull/300) + +1. Remove mistaken VERSION. + * [Pull request #284](https://github.com/gazebosim/gz-msgs/pull/284) + +1. Increase utility coverage. + * [Pull request #283](https://github.com/gazebosim/gz-msgs/pull/283) + ### Gazebo Msgs 5.10.0 (2022-07-18) 1. Add entity wrench message diff --git a/proto/gz/msgs/lens.proto b/proto/gz/msgs/lens.proto index 68029b06..1ed08f2b 100644 --- a/proto/gz/msgs/lens.proto +++ b/proto/gz/msgs/lens.proto @@ -20,7 +20,7 @@ package gz.msgs; option java_package = "com.gz.msgs"; option java_outer_classname = "LensProtos"; -/// \ingroup ignition.msgs +/// \ingroup gz.msgs /// \interface Lens /// \brief Information about a lens element diff --git a/proto/gz/msgs/parameter.proto b/proto/gz/msgs/parameter.proto new file mode 100644 index 00000000..66fb40dd --- /dev/null +++ b/proto/gz/msgs/parameter.proto @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2022 Open Source Robotics Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +*/ + +syntax = "proto3"; +package gz.msgs; +option java_package = "com.gz.msgs"; +option java_outer_classname = "ParameterProtos"; + +/// \ingroup gz.msgs +/// \interface Parameter +/// \brief Representation of a parameter, used to request to set a parameter. + +import "google/protobuf/any.proto"; + +message Parameter +{ + /// \brief Parameter name. + string name = 1; + + /// \brief Serialized parameter value. + google.protobuf.Any value = 2; +}; diff --git a/proto/gz/msgs/parameter_declaration.proto b/proto/gz/msgs/parameter_declaration.proto new file mode 100644 index 00000000..c33dcf17 --- /dev/null +++ b/proto/gz/msgs/parameter_declaration.proto @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2022 Open Source Robotics Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +*/ + +syntax = "proto3"; +package gz.msgs; +option java_package = "com.gz.msgs"; +option java_outer_classname = "ParameterDeclarationProtos"; + +/// \ingroup gz.msgs +/// \interface ParameterDeclaration +/// \brief Representation of a parameter declaration. + +message ParameterDeclaration +{ + /// \brief Parameter name. + string name = 1; + + /// \brief Parameter type, i.e. the associated protobuf type. + string type = 2; +}; diff --git a/proto/gz/msgs/parameter_declarations.proto b/proto/gz/msgs/parameter_declarations.proto new file mode 100644 index 00000000..4dd3399d --- /dev/null +++ b/proto/gz/msgs/parameter_declarations.proto @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2022 Open Source Robotics Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +*/ + +syntax = "proto3"; +package gz.msgs; +option java_package = "com.gz.msgs"; +option java_outer_classname = "ParameterDeclarationsProtos"; + +/// \ingroup gz.msgs +/// \interface ParameterDeclarations +/// \brief Collection of parameter declarations. + +import "gz/msgs/parameter_declaration.proto"; + +message ParameterDeclarations +{ + /// \brief Parameter declarations. + repeated ParameterDeclaration parameter_declarations = 1; +}; diff --git a/proto/gz/msgs/parameter_error.proto b/proto/gz/msgs/parameter_error.proto new file mode 100644 index 00000000..11dbb249 --- /dev/null +++ b/proto/gz/msgs/parameter_error.proto @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2022 Open Source Robotics Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +*/ + +syntax = "proto3"; +package gz.msgs; +option java_package = "com.gz.msgs"; +option java_outer_classname = "ParameterErrorProtos"; + +/// \ingroup gz.msgs +/// \interface ParameterError +/// \brief Parameter server errors for declare or set parameter. + +message ParameterError +{ + enum Type { + SUCCESS = 0; + ALREADY_DECLARED = 1; + INVALID_TYPE = 2; + NOT_DECLARED = 3; + } + Type data = 1; +}; diff --git a/proto/gz/msgs/parameter_name.proto b/proto/gz/msgs/parameter_name.proto new file mode 100644 index 00000000..37335c7c --- /dev/null +++ b/proto/gz/msgs/parameter_name.proto @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2022 Open Source Robotics Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +*/ + +syntax = "proto3"; +package gz.msgs; +option java_package = "com.gz.msgs"; +option java_outer_classname = "ParameterNameProtos"; + +/// \ingroup gz.msgs +/// \interface ParameterName +/// \brief Parameter name, used as a request to get a parameter. + +message ParameterName +{ + /// \brief Parameter name. + string name = 1; +}; diff --git a/proto/gz/msgs/parameter_value.proto b/proto/gz/msgs/parameter_value.proto new file mode 100644 index 00000000..8cc8610f --- /dev/null +++ b/proto/gz/msgs/parameter_value.proto @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2022 Open Source Robotics Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +*/ + +syntax = "proto3"; +package gz.msgs; +option java_package = "com.gz.msgs"; +option java_outer_classname = "ParameterValueProtos"; + +/// \ingroup gz.msgs +/// \interface ParameterValue +/// \brief Representation of a parameter value, used as a response to get a parameter. + +import "google/protobuf/any.proto"; + +message ParameterValue +{ + /// \brief Serialized protobuf message. + google.protobuf.Any data = 1; +}; diff --git a/src/PointCloudPackedUtils_TEST.cc b/src/PointCloudPackedUtils_TEST.cc index 7dfe98b2..a488b0dc 100644 --- a/src/PointCloudPackedUtils_TEST.cc +++ b/src/PointCloudPackedUtils_TEST.cc @@ -125,17 +125,17 @@ TEST(PointCloudPackedUtilsTest, MultipleFields) EXPECT_EQ("x", pcMsg.field(0).name()); EXPECT_EQ(0u, pcMsg.field(0).offset()); - EXPECT_EQ(msgs::PointCloudPacked::Field::INT8, pcMsg.field(0).datatype()); + EXPECT_EQ(PointCloudPacked::Field::INT8, pcMsg.field(0).datatype()); EXPECT_EQ(1u, pcMsg.field(0).count()); EXPECT_EQ("y", pcMsg.field(1).name()); EXPECT_EQ(1u, pcMsg.field(1).offset()); - EXPECT_EQ(msgs::PointCloudPacked::Field::UINT8, pcMsg.field(1).datatype()); + EXPECT_EQ(PointCloudPacked::Field::UINT8, pcMsg.field(1).datatype()); EXPECT_EQ(1u, pcMsg.field(1).count()); EXPECT_EQ("z", pcMsg.field(2).name()); EXPECT_EQ(2u, pcMsg.field(2).offset()); - EXPECT_EQ(msgs::PointCloudPacked::Field::INT16, pcMsg.field(2).datatype()); + EXPECT_EQ(PointCloudPacked::Field::INT16, pcMsg.field(2).datatype()); EXPECT_EQ(1u, pcMsg.field(2).count()); // Reserve space for data @@ -237,9 +237,9 @@ TEST(PointCloudPackedUtilsTest, XYZRGBA) { PointCloudPacked pcMsg; - msgs::InitPointCloudPacked(pcMsg, "my_frame", true, - {{"xyz", msgs::PointCloudPacked::Field::FLOAT32}, - {"rgba", msgs::PointCloudPacked::Field::FLOAT32}}); + InitPointCloudPacked(pcMsg, "my_frame", true, + {{"xyz", PointCloudPacked::Field::FLOAT32}, + {"rgba", PointCloudPacked::Field::FLOAT32}}); // Reserve space for data unsigned int total{5 * pcMsg.point_step()}; diff --git a/src/Utility_TEST.cc b/src/Utility_TEST.cc index 3996214a..dac61e9e 100644 --- a/src/Utility_TEST.cc +++ b/src/Utility_TEST.cc @@ -179,12 +179,12 @@ TEST(UtilityTest, ConvertMsgsPlaneToMath) ///////////////////////////////////////////////// TEST(MsgsTest, ConvertMathInertialToMsgs) { - const auto pose = gz::math::Pose3d(5, 6, 7, 0.4, 0.5, 0.6); + const auto pose = math::Pose3d(5, 6, 7, 0.4, 0.5, 0.6); msgs::Inertial msg = msgs::Convert( - gz::math::Inertiald( - gz::math::MassMatrix3d(12.0, - gz::math::Vector3d(2, 3, 4), - gz::math::Vector3d(0.1, 0.2, 0.3)), + math::Inertiald( + math::MassMatrix3d(12.0, + math::Vector3d(2, 3, 4), + math::Vector3d(0.1, 0.2, 0.3)), pose)); EXPECT_DOUBLE_EQ(12.0, msg.mass()); @@ -201,12 +201,12 @@ TEST(MsgsTest, ConvertMathInertialToMsgs) ///////////////////////////////////////////////// TEST(MsgsTest, ConvertMsgsInertialToMath) { - const auto pose = gz::math::Pose3d(5, 6, 7, 0.4, 0.5, 0.6); + const auto pose = math::Pose3d(5, 6, 7, 0.4, 0.5, 0.6); msgs::Inertial msg = msgs::Convert( - gz::math::Inertiald( - gz::math::MassMatrix3d(12.0, - gz::math::Vector3d(2, 3, 4), - gz::math::Vector3d(0.1, 0.2, 0.3)), + math::Inertiald( + math::MassMatrix3d(12.0, + math::Vector3d(2, 3, 4), + math::Vector3d(0.1, 0.2, 0.3)), pose)); auto inertial = msgs::Convert(msg); @@ -308,9 +308,9 @@ TEST(MsgsTest, ConvertMsgsInertialAddedMassToMath) TEST(MsgsTest, ConvertMathMassMatrix3ToMsgs) { msgs::Inertial msg = msgs::Convert( - gz::math::MassMatrix3d(12.0, - gz::math::Vector3d(2, 3, 4), - gz::math::Vector3d(0.1, 0.2, 0.3))); + math::MassMatrix3d(12.0, + math::Vector3d(2, 3, 4), + math::Vector3d(0.1, 0.2, 0.3))); EXPECT_DOUBLE_EQ(12.0, msg.mass()); EXPECT_DOUBLE_EQ(2.0, msg.ixx()); @@ -319,7 +319,7 @@ TEST(MsgsTest, ConvertMathMassMatrix3ToMsgs) EXPECT_DOUBLE_EQ(0.1, msg.ixy()); EXPECT_DOUBLE_EQ(0.2, msg.ixz()); EXPECT_DOUBLE_EQ(0.3, msg.iyz()); - EXPECT_EQ(gz::math::Pose3d::Zero, msgs::Convert(msg.pose())); + EXPECT_EQ(math::Pose3d::Zero, msgs::Convert(msg.pose())); } ///////////////////////////////////////////////// @@ -702,13 +702,13 @@ TEST(UtilityTest, SetPlane) ///////////////////////////////////////////////// TEST(MsgsTest, SetInertial) { - const auto pose = gz::math::Pose3d(5, 6, 7, 0.4, 0.5, 0.6); + const auto pose = math::Pose3d(5, 6, 7, 0.4, 0.5, 0.6); msgs::Inertial msg; - msgs::Set(&msg, gz::math::Inertiald( - gz::math::MassMatrix3d( + msgs::Set(&msg, math::Inertiald( + math::MassMatrix3d( 12.0, - gz::math::Vector3d(2, 3, 4), - gz::math::Vector3d(0.1, 0.2, 0.3)), + math::Vector3d(2, 3, 4), + math::Vector3d(0.1, 0.2, 0.3)), pose)); EXPECT_DOUBLE_EQ(12.0, msg.mass()); @@ -725,10 +725,10 @@ TEST(MsgsTest, SetInertial) TEST(MsgsTest, SetMassMatrix3) { msgs::Inertial msg; - msgs::Set(&msg, gz::math::MassMatrix3d( + msgs::Set(&msg, math::MassMatrix3d( 12.0, - gz::math::Vector3d(2, 3, 4), - gz::math::Vector3d(0.1, 0.2, 0.3))); + math::Vector3d(2, 3, 4), + math::Vector3d(0.1, 0.2, 0.3))); EXPECT_DOUBLE_EQ(12.0, msg.mass()); EXPECT_DOUBLE_EQ(2.0, msg.ixx()); @@ -737,7 +737,7 @@ TEST(MsgsTest, SetMassMatrix3) EXPECT_DOUBLE_EQ(0.1, msg.ixy()); EXPECT_DOUBLE_EQ(0.2, msg.ixz()); EXPECT_DOUBLE_EQ(0.3, msg.iyz()); - EXPECT_EQ(gz::math::Pose3d::Zero, msgs::Convert(msg.pose())); + EXPECT_EQ(math::Pose3d::Zero, msgs::Convert(msg.pose())); } ///////////////////////////////////////////////// diff --git a/src/gz.cc b/src/gz.cc index b5ac37c4..fde84ec9 100644 --- a/src/gz.cc +++ b/src/gz.cc @@ -47,7 +47,7 @@ void cmdMsgInfo(const char *_msg) { if (_msg) { - auto msg = gz::msgs::Factory::New(_msg); + auto msg = Factory::New(_msg); if (msg) { auto descriptor = msg->GetDescriptor(); @@ -71,7 +71,7 @@ extern "C" GZ_MSGS_VISIBLE void cmdMsgList() { std::vector types; - gz::msgs::Factory::Types(types); + Factory::Types(types); for (auto const &type : types) std::cout << type << std::endl;