Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge gz-msgs10 ➡️ main #395

Merged
merged 17 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 27 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
gz_configure_project(VERSION_SUFFIX
CONFIG_EXTRAS "gz-msgs-extras.cmake.in")

# Install cmake support files
install(
DIRECTORY cmake/
DESTINATION "${PROJECT_CMAKE_EXTRAS_INSTALL_DIR}"
)

#============================================================================
# Set project-specific options
#============================================================================
Expand Down Expand Up @@ -114,16 +108,18 @@ endif()
# Find Python
find_package(Python3 REQUIRED COMPONENTS Interpreter)

if(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION)
if(USE_DIST_PACKAGES_FOR_PYTHON)
string(REPLACE "site-packages" "dist-packages" GZ_PYTHON_INSTALL_PATH ${Python3_SITELIB})
if(NOT GZ_PYTHON_INSTALL_PATH)
if(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION)
if(USE_DIST_PACKAGES_FOR_PYTHON)
string(REPLACE "site-packages" "dist-packages" GZ_PYTHON_INSTALL_PATH ${Python3_SITELIB})
else()
# Python3_SITELIB might use dist-packages in some platforms
string(REPLACE "dist-packages" "site-packages" GZ_PYTHON_INSTALL_PATH ${Python3_SITELIB})
endif()
else()
# Python3_SITELIB might use dist-packages in some platforms
string(REPLACE "dist-packages" "site-packages" GZ_PYTHON_INSTALL_PATH ${Python3_SITELIB})
# If not a system installation, respect local paths
set(GZ_PYTHON_INSTALL_PATH ${GZ_LIB_INSTALL_DIR}/python)
endif()
else()
# If not a system installation, respect local paths
set(GZ_PYTHON_INSTALL_PATH ${GZ_LIB_INSTALL_DIR}/python)
endif()
#============================================================================
# Configure the build
Expand Down Expand Up @@ -153,6 +149,22 @@ add_subdirectory(python)
#============================================================================
gz_create_packages()

#============================================================================
# Install cmake extras for downstream users
#============================================================================
# Necessary to populate generator expressions
file(
GENERATE
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/gz-cmake/gz-msgs-extras.cmake"
INPUT "${CMAKE_CURRENT_BINARY_DIR}/gz-cmake/gz-msgs-extras.cmake"
)

# Install cmake support files
install(
DIRECTORY cmake/
DESTINATION "${PROJECT_CMAKE_EXTRAS_INSTALL_DIR}"
)

