Skip to content

Commit

Permalink
Merge branch 'sdf14' into schema_accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
azeey authored Jun 26, 2024
2 parents 792c5f4 + f05f4e7 commit aa3a8e4
Show file tree
Hide file tree
Showing 85 changed files with 3,999 additions and 209 deletions.
1 change: 0 additions & 1 deletion .github/ci/packages.apt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ libtinyxml2-dev
liburdfdom-dev
libxml2-utils
python3-dev
python3-distutils
python3-gz-math7
python3-psutil
python3-pybind11
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ jobs:
codecov-enabled: true
cppcheck-enabled: true
cpplint-enabled: true
noble-ci:
runs-on: ubuntu-latest
name: Ubuntu Noble CI
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compile and test
id: ci
uses: gazebo-tooling/action-gz-ci@noble
11 changes: 11 additions & 0 deletions .github/workflows/package_xml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Validate package.xml

on:
pull_request:

jobs:
package-xml:
runs-on: ubuntu-latest
name: Validate package.xml
steps:
- uses: gazebo-tooling/action-gz-ci/validate_package_xml@jammy
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0004 NEW)
endif(COMMAND CMAKE_POLICY)

project (sdformat14 VERSION 14.1.1)
project (sdformat14 VERSION 14.4.0)

# The protocol version has nothing to do with the package version.
# It represents the current version of SDFormat implemented by the software
Expand Down
108 changes: 108 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
## libsdformat 14.X

### libsdformat 14.4.0 (2024-06-20)

