Skip to content

Commit

Permalink
Merge tag 'v2.0.0'
Browse files Browse the repository at this point in the history
Release of version 2.0.0.
  • Loading branch information
nim65s committed Dec 5, 2024
2 parents bbcf5db + 7f91c9f commit b787d93
Show file tree
Hide file tree
Showing 19 changed files with 238 additions and 118 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos-linux-pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
os: ["ubuntu-latest"] # , "macos-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "CI - Nix"

on:
push:

jobs:
nix:
runs-on: "${{ matrix.os }}-latest"
strategy:
matrix:
os: [ubuntu, macos]
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- uses: cachix/cachix-action@v15
with:
name: gepetto
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build -L
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ci:
autoupdate_branch: devel
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.8.2
hooks:
- id: ruff
args:
Expand All @@ -14,18 +14,19 @@ repos:
hooks:
- id: cmake-format
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
rev: v0.24.2
hooks:
- id: toml-sort-fix
exclude: poetry.lock
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.3
rev: v19.1.4
hooks:
- id: clang-format
args:
- --style=Google
exclude: python/test/sandbox/test.ipynb
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.0.0] - 2024-12-05

- :warning: BREAKING: switch from boost smart pointers to std ones
- setup nix
- setup mergify

## [1.4.1] - 2024-04-12

- tests: fix use of np.random in tests
Expand Down Expand Up @@ -174,7 +180,8 @@ Changes since v0.2.0:

- Initial release

[Unreleased]: https://github.com/loco-3d/ndcurves/compare/v1.4.1...HEAD
[Unreleased]: https://github.com/loco-3d/ndcurves/compare/v2.0.0...HEAD
[2.0.0]: https://github.com/loco-3d/ndcurves/compare/v1.4.1...v2.0.0
[1.4.1]: https://github.com/loco-3d/ndcurves/compare/v1.4.0...v1.4.1
[1.4.0]: https://github.com/loco-3d/ndcurves/compare/v1.3.1...v1.4.0
[1.3.1]: https://github.com/loco-3d/ndcurves/compare/v1.3.0...v1.3.1
Expand Down
2 changes: 1 addition & 1 deletion cmake
Submodule cmake updated 93 files
+0 −240 .cmake-format.py
+1 −0 .docs/cmake.py
+1 −4 .docs/examples/minimal-with-packages.cmake
+2 −0 .gersemirc
+3 −0 .git-blame-ignore-revs
+47 −53 .pre-commit-config.yaml
+110 −97 CMakeLists.txt
+7 −3 _unittests/catkin/CMakeLists.txt
+7 −3 _unittests/cpp/CMakeLists.txt
+8 −4 _unittests/test_pkg-config.cmake
+6 −2 apple.cmake
+106 −56 base.cmake
+113 −63 boost.cmake
+56 −42 compiler.cmake
+31 −64 coverage.cmake
+24 −11 cpack.cmake
+4 −2 createshexe.cmake
+71 −38 cxx-standard.cmake
+2 −1 cxx11.cmake
+322 −159 cython/cython.cmake
+45 −20 debian.cmake
+104 −61 dist.cmake
+98 −70 distcheck.cmake
+141 −74 doxygen.cmake
+12 −6 eigen.cmake
+11 −8 find-external/Accelerate/FindAccelerate.cmake
+13 −10 find-external/CDD/FindCDD.cmake
+61 −39 find-external/CHOLMOD/FindCHOLMOD.cmake
+12 −13 find-external/CLP/FindCLP.cmake
+19 −13 find-external/CoinUtils/FindCoinUtils.cmake
+18 −8 find-external/CppAD/Findcppad.cmake
+21 −10 find-external/CppAD/Findcppadcg.cmake
+18 −10 find-external/GMP/FindGMP.cmake
+61 −0 find-external/Ipopt/FindIpopt.cmake
+55 −27 find-external/Julia/FindJulia.cmake
+54 −22 find-external/MPFR/FindMPFR.cmake
+384 −263 find-external/OpenMP/FindOpenMP.cmake
+44 −27 find-external/OpenRTM/FindOpenRTM.cmake
+64 −34 find-external/Qhull/FindQhull.cmake
+15 −9 find-external/Simde/FindSimde.cmake
+9 −7 find-external/TinyXML/FindTinyXML.cmake
+30 −14 find-external/TinyXML/FindTinyXML2.cmake
+51 −26 find-external/assimp/Findassimp.cmake
+21 −17 find-external/glpk/Findglpk.cmake
+24 −12 find-external/qpOASES/FindqpOASES.cmake
+31 −14 geometric-tools.cmake
+19 −17 gtest.cmake
+133 −30 header.cmake
+2 −6 hpp.cmake
+16 −10 ide.cmake
+54 −33 idl.cmake
+28 −15 idlrtc.cmake
+8 −4 image/visp.cmake
+2 −1 install-data.cmake
+49 −0 install-helpers.cmake
+14 −7 julia.cmake
+30 −19 kineo.cmake
+2 −1 lapack.cmake
+69 −34 logging.cmake
+11 −6 man.cmake
+26 −19 memorycheck_unit_test.cmake.in
+8 −5 metapodfromurdf.cmake
+23 −8 modernize-links.cmake
+43 −21 msvc-specific.cmake
+5 −3 openhrp.cmake
+23 −10 openhrpcontroller.cmake
+9 −6 openrtm.cmake
+168 −74 package-config.cmake
+21 −0 package.xml
+30 −0 pixi.py
+360 −254 pkg-config.cmake
+10 −7 portability.cmake
+7 −2 post-project.cmake
+8 −3 pthread.cmake
+78 −13 python-helpers.cmake
+162 −92 python.cmake
+59 −31 qhull.cmake
+111 −64 release.cmake
+6 −2 relpath.cmake
+35 −17 ros.cmake
+54 −0 ros2.cmake
+15 −6 sdformat.cmake
+8 −3 shared-library.cmake
+51 −24 sphinx.cmake
+39 −21 stubs.cmake
+21 −10 swig.cmake
+126 −55 test.cmake
+124 −0 tracy.cmake
+33 −0 tracy.hh.cmake
+41 −22 uninstall.cmake
+17 −8 version-script.cmake
+44 −37 version.cmake
+14 −17 xacro.cmake
58 changes: 58 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
description = "Library for creating smooth cubic splines";

inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};

outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = inputs.nixpkgs.lib.systems.flakeExposed;
perSystem =
{ pkgs, self', ... }:
{
apps.default = {
type = "app";
program = pkgs.python3.withPackages (_: [ self'.packages.default ]);
};
devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
packages = {
default = self'.packages.ndcurves;
ndcurves = pkgs.python3Packages.ndcurves.overrideAttrs (_: {
src = pkgs.lib.fileset.toSource {
root = ./.;
fileset = pkgs.lib.fileset.unions [
./CMakeLists.txt
./doc
./include
./package.xml
./python
./tests
];
};
});
};
};
};
}
2 changes: 1 addition & 1 deletion include/ndcurves/bernstein.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct Bern {
if (!(u >= 0. && u <= 1.)) {
throw std::invalid_argument("u needs to be betwen 0 and 1.");
}
return bin_m_i_ * (pow(u, i_)) * pow((1 - u), m_minus_i);
return bin_m_i_ * (pow(u, i_))*pow((1 - u), m_minus_i);
}

/// \brief Check if actual Bernstein polynomial and other are approximately
Expand Down
2 changes: 1 addition & 1 deletion include/ndcurves/bezier_curve.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct bezier_curve : public curve_abc<Time, Numeric, Safe, Point> {
typedef std::vector<point_t, Eigen::aligned_allocator<point_t> > t_point_t;
typedef typename t_point_t::const_iterator cit_point_t;
typedef bezier_curve<Time, Numeric, Safe, Point> bezier_curve_t;
typedef boost::shared_ptr<bezier_curve_t> bezier_curve_ptr_t;
typedef std::shared_ptr<bezier_curve_t> bezier_curve_ptr_t;
typedef piecewise_curve<Time, Numeric, Safe, point_t, point_t, bezier_curve_t>
piecewise_curve_t;
typedef curve_abc<Time, Numeric, Safe, point_t> curve_abc_t; // parent class
Expand Down
5 changes: 2 additions & 3 deletions include/ndcurves/curve_abc.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
#ifndef _STRUCT_CURVE_ABC
#define _STRUCT_CURVE_ABC

#include <boost/serialization/shared_ptr.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <functional>
#include <memory>

#include "MathDefs.h"
#include "serialization/archive.hpp"
Expand Down Expand Up @@ -43,7 +42,7 @@ struct curve_abc : public serialization::Serializable {
curve_t; // parent class
typedef curve_abc<Time, Numeric, Safe, point_derivate_t>
curve_derivate_t; // parent class
typedef boost::shared_ptr<curve_t> curve_ptr_t;
typedef std::shared_ptr<curve_t> curve_ptr_t;

/* Constructors - destructors */
public:
Expand Down
4 changes: 2 additions & 2 deletions include/ndcurves/exact_cubic.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ struct exact_cubic : public piecewise_curve<Time, Numeric, Safe, Point> {
std::size_t getNumberSplines() { return this->getNumberCurves(); }

spline_t getSplineAt(std::size_t index) {
boost::shared_ptr<spline_t> s_ptr =
boost::dynamic_pointer_cast<spline_t>(this->curves_.at(index));
std::shared_ptr<spline_t> s_ptr =
std::dynamic_pointer_cast<spline_t>(this->curves_.at(index));
if (s_ptr)
return *s_ptr;
else
Expand Down
12 changes: 6 additions & 6 deletions include/ndcurves/fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#ifndef CURVES_FWD_H
#define CURVES_FWD_H
#include <Eigen/Dense>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <memory>
#include <vector>

namespace ndcurves {
Expand Down Expand Up @@ -94,11 +94,11 @@ typedef curve_abc<double, double, true, transform_t, point6_t>
// (return dimension are fixed)

// shared pointer to abstract types:
typedef boost::shared_ptr<curve_abc_t> curve_ptr_t;
typedef boost::shared_ptr<curve_3_t> curve3_ptr_t;
typedef boost::shared_ptr<curve_rotation_t> curve_rotation_ptr_t;
typedef boost::shared_ptr<curve_translation_t> curve_translation_ptr_t;
typedef boost::shared_ptr<curve_SE3_t> curve_SE3_ptr_t;
typedef std::shared_ptr<curve_abc_t> curve_ptr_t;
typedef std::shared_ptr<curve_3_t> curve3_ptr_t;
typedef std::shared_ptr<curve_rotation_t> curve_rotation_ptr_t;
typedef std::shared_ptr<curve_translation_t> curve_translation_ptr_t;
typedef std::shared_ptr<curve_SE3_t> curve_SE3_ptr_t;

// definition of all curves class with pointX as return type:
typedef polynomial<double, double, true, pointX_t, t_pointX_t> polynomial_t;
Expand Down
8 changes: 4 additions & 4 deletions include/ndcurves/piecewise_curve.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#define _CLASS_PIECEWISE_CURVE

#include <boost/serialization/vector.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <fstream>
#include <memory>
#include <sstream>

#include "curve_abc.h"
Expand Down Expand Up @@ -46,15 +46,15 @@ struct piecewise_curve
typedef curve_abc<Time, Numeric, Safe, point_t, point_derivate_t>
base_curve_t; // parent class
typedef CurveType curve_t; // contained curves base class
typedef boost::shared_ptr<curve_t> curve_ptr_t;
typedef std::shared_ptr<curve_t> curve_ptr_t;
typedef typename std::vector<curve_ptr_t> t_curve_ptr_t;
typedef typename std::vector<Time> t_time_t;
typedef piecewise_curve<Time, Numeric, Safe, Point, Point_derivate, CurveType>
piecewise_curve_t;
typedef piecewise_curve<Time, Numeric, Safe, Point_derivate, Point_derivate,
typename CurveType::curve_derivate_t>
piecewise_curve_derivate_t;
typedef boost::shared_ptr<typename piecewise_curve_derivate_t::curve_t>
typedef std::shared_ptr<typename piecewise_curve_derivate_t::curve_t>
curve_derivate_ptr_t;

public:
Expand Down Expand Up @@ -174,7 +174,7 @@ struct piecewise_curve

template <typename Curve>
void add_curve(const Curve& curve) {
curve_ptr_t curve_ptr = boost::make_shared<Curve>(curve);
curve_ptr_t curve_ptr = std::make_shared<Curve>(curve);
add_curve_ptr(curve_ptr);
}

Expand Down
6 changes: 3 additions & 3 deletions include/ndcurves/se3_curve.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ struct SE3Curve : public curve_abc<Time, Numeric, Safe,
typedef curve_abc<Time, Numeric, Safe, matrix3_t, point3_t>
curve_rotation_t; // templated class used for the rotation (return
// dimension are fixed)
typedef boost::shared_ptr<curve_X_t> curve_ptr_t;
typedef boost::shared_ptr<curve_rotation_t> curve_rotation_ptr_t;
typedef boost::shared_ptr<curve_translation_t> curve_translation_ptr_t;
typedef std::shared_ptr<curve_X_t> curve_ptr_t;
typedef std::shared_ptr<curve_rotation_t> curve_rotation_ptr_t;
typedef std::shared_ptr<curve_translation_t> curve_translation_ptr_t;

typedef SO3Linear<Time, Numeric, Safe> SO3Linear_t;
typedef polynomial<Time, Numeric, Safe, pointX_t> polynomial_t;
Expand Down
1 change: 0 additions & 1 deletion include/ndcurves/serialization/curves.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/

#include <boost/serialization/shared_ptr.hpp>
#include <boost/shared_ptr.hpp>

#include "ndcurves/bezier_curve.h"
#include "ndcurves/constant_curve.h"
Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>ndcurves</name>
<version>1.4.1</version>
<version>2.0.0</version>
<description>
A template-based Library for creating curves of arbitrary order and dimension
</description>
Expand Down
Loading

0 comments on commit b787d93

Please sign in to comment.