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

6 ➡️ 7 #156

Merged
merged 27 commits into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7c0f0f1
move hgignore to gitignore
Apr 17, 2020
8161fe4
remove hg syntax and add comments
Apr 17, 2020
53efe3b
[ign-math6] Update BitBucket links (#110)
chapulina Apr 21, 2020
c272642
Make alpha optional when parsing a Color from an input stream (#106)
azeey Apr 28, 2020
45ff350
[ign-math6] Workflow updates (#117)
chapulina May 4, 2020
c9484fd
Add operator + for AxisAlignedBox and Vector3
chapulina May 30, 2020
d1b5e86
Changelog entry for #122.
scpeters May 30, 2020
ca49e98
Implement AxisAlignedBox Volume function (#126)
iche033 Jun 15, 2020
1e6f11d
Add setter/getter for Pose's each element - Issue 35 (#125)
pxalcantara Jul 2, 2020
754b0d9
fix: add header for numeric_limits for libstdc++ such that ign-math c…
catskul May 14, 2020
11864fd
[Issue #71] Update vector2 fuctions from vector3 (#130)
pxalcantara Jul 7, 2020
0270a51
Add Vector4 functions to match Vector3 (#132)
luccosta Jul 20, 2020
d50d094
Add Abs, Dot and AbsDot and respective tests to Vector4 (#135)
luccosta Jul 27, 2020
a14af06
Create abs, absDot and Correct functions for Vector2d (#143)
felximenes Jul 29, 2020
8a73032
Vector4 Ruby tests - Vector4.i and Vector4_TEST.rb (#137)
luccosta Jul 31, 2020
68f1418
Sum normalized functions (#140)
luccosta Aug 1, 2020
c513cde
Document Ruby Tests (#145)
luccosta Aug 3, 2020
c43f478
Update actions CI (#139)
chapulina Aug 3, 2020
1a7ae9f
Round, Rounded, Correct, Distance(x, y, z, w) and operator< addition …
luccosta Aug 7, 2020
6e80a49
Add Max and Min function to Vector2.hh (#133)
pxalcantara Aug 10, 2020
e7fffec
Fix Vector2 Ruby tests (#148)
chapulina Aug 18, 2020
9ff0f1c
Fix IGNITION_MATH_XX_VERSION (#151)
caguero Aug 27, 2020
d5dc70f
Added functions to convert between time_point and secNsec (#150)
ahcorde Sep 3, 2020
87d3406
Add string to time function (#152)
Sep 4, 2020
f08039f
6 ➡️ 7
chapulina Sep 4, 2020
bf1e3e2
⬆️ 6.5.0 (#155)
chapulina Sep 5, 2020
d54a46b
Merge branch 'ign-math6' into chapulina/6_to_7
scpeters Sep 6, 2020
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
4 changes: 4 additions & 0 deletions .github/ci-bionic/after_make.sh → .github/ci/after_make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -x

BUILD_DIR=`pwd`

# Install
make install

Expand All @@ -12,3 +14,5 @@ cd build
cmake ..
make
./graph_example

cd $BUILD_DIR
4 changes: 4 additions & 0 deletions .github/ci/packages.apt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libeigen3-dev
libignition-cmake2-dev
ruby-dev
swig
18 changes: 0 additions & 18 deletions .github/workflows/ci-bionic.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Ubuntu CI

on: [push, pull_request]

jobs:
bionic-ci:
runs-on: ubuntu-latest
name: Ubuntu Bionic CI
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Compile and test
id: ci
uses: ignition-tooling/action-ignition-ci@master
with:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
focal-ci:
runs-on: ubuntu-latest
name: Ubuntu Focal CI
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Compile and test
id: ci
uses: ignition-tooling/action-ignition-ci@focal
68 changes: 68 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,74 @@

### Ignition Math 6.x.x

## Ignition Math 6.5.0 (2020-09-04)

1. Add string to time function
* [Pull request 152](https://github.com/ignitionrobotics/ign-math/pull/152)

1. Added functions to convert between time_point and secNsec
* [Pull request 150](https://github.com/ignitionrobotics/ign-math/pull/150)

1. Fix IGNITION_MATH_XXX_VERSION
* [Pull request 151](https://github.com/ignitionrobotics/ign-math/pull/151)

1. Add Max and Min function to Vector2.hh
* [Pull request 133](https://github.com/ignitionrobotics/ign-math/pull/133)
* [Pull request 148](https://github.com/ignitionrobotics/ign-math/pull/148)
* [Issue 71](https://github.com/ignitionrobotics/ign-math/issues/71)

1. Round, Rounded, Correct, Distance(x, y, z, w) and operator< addition to Vector 4
* [Pull request 146](https://github.com/ignitionrobotics/ign-math/pull/146)
* [Issue 71](https://github.com/ignitionrobotics/ign-math/issues/71)

1. Sum and normalized functions for Vector4
* [Pull request 140](https://github.com/ignitionrobotics/ign-math/pull/140)
* [Issue 71](https://github.com/ignitionrobotics/ign-math/issues/71)

1. Vector4 Ruby tests - Vector4.i and Vector4_TEST.rb
* [Pull request 137](https://github.com/ignitionrobotics/ign-math/pull/137)
* [Issue 71](https://github.com/ignitionrobotics/ign-math/issues/71)

1. Vector3 to vector4 functions
* [Pull request 132](https://github.com/ignitionrobotics/ign-math/pull/132)
* [Issue 71](https://github.com/ignitionrobotics/ign-math/issues/71)

1. Update vector2 fuctions from vector3
* [Pull request 130](https://github.com/ignitionrobotics/ign-math/pull/130)
* [Issue 71](https://github.com/ignitionrobotics/ign-math/issues/71)

1. Add Abs, Dot and AbsDot and respective tests to Vector4
* [Pull request 135](https://github.com/ignitionrobotics/ign-math/pull/135)
* [Issue 71](https://github.com/ignitionrobotics/ign-math/issues/71)

1. Create abs, absDot and Correct functions for Vector2d
* [Pull request 143](https://github.com/ignitionrobotics/ign-math/pull/143)
* [Issue 71](https://github.com/ignitionrobotics/ign-math/issues/71)

1. Document Ruby tests
* [Pull request 145](https://github.com/ignitionrobotics/ign-math/pull/145)

1. Add header for numeric_limits allowing build on ubuntu 16.04
* [Pull request 119](https://github.com/ignitionrobotics/ign-math/pull/119)

1. Add setter/getter for Pose's each element
* [Pull request 125](https://github.com/ignitionrobotics/ign-math/pull/125)
* [Issue 35](https://github.com/ignitionrobotics/ign-math/issues/35)

1. Implement AxisAlignedBox Volume function
* [Pull request 126](https://github.com/ignitionrobotics/ign-math/pull/126)

1. Add operator + for AxisAlignedBox and Vector3.
* [Pull request 122](https://github.com/ignitionrobotics/ign-math/pull/122)

1. Make alpha optional when parsing a Color from an input stream.
* [Pull request 106](https://github.com/ignitionrobotics/ign-math/pull/106)

1. GitHub actions CI and workflow updates
* [Pull request 117](https://github.com/ignitionrobotics/ign-math/pull/117)
* [Pull request 139](https://github.com/ignitionrobotics/ign-math/pull/139)
* [Pull request 110](https://github.com/ignitionrobotics/ign-math/pull/110)

1. Added a Gauss-Markov Process class.
* [BitBucket pull request 342](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-math/pull-requests/342)

Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,28 @@ Follow these steps to run tests and static code analysis in your clone of this r
make codecheck
```

## Ruby Tests

### Usage

The C++ classes are available in Ruby code by interface files (`.i`) used by swig to build a C++ extension module.

The interfaces and Ruby test codes are in the `src` folder. To use a C++ class in Ruby you need to:

1. Create an interface file describing the class as in Swig and Ruby reference at [The Ruby-to-C/C++ Mapping](http://www.swig.org/Doc1.3/Ruby.html#Ruby_nn11)

2. Include the interface file in `/src/ing_math.i`

3. Create the Ruby file and import the class as in Swig and Ruby reference at [C++ Classes](http://www.swig.org/Doc1.3/Ruby.html#Ruby_nn18)

### Tests

`make test` already runs all tests, including the ones made in Ruby, but you can run a Ruby test individually using

```
ctest -R Ruby_TEST.rb
```

# Folder Structure

Refer to the following table for information about important directories and files in this repository.
Expand Down
5 changes: 5 additions & 0 deletions include/ignition/math/AxisAlignedBox.hh
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ namespace ignition
/// \return The new box
public: AxisAlignedBox operator-(const Vector3d &_v);

/// \brief Add a vector to the min and max values
/// \param _v The vector to use during addition
/// \return The new box
public: AxisAlignedBox operator+(const Vector3d &_v);

/// \brief Output operator
/// \param[in] _out Output stream
/// \param[in] _b AxisAlignedBox to output to the stream
Expand Down
18 changes: 16 additions & 2 deletions include/ignition/math/Color.hh
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,27 @@ namespace ignition
}

/// \brief Stream insertion operator
/// \param[in] _in the input stream
/// \param[in] _in the input stream. If the input stream does not include
/// an alpha value, a default alpha value of 1.0 will be used.
/// \param[in] _pt
public: friend std::istream &operator>> (std::istream &_in, Color &_pt)
{
// Skip white spaces
_in.setf(std::ios_base::skipws);
_in >> _pt.r >> _pt.g >> _pt.b >> _pt.a;
_in >> _pt.r >> _pt.g >> _pt.b;
// Since alpha is optional, check if it's there before parsing
while (!_in.eof() && std::isspace(_in.peek()))
{
_in.get();
}
if (!_in.eof())
{
_in >> _pt.a;
}
else
{
_pt.a = 1.0;
}
return _in;
}

Expand Down
6 changes: 3 additions & 3 deletions include/ignition/math/Filter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ namespace ignition
}

// Documentation Inherited.
public: virtual void Fc(double _fc, double _fs)
public: virtual void Fc(double _fc, double _fs) override
{
b1 = exp(-2.0 * IGN_PI * _fc / _fs);
a0 = 1.0 - b1;
Expand Down Expand Up @@ -168,7 +168,7 @@ namespace ignition
}

// Documentation Inherited.
public: void Fc(double _fc, double _fs)
public: void Fc(double _fc, double _fs) override
{
this->Fc(_fc, _fs, 0.5);
}
Expand All @@ -191,7 +191,7 @@ namespace ignition

/// \brief Set the current filter's output.
/// \param[in] _val New filter's output.
public: virtual void Set(const T &_val)
public: virtual void Set(const T &_val) override
{
this->y0 = this->y1 = this->y2 = this->x1 = this->x2 = _val;
}
Expand Down
Loading