1. Add Cone as a primitive parametric shape.
* [Pull request #1415](https://github.com/gazebosim/sdformat/pull/1415)
* Thanks to Benjamin Perseghetti

1. Add custom attribute to custom element in test
* [Pull request #1406](https://github.com/gazebosim/sdformat/pull/1406)

### libsdformat 14.3.0 (2024-06-14)

1. Backport voxel_resolution sdf element
* [Pull request #1429](https://github.com/gazebosim/sdformat/pull/1429)

1. Added Automatic Moment of Inertia Calculations for Basic Shapes Python wrappers
* [Pull request #1424](https://github.com/gazebosim/sdformat/pull/1424)

1. Add support for no gravity link
* [Pull request #1410](https://github.com/gazebosim/sdformat/pull/1410)
* [Pull request #1419](https://github.com/gazebosim/sdformat/pull/1419)

1. Update default camera instrinsics skew to 0, which matches spec
* [Pull request #1423](https://github.com/gazebosim/sdformat/pull/1423)
* [Pull request #1425](https://github.com/gazebosim/sdformat/pull/1425)

1. Allow empty strings in plugin and custom attributes
* [Pull request #1407](https://github.com/gazebosim/sdformat/pull/1407)

1. (Backport) Enable 24.04 CI, remove distutils dependency
* [Pull request #1413](https://github.com/gazebosim/sdformat/pull/1413)

1. Fix macOS workflow and backport windows fix
* [Pull request #1409](https://github.com/gazebosim/sdformat/pull/1409)

1. Fix warning with pybind11 2.12
* [Pull request #1389](https://github.com/gazebosim/sdformat/pull/1389)

1. Add bullet and torsional friction DOM
* [Pull request #1351](https://github.com/gazebosim/sdformat/pull/1351)
* [Pull request #1427](https://github.com/gazebosim/sdformat/pull/1427)

### libsdformat 14.2.0 (2024-04-23)

1. Fix trivial warning on 24.04 for JointAxis_TEST.cc
* [Pull request #1402](https://github.com/gazebosim/sdformat/pull/1402)

1. Add package.xml, fix `gz sdf` tests on Windows
* [Pull request #1374](https://github.com/gazebosim/sdformat/pull/1374)

1. Backport mesh optimization feature
* [Pull request #1398](https://github.com/gazebosim/sdformat/pull/1398)
* [Pull request #1386](https://github.com/gazebosim/sdformat/pull/1386)
* [Pull request #1382](https://github.com/gazebosim/sdformat/pull/1382)

1. Param_TEST: Check return values of Param::Get/Set
* [Pull request #1394](https://github.com/gazebosim/sdformat/pull/1394)

### libsdformat 14.1.1 (2024-03-28)

1. Fix warning with pybind11 2.12
Expand Down Expand Up @@ -112,6 +169,42 @@

## libsdformat 13.X

### libsdformat 13.7.0 (2024-06-13)

1. Add support for no gravity link
* [Pull request #1410](https://github.com/gazebosim/sdformat/pull/1410)
* [Pull request #1419](https://github.com/gazebosim/sdformat/pull/1419)

1. Fix macOS workflow and backport windows fix
* [Pull request #1409](https://github.com/gazebosim/sdformat/pull/1409)

1. Fix warning with pybind11 2.12
* [Pull request #1389](https://github.com/gazebosim/sdformat/pull/1389)

1. Add bullet and torsional friction DOM
* [Pull request #1351](https://github.com/gazebosim/sdformat/pull/1351)
* [Pull request #1427](https://github.com/gazebosim/sdformat/pull/1427)

1. Resolve URIs relative to file path
* [Pull request #1373](https://github.com/gazebosim/sdformat/pull/1373)

1. Bazel updates for Garden build
* [Pull request #1239](https://github.com/gazebosim/sdformat/pull/1239)

1. Fix static builds and optimize test compilation
* [Pull request #1343](https://github.com/gazebosim/sdformat/pull/1343)
* [Pull request #1347](https://github.com/gazebosim/sdformat/pull/1347)

1. Install ruby commands on Windows
* [Pull request #1339](https://github.com/gazebosim/sdformat/pull/1339)
* [Pull request #1341](https://github.com/gazebosim/sdformat/pull/1341)

1. Update github action workflows
* [Pull request #1345](https://github.com/gazebosim/sdformat/pull/1345)

1. URDF->SDF handle links with no inertia or small mass
* [Pull request #1238](https://github.com/gazebosim/sdformat/pull/1238)

### libsdformat 13.6.0 (2023-08-30)

1. Use relative path in an urdf include to avoid confusion between internal and system headers
Expand Down Expand Up @@ -574,6 +667,21 @@

## libsdformat 12.X

### libsdformat 12.8.0 (2024-06-06)

1. Add support for no gravity link
* [Pull request #1410](https://github.com/gazebosim/sdformat/pull/1410)

1. Add bullet and torsional friction DOM
* [Pull request #1351](https://github.com/gazebosim/sdformat/pull/1351)

1. Fix static builds and optimize test compilation
* [Pull request #1343](https://github.com/gazebosim/sdformat/pull/1343)
* [Pull request #1347](https://github.com/gazebosim/sdformat/pull/1347)

1. Update github action workflows
* [Pull request #1345](https://github.com/gazebosim/sdformat/pull/1345)

### libsdformat 12.7.2 (2023-09-01)

1. Fixed 1.9/light.sdf
Expand Down
3 changes: 3 additions & 0 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ but with improved human-readability..

### Modifications

1. The default camera lens intrinsics skew value in the Camera DOM class changed
from `1` to `0` to match the SDF specification.

1. World class only renames frames with name collisions if original file version
is 1.6 or earlier. Name collisions in newer files will cause `DUPLICATE_NAME`
errors, which now matches the behavior of the Model class.
Expand Down
108 changes: 108 additions & 0 deletions include/sdf/Cone.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*
* Copyright 2024 CogniPilot Foundation
* Copyright 2024 Open Source Robotics Foundation
* Copyright 2024 Rudis Laboratories
*
* 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.
*
*/
#ifndef SDF_CONE_HH_
#define SDF_CONE_HH_

#include <optional>

#include <gz/math/Cone.hh>
#include <gz/math/Inertial.hh>
#include <gz/utils/ImplPtr.hh>
#include <sdf/Error.hh>
#include <sdf/Element.hh>
#include <sdf/sdf_config.h>

namespace sdf
{
// Inline bracket to help doxygen filtering.
inline namespace SDF_VERSION_NAMESPACE {
/// \brief Cone represents a cone shape, and is usually accessed
/// through a Geometry.
class SDFORMAT_VISIBLE Cone
{
/// \brief Constructor
public: Cone();

/// \brief Load the cone geometry based on a element pointer.
/// This is *not* the usual entry point. Typical usage of the SDF DOM is
/// through the Root object.
/// \param[in] _sdf The SDF Element pointer
/// \return Errors, which is a vector of Error objects. Each Error includes
/// an error code and message. An empty vector indicates no error.
public: Errors Load(ElementPtr _sdf);

/// \brief Get the cone's radius in meters.
/// \return The radius of the cone in meters.
public: double Radius() const;

/// \brief Set the cone's radius in meters.
/// \param[in] _radius The radius of the cone in meters.
public: void SetRadius(double _radius);

/// \brief Get the cone's length in meters.
/// \return The length of the cone in meters.
public: double Length() const;

/// \brief Set the cone's length in meters.
/// \param[in] _length The length of the cone in meters.
public: void SetLength(double _length);

/// \brief Get a pointer to the SDF element that was used during
/// load.
/// \return SDF element pointer. The value will be nullptr if Load has
/// not been called.
public: sdf::ElementPtr Element() const;

/// \brief Get the Gazebo Math representation of this cone.
/// \return A const reference to a gz::math::Sphered object.
public: const gz::math::Coned &Shape() const;

/// \brief Get a mutable Gazebo Math representation of this cone.
/// \return A reference to a gz::math::Coned object.
public: gz::math::Coned &Shape();

/// \brief Calculate and return the Inertial values for the cone. In
/// order to calculate the inertial properties, the function mutates the
/// object by updating its material properties.
/// \param[in] _density Density of the cone in kg/m^3
/// \return A std::optional with gz::math::Inertiald object or std::nullopt
public: std::optional<gz::math::Inertiald>
CalculateInertial(double _density);

/// \brief Create and return an SDF element filled with data from this
/// cone.
/// Note that parameter passing functionality is not captured with this
/// function.
/// \return SDF element pointer with updated cone values.
public: sdf::ElementPtr ToElement() const;

/// \brief Create and return an SDF element filled with data from this
/// cone.
/// Note that parameter passing functionality is not captured with this
/// function.
/// \param[out] _errors Vector of errors.
/// \return SDF element pointer with updated cone values.
public: sdf::ElementPtr ToElement(sdf::Errors &_errors) const;

/// \brief Private data pointer.
GZ_UTILS_IMPL_PTR(dataPtr)
};
}
}
#endif
15 changes: 15 additions & 0 deletions include/sdf/Geometry.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ namespace sdf
// Forward declare private data class.
class Box;
class Capsule;
class Cone;
class Cylinder;
class Ellipsoid;
class Heightmap;
Expand Down Expand Up @@ -79,6 +80,9 @@ namespace sdf

/// \brief A polyline geometry.
POLYLINE = 9,

/// \brief A polyline geometry.
CONE = 10,
};

/// \brief Geometry provides access to a shape, such as a Box. Use the
Expand Down Expand Up @@ -140,6 +144,17 @@ namespace sdf
/// \param[in] _capsule The capsule shape.
public: void SetCapsuleShape(const Capsule &_capsule);

/// \brief Get the cone geometry, or nullptr if the contained
/// geometry is not a cone.
/// \return Pointer to the visual's cone geometry, or nullptr if the
/// geometry is not a cone.
/// \sa GeometryType Type() const
public: const Cone *ConeShape() const;

/// \brief Set the cone shape.
/// \param[in] _cone The cone shape.
public: void SetConeShape(const Cone &_cone);

/// \brief Get the cylinder geometry, or nullptr if the contained
/// geometry is not a cylinder.
/// \return Pointer to the visual's cylinder geometry, or nullptr if the
Expand Down
10 changes: 10 additions & 0 deletions include/sdf/Link.hh
Original file line number Diff line number Diff line change
Expand Up @@ -411,12 +411,22 @@ namespace sdf
/// \sa bool Model::EnableWind
public: bool EnableWind() const;

/// \brief Check if this link should be subject to gravity.
/// If true, this link should be affected by gravity.
/// \return true if the model should be subject to gravity, false otherwise.
public: bool EnableGravity() const;

/// \brief Set whether this link should be subject to wind.
/// \param[in] _enableWind True or false depending on whether the link
/// should be subject to wind.
/// \sa Model::SetEnableWind(bool)
public: void SetEnableWind(bool _enableWind);

/// \brief Set whether this link should be subject to gravity.
/// \param[in] _enableGravity True or false depending on whether the link
/// should be subject to gravity.
public: void SetEnableGravity(bool _enableGravity);

/// \brief Check if the automatic calculation for the link inertial
/// is enabled or not.
/// \return True if automatic calculation is enabled. This can be done
Expand Down
Loading

0 comments on commit aa3a8e4

Please sign in to comment.