#============================================================================
# Create documentation
#============================================================================
Expand All @@ -163,6 +175,7 @@ configure_file(${CMAKE_SOURCE_DIR}/tutorials.md.in ${CMAKE_BINARY_DIR}/tutorials
gz_create_docs(
API_MAINPAGE_MD "${CMAKE_BINARY_DIR}/api.md"
TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md"
IMAGE_PATH_DIRS "${CMAKE_SOURCE_DIR}/tutorials/files"
TAGFILES
"${GZ-MATH_DOXYGEN_TAGFILE} = ${GZ-MATH_API_URL}"
)
Expand Down
85 changes: 84 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,93 @@
## Gazebo Msgs 10.x

### Gazebo Msgs 10.0.0 (202x-xx-xx)
### Gazebo Msgs 10.0.0 (2023-09-29)

1. Add missing `<functional>` header
* [Pull request #382](https://github.com/gazebosim/gz-msgs/pull/382)

1. Documentation fixes
* [Pull request #381](https://github.com/gazebosim/gz-msgs/pull/381)

1. Generate messages in downstream builds
* [Pull request #339](https://github.com/gazebosim/gz-msgs/pull/339)
* [Pull request #356](https://github.com/gazebosim/gz-msgs/pull/356)
* [Pull request #359](https://github.com/gazebosim/gz-msgs/pull/359)
* [Pull request #361](https://github.com/gazebosim/gz-msgs/pull/361)
* [Pull request #368](https://github.com/gazebosim/gz-msgs/pull/368)
* [Pull request #374](https://github.com/gazebosim/gz-msgs/pull/374)
* [Pull request #377](https://github.com/gazebosim/gz-msgs/pull/377)
* [Pull request #379](https://github.com/gazebosim/gz-msgs/pull/379)
* [Pull request #386](https://github.com/gazebosim/gz-msgs/pull/386)
* [Pull request #384](https://github.com/gazebosim/gz-msgs/pull/384)

1. Add python message generation
* [Pull request #362](https://github.com/gazebosim/gz-msgs/pull/362)
* [Pull request #364](https://github.com/gazebosim/gz-msgs/pull/364)

1. Added AirSpeedSensor msgs to Sensor msg
* [Pull request #365](https://github.com/gazebosim/gz-msgs/pull/365)

1. Add covariance fields to imu message
* [Pull request #333](https://github.com/gazebosim/gz-msgs/pull/333)

1. Remove ignition
* [Pull request #367](https://github.com/gazebosim/gz-msgs/pull/367)
* [Pull request #335](https://github.com/gazebosim/gz-msgs/pull/335)

1. Infrastructure
* [Pull request #370](https://github.com/gazebosim/gz-msgs/pull/370)
* [Pull request #369](https://github.com/gazebosim/gz-msgs/pull/369)
* [Pull request #363](https://github.com/gazebosim/gz-msgs/pull/363)
* [Pull request #331](https://github.com/gazebosim/gz-msgs/pull/331)

1. Added cubemap_uri to sky
* [Pull request #306](https://github.com/gazebosim/gz-msgs/pull/306)

1. Add id and visibility flags field to projector msg
* [Pull request #345](https://github.com/gazebosim/gz-msgs/pull/345)

1. Add new discovery types
* [Pull request #322](https://github.com/gazebosim/gz-msgs/pull/322)

1. ⬆️ Bump main to 10.0.0~pre1
* [Pull request #292](https://github.com/gazebosim/gz-msgs/pull/292)


## Gazebo Msgs 9.x

### Gazebo Msgs 9.5.0 (2023-08-25)

1. Remove deprecated flag output_to_genfiles
* [Pull request #347](https://github.com/gazebosim/gz-msgs/pull/347)

1. GzProtobuf: Do not require version 3
* [Pull request #346](https://github.com/gazebosim/gz-msgs/pull/346)

1. Fix typos
* [Pull request #344](https://github.com/gazebosim/gz-msgs/pull/344)
* [Pull request #314](https://github.com/gazebosim/gz-msgs/pull/314)

1. Few clangtidy fixes
* [Pull request #343](https://github.com/gazebosim/gz-msgs/pull/343)

1. Remove unused load in gz_msgs_generate
* [Pull request #342](https://github.com/gazebosim/gz-msgs/pull/342)

1. Remove unused ignstrtok variable
* [Pull request #340](https://github.com/gazebosim/gz-msgs/pull/340)

1. Adds a message that allows loading environments via a topic
* [Pull request #320](https://github.com/gazebosim/gz-msgs/pull/320)

1. Rename COPYING to LICENSE
* [Pull request #330](https://github.com/gazebosim/gz-msgs/pull/330)

1. Infrastructure
* [Pull request #370](https://github.com/gazebosim/gz-msgs/pull/370)
* [Pull request #369](https://github.com/gazebosim/gz-msgs/pull/369)
* [Pull request #331](https://github.com/gazebosim/gz-msgs/pull/331)


### Gazebo Msgs 9.4.0 (2023-03-10)

1. Support for bazel in garden
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ framework, a set of libraries designed to rapidly develop robot applications.

## Installation

See the [installation tutorial](https://gazebosim.org/api/msgs/7.0/install.html).
See the [installation tutorial](https://gazebosim.org/api/msgs/10/install.html).

## Known issue of command line tools

Expand All @@ -29,7 +29,7 @@ line tools from `gz-tools` may not work correctly.
A workaround for a single package is to define the environment variable
`GZ_CONFIG_PATH` to point to the location of the Gazebo library installation,
where the YAML file for the package is found, such as
```
```{.sh}
export GZ_CONFIG_PATH=/usr/local/share/gz
```

Expand All @@ -38,7 +38,7 @@ installations from source are in different locations, only one can be specified.

Another workaround for working with multiple Gazebo libraries on the command
line is using symbolic links to each library's YAML file.
```
```{.sh}
mkdir ~/.gz/tools/configs -p
cd ~/.gz/tools/configs/
ln -s /usr/local/share/gz/fuel8.yaml .
Expand Down
4 changes: 4 additions & 0 deletions cmake/gz_msgs_generate.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# FACTORY_GEN_SCRIPT - Location of the factory generator script
# PROTO_PATH - Base directory of the proto files
# DEPENDENCY_DESCRIPTIONS - .gz_desc files for each dependency
# DLLEXPORT_DECL - Visibilty macro to apply to messages
# OUTPUT_DIRECTORY - CMake binary directoy to place generated artifacts
# OUTPUT_SOURCES - Variable to contain list of generated source files
# OUTPUT_HEADERS - Variable to contain list of generated header files
Expand All @@ -21,6 +22,7 @@ function(gz_msgs_generate_messages_impl)
# Inputs
PROTO_PACKAGE MSGS_GEN_SCRIPT GZ_PROTOC_PLUGIN FACTORY_GEN_SCRIPT PROTO_PATH
DEPENDENCY_DESCRIPTIONS
DLLEXPORT_DECL
OUTPUT_DIRECTORY
# Outputs
OUTPUT_SOURCES
Expand Down Expand Up @@ -57,6 +59,8 @@ function(gz_msgs_generate_messages_impl)

# Cpp Specific arguments
GENERATE_CPP
DLLEXPORT_DECL
${generate_messages_DLLEXPORT_DECL}
OUTPUT_CPP_HH_VAR
${generate_messages_OUTPUT_HEADERS}
OUTPUT_DETAIL_CPP_HH_VAR
Expand Down
8 changes: 8 additions & 0 deletions cmake/gz_msgs_protoc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# PROTO_PACKAGE - Protobuf package the file belongs to (e.g. "gz.msgs")
# PROTOC_EXEC - Path to protoc
# GZ_PROTOC_PLUGIN - Path to the gazebo-specific protobuf compiler executable
# DLLEXPORT_DECL - DLL visibility macro (eg GZ_MSGS_VISIBLE)
# INPUT_PROTO - Path to the input .proto file
# OUTPUT_CPP_DIR - Path where C++ files are saved
# OUTPUT_PYTON_DIR - Path where Python files are saved
Expand All @@ -25,6 +26,7 @@ function(gz_msgs_protoc)
PROTO_PACKAGE
PROTOC_EXEC
GZ_PROTOC_PLUGIN
DLLEXPORT_DECL
INPUT_PROTO
OUTPUT_CPP_DIR
OUTPUT_CPP_HH_VAR
Expand Down Expand Up @@ -96,6 +98,12 @@ function(gz_msgs_protoc)
)
endif()

if(gz_msgs_protoc_DLLEXPORT_DECL)
list(APPEND GENERATE_ARGS
--dllexport-decl "${gz_msgs_protoc_DLLEXPORT_DECL}"
)
endif()

if(${gz_msgs_protoc_GENERATE_CPP})
list(APPEND GENERATE_ARGS
--generate-cpp
Expand Down
2 changes: 2 additions & 0 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ gz_msgs_generate_messages_impl(
$<TARGET_FILE:${PROJECT_NAME}_protoc_plugin>
INPUT_PROTOS
${proto_files}
DLLEXPORT_DECL
"GZ_MSGS_VISIBLE"
PROTO_PACKAGE
"gz.msgs"
PROTO_PATH
Expand Down
1 change: 1 addition & 0 deletions core/include/gz/msgs/PointCloudPackedUtils.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <gz/msgs/pointcloud_packed.pb.h>

#include <cstdarg>
#include <functional>
#include <sstream>
#include <string>
#include <utility>
Expand Down
13 changes: 11 additions & 2 deletions core/include/gz/msgs/convert/Pose.hh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,17 @@ inline void Set(gz::msgs::Pose *_msg, const gz::math::Pose3d &_data)

inline void Set(gz::math::Pose3d *_data, const gz::msgs::Pose &_msg)
{
auto pos = Convert(_msg.position());
auto orientation = Convert(_msg.orientation());
gz::math::Vector3d pos;
gz::math::Quaterniond orientation;

if (_msg.has_position())
pos = Convert(_msg.position());

// This bit is critical. If orientation hasn't been set in the message,
// then we want the quaternion to default to identity.
if (_msg.has_orientation())
orientation = Convert(_msg.orientation());

_data->Set(pos, orientation);
}

Expand Down
10 changes: 10 additions & 0 deletions core/src/DynamicFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,16 @@ void DynamicFactory::LoadDescriptors(const std::string &_paths)
for (const google::protobuf::FileDescriptorProto &fileDescriptorProto :
fileDescriptorSet.file())
{
// If the descriptor already exists in the database, then skip it.
// This may happen as gz_desc files can potentially contain the
// transitive message definitions
google::protobuf::FileDescriptorProto checkDescriptorProto;
if (this->db.FindFileByName(
fileDescriptorProto.name(), &checkDescriptorProto))
{
continue;
}

if (!static_cast<bool>(pool.BuildFile(fileDescriptorProto)))
{
std::cerr << "DynamicFactory(). Unable to place descriptors from ["
Expand Down
1 change: 1 addition & 0 deletions core/src/DynamicFactory.hh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#pragma warning(pop)
#endif

#include <functional>
#include <map>
#include <memory>
#include <string>
Expand Down
Loading
Loading