Skip to content

Commit

Permalink
6 ➡️ 7 (#156)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina authored Sep 8, 2020
2 parents 6a3c4a3 + d54a46b commit 029e350
Show file tree
Hide file tree
Showing 31 changed files with 1,515 additions and 107 deletions.
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

0 comments on commit 029e350

Please sign in to comment.