Skip to content

Add Helpers pybind11 interface#313

Merged
ahcorde merged 4 commits intoign-math6from
ahcorde/pybind11/helpers
Dec 23, 2021
Merged

Add Helpers pybind11 interface#313
ahcorde merged 4 commits intoign-math6from
ahcorde/pybind11/helpers

Conversation

@ahcorde
Copy link
Copy Markdown
Contributor

@ahcorde ahcorde commented Dec 17, 2021

Signed-off-by: ahcorde ahcorde@gmail.com

🎉 New feature

Summary

This PR creates a Helpers Pybind11 interface

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde ahcorde requested a review from scpeters December 17, 2021 11:42
@ahcorde ahcorde self-assigned this Dec 17, 2021
@github-actions github-actions Bot added Gazebo 1️1️ Dependency of Gazebo classic version 11 🌱 garden Ignition Garden 🏢 edifice Ignition Edifice 🏯 fortress Ignition Fortress 🏰 citadel Ignition Citadel 🔮 dome Ignition Dome labels Dec 17, 2021
Signed-off-by: ahcorde <ahcorde@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 17, 2021

Codecov Report

Merging #313 (c2509fa) into ign-math6 (b63de2f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           ign-math6     #313   +/-   ##
==========================================
  Coverage      99.65%   99.65%           
==========================================
  Files             67       67           
  Lines           6360     6360           
==========================================
  Hits            6338     6338           
  Misses            22       22           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b63de2f...c2509fa. Read the comment docs.

@chapulina chapulina added the scripting Scripting interfaces to Ignition label Dec 18, 2021
@mjcarroll mjcarroll changed the title Add Helpers pybin11 interface Add Helpers pybind11 interface Dec 23, 2021
Comment on lines +35 to +68
/// \brief Compute sphere volume
/// \param[in] _radius Sphere radius
/// \return sphere volume
float SphereVolume(const float _radius)
{
return IGN_SPHERE_VOLUME(_radius);
}

/// \brief Compute cylinder volume
/// \param[in] _r Cylinder base radius
/// \param[in] _l Cylinder length
/// \return cylinder volume
float CylinderVolume(const float _r, const float _l)
{
return IGN_CYLINDER_VOLUME(_r, _l);
}

/// \brief Compute box volume
/// \param[in] _x X length
/// \param[in] _y Y length
/// \param[in] _z Z length
/// \return box volume
float BoxVolume(const float _x, const float _y, const float _z)
{
return IGN_BOX_VOLUME(_x, _y, _z);
}

/// \brief Compute box volume from a vector
/// \param[in] _v Vector3d that contains the box's dimensions.
/// \return box volume from a vector
float BoxVolumeV(const ignition::math::Vector3d &_v)
{
return IGN_BOX_VOLUME_V(_v);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intend on replacing these macros with constexpr functions in main, just a thought when we are forward porting.

@ahcorde ahcorde merged commit 2b0f9a4 into ign-math6 Dec 23, 2021
@ahcorde ahcorde deleted the ahcorde/pybind11/helpers branch December 23, 2021 16:20
@ahcorde ahcorde mentioned this pull request Dec 28, 2021
8 tasks
@osrf-triage
Copy link
Copy Markdown

This pull request has been mentioned on Gazebo Community. There might be relevant details there:

https://community.gazebosim.org/t/new-ignition-releases-2022-03-01-citadel-edifice-fortress/1313/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏰 citadel Ignition Citadel 🔮 dome Ignition Dome 🏢 edifice Ignition Edifice 🏯 fortress Ignition Fortress 🌱 garden Ignition Garden Gazebo 1️1️ Dependency of Gazebo classic version 11 scripting Scripting interfaces to Ignition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants