Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <methylDragon@gmail.com>
  • Loading branch information
methylDragon committed Aug 26, 2022
1 parent 590e02a commit 0fad0f7
Show file tree
Hide file tree
Showing 88 changed files with 402 additions and 403 deletions.
4 changes: 2 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@

### Ignition Math 6.1.0

1. eigen3: add conversion functions for Eigen::AlignedBox3d <=> ignition::math::AxisAlignedBox
1. eigen3: add conversion functions for Eigen::AlignedBox3d <=> gz::math::AxisAlignedBox
* [BitBucket pull request 302](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-math/pull-requests/302)

### Ignition Math 6.0.0
Expand Down Expand Up @@ -547,7 +547,7 @@
* [BitBucket pull request 301](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-math/pull-requests/301)
* [Issue 60](https://github.com/ignitionrobotics/ign-math/issues/60)

1. eigen3: add conversion functions for Eigen::AlignedBox3d <=> ignition::math::AxisAlignedBox
1. eigen3: add conversion functions for Eigen::AlignedBox3d <=> gz::math::AxisAlignedBox
* [BitBucket pull request 302](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-math/pull-requests/302)


Expand Down
78 changes: 39 additions & 39 deletions eigen3/include/gz/math/eigen3/Conversions.hh
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,28 @@ namespace ignition
{
namespace eigen3
{
/// \brief Convert from ignition::math::Vector3d to Eigen::Vector3d.
/// \param[in] _v ignition::math::Vector3d to convert
/// \brief Convert from gz::math::Vector3d to Eigen::Vector3d.
/// \param[in] _v gz::math::Vector3d to convert
/// \return The equivalent Eigen::Vector3d.
inline Eigen::Vector3d convert(const ignition::math::Vector3d &_v)
inline Eigen::Vector3d convert(const gz::math::Vector3d &_v)
{
return Eigen::Vector3d(_v[0], _v[1], _v[2]);
}

/// \brief Convert from ignition::math::AxisAlignedBox to
/// \brief Convert from gz::math::AxisAlignedBox to
/// Eigen::AlignedBox3d.
/// \param[in] _b ignition::math::AxisAlignedBox to convert
/// \param[in] _b gz::math::AxisAlignedBox to convert
/// \return The equivalent Eigen::AlignedBox3d.
inline Eigen::AlignedBox3d convert(
const ignition::math::AxisAlignedBox &_b)
const gz::math::AxisAlignedBox &_b)
{
return Eigen::AlignedBox3d(convert(_b.Min()), convert(_b.Max()));
}

/// \brief Convert from ignition::math::Matrix3d to Eigen::Matrix3d.
/// \param[in] _m ignition::math::Matrix3d to convert.
/// \brief Convert from gz::math::Matrix3d to Eigen::Matrix3d.
/// \param[in] _m gz::math::Matrix3d to convert.
/// \return The equivalent Eigen::Matrix3d.
inline Eigen::Matrix3d convert(const ignition::math::Matrix3d &_m)
inline Eigen::Matrix3d convert(const gz::math::Matrix3d &_m)
{
Eigen::Matrix3d matrix;
for (std::size_t i=0; i < 3; ++i)
Expand All @@ -67,9 +67,9 @@ namespace ignition
return matrix;
}

/// \brief Convert from ignition::math::Matrix6d to
/// \brief Convert from gz::math::Matrix6d to
/// Eigen::Matrix<Precision, 6, 6>.
/// \param[in] _m ignition::math::Matrix6d to convert.
/// \param[in] _m gz::math::Matrix6d to convert.
/// \return The equivalent Eigen::Matrix<Precision, 6, 6>.
/// \tparam Precision Precision such as int, double or float.
template<typename Precision>
Expand All @@ -88,10 +88,10 @@ namespace ignition
return matrix;
}

/// \brief Convert ignition::math::Quaterniond to Eigen::Quaterniond.
/// \param[in] _q ignition::math::Quaterniond to convert.
/// \brief Convert gz::math::Quaterniond to Eigen::Quaterniond.
/// \param[in] _q gz::math::Quaterniond to convert.
/// \return The equivalent Eigen::Quaterniond.
inline Eigen::Quaterniond convert(const ignition::math::Quaterniond &_q)
inline Eigen::Quaterniond convert(const gz::math::Quaterniond &_q)
{
Eigen::Quaterniond quat;
quat.w() = _q.W();
Expand All @@ -102,10 +102,10 @@ namespace ignition
return quat;
}

/// \brief Convert ignition::math::Pose3d to Eigen::Isometry3d.
/// \param[in] _pose ignition::math::Pose3d to convert.
/// \brief Convert gz::math::Pose3d to Eigen::Isometry3d.
/// \param[in] _pose gz::math::Pose3d to convert.
/// \return The equivalent Eigen::Isometry3d.
inline Eigen::Isometry3d convert(const ignition::math::Pose3d &_pose)
inline Eigen::Isometry3d convert(const gz::math::Pose3d &_pose)
{
Eigen::Isometry3d tf = Eigen::Isometry3d::Identity();
tf.translation() = convert(_pose.Pos());
Expand All @@ -114,38 +114,38 @@ namespace ignition
return tf;
}

/// \brief Convert Eigen::Vector3d to ignition::math::Vector3d.
/// \brief Convert Eigen::Vector3d to gz::math::Vector3d.
/// \param[in] _v Eigen::Vector3d to convert.
/// \return The equivalent ignition::math::Vector3d.
inline ignition::math::Vector3d convert(const Eigen::Vector3d &_v)
/// \return The equivalent gz::math::Vector3d.
inline gz::math::Vector3d convert(const Eigen::Vector3d &_v)
{
ignition::math::Vector3d vec;
gz::math::Vector3d vec;
vec.X() = _v[0];
vec.Y() = _v[1];
vec.Z() = _v[2];

return vec;
}

/// \brief Convert Eigen::AlignedBox3d to ignition::math::AxisAlignedBox.
/// \brief Convert Eigen::AlignedBox3d to gz::math::AxisAlignedBox.
/// \param[in] _b Eigen::AlignedBox3d to convert.
/// \return The equivalent ignition::math::AxisAlignedBox.
inline ignition::math::AxisAlignedBox convert(
/// \return The equivalent gz::math::AxisAlignedBox.
inline gz::math::AxisAlignedBox convert(
const Eigen::AlignedBox3d &_b)
{
ignition::math::AxisAlignedBox box;
gz::math::AxisAlignedBox box;
box.Min() = convert(_b.min());
box.Max() = convert(_b.max());

return box;
}

/// \brief Convert Eigen::Matrix3d to ignition::math::Matrix3d.
/// \brief Convert Eigen::Matrix3d to gz::math::Matrix3d.
/// \param[in] _m Eigen::Matrix3d to convert.
/// \return The equivalent ignition::math::Matrix3d.
inline ignition::math::Matrix3d convert(const Eigen::Matrix3d &_m)
/// \return The equivalent gz::math::Matrix3d.
inline gz::math::Matrix3d convert(const Eigen::Matrix3d &_m)
{
ignition::math::Matrix3d matrix;
gz::math::Matrix3d matrix;
for (std::size_t i=0; i < 3; ++i)
{
for (std::size_t j=0; j < 3; ++j)
Expand All @@ -158,9 +158,9 @@ namespace ignition
}

/// \brief Convert Eigen::Matrix<Precision, 6, 6> to
/// ignition::math::Matrix6d.
/// gz::math::Matrix6d.
/// \param[in] _m Eigen::Matrix<Precision, 6, 6> to convert.
/// \return The equivalent ignition::math::Matrix6d.
/// \return The equivalent gz::math::Matrix6d.
/// \tparam Precision Precision such as int, double or float.
template<typename Precision>
inline
Expand All @@ -178,12 +178,12 @@ namespace ignition
return matrix;
}

/// \brief Convert Eigen::Quaterniond to ignition::math::Quaterniond.
/// \brief Convert Eigen::Quaterniond to gz::math::Quaterniond.
/// \param[in] _q Eigen::Quaterniond to convert.
/// \return The equivalent ignition::math::Quaterniond.
inline ignition::math::Quaterniond convert(const Eigen::Quaterniond &_q)
/// \return The equivalent gz::math::Quaterniond.
inline gz::math::Quaterniond convert(const Eigen::Quaterniond &_q)
{
ignition::math::Quaterniond quat;
gz::math::Quaterniond quat;
quat.W() = _q.w();
quat.X() = _q.x();
quat.Y() = _q.y();
Expand All @@ -192,12 +192,12 @@ namespace ignition
return quat;
}

/// \brief Convert Eigen::Isometry3d to ignition::math::Pose3d.
/// \brief Convert Eigen::Isometry3d to gz::math::Pose3d.
/// \param[in] _tf Eigen::Isometry3d to convert.
/// \return The equivalent ignition::math::Pose3d.
inline ignition::math::Pose3d convert(const Eigen::Isometry3d &_tf)
/// \return The equivalent gz::math::Pose3d.
inline gz::math::Pose3d convert(const Eigen::Isometry3d &_tf)
{
ignition::math::Pose3d pose;
gz::math::Pose3d pose;
pose.Pos() = convert(Eigen::Vector3d(_tf.translation()));
pose.Rot() = convert(Eigen::Quaterniond(_tf.linear()));

Expand Down
2 changes: 1 addition & 1 deletion eigen3/include/gz/math/eigen3/Util.hh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace ignition
/// http://codextechnicanum.blogspot.com/2015/04/find-minimum-oriented-bounding-box-of.html
/// \param[in] _vertices a vector of 3d vertices
/// \return Oriented 3D box
inline ignition::math::OrientedBoxd verticesToOrientedBox(
inline gz::math::OrientedBoxd verticesToOrientedBox(
const std::vector<math::Vector3d> &_vertices)
{
math::OrientedBoxd box;
Expand Down
2 changes: 1 addition & 1 deletion include/gz/math/AdditivelySeparableScalarField3.hh
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ namespace ignition
/// \return the stream
public: friend std::ostream &operator<<(
std::ostream &_out,
const ignition::math::AdditivelySeparableScalarField3<
const gz::math::AdditivelySeparableScalarField3<
ScalarFunctionT, ScalarT> &_field)
{
using std::abs; // enable ADL
Expand Down
4 changes: 2 additions & 2 deletions include/gz/math/Angle.hh
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ namespace ignition
/// \param[in] _a Angle to output.
/// \return The output stream.
public: friend std::ostream &operator<<(std::ostream &_out,
const ignition::math::Angle &_a)
const gz::math::Angle &_a)
{
_out << _a.Radian();
return _out;
Expand All @@ -245,7 +245,7 @@ namespace ignition
/// \param[out] _a Angle to read value into.
/// \return The input stream.
public: friend std::istream &operator>>(std::istream &_in,
ignition::math::Angle &_a)
gz::math::Angle &_a)
{
// Skip white spaces
_in.setf(std::ios_base::skipws);
Expand Down
6 changes: 3 additions & 3 deletions include/gz/math/AxisAlignedBox.hh
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ namespace ignition
/// \param[in] _b AxisAlignedBox to output to the stream
/// \return The stream
public: friend std::ostream &operator<<(std::ostream &_out,
const ignition::math::AxisAlignedBox &_b)
const gz::math::AxisAlignedBox &_b)
{
_out << "Min[" << _b.Min() << "] Max[" << _b.Max() << "]";
return _out;
Expand Down Expand Up @@ -277,14 +277,14 @@ namespace ignition
/// \brief Get the material associated with this box.
/// \return The material assigned to this box.
/// \deprecated Unimplemented
public: const ignition::math::Material IGN_DEPRECATED(6.0)
public: const gz::math::Material IGN_DEPRECATED(6.0)
&Material() const;

/// \brief Set the material associated with this box.
/// \param[in] _mat The material assigned to this box
/// \deprecated Unimplemented
public: void IGN_DEPRECATED(6.0) SetMaterial(
const ignition::math::Material &_mat);
const gz::math::Material &_mat);

/// \brief Get the mass matrix for this box. This function
/// is only meaningful if the box's size and material
Expand Down
10 changes: 5 additions & 5 deletions include/gz/math/Box.hh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace ignition
/// \param[in] _mat Material property for the box.
public: Box(const Precision _length, const Precision _width,
const Precision _height,
const ignition::math::Material &_mat);
const gz::math::Material &_mat);

/// \brief Construct a box with specified dimensions, in vector form.
/// \param[in] _size Size of the box. The vector _size has the following
Expand All @@ -89,7 +89,7 @@ namespace ignition
/// * _size[2] == height in meters
/// \param[in] _mat Material property for the box.
public: Box(const Vector3<Precision> &_size,
const ignition::math::Material &_mat);
const gz::math::Material &_mat);

/// \brief Destructor.
public: virtual ~Box() = default;
Expand Down Expand Up @@ -127,11 +127,11 @@ namespace ignition

/// \brief Get the material associated with this box.
/// \return The material assigned to this box.
public: const ignition::math::Material &Material() const;
public: const gz::math::Material &Material() const;

/// \brief Set the material associated with this box.
/// \param[in] _mat The material assigned to this box.
public: void SetMaterial(const ignition::math::Material &_mat);
public: void SetMaterial(const gz::math::Material &_mat);

/// \brief Get the volume of the box in m^3.
/// \return Volume of the box in m^3.
Expand Down Expand Up @@ -204,7 +204,7 @@ namespace ignition
private: Vector3<Precision> size = Vector3<Precision>::Zero;

/// \brief The box's material.
private: ignition::math::Material material;
private: gz::math::Material material;
};

/// \typedef Box<int> Boxi
Expand Down
2 changes: 1 addition & 1 deletion include/gz/math/DiffDriveOdometry.hh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace ignition
/// **Example Usage**
///
/// \code{.cpp}
/// ignition::math::DiffDriveOdometry odom;
/// gz::math::DiffDriveOdometry odom;
/// odom.SetWheelParams(2.0, 0.5, 0.5);
/// odom.Init(std::chrono::steady_clock::now());
///
Expand Down
Loading

0 comments on commit 0fad0f7

Please sign in to comment.