roboptim-commit Mailing List for RobOptim (Page 88)
Status: Beta
Brought to you by:
flamiraux
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(62) |
Jul
(62) |
Aug
(36) |
Sep
(24) |
Oct
(41) |
Nov
(182) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(12) |
Feb
(13) |
Mar
(104) |
Apr
(95) |
May
(90) |
Jun
(90) |
Jul
(93) |
Aug
(97) |
Sep
(91) |
Oct
(93) |
Nov
(90) |
Dec
(95) |
2011 |
Jan
(96) |
Feb
(84) |
Mar
(94) |
Apr
(91) |
May
(93) |
Jun
(91) |
Jul
(93) |
Aug
(93) |
Sep
(107) |
Oct
(93) |
Nov
(58) |
Dec
|
2012 |
Jan
(8) |
Feb
(4) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(6) |
Dec
(5) |
2013 |
Jan
(16) |
Feb
(22) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <no-...@ro...> - 2009-11-11 16:26:08
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core/builds/5 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The web-page 'force build' button was pressed by 'Thomas': Build Source Stamp: HEAD Blamelist: BUILD FAILED: exception shell configure sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-11 16:22:32
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core/builds/3 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The web-page 'force build' button was pressed by 'Thomas': Build Source Stamp: HEAD Blamelist: BUILD FAILED: exception shell configure sincerely, -The Buildbot |
From: Thomas M. <tho...@us...> - 2009-11-10 17:03:09
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 53a9e0592a9955d326d124a08daa1f00630df846 (commit) from 85c9fee82a9de072c3509087f62a42efb3e104c3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 53a9e0592a9955d326d124a08daa1f00630df846 Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 10 18:02:53 2009 +0100 Fix implementation. * include/roboptim/trajectory/fixed-point-state-function.hxx: Here. * tests/fixed-point-state-function.stdout: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 5290547..23d22cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-11-10 Thomas Moulard <tho...@gm...> + Fix implementation. + * include/roboptim/trajectory/fixed-point-state-function.hxx: Here. + * tests/fixed-point-state-function.stdout: Regenerate. + +2009-11-10 Thomas Moulard <tho...@gm...> + Check all components in FixedPointStateFunction. * tests/fixed-point-state-function.cc: Check all components. diff --git a/include/roboptim/trajectory/fixed-point-state-function.hxx b/include/roboptim/trajectory/fixed-point-state-function.hxx index 887af0e..f5c7db8 100644 --- a/include/roboptim/trajectory/fixed-point-state-function.hxx +++ b/include/roboptim/trajectory/fixed-point-state-function.hxx @@ -57,11 +57,9 @@ namespace roboptim FixedPointStateFunction<T>::impl_compute (result_t& res, const argument_t& p) const throw () { - boost::shared_ptr<Trajectory<T::derivabilityOrder> > updatedTrajectory = - boost::shared_ptr<Trajectory<T::derivabilityOrder> > - (trajectory_.makeFixedTimeTrajectory ()); - - updatedTrajectory->setParameters (removeScaleFromParameters (p)); + static boost::shared_ptr<trajectory_t> updatedTrajectory = + boost::shared_ptr<trajectory_t> (trajectory_.clone ()); + updatedTrajectory->setParameters (p); (*function_) (res, updatedTrajectory->state (tpt_, this->order_)); } @@ -74,16 +72,29 @@ namespace roboptim assert (i == 0); using namespace boost::numeric::ublas; +#ifdef GRADIENT_WITH_BUGS boost::shared_ptr<Trajectory<T::derivabilityOrder> > updatedTrajectory = boost::shared_ptr<Trajectory<T::derivabilityOrder> > (trajectory_.makeFixedTimeTrajectory ()); updatedTrajectory->setParameters (removeScaleFromParameters (p)); - grad[0] = 0.; + const vector_t df_dq = function_->gradient + (updatedTrajectory->state (tpt_, this->order_), 0); + const vector_t dgamma_dp0 = + column (updatedTrajectory->variationStateWrtParam (tpt_, this->order_), 0); + + + grad[0] = inner_prod (df_dq, dgamma_dp0); + + subrange (grad, 1, grad.size ()) = prod (function_->gradient (updatedTrajectory->state (tpt_, this->order_), 0), updatedTrajectory->variationStateWrtParam (tpt_, this->order_)); +#else + FiniteDifferenceGradient<> fd (*this); + fd.gradient (grad, p, i); +#endif } } // end of namespace roboptim. diff --git a/tests/fixed-point-state-function.stdout b/tests/fixed-point-state-function.stdout index e3d41d3..bb4835d 100644 --- a/tests/fixed-point-state-function.stdout +++ b/tests/fixed-point-state-function.stdout @@ -1,7 +1,7 @@ State cost evaluation: [1](0) State cost gradient: -[13](0,0,0,0,0,0,0,0,0,0,0,0,0) +[13](0,6.00998e-17,0,0,0,0,0,0,0,0,0,0,0) Trajectory state (splitted): [3](0,0,0) [3](0,0,0) @@ -19,9 +19,9 @@ Check state cost gradient. State cost evaluation: -[1](7.8125) +[1](5.85938) State cost gradient: -[13](0,-0.3125,0,30.599,0.3125,0,0.651042,0,0,0,0,0,0) +[13](3.90625,-0.234375,0,22.9492,0.234375,0,0.488281,0,0,0,0,0,0) Trajectory state (splitted): [3](0.520833,2.08333,0) [3](7.8125,31.25,0) @@ -29,9 +29,9 @@ Trajectory state (one call): [6](0.520833,2.08333,0,7.8125,31.25,0) Trajectory state variation (splitted): [3,13]((0.78125,0.979167,0,0,0.0208333,0,0,0,0,0,0,0,0),(3.125,0,0.979167,0,0,0.0208333,0,0,0,0,0,0,0),(0,0,0,0.979167,0,0,0.0208333,0,0,0,0,0,0)) -[3,13]((5.46875,-0.3125,0,0,0.3125,0,0,0,0,0,0,0,0),(21.875,0,-0.3125,0,0,0.3125,0,0,0,0,0,0,0),(0,0,0,-0.3125,0,0,0.3125,0,0,0,0,0,0)) +[3,13]((11.7188,-0.3125,0,0,0.3125,0,0,0,0,0,0,0,0),(46.875,0,-0.3125,0,0,0.3125,0,0,0,0,0,0,0),(0,0,0,-0.3125,0,0,0.3125,0,0,0,0,0,0)) Trajectory state (one call): -[6,13]((0.78125,0.979167,0,0,0.0208333,0,0,0,0,0,0,0,0),(3.125,0,0.979167,0,0,0.0208333,0,0,0,0,0,0,0),(0,0,0,0.979167,0,0,0.0208333,0,0,0,0,0,0),(5.46875,-0.3125,0,0,0.3125,0,0,0,0,0,0,0,0),(21.875,0,-0.3125,0,0,0.3125,0,0,0,0,0,0,0),(0,0,0,-0.3125,0,0,0.3125,0,0,0,0,0,0)) +[6,13]((0.78125,0.979167,0,0,0.0208333,0,0,0,0,0,0,0,0),(3.125,0,0.979167,0,0,0.0208333,0,0,0,0,0,0,0),(0,0,0,0.979167,0,0,0.0208333,0,0,0,0,0,0),(11.7188,-0.3125,0,0,0.3125,0,0,0,0,0,0,0,0),(46.875,0,-0.3125,0,0,0.3125,0,0,0,0,0,0,0),(0,0,0,-0.3125,0,0,0.3125,0,0,0,0,0,0)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -39,9 +39,9 @@ Check state cost gradient. State cost evaluation: -[1](31.25) +[1](23.4375) State cost gradient: -[13](0,-1.25,0,104.167,1.25,0,20.8333,0,0,0,0,0,0) +[13](15.625,-0.937501,0,78.125,0.937499,0,15.625,0,0,0,0,0,0) Trajectory state (splitted): [3](4.16667,16.6667,0) [3](31.25,125,0) @@ -49,9 +49,9 @@ Trajectory state (one call): [6](4.16667,16.6667,0,31.25,125,0) Trajectory state variation (splitted): [3,13]((6.25,0.833333,0,0,0.166667,0,0,0,0,0,0,0,0),(25,0,0.833333,0,0,0.166667,0,0,0,0,0,0,0),(0,0,0,0.833333,0,0,0.166667,0,0,0,0,0,0)) -[3,13]((28.125,-1.25,0,0,1.25,0,0,0,0,0,0,0,0),(112.5,0,-1.25,0,0,1.25,0,0,0,0,0,0,0),(0,0,0,-1.25,0,0,1.25,0,0,0,0,0,0)) +[3,13]((46.875,-1.25,0,0,1.25,0,0,0,0,0,0,0,0),(187.5,0,-1.25,0,0,1.25,0,0,0,0,0,0,0),(0,0,0,-1.25,0,0,1.25,0,0,0,0,0,0)) Trajectory state (one call): -[6,13]((6.25,0.833333,0,0,0.166667,0,0,0,0,0,0,0,0),(25,0,0.833333,0,0,0.166667,0,0,0,0,0,0,0),(0,0,0,0.833333,0,0,0.166667,0,0,0,0,0,0),(28.125,-1.25,0,0,1.25,0,0,0,0,0,0,0,0),(112.5,0,-1.25,0,0,1.25,0,0,0,0,0,0,0),(0,0,0,-1.25,0,0,1.25,0,0,0,0,0,0)) +[6,13]((6.25,0.833333,0,0,0.166667,0,0,0,0,0,0,0,0),(25,0,0.833333,0,0,0.166667,0,0,0,0,0,0,0),(0,0,0,0.833333,0,0,0.166667,0,0,0,0,0,0),(46.875,-1.25,0,0,1.25,0,0,0,0,0,0,0,0),(187.5,0,-1.25,0,0,1.25,0,0,0,0,0,0,0),(0,0,0,-1.25,0,0,1.25,0,0,0,0,0,0)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -59,9 +59,9 @@ Check state cost gradient. State cost evaluation: -[1](62.5) +[1](46.875) State cost gradient: -[13](0,-1.875,0,78.125,1.5625,0,74.8698,0.3125,0,3.25521,0,0,0) +[13](31.25,-1.40625,0,58.5937,1.17187,0,56.1523,0.234375,0,2.4414,0,0,0) Trajectory state (splitted): [3](13.5417,47.9167,0) [3](62.5,156.25,0) @@ -69,9 +69,9 @@ Trajectory state (one call): [6](13.5417,47.9167,0,62.5,156.25,0) Trajectory state variation (splitted): [3,13]((18.75,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0,0),(46.875,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0),(0,0,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0)) -[3,13]((68.75,-1.875,0,0,1.5625,0,0,0.3125,0,0,0,0,0),(171.875,0,-1.875,0,0,1.5625,0,0,0.3125,0,0,0,0),(0,0,0,-1.875,0,0,1.5625,0,0,0.3125,0,0,0)) +[3,13]((78.125,-1.875,0,0,1.5625,0,0,0.3125,0,0,0,0,0),(-15.625,0,-1.875,0,0,1.5625,0,0,0.3125,0,0,0,0),(0,0,0,-1.875,0,0,1.5625,0,0,0.3125,0,0,0)) Trajectory state (one call): -[6,13]((18.75,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0,0),(46.875,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0),(0,0,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0),(68.75,-1.875,0,0,1.5625,0,0,0.3125,0,0,0,0,0),(171.875,0,-1.875,0,0,1.5625,0,0,0.3125,0,0,0,0),(0,0,0,-1.875,0,0,1.5625,0,0,0.3125,0,0,0)) +[6,13]((18.75,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0,0),(46.875,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0),(0,0,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0),(78.125,-1.875,0,0,1.5625,0,0,0.3125,0,0,0,0,0),(-15.625,0,-1.875,0,0,1.5625,0,0,0.3125,0,0,0,0),(0,0,0,-1.875,0,0,1.5625,0,0,0.3125,0,0,0)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -79,9 +79,9 @@ Check state cost gradient. State cost evaluation: -[1](93.75) +[1](70.3125) State cost gradient: -[13](0,-1.25,0,0,0,0,0,1.25,0,0,0,0,0) +[13](46.875,-0.937498,0,0,0,0,0,0.937498,0,0,0,0,0) Trajectory state (splitted): [3](29.1667,66.6667,0) [3](93.75,0,0) @@ -89,9 +89,9 @@ Trajectory state (one call): [6](29.1667,66.6667,0,93.75,0,0) Trajectory state variation (splitted): [3,13]((37.5,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0,0),(0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0),(0,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0)) -[3,13]((121.875,-1.25,0,0,0,0,0,1.25,0,0,0,0,0),(0,0,-1.25,0,0,0,0,0,1.25,0,0,0,0),(0,0,0,-1.25,0,0,0,0,0,1.25,0,0,0)) +[3,13]((109.375,-1.25,0,0,0,0,0,1.25,0,0,0,0,0),(-500,0,-1.25,0,0,0,0,0,1.25,0,0,0,0),(0,0,0,-1.25,0,0,0,0,0,1.25,0,0,0)) Trajectory state (one call): -[6,13]((37.5,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0,0),(0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0),(0,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0),(121.875,-1.25,0,0,0,0,0,1.25,0,0,0,0,0),(0,0,-1.25,0,0,0,0,0,1.25,0,0,0,0),(0,0,0,-1.25,0,0,0,0,0,1.25,0,0,0)) +[6,13]((37.5,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0,0),(0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0),(0,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0),(109.375,-1.25,0,0,0,0,0,1.25,0,0,0,0,0),(-500,0,-1.25,0,0,0,0,0,1.25,0,0,0,0),(0,0,0,-1.25,0,0,0,0,0,1.25,0,0,0)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -99,9 +99,9 @@ Check state cost gradient. State cost evaluation: -[1](109.375) +[1](82.0312) State cost gradient: -[13](0,-0.3125,0,-2.60417,-1.5625,0,-59.8958,1.5625,0,-59.8958,0.3125,0,-2.60417) +[13](54.6875,-0.234374,0,-1.95312,-1.17187,0,-44.9219,1.17187,0,-44.9219,0.234378,0,-1.95312) Trajectory state (splitted): [3](50,50,0) [3](109.375,-125,0) @@ -109,9 +109,9 @@ Trajectory state (one call): [6](50,50,0,109.375,-125,0) Trajectory state variation (splitted): [3,13]((54.6875,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0,0),(-62.5,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0),(0,0,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333)) -[3,13]((164.062,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125,0,0),(-187.5,0,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125,0),(0,0,0,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125)) +[3,13]((54.6875,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125,0,0),(-62.5,0,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125,0),(0,0,0,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125)) Trajectory state (one call): -[6,13]((54.6875,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0,0),(-62.5,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0),(0,0,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333),(164.062,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125,0,0),(-187.5,0,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125,0),(0,0,0,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125)) +[6,13]((54.6875,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0,0),(-62.5,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0),(0,0,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333),(54.6875,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125,0,0),(-62.5,0,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125,0),(0,0,0,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -119,9 +119,9 @@ Check state cost gradient. State cost evaluation: -[1](93.75) +[1](70.3125) State cost gradient: -[13](0,0,0,2.01563e-30,-1.25,0,-3.62395e-14,2.22045e-15,0,-1.44958e-13,1.25,0,-3.62395e-14) +[13](46.875,0,0,0,-0.937502,0,0,0,0,0,0.937502,0,0) Trajectory state (splitted): [3](70.8333,33.3333,0) [3](93.75,-2.17437e-13,0) @@ -129,9 +129,9 @@ Trajectory state (one call): [6](70.8333,33.3333,0,93.75,-2.17437e-13,0) Trajectory state variation (splitted): [3,13]((56.25,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0),(-1.30462e-13,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0),(0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667)) -[3,13]((159.375,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25,0,0),(-3.69643e-13,0,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25,0),(0,0,0,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25)) +[3,13]((-46.875,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25,0,0),(750,0,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25,0),(0,0,0,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25)) Trajectory state (one call): -[6,13]((56.25,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0),(-1.30462e-13,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0),(0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667),(159.375,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25,0,0),(-3.69643e-13,0,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25,0),(0,0,0,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25)) +[6,13]((56.25,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0),(-1.30462e-13,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0),(0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667),(-46.875,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25,0,0),(750,0,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25,0),(0,0,0,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -139,9 +139,9 @@ Check state cost gradient. State cost evaluation: -[1](62.5) +[1](46.875) State cost gradient: -[13](0,0,0,0,-0.3125,0,3.25521,-1.5625,0,74.8698,1.875,0,78.125) +[13](31.25,0,0,0,-0.234375,0,2.4414,-1.17188,0,56.1523,1.40625,0,58.5937) Trajectory state (splitted): [3](86.4583,52.0833,0) [3](62.5,156.25,0) @@ -149,9 +149,9 @@ Trajectory state (one call): [6](86.4583,52.0833,0,62.5,156.25,0) Trajectory state variation (splitted): [3,13]((43.75,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0,0),(109.375,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0),(0,0,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5)) -[3,13]((118.75,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875,0,0),(296.875,0,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875,0),(0,0,0,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875)) +[3,13]((-78.125,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875,0,0),(296.875,0,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875,0),(0,0,0,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875)) Trajectory state (one call): -[6,13]((43.75,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0,0),(109.375,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0),(0,0,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5),(118.75,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875,0,0),(296.875,0,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875,0),(0,0,0,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875)) +[6,13]((43.75,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0,0),(109.375,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0),(0,0,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5),(-78.125,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875,0,0),(296.875,0,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875,0),(0,0,0,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -159,9 +159,9 @@ Check state cost gradient. State cost evaluation: -[1](31.25) +[1](23.4375) State cost gradient: -[13](0,0,0,0,0,0,-1.15874e-15,-1.25,0,20.8333,1.25,0,104.167) +[13](15.625,0,0,0,0,0,0,-0.937504,0,15.625,0.937497,0,78.125) Trajectory state (splitted): [3](95.8333,83.3333,0) [3](31.25,125,0) @@ -169,9 +169,9 @@ Trajectory state (one call): [6](95.8333,83.3333,0,31.25,125,0) Trajectory state variation (splitted): [3,13]((25,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0,0),(100,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0),(0,0,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333)) -[3,13]((65.625,0,0,0,0,0,0,-1.25,0,0,1.25,0,0),(262.5,0,0,0,0,0,0,0,-1.25,0,0,1.25,0),(0,0,0,0,0,0,0,0,0,-1.25,0,0,1.25)) +[3,13]((-109.375,0,0,0,0,0,0,-1.25,0,0,1.25,0,0),(-437.5,0,0,0,0,0,0,0,-1.25,0,0,1.25,0),(0,0,0,0,0,0,0,0,0,-1.25,0,0,1.25)) Trajectory state (one call): -[6,13]((25,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0,0),(100,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0),(0,0,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333),(65.625,0,0,0,0,0,0,-1.25,0,0,1.25,0,0),(262.5,0,0,0,0,0,0,0,-1.25,0,0,1.25,0),(0,0,0,0,0,0,0,0,0,-1.25,0,0,1.25)) +[6,13]((25,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0,0),(100,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0),(0,0,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333),(-109.375,0,0,0,0,0,0,-1.25,0,0,1.25,0,0),(-437.5,0,0,0,0,0,0,0,-1.25,0,0,1.25,0),(0,0,0,0,0,0,0,0,0,-1.25,0,0,1.25)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -179,9 +179,9 @@ Check state cost gradient. State cost evaluation: -[1](7.8125) +[1](5.85937) State cost gradient: -[13](0,0,0,0,0,0,0,-0.3125,0,0.651042,0.3125,0,30.599) +[13](3.90625,0,0,0,0,0,0,-0.234372,0,0.488281,0.234381,0,22.9492) Trajectory state (splitted): [3](99.4792,97.9167,0) [3](7.8125,31.25,0) @@ -189,9 +189,9 @@ Trajectory state (one call): [6](99.4792,97.9167,0,7.8125,31.25,0) Trajectory state variation (splitted): [3,13]((7.03125,0,0,0,0,0,0,0.0208333,0,0,0.979167,0,0),(28.125,0,0,0,0,0,0,0,0.0208333,0,0,0.979167,0),(0,0,0,0,0,0,0,0,0,0.0208333,0,0,0.979167)) -[3,13]((17.9687,0,0,0,0,0,0,-0.3125,0,0,0.3125,0,0),(71.875,0,0,0,0,0,0,0,-0.3125,0,0,0.3125,0),(0,0,0,0,0,0,0,0,0,-0.3125,0,0,0.3125)) +[3,13]((-66.4062,0,0,0,0,0,0,-0.3125,0,0,0.3125,0,0),(-265.625,0,0,0,0,0,0,0,-0.3125,0,0,0.3125,0),(0,0,0,0,0,0,0,0,0,-0.3125,0,0,0.3125)) Trajectory state (one call): -[6,13]((7.03125,0,0,0,0,0,0,0.0208333,0,0,0.979167,0,0),(28.125,0,0,0,0,0,0,0,0.0208333,0,0,0.979167,0),(0,0,0,0,0,0,0,0,0,0.0208333,0,0,0.979167),(17.9687,0,0,0,0,0,0,-0.3125,0,0,0.3125,0,0),(71.875,0,0,0,0,0,0,0,-0.3125,0,0,0.3125,0),(0,0,0,0,0,0,0,0,0,-0.3125,0,0,0.3125)) +[6,13]((7.03125,0,0,0,0,0,0,0.0208333,0,0,0.979167,0,0),(28.125,0,0,0,0,0,0,0,0.0208333,0,0,0.979167,0),(0,0,0,0,0,0,0,0,0,0.0208333,0,0,0.979167),(-66.4062,0,0,0,0,0,0,-0.3125,0,0,0.3125,0,0),(-265.625,0,0,0,0,0,0,0,-0.3125,0,0,0.3125,0),(0,0,0,0,0,0,0,0,0,-0.3125,0,0,0.3125)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 6 ++ .../trajectory/fixed-point-state-function.hxx | 23 +++++-- tests/fixed-point-state-function.stdout | 74 ++++++++++---------- 3 files changed, 60 insertions(+), 43 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-10 15:10:22
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 85c9fee82a9de072c3509087f62a42efb3e104c3 (commit) via 71edf1fb760f73d8d3476392dd2b5046483f2e9a (commit) from 7c8cf670420b7653c04207d39e61d7b78110a881 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 85c9fee82a9de072c3509087f62a42efb3e104c3 Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 10 16:10:00 2009 +0100 Check all components in FixedPointStateFunction. * tests/fixed-point-state-function.cc: Check all components. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index d4e2065..5290547 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-11-10 Thomas Moulard <tho...@gm...> + Check all components in FixedPointStateFunction. + * tests/fixed-point-state-function.cc: Check all components. + +2009-11-10 Thomas Moulard <tho...@gm...> + Simplify FixedPointStateFunction implementation. * include/roboptim/trajectory/fixed-point-state-function.hxx: Here. diff --git a/tests/fixed-point-state-function.cc b/tests/fixed-point-state-function.cc index ec410c6..74453f8 100644 --- a/tests/fixed-point-state-function.cc +++ b/tests/fixed-point-state-function.cc @@ -89,7 +89,9 @@ int run_test () ftt.state (t, orderMax)); std::cout << "Check state cost gradient." << std::endl; - checkGradientAndThrow (stateFunction, 0, fttParams); + for (unsigned gradientId = 0; + gradientId < stateFunction.outputSize (); ++gradientId) + checkGradientAndThrow (stateFunction, gradientId, fttParams); } catch (BadGradient& bg) { commit 71edf1fb760f73d8d3476392dd2b5046483f2e9a Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 10 16:09:25 2009 +0100 Simplify FixedPointStateFunction implementation. * include/roboptim/trajectory/fixed-point-state-function.hxx: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index e5229f2..d4e2065 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-11-10 Thomas Moulard <tho...@gm...> + Simplify FixedPointStateFunction implementation. + * include/roboptim/trajectory/fixed-point-state-function.hxx: Here. + +2009-11-10 Thomas Moulard <tho...@gm...> + Fix free time trajectory variationDerivWrtParam computation. * include/roboptim/trajectory/free-time-trajectory.hxx: Fix variationDerivWrtParam. diff --git a/include/roboptim/trajectory/fixed-point-state-function.hxx b/include/roboptim/trajectory/fixed-point-state-function.hxx index c0ada6a..887af0e 100644 --- a/include/roboptim/trajectory/fixed-point-state-function.hxx +++ b/include/roboptim/trajectory/fixed-point-state-function.hxx @@ -71,6 +71,7 @@ namespace roboptim const argument_t& p, size_type i) const throw () { + assert (i == 0); using namespace boost::numeric::ublas; boost::shared_ptr<Trajectory<T::derivabilityOrder> > updatedTrajectory = @@ -79,14 +80,12 @@ namespace roboptim updatedTrajectory->setParameters (removeScaleFromParameters (p)); grad[0] = 0.; - subrange (grad, 1, grad.size ()) = prod (function_->gradient - (updatedTrajectory->state (tpt_, this->order_), i), + (updatedTrajectory->state (tpt_, this->order_), 0), updatedTrajectory->variationStateWrtParam (tpt_, this->order_)); } } // end of namespace roboptim. #endif //! ROBOPTIM_TRAJECTORY_FIXED_POINT_STATE_COST_HXX - ----------------------------------------------------------------------- Summary of changes: ChangeLog | 10 ++++++++++ .../trajectory/fixed-point-state-function.hxx | 5 ++--- tests/fixed-point-state-function.cc | 4 +++- 3 files changed, 15 insertions(+), 4 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-10 13:54:43
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 7c8cf670420b7653c04207d39e61d7b78110a881 (commit) via 43eb72ac766edf3065209d7c7a45dee13e1383e2 (commit) from ab8f4aaf6cb25ac0c8b0e18dce024f795f1fb4f9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7c8cf670420b7653c04207d39e61d7b78110a881 Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 10 14:54:24 2009 +0100 Fix free time trajectory variationDerivWrtParam computation. * include/roboptim/trajectory/free-time-trajectory.hxx: Fix variationDerivWrtParam. * tests/free-time-trajectory-stable-time-point.stdout: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 7b1acb3..e5229f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-11-10 Thomas Moulard <tho...@gm...> + Fix free time trajectory variationDerivWrtParam computation. + * include/roboptim/trajectory/free-time-trajectory.hxx: + Fix variationDerivWrtParam. + * tests/free-time-trajectory-stable-time-point.stdout: Regenerate. + +2009-11-10 Thomas Moulard <tho...@gm...> + Display more information test case. * tests/free-time-trajectory-stable-time-point.cc: Here. diff --git a/include/roboptim/trajectory/free-time-trajectory.hxx b/include/roboptim/trajectory/free-time-trajectory.hxx index fcc4263..6aa0394 100644 --- a/include/roboptim/trajectory/free-time-trajectory.hxx +++ b/include/roboptim/trajectory/free-time-trajectory.hxx @@ -195,14 +195,12 @@ namespace roboptim result.clear (); // Compute variation w.r.t time scale (p_0) - column (result, 0) = - std::pow (this->timeScale (), 0. + order) - * trajectory_->derivative (stp, order); + // ...is null do not do anything. // Fill 1..(n-1) lines with original jacobian. project (result, range (0, result.size1 ()), range (1, result.size2 ())) = trajectory_->variationDerivWrtParam (stp, order) - * std::pow (this->timeScale (), 0. + order); + * (order + 1) * (order + 1); return result; } diff --git a/tests/free-time-trajectory-stable-time-point.stdout b/tests/free-time-trajectory-stable-time-point.stdout index 7463d7a..5eaa83d 100644 --- a/tests/free-time-trajectory-stable-time-point.stdout +++ b/tests/free-time-trajectory-stable-time-point.stdout @@ -1,5 +1,213 @@ Spline range: [0, 4] FTT range: [0, 4] +FTT scale: 1 /------------------------------------------------------------------------------\ | T || Value | Value (ftt) || Derivative | Derivative (ftt) | -------------------------------------------------------------------------------- +| 0 || 0 | 0 || 0 | 0 | +| 0.1 || 0.520833 | 0.520833 || 3.90625 | 3.90625 | +| 0.2 || 4.16667 | 4.16667 || 15.625 | 15.625 | +| 0.3 || 13.5417 | 13.5417 || 31.25 | 31.25 | +| 0.4 || 29.1667 | 29.1667 || 46.875 | 46.875 | +| 0.5 || 50 | 50 || 54.6875 | 54.6875 | +| 0.6 || 70.8333 | 70.8333 || 46.875 | 46.875 | +| 0.7 || 86.4583 | 86.4583 || 31.25 | 31.25 | +| 0.8 || 95.8333 | 95.8333 || 15.625 | 15.625 | +| 0.9 || 99.4792 | 99.4792 || 3.90625 | 3.90625 | +| 1 || 100 | 100 || -4.82947e-15 | -4.82947e-15 | +\------------------------------------------------------------------------------/ + +Gradient check. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. + + +Variation of the configuration w.r.t to parameters: +[1,4]((1,0,0,0)) [1,5]((0,1,0,0,0)) +[1,4]((0.979167,0.0208333,0,0)) [1,5]((0,0.979167,0.0208333,0,0)) +[1,4]((0.833333,0.166667,0,0)) [1,5]((0,0.833333,0.166667,0,0)) +[1,4]((0.5,0.479167,0.0208333,0)) [1,5]((0,0.5,0.479167,0.0208333,0)) +[1,4]((0.166667,0.666667,0.166667,0)) [1,5]((0,0.166667,0.666667,0.166667,0)) +[1,4]((0.0208333,0.479167,0.479167,0.0208333)) [1,5]((0,0.0208333,0.479167,0.479167,0.0208333)) +[1,4]((-9.26993e-18,0.166667,0.666667,0.166667)) [1,5]((0,-9.26993e-18,0.166667,0.666667,0.166667)) +[1,4]((0,0.0208333,0.479167,0.5)) [1,5]((0,0,0.0208333,0.479167,0.5)) +[1,4]((0,-9.26993e-18,0.166667,0.833333)) [1,5]((0,0,-9.26993e-18,0.166667,0.833333)) +[1,4]((0,0,0.0208333,0.979167)) [1,5]((0,0,0,0.0208333,0.979167)) +[1,4]((0,0,-9.26993e-18,1)) [1,5]((0,0,0,-9.26993e-18,1)) + + +Variation of the derivative w.r.t to parameters: +[1,4]((0,0,0,0)) [1,5]((0,0,0,0,0)) +[1,4]((-0.15625,0.15625,0,0)) [1,5]((0,-0.625,0.625,0,0)) +[1,4]((-0.625,0.625,0,0)) [1,5]((0,-2.5,2.5,0,0)) +[1,4]((-0.9375,0.78125,0.15625,0)) [1,5]((0,-3.75,3.125,0.625,0)) +[1,4]((-0.625,0,0.625,0)) [1,5]((0,-2.5,0,2.5,0)) +[1,4]((-0.15625,-0.78125,0.78125,0.15625)) [1,5]((0,-0.625,-3.125,3.125,0.625)) +[1,4]((0,-0.625,1.11022e-15,0.625)) [1,5]((0,0,-2.5,4.44089e-15,2.5)) +[1,4]((0,-0.15625,-0.78125,0.9375)) [1,5]((0,0,-0.625,-3.125,3.75)) +[1,4]((0,0,-0.625,0.625)) [1,5]((0,0,0,-2.5,2.5)) +[1,4]((0,0,-0.15625,0.15625)) [1,5]((0,0,0,-0.625,0.625)) +[1,4]((0,0,0,4.44089e-16)) [1,5]((0,0,0,0,1.77636e-15)) + +Spline range: [0, 4] +FTT range: [0, 8] +FTT scale: 0.5 +/------------------------------------------------------------------------------\ +| T || Value | Value (ftt) || Derivative | Derivative (ftt) | +-------------------------------------------------------------------------------- +| 0 || 0 | 0 || 0 | 0 | +| 0.1 || 0.520833 | 0.520833 || 3.90625 | 1.95312 | +| 0.2 || 4.16667 | 4.16667 || 15.625 | 7.8125 | +| 0.3 || 13.5417 | 13.5417 || 31.25 | 15.625 | +| 0.4 || 29.1667 | 29.1667 || 46.875 | 23.4375 | +| 0.5 || 50 | 50 || 54.6875 | 27.3438 | +| 0.6 || 70.8333 | 70.8333 || 46.875 | 23.4375 | +| 0.7 || 86.4583 | 86.4583 || 31.25 | 15.625 | +| 0.8 || 95.8333 | 95.8333 || 15.625 | 7.8125 | +| 0.9 || 99.4792 | 99.4792 || 3.90625 | 1.95313 | +| 1 || 100 | 100 || -4.82947e-15 | -2.41474e-15 | +\------------------------------------------------------------------------------/ + +Gradient check. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. + + +Variation of the configuration w.r.t to parameters: +[1,4]((1,0,0,0)) [1,5]((0,1,0,0,0)) +[1,4]((0.979167,0.0208333,0,0)) [1,5]((0,0.979167,0.0208333,0,0)) +[1,4]((0.833333,0.166667,0,0)) [1,5]((0,0.833333,0.166667,0,0)) +[1,4]((0.5,0.479167,0.0208333,0)) [1,5]((0,0.5,0.479167,0.0208333,0)) +[1,4]((0.166667,0.666667,0.166667,0)) [1,5]((0,0.166667,0.666667,0.166667,0)) +[1,4]((0.0208333,0.479167,0.479167,0.0208333)) [1,5]((0,0.0208333,0.479167,0.479167,0.0208333)) +[1,4]((-9.26993e-18,0.166667,0.666667,0.166667)) [1,5]((0,-9.26993e-18,0.166667,0.666667,0.166667)) +[1,4]((0,0.0208333,0.479167,0.5)) [1,5]((0,0,0.0208333,0.479167,0.5)) +[1,4]((0,-9.26993e-18,0.166667,0.833333)) [1,5]((0,0,-9.26993e-18,0.166667,0.833333)) +[1,4]((0,0,0.0208333,0.979167)) [1,5]((0,0,0,0.0208333,0.979167)) +[1,4]((0,0,-9.26993e-18,1)) [1,5]((0,0,0,-9.26993e-18,1)) + + +Variation of the derivative w.r.t to parameters: +[1,4]((0,0,0,0)) [1,5]((0,0,0,0,0)) +[1,4]((-0.15625,0.15625,0,0)) [1,5]((0,-0.625,0.625,0,0)) +[1,4]((-0.625,0.625,0,0)) [1,5]((0,-2.5,2.5,0,0)) +[1,4]((-0.9375,0.78125,0.15625,0)) [1,5]((0,-3.75,3.125,0.625,0)) +[1,4]((-0.625,0,0.625,0)) [1,5]((0,-2.5,0,2.5,0)) +[1,4]((-0.15625,-0.78125,0.78125,0.15625)) [1,5]((0,-0.625,-3.125,3.125,0.625)) +[1,4]((0,-0.625,1.11022e-15,0.625)) [1,5]((0,0,-2.5,4.44089e-15,2.5)) +[1,4]((0,-0.15625,-0.78125,0.9375)) [1,5]((0,0,-0.625,-3.125,3.75)) +[1,4]((0,0,-0.625,0.625)) [1,5]((0,0,0,-2.5,2.5)) +[1,4]((0,0,-0.15625,0.15625)) [1,5]((0,0,0,-0.625,0.625)) +[1,4]((0,0,0,4.44089e-16)) [1,5]((0,0,0,0,1.77636e-15)) + +Spline range: [0, 4] +FTT range: [0, 2] +FTT scale: 2 +/------------------------------------------------------------------------------\ +| T || Value | Value (ftt) || Derivative | Derivative (ftt) | +-------------------------------------------------------------------------------- +| 0 || 0 | 0 || 0 | 0 | +| 0.1 || 0.520833 | 0.520833 || 3.90625 | 7.8125 | +| 0.2 || 4.16667 | 4.16667 || 15.625 | 31.25 | +| 0.3 || 13.5417 | 13.5417 || 31.25 | 62.5 | +| 0.4 || 29.1667 | 29.1667 || 46.875 | 93.75 | +| 0.5 || 50 | 50 || 54.6875 | 109.375 | +| 0.6 || 70.8333 | 70.8333 || 46.875 | 93.75 | +| 0.7 || 86.4583 | 86.4583 || 31.25 | 62.5 | +| 0.8 || 95.8333 | 95.8333 || 15.625 | 31.25 | +| 0.9 || 99.4792 | 99.4792 || 3.90625 | 7.8125 | +| 1 || 100 | 100 || -4.82947e-15 | -9.65894e-15 | +\------------------------------------------------------------------------------/ + +Gradient check. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. +Spline gradient. +Free time trajectory gradient. + + +Variation of the configuration w.r.t to parameters: +[1,4]((1,0,0,0)) [1,5]((0,1,0,0,0)) +[1,4]((0.979167,0.0208333,0,0)) [1,5]((0,0.979167,0.0208333,0,0)) +[1,4]((0.833333,0.166667,0,0)) [1,5]((0,0.833333,0.166667,0,0)) +[1,4]((0.5,0.479167,0.0208333,0)) [1,5]((0,0.5,0.479167,0.0208333,0)) +[1,4]((0.166667,0.666667,0.166667,0)) [1,5]((0,0.166667,0.666667,0.166667,0)) +[1,4]((0.0208333,0.479167,0.479167,0.0208333)) [1,5]((0,0.0208333,0.479167,0.479167,0.0208333)) +[1,4]((-9.26993e-18,0.166667,0.666667,0.166667)) [1,5]((0,-9.26993e-18,0.166667,0.666667,0.166667)) +[1,4]((0,0.0208333,0.479167,0.5)) [1,5]((0,0,0.0208333,0.479167,0.5)) +[1,4]((0,-9.26993e-18,0.166667,0.833333)) [1,5]((0,0,-9.26993e-18,0.166667,0.833333)) +[1,4]((0,0,0.0208333,0.979167)) [1,5]((0,0,0,0.0208333,0.979167)) +[1,4]((0,0,-9.26993e-18,1)) [1,5]((0,0,0,-9.26993e-18,1)) + + +Variation of the derivative w.r.t to parameters: +[1,4]((0,0,0,0)) [1,5]((0,0,0,0,0)) +[1,4]((-0.15625,0.15625,0,0)) [1,5]((0,-0.625,0.625,0,0)) +[1,4]((-0.625,0.625,0,0)) [1,5]((0,-2.5,2.5,0,0)) +[1,4]((-0.9375,0.78125,0.15625,0)) [1,5]((0,-3.75,3.125,0.625,0)) +[1,4]((-0.625,0,0.625,0)) [1,5]((0,-2.5,0,2.5,0)) +[1,4]((-0.15625,-0.78125,0.78125,0.15625)) [1,5]((0,-0.625,-3.125,3.125,0.625)) +[1,4]((0,-0.625,1.11022e-15,0.625)) [1,5]((0,0,-2.5,4.44089e-15,2.5)) +[1,4]((0,-0.15625,-0.78125,0.9375)) [1,5]((0,0,-0.625,-3.125,3.75)) +[1,4]((0,0,-0.625,0.625)) [1,5]((0,0,0,-2.5,2.5)) +[1,4]((0,0,-0.15625,0.15625)) [1,5]((0,0,0,-0.625,0.625)) +[1,4]((0,0,0,4.44089e-16)) [1,5]((0,0,0,0,1.77636e-15)) + commit 43eb72ac766edf3065209d7c7a45dee13e1383e2 Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 10 14:27:58 2009 +0100 Display more information test case. * tests/free-time-trajectory-stable-time-point.cc: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index e75680d..7b1acb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-11-10 Thomas Moulard <tho...@gm...> + Display more information test case. + * tests/free-time-trajectory-stable-time-point.cc: Here. + +2009-11-10 Thomas Moulard <tho...@gm...> + Fix FreeTimeTrajectory variationConfigWrtParam. * include/roboptim/trajectory/free-time-trajectory.hxx: Here. diff --git a/tests/free-time-trajectory-stable-time-point.cc b/tests/free-time-trajectory-stable-time-point.cc index 7810c2b..632f6f0 100644 --- a/tests/free-time-trajectory-stable-time-point.cc +++ b/tests/free-time-trajectory-stable-time-point.cc @@ -133,7 +133,8 @@ void printTable (const Spline& spline, const freeTime_t& freeTimeTraj) double fttTmax = Function::getUpperBound (freeTimeTraj.timeRange ()); std::cout << format ("Spline range: [%1%, %2%]") % tmin % tmax << std::endl - << format ("FTT range: [%1%, %2%]") % fttTmin % fttTmax << std::endl; + << format ("FTT range: [%1%, %2%]") % fttTmin % fttTmax << std::endl + << format ("FTT scale: %1%") % freeTimeTraj.timeScale () << std::endl; format fmter ("| %1% %|6t||| %2% %|20t|| %3% %|35t||| %4% %|55t|| %5% %|79t||"); std::cout << "/---------------------------------------" @@ -245,6 +246,9 @@ void printTable (const Spline& spline, const freeTime_t& freeTimeTraj) } catch (BadGradient& bg) { + std::cout << "Component " + << gradientId + << " of the gradient is wrong:" << std::endl; std::cout << bg << std::endl; } ----------------------------------------------------------------------- Summary of changes: ChangeLog | 12 ++ .../roboptim/trajectory/free-time-trajectory.hxx | 6 +- tests/free-time-trajectory-stable-time-point.cc | 6 +- .../free-time-trajectory-stable-time-point.stdout | 208 ++++++++++++++++++++ 4 files changed, 227 insertions(+), 5 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-10 12:42:31
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via ab8f4aaf6cb25ac0c8b0e18dce024f795f1fb4f9 (commit) from 07dc1ececdd6917125828a478976eb5431feb00d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ab8f4aaf6cb25ac0c8b0e18dce024f795f1fb4f9 Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 10 13:42:15 2009 +0100 Fix FreeTimeTrajectory variationConfigWrtParam. * include/roboptim/trajectory/free-time-trajectory.hxx: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 19b815c..e75680d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-11-10 Thomas Moulard <tho...@gm...> + Fix FreeTimeTrajectory variationConfigWrtParam. + * include/roboptim/trajectory/free-time-trajectory.hxx: Here. + +2009-11-10 Thomas Moulard <tho...@gm...> + Check free time trajectory and stable time points. * include/roboptim/trajectory/free-time-trajectory.hh, * include/roboptim/trajectory/spline.hh: Make derivatives diff --git a/include/roboptim/trajectory/free-time-trajectory.hxx b/include/roboptim/trajectory/free-time-trajectory.hxx index 60e5b8f..fcc4263 100644 --- a/include/roboptim/trajectory/free-time-trajectory.hxx +++ b/include/roboptim/trajectory/free-time-trajectory.hxx @@ -163,7 +163,20 @@ namespace roboptim FreeTimeTrajectory<dorder>::variationConfigWrtParam (StableTimePoint stp) const throw () { - return this->variationDerivWrtParam (stp, 0); + using namespace boost::numeric::ublas; + + jacobian_t result (this->outputSize (), + this->parameters ().size ()); + result.clear (); + + // Compute variation w.r.t time scale (p_0) + // ...is null do not do anything. + + // Fill 1..(n-1) lines with original jacobian. + project (result, range (0, result.size1 ()), range (1, result.size2 ())) + = trajectory_->variationConfigWrtParam (stp); + + return result; } @@ -172,6 +185,9 @@ namespace roboptim FreeTimeTrajectory<dorder>::variationDerivWrtParam (StableTimePoint stp, size_type order) const throw () { + if (order == 0) + return this->variationConfigWrtParam (stp); + using namespace boost::numeric::ublas; jacobian_t result (this->outputSize (), ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ .../roboptim/trajectory/free-time-trajectory.hxx | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-10 11:35:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 07dc1ececdd6917125828a478976eb5431feb00d (commit) from 772651f0f5b8aa0c6bc13d0f66982407929f9f3e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 07dc1ececdd6917125828a478976eb5431feb00d Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 10 12:35:11 2009 +0100 Check free time trajectory and stable time points. * include/roboptim/trajectory/free-time-trajectory.hh, * include/roboptim/trajectory/spline.hh: Make derivatives computation public. * tests/Makefile.am: Compile test case. * tests/free-time-trajectory-stable-time-point.cc: New. * tests/free-time-trajectory-stable-time-point.stdout: New. * tests/testsuite.at: Run test case. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index a2f65ce..19b815c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2009-11-10 Thomas Moulard <tho...@gm...> + + Check free time trajectory and stable time points. + * include/roboptim/trajectory/free-time-trajectory.hh, + * include/roboptim/trajectory/spline.hh: Make derivatives + computation public. + * tests/Makefile.am: Compile test case. + * tests/free-time-trajectory-stable-time-point.cc: New. + * tests/free-time-trajectory-stable-time-point.stdout: New. + * tests/testsuite.at: Run test case. + 2009-11-09 Thomas Moulard <tho...@gm...> Fix free time trajectory and stable time point implementatation. diff --git a/include/roboptim/trajectory/free-time-trajectory.hh b/include/roboptim/trajectory/free-time-trajectory.hh index a4b22ce..756aae5 100644 --- a/include/roboptim/trajectory/free-time-trajectory.hh +++ b/include/roboptim/trajectory/free-time-trajectory.hh @@ -152,16 +152,16 @@ namespace roboptim double scaleTime (double t) const throw (); double unscaleTime (double t) const throw (); + jacobian_t variationConfigWrtParam (StableTimePoint tp) const throw (); + jacobian_t variationDerivWrtParam (StableTimePoint tp, size_type order) + const throw (); + protected: void impl_compute (result_t&, double) const throw (); void impl_derivative (gradient_t& g, double x, size_type order) const throw (); void impl_derivative (gradient_t& g, StableTimePoint, size_type order) const throw (); - jacobian_t variationConfigWrtParam (StableTimePoint tp) const throw (); - jacobian_t variationDerivWrtParam (StableTimePoint tp, size_type order) - const throw (); - private: /// \brief Input fixed time trajectory. Trajectory<DerivabilityOrder>* trajectory_; diff --git a/include/roboptim/trajectory/spline.hh b/include/roboptim/trajectory/spline.hh index 5f40ce9..58e1b73 100644 --- a/include/roboptim/trajectory/spline.hh +++ b/include/roboptim/trajectory/spline.hh @@ -89,15 +89,16 @@ namespace roboptim /// \return output stream virtual std::ostream& print (std::ostream& o) const throw (); + jacobian_t variationConfigWrtParam (StableTimePoint tp) const throw (); + jacobian_t variationDerivWrtParam (StableTimePoint tp, size_type order) + const throw (); + protected: void impl_compute (result_t&, double) const throw (); void impl_derivative (gradient_t& g, double x, size_type order) const throw (); void impl_derivative (gradient_t& g, StableTimePoint, size_type order) const throw (); - jacobian_t variationConfigWrtParam (StableTimePoint tp) const throw (); - jacobian_t variationDerivWrtParam (StableTimePoint tp, size_type order) - const throw (); private: /// \brief Convert parameters to internal representation. diff --git a/tests/Makefile.am b/tests/Makefile.am index 9d70f2a..77eafa0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -36,6 +36,14 @@ check_PROGRAMS += free-time-trajectory free_time_trajectory_SOURCES = free-time-trajectory.cc $(COMMON_SOURCES) free_time_trajectory_LDADD = $(top_builddir)/src/libroboptim-trajectory.la +# free-time-trajectory-stable-time-point +check_PROGRAMS += free-time-trajectory-stable-time-point +free_time_trajectory_stable_time_point_SOURCES = \ + free-time-trajectory-stable-time-point.cc \ + $(COMMON_SOURCES) +free_time_trajectory_stable_time_point_LDADD = \ + $(top_builddir)/src/libroboptim-trajectory.la + # state-function check_PROGRAMS += state-function @@ -162,6 +170,7 @@ EXTRA_DIST += \ anthropomorphic-cost-function-case-6.stdout \ fixed-point-state-function.stdout \ free-time-trajectory.stdout \ + free-time-trajectory-stable-time-point.stdout \ simple.stdout \ spline-gradient.stdout \ spline-optimization.stdout \ diff --git a/tests/free-time-trajectory-stable-time-point.cc b/tests/free-time-trajectory-stable-time-point.cc new file mode 100644 index 0000000..7810c2b --- /dev/null +++ b/tests/free-time-trajectory-stable-time-point.cc @@ -0,0 +1,296 @@ +// Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#include <roboptim/trajectory/sys.hh> + +#include <boost/format.hpp> +#include <boost/scoped_ptr.hpp> + +#include <roboptim/core/finite-difference-gradient.hh> +#include <roboptim/core/io.hh> +#include <roboptim/core/util.hh> + +#include <roboptim/trajectory/free-time-trajectory.hh> +#include <roboptim/trajectory/fwd.hh> +#include <roboptim/trajectory/spline.hh> +#include <roboptim/trajectory/trajectory-cost.hh> + +#include "common.hh" + +using boost::format; +using boost::io::group; + +using namespace roboptim; + + +typedef FreeTimeTrajectory<Spline::derivabilityOrder> freeTime_t; + +template <typename T> +bool isAlmostEqual (const T& x, const T& y, const T& epsilon = 1e10-8) +{ + return (x - y) * (x - y) < epsilon; +} + +struct ConfigWrtParam : public DerivableFunction +{ + ConfigWrtParam (const freeTime_t& traj, StableTimePoint stp) throw () + : DerivableFunction (traj.parameters ().size (), + traj.outputSize (), + "config wrt param"), + traj_ (traj), + stp_ (stp) + { + } + + ~ConfigWrtParam () throw () + { + } + + void + impl_compute (result_t& res, const argument_t& p) const throw () + { + boost::scoped_ptr<freeTime_t> updatedTrajectory (traj_.clone ()); + updatedTrajectory->setParameters (p); + res = (*updatedTrajectory) (stp_); + } + + void + impl_gradient (gradient_t& grad, const argument_t& p, size_type i) + const throw () + { + boost::scoped_ptr<freeTime_t> updatedTrajectory (traj_.clone ()); + updatedTrajectory->setParameters (p); + matrix_t tmp = updatedTrajectory->variationDerivWrtParam (stp_, 0); + grad = row (tmp, 0); + } + + const freeTime_t& traj_; + StableTimePoint stp_; +}; + +struct DerivWrtParam : public DerivableFunction +{ + DerivWrtParam (const freeTime_t& traj) throw () + : DerivableFunction (traj.inputSize (), + traj.parameters ().size (), + "config wrt param"), + traj_ (traj.clone ()) + {} + + ~DerivWrtParam () throw () + {} + + void + impl_compute (result_t& res, const argument_t& stp) const throw () + { + // Make sure one never evaluates under zero. + // This case happens because of the finite difference gradient + // checking! + value_type alpha = stp[0]; + if (alpha <= 0.) + alpha = 0.; + if (alpha >= 1.) + alpha = 1.; + + + matrix_t tmp = traj_->variationDerivWrtParam (alpha * tMax, 0); + res = row (tmp, 0); + } + + void + impl_gradient (gradient_t& grad, const argument_t& stp, size_type i) + const throw () + { + matrix_t tmp = traj_->variationDerivWrtParam (stp[0] * tMax, 1); + grad[0] = row (tmp, 0)[i]; + } + + const boost::scoped_ptr<const freeTime_t> traj_; +}; + + +void printTable (const Spline& spline, const freeTime_t& freeTimeTraj); + +void printTable (const Spline& spline, const freeTime_t& freeTimeTraj) +{ + double tmin = Function::getLowerBound (spline.timeRange ()); + double tmax = Function::getUpperBound (spline.timeRange ()); + double fttTmin = Function::getLowerBound (freeTimeTraj.timeRange ()); + double fttTmax = Function::getUpperBound (freeTimeTraj.timeRange ()); + + std::cout << format ("Spline range: [%1%, %2%]") % tmin % tmax << std::endl + << format ("FTT range: [%1%, %2%]") % fttTmin % fttTmax << std::endl; + + format fmter ("| %1% %|6t||| %2% %|20t|| %3% %|35t||| %4% %|55t|| %5% %|79t||"); + std::cout << "/---------------------------------------" + << "---------------------------------------\\" << std::endl + << fmter + % "T" % "Value" % "Value (ftt)" + % "Derivative" % "Derivative (ftt)" + << std::endl + << "----------------------------------------" + << "----------------------------------------" + << std::endl; + + for (double alpha = 0.; alpha <= 1.; alpha += .1) + { + if (alpha >= 1.) + alpha = 1.; + + fmter % alpha; + fmter % spline (alpha * tMax)[0]; + fmter % freeTimeTraj (alpha * tMax)[0]; + fmter % spline.derivative (alpha * tMax, 1)[0]; + fmter % freeTimeTraj.derivative (alpha * tMax, 1)[0]; + std:: cout << fmter << std::endl; + } + std::cout << "\\---------------------------------------" + << "---------------------------------------/" + << std::endl << std::endl; + + + std::cout << "Gradient check." << std::endl; + for (double alpha = 0.; alpha <= 1.; alpha += .1) + { + if (alpha >= 1.) + alpha = 1.; + + Spline::vector_t x (1); + x[0] = alpha; + + try + { + std::cout << "Spline gradient." << std::endl; + checkGradientAndThrow (spline, 0, x); + std::cout << "Free time trajectory gradient." << std::endl; + checkGradientAndThrow (freeTimeTraj, 0, x); + } + catch (BadGradient& bg) + { + std::cout << bg << std::endl; + } + } + std::cout << std::endl << std::endl; + + + std::cout << "Variation of the configuration w.r.t to parameters:" << std::endl; + format fmterConfig ("%1% %|50t|%2%"); + for (double alpha = 0.; alpha <= 1.; alpha += .1) + { + if (alpha >= 1.) + alpha = 1.; + + Spline::jacobian_t splineVarConfig = + spline.variationConfigWrtParam (alpha * tMax); + fmterConfig % splineVarConfig; + + freeTime_t::jacobian_t fttVarConfig = + freeTimeTraj.variationConfigWrtParam (alpha * tMax); + fmterConfig % fttVarConfig; + + try + { + ConfigWrtParam configWrtParam (freeTimeTraj, alpha * tMax); + checkGradientAndThrow (configWrtParam, 0, + freeTimeTraj.parameters ()); + } + catch (BadGradient& bg) + { + std::cout << bg << std::endl; + } + + std::cout << fmterConfig << std::endl; + } + std::cout << std::endl << std::endl; + + std::cout << "Variation of the derivative w.r.t to parameters:" << std::endl; + format fmterDeriv ("%1% %|50t|%2%"); + for (double alpha = 0.; alpha <= 1.; alpha += .1) + { + if (alpha >= 1.) + alpha = 1.; + if (alpha <= 0.) + alpha = 0.; + + Spline::jacobian_t splineVarDeriv = + spline.variationDerivWrtParam (alpha * tMax, 1); + fmterDeriv % splineVarDeriv; + + freeTime_t::jacobian_t fttVarDeriv = + freeTimeTraj.variationDerivWrtParam (alpha * tMax, 1); + fmterDeriv % fttVarDeriv; + + for (unsigned gradientId = 0; + gradientId < freeTimeTraj.parameters ().size (); ++gradientId) + try + { + Spline::vector_t t_ (1); + t_[0] = alpha; + DerivWrtParam derivWrtParam (freeTimeTraj); + checkGradientAndThrow (derivWrtParam, gradientId, t_); + } + catch (BadGradient& bg) + { + std::cout << bg << std::endl; + } + + std::cout << fmterDeriv << std::endl; + } + + std::cout << std::endl; +} + +int run_test () +{ + typedef Spline::value_type value_type; + Spline::vector_t params (5); + + // Scale. + params[0] = 1.; + // Initial position. + params[1] = 0.; + // Control point 1. + params[2] = 25.; + // Control point 2. + params[3] = 75.; + // Final position. + params[4] = 100.; + + // Make trajectories. + Spline::interval_t timeRange = Spline::makeInterval (0., 4.); + Spline spline (timeRange, 1, removeScaleFromParameters (params), "before"); + FreeTimeTrajectory<Spline::derivabilityOrder> freeTimeTraj (spline, 1.); + + assert (freeTimeTraj.inputSize () == 1); + assert (freeTimeTraj.outputSize () == 1); + + params[0] = 1.; + freeTimeTraj.setParameters (params); + printTable (spline, freeTimeTraj); + + params[0] = .5; + freeTimeTraj.setParameters (params); + printTable (spline, freeTimeTraj); + + params[0] = 2.; + freeTimeTraj.setParameters (params); + printTable (spline, freeTimeTraj); + + return 0; +} + +GENERATE_TEST () diff --git a/tests/free-time-trajectory-stable-time-point.stdout b/tests/free-time-trajectory-stable-time-point.stdout new file mode 100644 index 0000000..7463d7a --- /dev/null +++ b/tests/free-time-trajectory-stable-time-point.stdout @@ -0,0 +1,5 @@ +Spline range: [0, 4] +FTT range: [0, 4] +/------------------------------------------------------------------------------\ +| T || Value | Value (ftt) || Derivative | Derivative (ftt) | +-------------------------------------------------------------------------------- diff --git a/tests/testsuite.at b/tests/testsuite.at index 073654f..4c9c9fe 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -32,6 +32,8 @@ CHECK_STDOUT([simple], [Check basic features.]) CHECK_STDOUT([spline], [Check Spline class.]) CHECK_STDOUT([spline-gradient], [Check Spline gradient.]) CHECK_STDOUT([free-time-trajectory], [Check free time trajectory.]) +CHECK_STDOUT([free-time-trajectory-stable-time-point], + [Check free time trajectory (using stable time points).]) CHECK_STDOUT([state-function], [Check state function.]) CHECK_STDOUT([fixed-point-state-function], [Check fixed point state function.]) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 11 ++ .../roboptim/trajectory/free-time-trajectory.hh | 8 +- include/roboptim/trajectory/spline.hh | 7 +- tests/Makefile.am | 9 + ...c => free-time-trajectory-stable-time-point.cc} | 180 ++++++-------------- .../free-time-trajectory-stable-time-point.stdout | 5 + tests/testsuite.at | 2 + 7 files changed, 87 insertions(+), 135 deletions(-) copy tests/{free-time-trajectory.cc => free-time-trajectory-stable-time-point.cc} (59%) create mode 100644 tests/free-time-trajectory-stable-time-point.stdout hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-09 20:40:53
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "shared-tests". The branch, master has been updated via 75d8641a91cb6b43a13897eacb29276a2300be5a (commit) from 2a2608e6bfcbd3103f8eb005d0c674606e7e20ea (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 75d8641a91cb6b43a13897eacb29276a2300be5a Author: Thomas Moulard <tho...@gm...> Date: Mon Nov 9 21:38:31 2009 +0100 Include ``debug.hh'' to get libcwd initialized properly. * common.hh: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 5adc144..d2d0d2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-09 Thomas Moulard <tho...@gm...> + + Include ``debug.hh'' to get libcwd initialized properly. + * common.hh: Here. + 2009-11-02 Thomas Moulard <tho...@gm...> Add Windows specific interactive mode for test cases. diff --git a/common.hh b/common.hh index 4d7b068..188c7f9 100644 --- a/common.hh +++ b/common.hh @@ -19,6 +19,7 @@ #ifndef OPTIMIZATION_TESTS_COMMON_HH # define OPTIMIZATION_TESTS_COMMON_HH # include <roboptim/core/sys.hh> +# include <roboptim/core/debug.hh> # include <fstream> # include <iostream> ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ common.hh | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) hooks/post-receive -- shared-tests |
From: Thomas M. <tho...@us...> - 2009-11-09 17:21:44
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 772651f0f5b8aa0c6bc13d0f66982407929f9f3e (commit) from 4f7ec26ee057cde9229773258a6e66d87ceba050 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 772651f0f5b8aa0c6bc13d0f66982407929f9f3e Author: Thomas Moulard <tho...@gm...> Date: Mon Nov 9 18:21:22 2009 +0100 Fix free time trajectory and stable time point implementatation. * include/roboptim/trajectory/fixed-point-state-function.hxx, * include/roboptim/trajectory/free-time-trajectory.hh, * include/roboptim/trajectory/free-time-trajectory.hxx, * include/roboptim/trajectory/spline.hh, * include/roboptim/trajectory/state-function.hxx, * include/roboptim/trajectory/trajectory.hh, * include/roboptim/trajectory/trajectory.hxx, * src/spline.cc: Split totally double/StableTimePoint gradient computations (and associated methods). Fix FreeTimeTrajectory::variationDerivWrtParam computation. * tests/free-time-trajectory.cc: Check all components of variationDerivWrtParam. Test now succeed. * tests/free-time-trajectory.stdout: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index d901c57..a2f65ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2009-11-09 Thomas Moulard <tho...@gm...> + + Fix free time trajectory and stable time point implementatation. + * include/roboptim/trajectory/fixed-point-state-function.hxx, + * include/roboptim/trajectory/free-time-trajectory.hh, + * include/roboptim/trajectory/free-time-trajectory.hxx, + * include/roboptim/trajectory/spline.hh, + * include/roboptim/trajectory/state-function.hxx, + * include/roboptim/trajectory/trajectory.hh, + * include/roboptim/trajectory/trajectory.hxx, + * src/spline.cc: Split totally double/StableTimePoint gradient + computations (and associated methods). + Fix FreeTimeTrajectory::variationDerivWrtParam computation. + * tests/free-time-trajectory.cc: Check all components of + variationDerivWrtParam. Test now succeed. + * tests/free-time-trajectory.stdout: Regenerate. + 2009-11-06 Thomas Moulard <tho...@gm...> Check interval unscaling. diff --git a/include/roboptim/trajectory/fixed-point-state-function.hxx b/include/roboptim/trajectory/fixed-point-state-function.hxx index a2f5745..c0ada6a 100644 --- a/include/roboptim/trajectory/fixed-point-state-function.hxx +++ b/include/roboptim/trajectory/fixed-point-state-function.hxx @@ -62,9 +62,7 @@ namespace roboptim (trajectory_.makeFixedTimeTrajectory ()); updatedTrajectory->setParameters (removeScaleFromParameters (p)); - (*function_) (res, updatedTrajectory->state - (tpt_.getTime (updatedTrajectory->timeRange ()), - this->order_)); + (*function_) (res, updatedTrajectory->state (tpt_, this->order_)); } template <typename T> @@ -80,14 +78,12 @@ namespace roboptim (trajectory_.makeFixedTimeTrajectory ()); updatedTrajectory->setParameters (removeScaleFromParameters (p)); - const value_type t = tpt_.getTime (updatedTrajectory->timeRange ()); - grad[0] = 0.; subrange (grad, 1, grad.size ()) = prod (function_->gradient - (updatedTrajectory->state (t, this->order_), i), - updatedTrajectory->variationStateWrtParam (t, this->order_)); + (updatedTrajectory->state (tpt_, this->order_), i), + updatedTrajectory->variationStateWrtParam (tpt_, this->order_)); } } // end of namespace roboptim. diff --git a/include/roboptim/trajectory/free-time-trajectory.hh b/include/roboptim/trajectory/free-time-trajectory.hh index 8aaf688..a4b22ce 100644 --- a/include/roboptim/trajectory/free-time-trajectory.hh +++ b/include/roboptim/trajectory/free-time-trajectory.hh @@ -156,6 +156,11 @@ namespace roboptim void impl_compute (result_t&, double) const throw (); void impl_derivative (gradient_t& g, double x, size_type order) const throw (); + void impl_derivative (gradient_t& g, StableTimePoint, size_type order) + const throw (); + jacobian_t variationConfigWrtParam (StableTimePoint tp) const throw (); + jacobian_t variationDerivWrtParam (StableTimePoint tp, size_type order) + const throw (); private: /// \brief Input fixed time trajectory. diff --git a/include/roboptim/trajectory/free-time-trajectory.hxx b/include/roboptim/trajectory/free-time-trajectory.hxx index 727f24f..60e5b8f 100644 --- a/include/roboptim/trajectory/free-time-trajectory.hxx +++ b/include/roboptim/trajectory/free-time-trajectory.hxx @@ -94,6 +94,17 @@ namespace roboptim } template <unsigned dorder> + void + FreeTimeTrajectory<dorder>::impl_derivative (gradient_t& derivative, + StableTimePoint stp, + size_type order) const throw () + { + assert (order >= 0); + trajectory_->derivative (derivative, stp, order); + derivative *= std::pow (this->timeScale (), 0. + order); + } + + template <unsigned dorder> typename FreeTimeTrajectory<dorder>::jacobian_t FreeTimeTrajectory<dorder>::variationConfigWrtParam (double t) const throw () { @@ -126,21 +137,55 @@ namespace roboptim using namespace boost::numeric::ublas; value_type scaled = this->scaleTime (t); + value_type tmin = getLowerBound (this->trajectory_->timeRange ()); - double tMin = this->getLowerBound (this->trajectory_->timeRange ()); + jacobian_t result (this->outputSize (), + this->parameters ().size ()); + result.clear (); + + // Compute variation w.r.t time scale (p_0) + column (result, 0) = trajectory_->derivative (scaled, order) * order; + column (result, 0) + += trajectory_->derivative (scaled, order + 1) + * (this->timeScale () * (t - tmin)); + column (result, 0) *= std::pow (this->timeScale (), order - 1.); + + // Fill 1..(n-1) lines with original jacobian. + project (result, range (0, result.size1 ()), range (1, result.size2 ())) + = trajectory_->variationDerivWrtParam(scaled, order) + * std::pow (this->timeScale (), 0. + order); + + return result; + } + + template <unsigned dorder> + typename FreeTimeTrajectory<dorder>::jacobian_t + FreeTimeTrajectory<dorder>::variationConfigWrtParam + (StableTimePoint stp) const throw () + { + return this->variationDerivWrtParam (stp, 0); + } + + + template <unsigned dorder> + typename FreeTimeTrajectory<dorder>::jacobian_t + FreeTimeTrajectory<dorder>::variationDerivWrtParam + (StableTimePoint stp, size_type order) const throw () + { + using namespace boost::numeric::ublas; jacobian_t result (this->outputSize (), this->parameters ().size ()); result.clear (); // Compute variation w.r.t time scale (p_0) - column (result, 0) = trajectory_->derivative (scaled, order) - * std::pow (this->timeScale (), order - 1.); - column (result, 0) *= order + (this->timeScale () * (t - tMin)); + column (result, 0) = + std::pow (this->timeScale (), 0. + order) + * trajectory_->derivative (stp, order); // Fill 1..(n-1) lines with original jacobian. project (result, range (0, result.size1 ()), range (1, result.size2 ())) - = trajectory_->variationDerivWrtParam (scaled, order) + = trajectory_->variationDerivWrtParam (stp, order) * std::pow (this->timeScale (), 0. + order); return result; diff --git a/include/roboptim/trajectory/spline.hh b/include/roboptim/trajectory/spline.hh index 9a41255..5f40ce9 100644 --- a/include/roboptim/trajectory/spline.hh +++ b/include/roboptim/trajectory/spline.hh @@ -93,6 +93,11 @@ namespace roboptim void impl_compute (result_t&, double) const throw (); void impl_derivative (gradient_t& g, double x, size_type order) const throw (); + void impl_derivative (gradient_t& g, StableTimePoint, size_type order) + const throw (); + jacobian_t variationConfigWrtParam (StableTimePoint tp) const throw (); + jacobian_t variationDerivWrtParam (StableTimePoint tp, size_type order) + const throw (); private: /// \brief Convert parameters to internal representation. diff --git a/include/roboptim/trajectory/state-function.hxx b/include/roboptim/trajectory/state-function.hxx index e4013d2..732e45c 100644 --- a/include/roboptim/trajectory/state-function.hxx +++ b/include/roboptim/trajectory/state-function.hxx @@ -58,9 +58,7 @@ namespace roboptim static boost::shared_ptr<trajectory_t> updatedTrajectory = boost::shared_ptr<trajectory_t> (trajectory_.clone ()); updatedTrajectory->setParameters (p); - (*function_) (res, updatedTrajectory->state - (tpt_.getTime (updatedTrajectory->timeRange ()), - this->order_)); + (*function_) (res, updatedTrajectory->state (tpt_, this->order_)); } template <unsigned N> @@ -73,10 +71,9 @@ namespace roboptim static boost::shared_ptr<trajectory_t> updatedTrajectory = boost::shared_ptr<trajectory_t> (trajectory_.clone ()); updatedTrajectory->setParameters (p); - const value_type t = tpt_.getTime (updatedTrajectory->timeRange ()); grad = prod (function_->gradient - (updatedTrajectory->state (t, this->order_), i), - updatedTrajectory->variationStateWrtParam (t, this->order_)); + (updatedTrajectory->state (tpt_, this->order_), i), + updatedTrajectory->variationStateWrtParam (tpt_, this->order_)); } } // end of namespace roboptim. diff --git a/include/roboptim/trajectory/trajectory.hh b/include/roboptim/trajectory/trajectory.hh index e7d934a..b9fe5f5 100644 --- a/include/roboptim/trajectory/trajectory.hh +++ b/include/roboptim/trajectory/trajectory.hh @@ -120,6 +120,7 @@ namespace roboptim \f]*/ /// The configuration and derivatives are concatenated in one vector. virtual vector_t state (double t, size_type order) const throw (); + virtual vector_t state (StableTimePoint t, size_type order) const throw (); /// \} @@ -160,6 +161,8 @@ namespace roboptim \f]**/ jacobian_t variationStateWrtParam (double t, size_type order) const throw (); + jacobian_t variationStateWrtParam + (StableTimePoint stp, size_type order) const throw (); /// \} @@ -227,9 +230,12 @@ namespace roboptim assert (this->isValidDerivative (derivative)); } - virtual jacobian_t variationConfigWrtParam (StableTimePoint tp) const throw (); - virtual jacobian_t variationDerivWrtParam (StableTimePoint tp, size_type order) - const throw (); + virtual jacobian_t + variationConfigWrtParam (StableTimePoint tp) + const throw () = 0; + virtual jacobian_t + variationDerivWrtParam (StableTimePoint tp, size_type order) + const throw () = 0; bool isValidTime (value_type t) const throw (); @@ -248,8 +254,9 @@ namespace roboptim virtual std::ostream& print (std::ostream&) const throw (); protected: void impl_compute (result_t&, StableTimePoint) const throw (); - void impl_derivative (gradient_t& g, StableTimePoint, size_type order) - const throw (); + virtual void + impl_derivative (gradient_t& g, StableTimePoint, size_type order) + const throw () = 0; Trajectory (interval_t, size_type, const vector_t&, std::string name = std::string ()) throw (); diff --git a/include/roboptim/trajectory/trajectory.hxx b/include/roboptim/trajectory/trajectory.hxx index d9919b2..15eebca 100644 --- a/include/roboptim/trajectory/trajectory.hxx +++ b/include/roboptim/trajectory/trajectory.hxx @@ -89,6 +89,21 @@ namespace roboptim return result; } + template <unsigned dorder> + typename Trajectory<dorder>::vector_t + Trajectory<dorder>::state + (StableTimePoint stp, size_type order) const throw () + { + using namespace boost::numeric::ublas; + const value_type dimension = this->outputSize (); + vector_t result ((order + 1) * dimension); + + for (size_type o = 0; o <= order; ++o) + subrange (result, o * dimension, (o + 1) * dimension) = + this->derivative (stp, o); + return result; + } + template <unsigned dorder> typename Trajectory<dorder>::jacobian_t @@ -109,6 +124,27 @@ namespace roboptim return result; } + template <unsigned dorder> + typename Trajectory<dorder>::jacobian_t + Trajectory<dorder>::variationStateWrtParam + (StableTimePoint stp, size_type order) + const throw () + { + using namespace boost::numeric::ublas; + const size_type dimension = this->outputSize (); + const size_type parameterSize = parameters ().size (); + jacobian_t result (dimension * (order + 1), parameterSize); + + for (size_type o = 0; o <= order; ++o) + { + range xrange (o * dimension, (o + 1) * dimension); + range yrange (0, parameterSize); + project (result, xrange, yrange) = + this->variationDerivWrtParam (stp, o); + } + return result; + } + template <unsigned dorder> typename Trajectory<dorder>::size_type @@ -127,36 +163,6 @@ namespace roboptim } template <unsigned dorder> - void - Trajectory<dorder>::impl_derivative (gradient_t& derivative, - StableTimePoint stp, - size_type order) const throw () - { - return this->impl_derivative (derivative, - stp.getTime (this->timeRange ()), - order); - } - - template <unsigned dorder> - typename Trajectory<dorder>::jacobian_t - Trajectory<dorder>::variationConfigWrtParam (StableTimePoint stp) - const throw () - { - return this->variationConfigWrtParam (stp.getTime (this->timeRange ())); - } - - - template <unsigned dorder> - typename Trajectory<dorder>::jacobian_t - Trajectory<dorder>::variationDerivWrtParam (StableTimePoint stp, - size_type order) - const throw () - { - return this->variationDerivWrtParam - (stp.getTime (this->timeRange ()), order); - } - - template <unsigned dorder> bool Trajectory<dorder>::isValidTime (value_type t) const throw () { diff --git a/src/spline.cc b/src/spline.cc index 7f40320..489739f 100644 --- a/src/spline.cc +++ b/src/spline.cc @@ -1,4 +1,3 @@ - // Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA. // // This file is part of the roboptim. @@ -124,6 +123,16 @@ namespace roboptim } } + void + Spline::impl_derivative (gradient_t& derivative, + StableTimePoint stp, + size_type order) const throw () + { + this->impl_derivative (derivative, + stp.getTime (this->timeRange ()), + order); + } + Spline::jacobian_t Spline::variationConfigWrtParam (double t) const throw () { @@ -178,6 +187,23 @@ namespace roboptim return jac; } + Spline::jacobian_t + Spline::variationConfigWrtParam (StableTimePoint stp) + const throw () + { + return this->variationConfigWrtParam (stp.getTime (this->timeRange ())); + } + + + Spline::jacobian_t + Spline::variationDerivWrtParam (StableTimePoint stp, size_type order) + const throw () + { + return this->variationDerivWrtParam + (stp.getTime (this->timeRange ()), order); + } + + Spline::value_type Spline::singularPointAtRank (size_type rank) const { diff --git a/tests/free-time-trajectory.cc b/tests/free-time-trajectory.cc index b76c4f7..500f6af 100644 --- a/tests/free-time-trajectory.cc +++ b/tests/free-time-trajectory.cc @@ -240,17 +240,19 @@ void printTable (const Spline& spline, const freeTime_t& freeTimeTraj) freeTimeTraj.variationDerivWrtParam (t, 1); fmterDeriv % fttVarDeriv; - try - { - Spline::vector_t t_ (1); - t_[0] = t; - DerivWrtParam derivWrtParam (freeTimeTraj); - checkGradientAndThrow (derivWrtParam, 0, t_); - } - catch (BadGradient& bg) - { - std::cout << bg << std::endl; - } + for (unsigned gradientId = 0; + gradientId < freeTimeTraj.parameters ().size (); ++gradientId) + try + { + Spline::vector_t t_ (1); + t_[0] = t; + DerivWrtParam derivWrtParam (freeTimeTraj); + checkGradientAndThrow (derivWrtParam, gradientId, t_); + } + catch (BadGradient& bg) + { + std::cout << bg << std::endl; + } std::cout << fmterDeriv << std::endl; } diff --git a/tests/free-time-trajectory.stdout b/tests/free-time-trajectory.stdout index 9342ff0..e0ce508 100644 --- a/tests/free-time-trajectory.stdout +++ b/tests/free-time-trajectory.stdout @@ -187,312 +187,46 @@ Variation of the configuration w.r.t to parameters: Variation of the derivative w.r.t to parameters: [1,4]((0,0,0,0)) [1,5]((0,0,0,0,0)) -bad gradient - X: [1](0.1) - Analytical gradient: [1](0.268555) - Finite difference gradient: [1](0.732422) - Max. delta: 0.463867 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.00976562,0.00976562,0,0)) [1,5]((0.268555,-0.00976562,0.00976562,0,0)) -bad gradient - X: [1](0.2) - Analytical gradient: [1](1.17188) - Finite difference gradient: [1](2.92969) - Max. delta: 1.75781 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.0390625,0.0390625,0,0)) [1,5]((1.17188,-0.0390625,0.0390625,0,0)) -bad gradient - X: [1](0.3) - Analytical gradient: [1](2.85645) - Finite difference gradient: [1](6.5918) - Max. delta: 3.73535 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.0878906,0.0878906,0,0)) [1,5]((2.85645,-0.0878906,0.0878906,0,0)) -bad gradient - X: [1](0.4) - Analytical gradient: [1](5.46875) - Finite difference gradient: [1](11.7187) - Max. delta: 6.25 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.15625,0.15625,0,0)) [1,5]((5.46875,-0.15625,0.15625,0,0)) -bad gradient - X: [1](0.5) - Analytical gradient: [1](9.15527) - Finite difference gradient: [1](18.3105) - Max. delta: 9.15527 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.244141,0.244141,0,0)) [1,5]((9.15527,-0.244141,0.244141,0,0)) -bad gradient - X: [1](0.6) - Analytical gradient: [1](14.0625) - Finite difference gradient: [1](26.3672) - Max. delta: 12.3047 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.351562,0.351562,0,0)) [1,5]((14.0625,-0.351562,0.351562,0,0)) -bad gradient - X: [1](0.7) - Analytical gradient: [1](20.3369) - Finite difference gradient: [1](35.8887) - Max. delta: 15.5518 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.478516,0.478516,0,0)) [1,5]((20.3369,-0.478516,0.478516,0,0)) -bad gradient - X: [1](0.8) - Analytical gradient: [1](28.125) - Finite difference gradient: [1](46.875) - Max. delta: 18.75 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.625,0.625,0,0)) [1,5]((28.125,-0.625,0.625,0,0)) -bad gradient - X: [1](0.9) - Analytical gradient: [1](37.1094) - Finite difference gradient: [1](54.6875) - Max. delta: 17.5781 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.761719,0.751953,0.00976562,0)) [1,5]((37.1094,-0.761719,0.751953,0.00976562,0)) -bad gradient - X: [1](1) - Analytical gradient: [1](46.875) - Finite difference gradient: [1](62.5) - Max. delta: 15.625 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.859375,0.820312,0.0390625,0)) [1,5]((46.875,-0.859375,0.820312,0.0390625,0)) -bad gradient - X: [1](1.1) - Analytical gradient: [1](57.4219) - Finite difference gradient: [1](70.3125) - Max. delta: 12.8906 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.917969,0.830078,0.0878906,0)) [1,5]((57.4219,-0.917969,0.830078,0.0878906,0)) -bad gradient - X: [1](1.2) - Analytical gradient: [1](68.75) - Finite difference gradient: [1](78.125) - Max. delta: 9.375 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.9375,0.78125,0.15625,0)) [1,5]((68.75,-0.9375,0.78125,0.15625,0)) -bad gradient - X: [1](1.3) - Analytical gradient: [1](80.8594) - Finite difference gradient: [1](85.9375) - Max. delta: 5.07812 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.917969,0.673828,0.244141,0)) [1,5]((80.8594,-0.917969,0.673828,0.244141,0)) +[1,4]((-0.00976562,0.00976562,0,0)) [1,5]((0.732422,-0.00976562,0.00976562,0,0)) +[1,4]((-0.0390625,0.0390625,0,0)) [1,5]((2.92969,-0.0390625,0.0390625,0,0)) +[1,4]((-0.0878906,0.0878906,0,0)) [1,5]((6.5918,-0.0878906,0.0878906,0,0)) +[1,4]((-0.15625,0.15625,0,0)) [1,5]((11.7188,-0.15625,0.15625,0,0)) +[1,4]((-0.244141,0.244141,0,0)) [1,5]((18.3105,-0.244141,0.244141,0,0)) +[1,4]((-0.351562,0.351562,0,0)) [1,5]((26.3672,-0.351562,0.351562,0,0)) +[1,4]((-0.478516,0.478516,0,0)) [1,5]((35.8887,-0.478516,0.478516,0,0)) +[1,4]((-0.625,0.625,0,0)) [1,5]((46.875,-0.625,0.625,0,0)) +[1,4]((-0.761719,0.751953,0.00976562,0)) [1,5]((54.6875,-0.761719,0.751953,0.00976562,0)) +[1,4]((-0.859375,0.820312,0.0390625,0)) [1,5]((62.5,-0.859375,0.820312,0.0390625,0)) +[1,4]((-0.917969,0.830078,0.0878906,0)) [1,5]((70.3125,-0.917969,0.830078,0.0878906,0)) +[1,4]((-0.9375,0.78125,0.15625,0)) [1,5]((78.125,-0.9375,0.78125,0.15625,0)) +[1,4]((-0.917969,0.673828,0.244141,0)) [1,5]((85.9375,-0.917969,0.673828,0.244141,0)) [1,4]((-0.859375,0.507812,0.351562,0)) [1,5]((93.75,-0.859375,0.507812,0.351562,0)) -bad gradient - X: [1](1.5) - Analytical gradient: [1](107.422) - Finite difference gradient: [1](101.563) - Max. delta: 5.85937 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.761719,0.283203,0.478516,0)) [1,5]((107.422,-0.761719,0.283203,0.478516,0)) -bad gradient - X: [1](1.6) - Analytical gradient: [1](121.875) - Finite difference gradient: [1](109.375) - Max. delta: 12.5 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.625,-1.11022e-15,0.625,-0)) [1,5]((121.875,-0.625,-1.11022e-15,0.625,-0)) -bad gradient - X: [1](1.7) - Analytical gradient: [1](135.791) - Finite difference gradient: [1](100.098) - Max. delta: 35.6934 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.478516,-0.283203,0.751953,0.00976563)) [1,5]((135.791,-0.478516,-0.283203,0.751953,0.00976563)) -bad gradient - X: [1](1.8) - Analytical gradient: [1](147.656) - Finite difference gradient: [1](87.8906) - Max. delta: 59.7656 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.351562,-0.507813,0.820313,0.0390625)) [1,5]((147.656,-0.351562,-0.507813,0.820313,0.0390625)) -bad gradient - X: [1](1.9) - Analytical gradient: [1](157.178) - Finite difference gradient: [1](72.7539) - Max. delta: 84.4238 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.244141,-0.673828,0.830078,0.0878906)) [1,5]((157.178,-0.244141,-0.673828,0.830078,0.0878906)) -bad gradient - X: [1](2) - Analytical gradient: [1](164.063) - Finite difference gradient: [1](54.6875) - Max. delta: 109.375 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.15625,-0.78125,0.78125,0.15625)) [1,5]((164.063,-0.15625,-0.78125,0.78125,0.15625)) -bad gradient - X: [1](2.1) - Analytical gradient: [1](168.018) - Finite difference gradient: [1](33.6914) - Max. delta: 134.326 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.0878906,-0.830078,0.673828,0.244141)) [1,5]((168.018,-0.0878906,-0.830078,0.673828,0.244141)) -bad gradient - X: [1](2.2) - Analytical gradient: [1](168.75) - Finite difference gradient: [1](9.76563) - Max. delta: 158.984 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.0390625,-0.820312,0.507812,0.351563)) [1,5]((168.75,-0.0390625,-0.820312,0.507812,0.351563)) -bad gradient - X: [1](2.3) - Analytical gradient: [1](165.967) - Finite difference gradient: [1](-17.0898) - Max. delta: 183.057 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.00976562,-0.751953,0.283203,0.478516)) [1,5]((165.967,-0.00976562,-0.751953,0.283203,0.478516)) -bad gradient - X: [1](2.4) - Analytical gradient: [1](159.375) - Finite difference gradient: [1](-46.875) - Max. delta: 206.25 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.625,-2.22045e-15,0.625)) [1,5]((159.375,0,-0.625,-2.22045e-15,0.625)) -bad gradient - X: [1](2.5) - Analytical gradient: [1](150.391) - Finite difference gradient: [1](-54.6875) - Max. delta: 205.078 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.478516,-0.283203,0.761719)) [1,5]((150.391,0,-0.478516,-0.283203,0.761719)) -bad gradient - X: [1](2.6) - Analytical gradient: [1](140.625) - Finite difference gradient: [1](-62.5) - Max. delta: 203.125 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.351562,-0.507813,0.859375)) [1,5]((140.625,0,-0.351562,-0.507813,0.859375)) -bad gradient - X: [1](2.7) - Analytical gradient: [1](130.078) - Finite difference gradient: [1](-70.3125) - Max. delta: 200.391 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.244141,-0.673828,0.917969)) [1,5]((130.078,0,-0.244141,-0.673828,0.917969)) -bad gradient - X: [1](2.8) - Analytical gradient: [1](118.75) - Finite difference gradient: [1](-78.125) - Max. delta: 196.875 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.15625,-0.78125,0.9375)) [1,5]((118.75,0,-0.15625,-0.78125,0.9375)) -bad gradient - X: [1](2.9) - Analytical gradient: [1](106.641) - Finite difference gradient: [1](-85.9375) - Max. delta: 192.578 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.0878906,-0.830078,0.917969)) [1,5]((106.641,0,-0.0878906,-0.830078,0.917969)) -bad gradient - X: [1](3) - Analytical gradient: [1](93.75) - Finite difference gradient: [1](-93.75) - Max. delta: 187.5 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.0390625,-0.820312,0.859375)) [1,5]((93.75,0,-0.0390625,-0.820312,0.859375)) -bad gradient - X: [1](3.1) - Analytical gradient: [1](80.0781) - Finite difference gradient: [1](-101.563) - Max. delta: 181.641 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.00976562,-0.751953,0.761719)) [1,5]((80.0781,0,-0.00976562,-0.751953,0.761719)) -bad gradient - X: [1](3.2) - Analytical gradient: [1](65.625) - Finite difference gradient: [1](-109.375) - Max. delta: 175 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.625,0.625)) [1,5]((65.625,0,0,-0.625,0.625)) -bad gradient - X: [1](3.3) - Analytical gradient: [1](51.4404) - Finite difference gradient: [1](-100.83) - Max. delta: 152.271 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.478516,0.478516)) [1,5]((51.4404,0,0,-0.478516,0.478516)) -bad gradient - X: [1](3.4) - Analytical gradient: [1](38.6719) - Finite difference gradient: [1](-90.8203) - Max. delta: 129.492 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.351562,0.351562)) [1,5]((38.6719,0,0,-0.351562,0.351562)) -bad gradient - X: [1](3.5) - Analytical gradient: [1](27.4658) - Finite difference gradient: [1](-79.3457) - Max. delta: 106.812 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.244141,0.244141)) [1,5]((27.4658,0,0,-0.244141,0.244141)) -bad gradient - X: [1](3.6) - Analytical gradient: [1](17.9687) - Finite difference gradient: [1](-66.4063) - Max. delta: 84.375 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.15625,0.15625)) [1,5]((17.9687,0,0,-0.15625,0.15625)) -bad gradient - X: [1](3.7) - Analytical gradient: [1](10.3271) - Finite difference gradient: [1](-52.002) - Max. delta: 62.3291 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.0878906,0.0878906)) [1,5]((10.3271,0,0,-0.0878906,0.0878906)) -bad gradient - X: [1](3.8) - Analytical gradient: [1](4.6875) - Finite difference gradient: [1](-36.1328) - Max. delta: 40.8203 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.0390625,0.0390625)) [1,5]((4.6875,0,0,-0.0390625,0.0390625)) -bad gradient - X: [1](3.9) - Analytical gradient: [1](1.19629) - Finite difference gradient: [1](-18.7988) - Max. delta: 19.9951 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.00976562,0.00976562)) [1,5]((1.19629,0,0,-0.00976562,0.00976562)) -[1,4]((0,0,0,0)) [1,5]((-1.04083e-13,0,0,0,0)) +[1,4]((-0.761719,0.283203,0.478516,0)) [1,5]((101.562,-0.761719,0.283203,0.478516,0)) +[1,4]((-0.625,-1.11022e-15,0.625,-0)) [1,5]((109.375,-0.625,-1.11022e-15,0.625,-0)) +[1,4]((-0.478516,-0.283203,0.751953,0.00976563)) [1,5]((100.098,-0.478516,-0.283203,0.751953,0.00976563)) +[1,4]((-0.351562,-0.507813,0.820313,0.0390625)) [1,5]((87.8906,-0.351562,-0.507813,0.820313,0.0390625)) +[1,4]((-0.244141,-0.673828,0.830078,0.0878906)) [1,5]((72.7539,-0.244141,-0.673828,0.830078,0.0878906)) +[1,4]((-0.15625,-0.78125,0.78125,0.15625)) [1,5]((54.6875,-0.15625,-0.78125,0.78125,0.15625)) +[1,4]((-0.0878906,-0.830078,0.673828,0.244141)) [1,5]((33.6914,-0.0878906,-0.830078,0.673828,0.244141)) +[1,4]((-0.0390625,-0.820312,0.507812,0.351563)) [1,5]((9.76562,-0.0390625,-0.820312,0.507812,0.351563)) +[1,4]((-0.00976562,-0.751953,0.283203,0.478516)) [1,5]((-17.0898,-0.00976562,-0.751953,0.283203,0.478516)) +[1,4]((0,-0.625,-2.22045e-15,0.625)) [1,5]((-46.875,0,-0.625,-2.22045e-15,0.625)) +[1,4]((0,-0.478516,-0.283203,0.761719)) [1,5]((-54.6875,0,-0.478516,-0.283203,0.761719)) +[1,4]((0,-0.351562,-0.507813,0.859375)) [1,5]((-62.5,0,-0.351562,-0.507813,0.859375)) +[1,4]((0,-0.244141,-0.673828,0.917969)) [1,5]((-70.3125,0,-0.244141,-0.673828,0.917969)) +[1,4]((0,-0.15625,-0.78125,0.9375)) [1,5]((-78.125,0,-0.15625,-0.78125,0.9375)) +[1,4]((0,-0.0878906,-0.830078,0.917969)) [1,5]((-85.9375,0,-0.0878906,-0.830078,0.917969)) +[1,4]((0,-0.0390625,-0.820312,0.859375)) [1,5]((-93.75,0,-0.0390625,-0.820312,0.859375)) +[1,4]((0,-0.00976562,-0.751953,0.761719)) [1,5]((-101.563,0,-0.00976562,-0.751953,0.761719)) +[1,4]((0,0,-0.625,0.625)) [1,5]((-109.375,0,0,-0.625,0.625)) +[1,4]((0,0,-0.478516,0.478516)) [1,5]((-100.83,0,0,-0.478516,0.478516)) +[1,4]((0,0,-0.351562,0.351562)) [1,5]((-90.8203,0,0,-0.351562,0.351562)) +[1,4]((0,0,-0.244141,0.244141)) [1,5]((-79.3457,0,0,-0.244141,0.244141)) +[1,4]((0,0,-0.15625,0.15625)) [1,5]((-66.4062,0,0,-0.15625,0.15625)) +[1,4]((0,0,-0.0878906,0.0878906)) [1,5]((-52.002,0,0,-0.0878906,0.0878906)) +[1,4]((0,0,-0.0390625,0.0390625)) [1,5]((-36.1328,0,0,-0.0390625,0.0390625)) +[1,4]((0,0,-0.00976562,0.00976562)) [1,5]((-18.7988,0,0,-0.00976562,0.00976562)) +[1,4]((0,0,0,0)) [1,5]((-2.94598e-13,0,0,0,0)) Spline range: [0, 4] FTT range: [0, 8] @@ -833,632 +567,86 @@ N/A [1,5]((7.50511e-14,0,0,-9.2699 Variation of the derivative w.r.t to parameters: [1,4]((0,0,0,0)) [1,5]((0,0,0,0,0)) -bad gradient - X: [1](0.1) - Analytical gradient: [1](0.0640869) - Finite difference gradient: [1](0.183105) - Max. delta: 0.119019 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.00976562,0.00976562,0,0)) [1,5]((0.0640869,-0.0012207,0.0012207,0,0)) -bad gradient - X: [1](0.2) - Analytical gradient: [1](0.268555) - Finite difference gradient: [1](0.732422) - Max. delta: 0.463867 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.0390625,0.0390625,0,0)) [1,5]((0.268555,-0.00488281,0.00488281,0,0)) -bad gradient - X: [1](0.3) - Analytical gradient: [1](0.631714) - Finite difference gradient: [1](1.64795) - Max. delta: 1.01624 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.0878906,0.0878906,0,0)) [1,5]((0.631714,-0.0109863,0.0109863,0,0)) -bad gradient - X: [1](0.4) - Analytical gradient: [1](1.17188) - Finite difference gradient: [1](2.92969) - Max. delta: 1.75781 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.15625,0.15625,0,0)) [1,5]((1.17188,-0.0195312,0.0195312,0,0)) -bad gradient - X: [1](0.5) - Analytical gradient: [1](1.90735) - Finite difference gradient: [1](4.57764) - Max. delta: 2.67029 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.244141,0.244141,0,0)) [1,5]((1.90735,-0.0305176,0.0305176,0,0)) -bad gradient - X: [1](0.6) - Analytical gradient: [1](2.85645) - Finite difference gradient: [1](6.5918) - Max. delta: 3.73535 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.351562,0.351562,0,0)) [1,5]((2.85645,-0.0439453,0.0439453,0,0)) -bad gradient - X: [1](0.7) - Analytical gradient: [1](4.03748) - Finite difference gradient: [1](8.97217) - Max. delta: 4.93469 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.478516,0.478516,0,0)) [1,5]((4.03748,-0.0598145,0.0598145,0,0)) -bad gradient - X: [1](0.8) - Analytical gradient: [1](5.46875) - Finite difference gradient: [1](11.7187) - Max. delta: 6.25 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.625,0.625,0,0)) [1,5]((5.46875,-0.078125,0.078125,0,0)) -bad gradient - X: [1](0.9) - Analytical gradient: [1](7.16858) - Finite difference gradient: [1](14.8315) - Max. delta: 7.66296 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.761719,0.751953,0.00976562,0)) [1,5]((7.16858,-0.098877,0.098877,0,0)) -bad gradient - X: [1](1) - Analytical gradient: [1](9.15527) - Finite difference gradient: [1](18.3105) - Max. delta: 9.15527 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.859375,0.820312,0.0390625,0)) [1,5]((9.15527,-0.12207,0.12207,0,0)) -bad gradient - X: [1](1.1) - Analytical gradient: [1](11.4471) - Finite difference gradient: [1](22.1558) - Max. delta: 10.7086 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.917969,0.830078,0.0878906,0)) [1,5]((11.4471,-0.147705,0.147705,0,0)) -bad gradient - X: [1](1.2) - Analytical gradient: [1](14.0625) - Finite difference gradient: [1](26.3672) - Max. delta: 12.3047 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.9375,0.78125,0.15625,0)) [1,5]((14.0625,-0.175781,0.175781,0,0)) -bad gradient - X: [1](1.3) - Analytical gradient: [1](17.0197) - Finite difference gradient: [1](30.9448) - Max. delta: 13.9252 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.917969,0.673828,0.244141,0)) [1,5]((17.0197,-0.206299,0.206299,0,0)) -bad gradient - X: [1](1.4) - Analytical gradient: [1](20.3369) - Finite difference gradient: [1](35.8887) - Max. delta: 15.5518 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.859375,0.507812,0.351562,0)) [1,5]((20.3369,-0.239258,0.239258,0,0)) -bad gradient - X: [1](1.5) - Analytical gradient: [1](24.0326) - Finite difference gradient: [1](41.1987) - Max. delta: 17.1661 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.761719,0.283203,0.478516,0)) [1,5]((24.0326,-0.274658,0.274658,0,0)) -bad gradient - X: [1](1.6) - Analytical gradient: [1](28.125) - Finite difference gradient: [1](46.875) - Max. delta: 18.75 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.625,-1.11022e-15,0.625,-0)) [1,5]((28.125,-0.3125,0.3125,1.54074e-32,0)) -bad gradient - X: [1](1.7) - Analytical gradient: [1](32.5195) - Finite difference gradient: [1](50.7813) - Max. delta: 18.2617 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.478516,-0.283203,0.751953,0.00976563)) [1,5]((32.5195,-0.349121,0.3479,0.0012207,0)) -bad gradient - X: [1](1.8) - Analytical gradient: [1](37.1094) - Finite difference gradient: [1](54.6875) - Max. delta: 17.5781 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.351562,-0.507813,0.820313,0.0390625)) [1,5]((37.1094,-0.380859,0.375977,0.00488281,0)) -bad gradient - X: [1](1.9) - Analytical gradient: [1](41.8945) - Finite difference gradient: [1](58.5938) - Max. delta: 16.6992 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.244141,-0.673828,0.830078,0.0878906)) [1,5]((41.8945,-0.407715,0.396729,0.0109863,0)) -bad gradient - X: [1](2) - Analytical gradient: [1](46.875) - Finite difference gradient: [1](62.5) - Max. delta: 15.625 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.15625,-0.78125,0.78125,0.15625)) [1,5]((46.875,-0.429688,0.410156,0.0195313,0)) -bad gradient - X: [1](2.1) - Analytical gradient: [1](52.0508) - Finite difference gradient: [1](66.4063) - Max. delta: 14.3555 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.0878906,-0.830078,0.673828,0.244141)) [1,5]((52.0508,-0.446777,0.41626,0.0305176,0)) -bad gradient - X: [1](2.2) - Analytical gradient: [1](57.4219) - Finite difference gradient: [1](70.3125) - Max. delta: 12.8906 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.0390625,-0.820312,0.507812,0.351563)) [1,5]((57.4219,-0.458984,0.415039,0.0439453,0)) -bad gradient - X: [1](2.3) - Analytical gradient: [1](62.9883) - Finite difference gradient: [1](74.2188) - Max. delta: 11.2305 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((-0.00976562,-0.751953,0.283203,0.478516)) [1,5]((62.9883,-0.466309,0.406494,0.0598145,0)) -bad gradient - X: [1](2.4) - Analytical gradient: [1](68.75) - Finite difference gradient: [1](78.125) - Max. delta: 9.37501 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.625,-2.22045e-15,0.625)) [1,5]((68.75,-0.46875,0.390625,0.078125,0)) -bad gradient - X: [1](2.5) - Analytical gradient: [1](74.707) - Finite difference gradient: [1](82.0313) - Max. delta: 7.32423 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.478516,-0.283203,0.761719)) [1,5]((74.707,-0.466309,0.367432,0.098877,0)) -bad gradient - X: [1](2.6) - Analytical gradient: [1](80.8594) - Finite difference gradient: [1](85.9375) - Max. delta: 5.07813 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.351562,-0.507813,0.859375)) [1,5]((80.8594,-0.458984,0.336914,0.12207,0)) -bad gradient - X: [1](2.7) - Analytical gradient: [1](87.207) - Finite difference gradient: [1](89.8438) - Max. delta: 2.63673 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.244141,-0.673828,0.917969)) [1,5]((87.207,-0.446777,0.299072,0.147705,0)) +[1,4]((-0.00976562,0.00976562,0,0)) [1,5]((0.183105,-0.0012207,0.0012207,0,0)) +[1,4]((-0.0390625,0.0390625,0,0)) [1,5]((0.732422,-0.00488281,0.00488281,0,0)) +[1,4]((-0.0878906,0.0878906,0,0)) [1,5]((1.64795,-0.0109863,0.0109863,0,0)) +[1,4]((-0.15625,0.15625,0,0)) [1,5]((2.92969,-0.0195312,0.0195312,0,0)) +[1,4]((-0.244141,0.244141,0,0)) [1,5]((4.57764,-0.0305176,0.0305176,0,0)) +[1,4]((-0.351562,0.351562,0,0)) [1,5]((6.5918,-0.0439453,0.0439453,0,0)) +[1,4]((-0.478516,0.478516,0,0)) [1,5]((8.97217,-0.0598145,0.0598145,0,0)) +[1,4]((-0.625,0.625,0,0)) [1,5]((11.7187,-0.078125,0.078125,0,0)) +[1,4]((-0.761719,0.751953,0.00976562,0)) [1,5]((14.8315,-0.098877,0.098877,0,0)) +[1,4]((-0.859375,0.820312,0.0390625,0)) [1,5]((18.3105,-0.12207,0.12207,0,0)) +[1,4]((-0.917969,0.830078,0.0878906,0)) [1,5]((22.1558,-0.147705,0.147705,0,0)) +[1,4]((-0.9375,0.78125,0.15625,0)) [1,5]((26.3672,-0.175781,0.175781,0,0)) +[1,4]((-0.917969,0.673828,0.244141,0)) [1,5]((30.9448,-0.206299,0.206299,0,0)) +[1,4]((-0.859375,0.507812,0.351562,0)) [1,5]((35.8887,-0.239258,0.239258,0,0)) +[1,4]((-0.761719,0.283203,0.478516,0)) [1,5]((41.1987,-0.274658,0.274658,0,0)) +[1,4]((-0.625,-1.11022e-15,0.625,-0)) [1,5]((46.875,-0.3125,0.3125,1.54074e-32,0)) +[1,4]((-0.478516,-0.283203,0.751953,0.00976563)) [1,5]((50.7812,-0.349121,0.3479,0.0012207,0)) +[1,4]((-0.351562,-0.507813,0.820313,0.0390625)) [1,5]((54.6875,-0.380859,0.375977,0.00488281,0)) +[1,4]((-0.244141,-0.673828,0.830078,0.0878906)) [1,5]((58.5938,-0.407715,0.396729,0.0109863,0)) +[1,4]((-0.15625,-0.78125,0.78125,0.15625)) [1,5]((62.5,-0.429688,0.410156,0.0195313,0)) +[1,4]((-0.0878906,-0.830078,0.673828,0.244141)) [1,5]((66.4062,-0.446777,0.41626,0.0305176,0)) +[1,4]((-0.0390625,-0.820312,0.507812,0.351563)) [1,5]((70.3125,-0.458984,0.415039,0.0439453,0)) +[1,4]((-0.00976562,-0.751953,0.283203,0.478516)) [1,5]((74.2188,-0.466309,0.406494,0.0598145,0)) +[1,4]((0,-0.625,-2.22045e-15,0.625)) [1,5]((78.125,-0.46875,0.390625,0.078125,0)) +[1,4]((0,-0.478516,-0.283203,0.761719)) [1,5]((82.0313,-0.466309,0.367432,0.098877,0)) +[1,4]((0,-0.351562,-0.507813,0.859375)) [1,5]((85.9375,-0.458984,0.336914,0.12207,0)) +[1,4]((0,-0.244141,-0.673828,0.917969)) [1,5]((89.8438,-0.446777,0.299072,0.147705,0)) [1,4]((0,-0.15625,-0.78125,0.9375)) [1,5]((93.75,-0.429687,0.253906,0.175781,0)) -bad gradient - X: [1](2.9) - Analytical gradient: [1](100.488) - Finite difference gradient: [1](97.6563) - Max. delta: 2.83202 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.0878906,-0.830078,0.917969)) [1,5]((100.488,-0.407715,0.201416,0.206299,0)) -bad gradient - X: [1](3) - Analytical gradient: [1](107.422) - Finite difference gradient: [1](101.563) - Max. delta: 5.85936 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.0390625,-0.820312,0.859375)) [1,5]((107.422,-0.380859,0.141602,0.239258,0)) -bad gradient - X: [1](3.1) - Analytical gradient: [1](114.551) - Finite difference gradient: [1](105.469) - Max. delta: 9.08202 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,-0.00976562,-0.751953,0.761719)) [1,5]((114.551,-0.349121,0.0744629,0.274658,0)) -bad gradient - X: [1](3.2) - Analytical gradient: [1](121.875) - Finite difference gradient: [1](109.375) - Max. delta: 12.5 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.625,0.625)) [1,5]((121.875,-0.3125,-1.11022e-15,0.3125,-0)) -bad gradient - X: [1](3.3) - Analytical gradient: [1](129.071) - Finite difference gradient: [1](105.103) - Max. delta: 23.9685 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.478516,0.478516)) [1,5]((129.071,-0.274658,-0.0744629,0.3479,0.0012207)) -bad gradient - X: [1](3.4) - Analytical gradient: [1](135.791) - Finite difference gradient: [1](100.098) - Max. delta: 35.6933 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.351562,0.351562)) [1,5]((135.791,-0.239258,-0.141602,0.375977,0.00488281)) -bad gradient - X: [1](3.5) - Analytical gradient: [1](141.998) - Finite difference gradient: [1](94.3604) - Max. delta: 47.6379 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.244141,0.244141)) [1,5]((141.998,-0.206299,-0.201416,0.396729,0.0109863)) -bad gradient - X: [1](3.6) - Analytical gradient: [1](147.656) - Finite difference gradient: [1](87.8906) - Max. delta: 59.7656 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.15625,0.15625)) [1,5]((147.656,-0.175781,-0.253906,0.410156,0.0195313)) -bad gradient - X: [1](3.7) - Analytical gradient: [1](152.728) - Finite difference gradient: [1](80.6885) - Max. delta: 72.0398 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.0878906,0.0878906)) [1,5]((152.728,-0.147705,-0.299072,0.41626,0.0305176)) -bad gradient - X: [1](3.8) - Analytical gradient: [1](157.178) - Finite difference gradient: [1](72.7539) - Max. delta: 84.4238 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.0390625,0.0390625)) [1,5]((157.178,-0.12207,-0.336914,0.415039,0.0439453)) -bad gradient - X: [1](3.9) - Analytical gradient: [1](160.968) - Finite difference gradient: [1](64.0869) - Max. delta: 96.8811 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -[1,4]((0,0,-0.00976562,0.00976562)) [1,5]((160.968,-0.098877,-0.367432,0.406494,0.0598145)) -bad gradient - X: [1](4) - Analytical gradient: [1](164.063) - Finite difference gradient: [1](54.6875) - Max. delta: 109.375 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((164.063,-0.078125,-0.390625,0.390625,0.078125)) -bad gradient - X: [1](4.1) - Analytical gradient: [1](166.425) - Finite difference gradient: [1](44.5557) - Max. delta: 121.869 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((166.425,-0.0598145,-0.406494,0.367432,0.098877)) -bad gradient - X: [1](4.2) - Analytical gradient: [1](168.018) - Finite difference gradient: [1](33.6914) - Max. delta: 134.326 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((168.018,-0.0439453,-0.415039,0.336914,0.12207)) -bad gradient - X: [1](4.3) - Analytical gradient: [1](168.805) - Finite difference gradient: [1](22.0947) - Max. delta: 146.71 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((168.805,-0.0305176,-0.41626,0.299072,0.147705)) -bad gradient - X: [1](4.4) - Analytical gradient: [1](168.75) - Finite difference gradient: [1](9.76562) - Max. delta: 158.984 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((168.75,-0.0195312,-0.410156,0.253906,0.175781)) -bad gradient - X: [1](4.5) - Analytical gradient: [1](167.816) - Finite difference gradient: [1](-3.29591) - Max. delta: 171.112 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((167.816,-0.0109863,-0.396729,0.201416,0.206299)) -bad gradient - X: [1](4.6) - Analytical gradient: [1](165.967) - Finite difference gradient: [1](-17.0898) - Max. delta: 183.057 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((165.967,-0.00488281,-0.375977,0.141602,0.239258)) -bad gradient - X: [1](4.7) - Analytical gradient: [1](163.165) - Finite difference gradient: [1](-31.6162) - Max. delta: 194.781 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((163.165,-0.0012207,-0.3479,0.0744629,0.274658)) -bad gradient - X: [1](4.8) - Analytical gradient: [1](159.375) - Finite difference gradient: [1](-46.875) - Max. delta: 206.25 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((159.375,0,-0.3125,1.11022e-15,0.3125)) -bad gradient - X: [1](4.9) - Analytical gradient: [1](154.98) - Finite difference gradient: [1](-50.7813) - Max. delta: 205.762 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((154.98,0,-0.274658,-0.0744629,0.349121)) -bad gradient - X: [1](5) - Analytical gradient: [1](150.391) - Finite difference gradient: [1](-54.6875) - Max. delta: 205.078 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((150.391,0,-0.239258,-0.141602,0.380859)) -bad gradient - X: [1](5.1) - Analytical gradient: [1](145.605) - Finite difference gradient: [1](-58.5937) - Max. delta: 204.199 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((145.605,0,-0.206299,-0.201416,0.407715)) -bad gradient - X: [1](5.2) - Analytical gradient: [1](140.625) - Finite difference gradient: [1](-62.5) - Max. delta: 203.125 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((140.625,0,-0.175781,-0.253906,0.429687)) -bad gradient - X: [1](5.3) - Analytical gradient: [1](135.449) - Finite difference gradient: [1](-66.4063) - Max. delta: 201.855 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((135.449,0,-0.147705,-0.299072,0.446777)) -bad gradient - X: [1](5.4) - Analytical gradient: [1](130.078) - Finite difference gradient: [1](-70.3125) - Max. delta: 200.391 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((130.078,0,-0.12207,-0.336914,0.458984)) -bad gradient - X: [1](5.5) - Analytical gradient: [1](124.512) - Finite difference gradient: [1](-74.2188) - Max. delta: 198.73 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((124.512,0,-0.098877,-0.367432,0.466309)) -bad gradient - X: [1](5.6) - Analytical gradient: [1](118.75) - Finite difference gradient: [1](-78.125) - Max. delta: 196.875 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((118.75,0,-0.078125,-0.390625,0.46875)) -bad gradient - X: [1](5.7) - Analytical gradient: [1](112.793) - Finite difference gradient: [1](-82.0313) - Max. delta: 194.824 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((112.793,0,-0.0598145,-0.406494,0.466309)) -bad gradient - X: [1](5.8) - Analytical gradient: [1](106.641) - Finite difference gradient: [1](-85.9375) - Max. delta: 192.578 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((106.641,0,-0.0439453,-0.415039,0.458984)) -bad gradient - X: [1](5.9) - Analytical gradient: [1](100.293) - Finite difference gradient: [1](-89.8438) - Max. delta: 190.137 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((100.293,0,-0.0305176,-0.41626,0.446777)) -bad gradient - X: [1](6) - Analytical gradient: [1](93.75) - Finite difference gradient: [1](-93.75) - Max. delta: 187.5 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((93.75,0,-0.0195313,-0.410156,0.429688)) -bad gradient - X: [1](6.1) - Analytical gradient: [1](87.0117) - Finite difference gradient: [1](-97.6563) - Max. delta: 184.668 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((87.0117,0,-0.0109863,-0.396729,0.407715)) -bad gradient - X: [1](6.2) - Analytical gradient: [1](80.0781) - Finite difference gradient: [1](-101.563) - Max. delta: 181.641 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((80.0781,0,-0.00488281,-0.375977,0.380859)) -bad gradient - X: [1](6.3) - Analytical gradient: [1](72.9492) - Finite difference gradient: [1](-105.469) - Max. delta: 178.418 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((72.9492,0,-0.0012207,-0.3479,0.349121)) -bad gradient - X: [1](6.4) - Analytical gradient: [1](65.625) - Finite difference gradient: [1](-109.375) - Max. delta: 175 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((65.625,0,0,-0.3125,0.3125)) -bad gradient - X: [1](6.5) - Analytical gradient: [1](58.3649) - Finite difference gradient: [1](-105.286) - Max. delta: 163.65 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((58.3649,0,0,-0.274658,0.274658)) -bad gradient - X: [1](6.6) - Analytical gradient: [1](51.4404) - Finite difference gradient: [1](-100.83) - Max. delta: 152.27 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((51.4404,0,0,-0.239258,0.239258)) -bad gradient - X: [1](6.7) - Analytical gradient: [1](44.87) - Finite difference gradient: [1](-96.0083) - Max. delta: 140.878 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((44.87,0,0,-0.206299,0.206299)) -bad gradient - X: [1](6.8) - Analytical gradient: [1](38.6719) - Finite difference gradient: [1](-90.8203) - Max. delta: 129.492 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((38.6719,0,0,-0.175781,0.175781)) -bad gradient - X: [1](6.9) - Analytical gradient: [1](32.8644) - Finite difference gradient: [1](-85.2661) - Max. delta: 118.13 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((32.8644,0,0,-0.147705,0.147705)) -bad gradient - X: [1](7) - Analytical gradient: [1](27.4658) - Finite difference gradient: [1](-79.3457) - Max. delta: 106.811 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((27.4658,0,0,-0.12207,0.12207)) -bad gradient - X: [1](7.1) - Analytical gradient: [1](22.4945) - Finite difference gradient: [1](-73.0591) - Max. delta: 95.5536 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((22.4945,0,0,-0.098877,0.098877)) -bad gradient - X: [1](7.2) - Analytical gradient: [1](17.9688) - Finite difference gradient: [1](-66.4063) - Max. delta: 84.375 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((17.9688,0,0,-0.078125,0.078125)) -bad gradient - X: [1](7.3) - Analytical gradient: [1](13.9069) - Finite difference gradient: [1](-59.3872) - Max. delta: 73.2941 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((13.9069,0,0,-0.0598145,0.0598145)) -bad gradient - X: [1](7.4) - Analytical gradient: [1](10.3271) - Finite difference gradient: [1](-52.002) - Max. delta: 62.3291 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((10.3271,0,0,-0.0439453,0.0439453)) -bad gradient - X: [1](7.5) - Analytical gradient: [1](7.24792) - Finite difference gradient: [1](-44.2505) - Max. delta: 51.4984 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((7.24792,0,0,-0.0305176,0.0305176)) -bad gradient - X: [1](7.6) - Analytical gradient: [1](4.6875) - Finite difference gradient: [1](-36.1328) - Max. delta: 40.8203 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((4.6875,0,0,-0.0195313,0.0195313)) -bad gradient - X: [1](7.7) - Analytical gradient: [1](2.66418) - Finite difference gradient: [1](-27.6489) - Max. delta: 30.3131 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((2.66418,0,0,-0.0109863,0.0109863)) -bad gradient - X: [1](7.8) - Analytical gradient: [1](1.19629) - Finite difference gradient: [1](-18.7989) - Max. delta: 19.9952 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((1.19629,0,0,-0.00488281,0.00488281)) -bad gradient - X: [1](7.9) - Analytical gradient: [1](0.302124) - Finite difference gradient: [1](-9.58258) - Max. delta: 9.8847 - Max. delta in component: 0 - Max. allowed delta: 0.0001 -N/A [1,5]((0.302124,0,0,-0.0012207,0.0012207)) -N/A [1,5]((4.69069e-14,0,0,0,2.22045e-16)) +[1,4]((0,-0.0878906,-0.830078,0.917969)) [1,5]((97.6563,-0.407715,0.201416,0.206299,0)) +[1,4]((0,-0.0390625,-0.820312,0.859375)) [1,5]((101.563,-0.380859,0.141602,0.239258,0)) +[1,4]((0,-0.00976562,-0.751953,0.761719)) [1,5]((105.469,-0.349121,0.0744629,0.274658,0)) +[1,4]((0,0,-0.625,0.625)) [1,5]((109.375,-0.3125,-1.11022e-15,0.3125,-0)) +[1,4]((0,0,-0.478516,0.478516)) [1,5]((105.103,-0.274658,-0.0744629,0.3479,0.0012207)) +[1,4]((0,0,-0.351562,0.351562)) [1,5]((100.098,-0.239258,-0.141602,0.375977,0.00488281)) +[1,4]((0,0,-0.244141,0.244141)) [1,5]((94.3604,-0.206299,-0.201416,0.396729,0.0109863)) +[1,4]((0,0,-0.15625,0.15625)) [1,5]((87.8906,-0.175781,-0.253906,0.410156,0.0195313)) +[1,4]((0,0,-0.0878906,0.0878906)) [1,5]((80.6885,-0.147705,-0.299072,0.41626,0.0305176)) +[1,4]((0,0,-0.0390625,0.0390625)) [1,5]((72.7539,-0.12207,-0.336914,0.415039,0.0439453)) +[1,4]((0,0,-0.00976562,0.00976562)) [1,5]((64.0869,-0.098877,-0.367432,0.406494,0.0598145)) +N/A [1,5]((54.6875,-0.078125,-0.390625,0.390625,0.078125)) +N/A [1,5]((44.5557,-0.0598145,-0.406494,0.367432,0.098877)) +N/A [1,5]((33.6914,-0.0439453,-0.415039,0.336914,0.12207)) +N/A [1,5]((22.0947,-0.0305176,-0.41626,0.299072,0.147705)) +N/A [1,5]((9.76563,-0.0195312,-0.410156,0.253906,0.175781)) +N/A [1,5]((-3.2959,-0.0109863,-0.396729,0.201416,0.206299)) +N/A [1,5]((-17.0898,-0.00488281,-0.375977,0.141602,0.239258)) +N/A [1,5]((-31.6162,-0.0012207,-0.3479,0.0744629,0.274658)) +N/A [1,5]((-46.875,0,-0.3125,1.11022e-15,0.3125)) +N/A [1,5]((-50.7812,0,-0.274658,-0.0744629,0.349121)) +N/A [1,5]((-54.6875,0,-0.239258,-0.141602,0.380859)) +N/A [1,5]((-58.5937,0,-0.206299,-0.201416,0.407715)) +N/A [1,5]((-62.5,0,-0.175781,-0.253906,0.429687)) +N/A [1,5]((-66.4062,0,-0.147705,-0.299072,0.446777)) +N/A [1,5]((-70.3125,0,-0.12207,-0.336914,0.458984)) +N/A [1,5]((-74.2187,0,-0.098877,-0.367432,0.466309)) +N/A [1,5]((-78.125,0,-0.078125,-0.390625,0.46875)) +N/A [1,5]((-82.0312,0,-0.0598145,-0.406494,0.466309)) +N/A [1,5]((-85.9375,0,-0.0439453,-0.415039,0.458984)) +N/A [1,5]((-89.8437,0,-0.0305176,-0.41626,0.446777)) +N/A [1,5]((-93.75,0,-0.0195313,-0.410156,0.429688)) +N/... [truncated message content] |
From: Thomas M. <tho...@us...> - 2009-11-06 13:54:09
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 4f7ec26ee057cde9229773258a6e66d87ceba050 (commit) via 97621b6290570b9f1d650fc7d324af74b88d534e (commit) from a38a277e6553f4ba509ca607863ad9f9ffdcc390 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4f7ec26ee057cde9229773258a6e66d87ceba050 Author: Thomas Moulard <tho...@gm...> Date: Fri Nov 6 14:53:53 2009 +0100 Check interval unscaling. * tests/free-time-trajectory.cc: Add checks. * tests/free-time-trajectory.stdout: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 5e0455b..d901c57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-11-06 Thomas Moulard <tho...@gm...> + Check interval unscaling. + * tests/free-time-trajectory.cc: Add checks. + * tests/free-time-trajectory.stdout: Regenerate. + +2009-11-06 Thomas Moulard <tho...@gm...> + Fix function naming. * include/roboptim/trajectory/free-time-trajectory.hh, * include/roboptim/trajectory/free-time-trajectory.hxx: diff --git a/tests/free-time-trajectory.cc b/tests/free-time-trajectory.cc index bee5619..b76c4f7 100644 --- a/tests/free-time-trajectory.cc +++ b/tests/free-time-trajectory.cc @@ -22,6 +22,7 @@ #include <roboptim/core/finite-difference-gradient.hh> #include <roboptim/core/io.hh> +#include <roboptim/core/util.hh> #include <roboptim/trajectory/free-time-trajectory.hh> #include <roboptim/trajectory/fwd.hh> @@ -281,10 +282,27 @@ int run_test () assert (freeTimeTraj.inputSize () == 1); assert (freeTimeTraj.outputSize () == 1); + // Check interval scaling. + { + std::cout << "Initial interval" << std::endl; + std::cout << freeTimeTraj.timeRange () << std::endl; + + std::cout << "Params = 2" << std::endl; + params[0] = 2.; + freeTimeTraj.setParameters (params); + std::cout << freeTimeTraj.timeRange () << std::endl; + + std::cout << "Params = .5" << std::endl; + params[0] = .5; + freeTimeTraj.setParameters (params); + std::cout << freeTimeTraj.timeRange () << std::endl; + } + // Check scaling and unscaling. { params[0] = 3.14; freeTimeTraj.setParameters (params); + value_type t = 0.32; StableTimePoint stp (t / freeTimeTraj.length ()); diff --git a/tests/free-time-trajectory.stdout b/tests/free-time-trajectory.stdout index 0c7ed72..9342ff0 100644 --- a/tests/free-time-trajectory.stdout +++ b/tests/free-time-trajectory.stdout @@ -1,3 +1,9 @@ +Initial interval +(0, 4) +Params = 2 +(0, 2) +Params = .5 +(0, 8) Checking StableTimePoint scaling. Checking scale/unscale methods. Checking scale using tmin/tmax. commit 97621b6290570b9f1d650fc7d324af74b88d534e Author: Thomas Moulard <tho...@gm...> Date: Fri Nov 6 14:45:45 2009 +0100 Fix function naming. * include/roboptim/trajectory/free-time-trajectory.hh, * include/roboptim/trajectory/free-time-trajectory.hxx: Rename scaleTime/scaleInterval internal free functions to unscaleTime and unscaleInterval to maintain consistency. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 22bc76c..5e0455b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2009-11-06 Thomas Moulard <tho...@gm...> + Fix function naming. + * include/roboptim/trajectory/free-time-trajectory.hh, + * include/roboptim/trajectory/free-time-trajectory.hxx: + Rename scaleTime/scaleInterval internal free functions to + unscaleTime and unscaleInterval to maintain consistency. + +2009-11-06 Thomas Moulard <tho...@gm...> + Check scaling functions in FreeTimeTrajectory test. * include/roboptim/trajectory/free-time-trajectory.hh: Make scaleTime and unscaleTime public. diff --git a/include/roboptim/trajectory/free-time-trajectory.hh b/include/roboptim/trajectory/free-time-trajectory.hh index 28ee40e..8aaf688 100644 --- a/include/roboptim/trajectory/free-time-trajectory.hh +++ b/include/roboptim/trajectory/free-time-trajectory.hh @@ -126,8 +126,10 @@ namespace roboptim assert (this->scaleTime (tMin) == tmin); assert (this->scaleTime (tMax) == tmax); - return new FreeTimeTrajectory<DerivabilityOrder> - (*trajectory_, scale); + Trajectory<DerivabilityOrder>* res = + new FreeTimeTrajectory<DerivabilityOrder> (*trajectory_, scale); + assert (res->timeRange () == this->timeRange ()); + return res; } Trajectory<DerivabilityOrder>* diff --git a/include/roboptim/trajectory/free-time-trajectory.hxx b/include/roboptim/trajectory/free-time-trajectory.hxx index 763952b..727f24f 100644 --- a/include/roboptim/trajectory/free-time-trajectory.hxx +++ b/include/roboptim/trajectory/free-time-trajectory.hxx @@ -27,7 +27,7 @@ namespace roboptim namespace detail { inline Function::value_type - scaleTime (Function::value_type unscaled, + unscaleTime (Function::value_type unscaled, Function::value_type min, Function::value_type scale) { @@ -36,13 +36,13 @@ namespace roboptim template <unsigned dorder> Function::interval_t - scaleInterval (const Trajectory<dorder>& traj, - typename Function::value_type scale) + unscaleInterval (const Trajectory<dorder>& traj, + typename Function::value_type scale) { Function::value_type min = Function::getLowerBound (traj.timeRange ()); Function::value_type max = - scaleTime (Function::getUpperBound (traj.timeRange ()), min, scale); + unscaleTime (Function::getUpperBound (traj.timeRange ()), min, scale); return Function::makeInterval (min, max); } } // end of namespace detail @@ -50,7 +50,7 @@ namespace roboptim template <unsigned dorder> FreeTimeTrajectory<dorder>::FreeTimeTrajectory (const Trajectory<dorder>& traj, value_type s) throw () - : Trajectory<dorder> (detail::scaleInterval (traj, s), traj.outputSize (), + : Trajectory<dorder> (detail::unscaleInterval (traj, s), traj.outputSize (), addScaleToParameters (traj.parameters (), s)), trajectory_ (traj.clone ()) { @@ -182,7 +182,8 @@ namespace roboptim p_[0] = 1e-8; this->parameters_ = p_; - this->timeRange_ = detail::scaleInterval (*trajectory_, this->timeScale ()); + this->timeRange_ = + detail::unscaleInterval (*trajectory_, this->timeScale ()); this->trajectory_->setParameters (removeScaleFromParameters (p_)); } ----------------------------------------------------------------------- Summary of changes: ChangeLog | 14 ++++++++++++++ .../roboptim/trajectory/free-time-trajectory.hh | 6 ++++-- .../roboptim/trajectory/free-time-trajectory.hxx | 13 +++++++------ tests/free-time-trajectory.cc | 18 ++++++++++++++++++ tests/free-time-trajectory.stdout | 6 ++++++ 5 files changed, 49 insertions(+), 8 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-06 13:52:10
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core". The branch, master has been updated via 850808eda47e83ea1799cab3c32f61fd9d0c7945 (commit) from 7691dacca434fc7c47b545f80e0aaca89a9bb955 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 850808eda47e83ea1799cab3c32f61fd9d0c7945 Author: Thomas Moulard <tho...@gm...> Date: Fri Nov 6 14:51:52 2009 +0100 Add ROBOPTIM_DLLLOCAL when needed. * src/finite-difference-gradient.cc: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index f2a5636..68e68d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-06 Thomas Moulard <tho...@gm...> + + Add ROBOPTIM_DLLLOCAL when needed. + * src/finite-difference-gradient.cc: Here. + 2009-11-03 Thomas Moulard <tho...@gm...> Synchronize. diff --git a/src/finite-difference-gradient.cc b/src/finite-difference-gradient.cc index cb97148..04b0e09 100644 --- a/src/finite-difference-gradient.cc +++ b/src/finite-difference-gradient.cc @@ -79,7 +79,7 @@ namespace roboptim namespace detail { - void + ROBOPTIM_DLLLOCAL void compute_deriv (const Function& adaptee, unsigned j, double h, @@ -90,7 +90,7 @@ namespace roboptim Function::size_type idFunction); /// Algorithm from the Gnu Scientific Library. - void + ROBOPTIM_DLLLOCAL void compute_deriv (const Function& adaptee, unsigned j, double h, ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ src/finite-difference-gradient.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) hooks/post-receive -- roboptim-core |
From: Thomas M. <tho...@us...> - 2009-11-06 12:11:31
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via a38a277e6553f4ba509ca607863ad9f9ffdcc390 (commit) from 5203a96bf71f39bc3ada5b89b0c6b42e8726b405 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a38a277e6553f4ba509ca607863ad9f9ffdcc390 Author: Thomas Moulard <tho...@gm...> Date: Fri Nov 6 13:11:12 2009 +0100 Check scaling functions in FreeTimeTrajectory test. * include/roboptim/trajectory/free-time-trajectory.hh: Make scaleTime and unscaleTime public. * tests/free-time-trajectory.cc: Check scaling functions. * tests/free-time-trajectory.stdout: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 1e9ffb2..22bc76c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-11-06 Thomas Moulard <tho...@gm...> + + Check scaling functions in FreeTimeTrajectory test. + * include/roboptim/trajectory/free-time-trajectory.hh: + Make scaleTime and unscaleTime public. + * tests/free-time-trajectory.cc: Check scaling functions. + * tests/free-time-trajectory.stdout: Regenerate. + 2009-11-05 Thomas Moulard <tho...@gm...> Add missing semi-colon in Spline class. diff --git a/include/roboptim/trajectory/free-time-trajectory.hh b/include/roboptim/trajectory/free-time-trajectory.hh index f0d6ba5..28ee40e 100644 --- a/include/roboptim/trajectory/free-time-trajectory.hh +++ b/include/roboptim/trajectory/free-time-trajectory.hh @@ -136,12 +136,7 @@ namespace roboptim assert (trajectory_); return trajectory_->resize (this->timeRange ()); } - protected: - void impl_compute (result_t&, double) const throw (); - void impl_derivative (gradient_t& g, double x, size_type order) - const throw (); - private: /// \brief Scale input time argument. /// /// Scale input argument with the same factor that the input @@ -155,6 +150,12 @@ namespace roboptim double scaleTime (double t) const throw (); double unscaleTime (double t) const throw (); + protected: + void impl_compute (result_t&, double) const throw (); + void impl_derivative (gradient_t& g, double x, size_type order) + const throw (); + + private: /// \brief Input fixed time trajectory. Trajectory<DerivabilityOrder>* trajectory_; }; diff --git a/tests/free-time-trajectory.cc b/tests/free-time-trajectory.cc index 0750bf9..bee5619 100644 --- a/tests/free-time-trajectory.cc +++ b/tests/free-time-trajectory.cc @@ -38,6 +38,12 @@ using namespace roboptim; typedef FreeTimeTrajectory<Spline::derivabilityOrder> freeTime_t; +template <typename T> +bool isAlmostEqual (const T& x, const T& y, const T& epsilon = 1e10-8) +{ + return (x - y) * (x - y) < epsilon; +} + struct ConfigWrtParam : public DerivableFunction { ConfigWrtParam (const freeTime_t& traj, double t) throw () @@ -253,6 +259,7 @@ void printTable (const Spline& spline, const freeTime_t& freeTimeTraj) int run_test () { + typedef Spline::value_type value_type; Spline::vector_t params (5); // Scale. @@ -274,6 +281,61 @@ int run_test () assert (freeTimeTraj.inputSize () == 1); assert (freeTimeTraj.outputSize () == 1); + // Check scaling and unscaling. + { + params[0] = 3.14; + freeTimeTraj.setParameters (params); + value_type t = 0.32; + StableTimePoint stp (t / freeTimeTraj.length ()); + + std::cout << "Checking StableTimePoint scaling." << std::endl; + assert (isAlmostEqual + (stp.getTime (freeTimeTraj.timeRange ()), t)); + + std::cout << "Checking scale/unscale methods." << std::endl; + assert (isAlmostEqual + (freeTimeTraj.unscaleTime (freeTimeTraj.scaleTime (t)), t)); + + std::cout << "Checking scale using tmin/tmax." << std::endl; + value_type tMin = Function::getLowerBound (freeTimeTraj.timeRange ()); + value_type tMax = Function::getUpperBound (freeTimeTraj.timeRange ()); + + value_type tmin = Function::getLowerBound + (freeTimeTraj.getFixedTimeTrajectory ().timeRange ()); + value_type tmax = Function::getUpperBound + (freeTimeTraj.getFixedTimeTrajectory ().timeRange ()); + + assert (tmax != tMax); // Just to be sure a real scaling is done. + + assert (isAlmostEqual (freeTimeTraj.scaleTime (tMin), tmin)); + assert (isAlmostEqual (freeTimeTraj.scaleTime (tMax), tmax)); + + assert (isAlmostEqual (freeTimeTraj.unscaleTime (tmin), tMin)); + assert (isAlmostEqual (freeTimeTraj.unscaleTime (tmax), tMax)); + + assert (isAlmostEqual (freeTimeTraj.unscaleTime ((tmax - tmin) / 2.), + (tMax - tMin) / 2.)); + assert (isAlmostEqual (freeTimeTraj.unscaleTime ((tmax - tmin) / 4.), + (tMax - tMin) / 4.)); + + + std::cout << "Checking StableTimePoint scaling." << std::endl; + assert (isAlmostEqual + ((0. * roboptim::tMax).getTime (freeTimeTraj.timeRange ()), tmin)); + assert (isAlmostEqual + ((1. * roboptim::tMax).getTime (freeTimeTraj.timeRange ()), tmax)); + assert (isAlmostEqual + ((.5 * roboptim::tMax).getTime (freeTimeTraj.timeRange ()), + (tmax - tmin) / 2.)); + assert (isAlmostEqual + ((.25 * roboptim::tMax).getTime (freeTimeTraj.timeRange ()), + (tmax - tmin) / 4.)); + + } + + + params[0] = 1.; + freeTimeTraj.setParameters (params); printTable (spline, freeTimeTraj); params[0] = .5; diff --git a/tests/free-time-trajectory.stdout b/tests/free-time-trajectory.stdout index 5c55044..0c7ed72 100644 --- a/tests/free-time-trajectory.stdout +++ b/tests/free-time-trajectory.stdout @@ -1,3 +1,7 @@ +Checking StableTimePoint scaling. +Checking scale/unscale methods. +Checking scale using tmin/tmax. +Checking StableTimePoint scaling. Spline range: [0, 4] FTT range: [0, 4] /------------------------------------------------------------------------------\ ----------------------------------------------------------------------- Summary of changes: ChangeLog | 8 +++ .../roboptim/trajectory/free-time-trajectory.hh | 11 ++-- tests/free-time-trajectory.cc | 62 ++++++++++++++++++++ tests/free-time-trajectory.stdout | 4 + 4 files changed, 80 insertions(+), 5 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-05 17:02:46
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 5203a96bf71f39bc3ada5b89b0c6b42e8726b405 (commit) from 087321506eb0914e638bd20a29d9a03f50b7b24a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5203a96bf71f39bc3ada5b89b0c6b42e8726b405 Author: Thomas Moulard <tho...@gm...> Date: Thu Nov 5 18:02:24 2009 +0100 Add missing semi-colon in Spline class. * src/spline.cc: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 93e2d45..1e9ffb2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-11-05 Thomas Moulard <tho...@gm...> + Add missing semi-colon in Spline class. + * src/spline.cc: Here. + +2009-11-05 Thomas Moulard <tho...@gm...> + Add missing end of line in Spline display. * src/spline.cc: Add missing std::endl. diff --git a/src/spline.cc b/src/spline.cc index 2897b59..7f40320 100644 --- a/src/spline.cc +++ b/src/spline.cc @@ -212,7 +212,7 @@ namespace roboptim { o << "Spline" << incindent << std::endl << "Number of parameters per spline function: " << nbp_ << std::endl - << "Length: " << length () << std::endl; + << "Length: " << length () << std::endl << "Parameters: " << parameters () << decindent; return o; ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ src/spline.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-05 10:48:33
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 087321506eb0914e638bd20a29d9a03f50b7b24a (commit) via bb16fa8211be549c3e88c9040312d738e6907049 (commit) from a850c9637f685b5dce8727f3c83565d4e4464737 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 087321506eb0914e638bd20a29d9a03f50b7b24a Author: Thomas Moulard <tho...@gm...> Date: Thu Nov 5 11:48:17 2009 +0100 Add missing end of line in Spline display. * src/spline.cc: Add missing std::endl. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 579c759..93e2d45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-11-05 Thomas Moulard <tho...@gm...> + Add missing end of line in Spline display. + * src/spline.cc: Add missing std::endl. + +2009-11-05 Thomas Moulard <tho...@gm...> + Add post-condition to resize method. * include/roboptim/trajectory/free-time-trajectory.hh: Make sure the scaling computation is right. diff --git a/src/spline.cc b/src/spline.cc index bcf4286..2897b59 100644 --- a/src/spline.cc +++ b/src/spline.cc @@ -212,7 +212,7 @@ namespace roboptim { o << "Spline" << incindent << std::endl << "Number of parameters per spline function: " << nbp_ << std::endl - << "Length: " << length () + << "Length: " << length () << std::endl; << "Parameters: " << parameters () << decindent; return o; commit bb16fa8211be549c3e88c9040312d738e6907049 Author: Thomas Moulard <tho...@gm...> Date: Thu Nov 5 11:47:55 2009 +0100 Add post-condition to resize method. * include/roboptim/trajectory/free-time-trajectory.hh: Make sure the scaling computation is right. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index c9a7fc3..579c759 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-11-05 Thomas Moulard <tho...@gm...> + Add post-condition to resize method. + * include/roboptim/trajectory/free-time-trajectory.hh: + Make sure the scaling computation is right. + +2009-11-05 Thomas Moulard <tho...@gm...> + Make Spline display more informative. * src/spline.cc: Display spline parameters when displaying the spline. diff --git a/include/roboptim/trajectory/free-time-trajectory.hh b/include/roboptim/trajectory/free-time-trajectory.hh index a97f699..f0d6ba5 100644 --- a/include/roboptim/trajectory/free-time-trajectory.hh +++ b/include/roboptim/trajectory/free-time-trajectory.hh @@ -119,8 +119,13 @@ namespace roboptim value_type tMax = getUpperBound (this->timeRange ()); value_type tmin = getLowerBound (this->trajectory_->timeRange ()); value_type tmax = getUpperBound (this->trajectory_->timeRange ()); + assert (tMax != tMin); + value_type scale = (tmax - tmin) / (tMax - tMin); + assert (this->scaleTime (tMin) == tmin); + assert (this->scaleTime (tMax) == tmax); + return new FreeTimeTrajectory<DerivabilityOrder> (*trajectory_, scale); } ----------------------------------------------------------------------- Summary of changes: ChangeLog | 11 +++++++++++ .../roboptim/trajectory/free-time-trajectory.hh | 5 +++++ src/spline.cc | 2 +- 3 files changed, 17 insertions(+), 1 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-05 09:57:31
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via a850c9637f685b5dce8727f3c83565d4e4464737 (commit) from 3b2c1dd3fb9ba83f8acc569cef6e3aca06bcddd4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a850c9637f685b5dce8727f3c83565d4e4464737 Author: Thomas Moulard <tho...@gm...> Date: Thu Nov 5 10:57:10 2009 +0100 Make Spline display more informative. * src/spline.cc: Display spline parameters when displaying the spline. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 1e37299..c9a7fc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-05 Thomas Moulard <tho...@gm...> + + Make Spline display more informative. + * src/spline.cc: Display spline parameters when + displaying the spline. + 2009-11-04 Thomas Moulard <tho...@gm...> Fix FixedPointStateFunction implementation. diff --git a/src/spline.cc b/src/spline.cc index 9cc93e4..bcf4286 100644 --- a/src/spline.cc +++ b/src/spline.cc @@ -213,6 +213,7 @@ namespace roboptim o << "Spline" << incindent << std::endl << "Number of parameters per spline function: " << nbp_ << std::endl << "Length: " << length () + << "Parameters: " << parameters () << decindent; return o; } ----------------------------------------------------------------------- Summary of changes: ChangeLog | 6 ++++++ src/spline.cc | 1 + 2 files changed, 7 insertions(+), 0 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-04 17:01:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 3b2c1dd3fb9ba83f8acc569cef6e3aca06bcddd4 (commit) via e1616107146e2c29d22d8c094a911be9b67b3a09 (commit) from 069c7b43f75a55a249ec92065c301001586c1872 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3b2c1dd3fb9ba83f8acc569cef6e3aca06bcddd4 Author: Thomas Moulard <tho...@gm...> Date: Wed Nov 4 18:00:58 2009 +0100 Fix FixedPointStateFunction implementation. * include/roboptim/trajectory/fixed-point-state-function.hxx: Fix implementation. * tests/fixed-point-state-function.cc, * tests/fixed-point-state-function.stdout: Set scale to 2 to really check that scaling is ok. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index f2ea541..1e37299 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2009-11-04 Thomas Moulard <tho...@gm...> + Fix FixedPointStateFunction implementation. + * include/roboptim/trajectory/fixed-point-state-function.hxx: + Fix implementation. + * tests/fixed-point-state-function.cc, + * tests/fixed-point-state-function.stdout: + Set scale to 2 to really check that scaling is ok. + +2009-11-04 Thomas Moulard <tho...@gm...> + Implement resize in all trajectory classes. * include/roboptim/trajectory/free-time-trajectory.hh: Implement resize. diff --git a/include/roboptim/trajectory/fixed-point-state-function.hxx b/include/roboptim/trajectory/fixed-point-state-function.hxx index 3fabf85..a2f5745 100644 --- a/include/roboptim/trajectory/fixed-point-state-function.hxx +++ b/include/roboptim/trajectory/fixed-point-state-function.hxx @@ -57,9 +57,9 @@ namespace roboptim FixedPointStateFunction<T>::impl_compute (result_t& res, const argument_t& p) const throw () { - static boost::shared_ptr<Trajectory<T::derivabilityOrder> > updatedTrajectory = + boost::shared_ptr<Trajectory<T::derivabilityOrder> > updatedTrajectory = boost::shared_ptr<Trajectory<T::derivabilityOrder> > - (trajectory_.getFixedTimeTrajectory ().clone ()); + (trajectory_.makeFixedTimeTrajectory ()); updatedTrajectory->setParameters (removeScaleFromParameters (p)); (*function_) (res, updatedTrajectory->state @@ -75,9 +75,9 @@ namespace roboptim { using namespace boost::numeric::ublas; - static boost::shared_ptr<Trajectory<T::derivabilityOrder> > updatedTrajectory = + boost::shared_ptr<Trajectory<T::derivabilityOrder> > updatedTrajectory = boost::shared_ptr<Trajectory<T::derivabilityOrder> > - (trajectory_.getFixedTimeTrajectory ().clone ()); + (trajectory_.makeFixedTimeTrajectory ()); updatedTrajectory->setParameters (removeScaleFromParameters (p)); const value_type t = tpt_.getTime (updatedTrajectory->timeRange ()); diff --git a/tests/fixed-point-state-function.cc b/tests/fixed-point-state-function.cc index c41006e..ec410c6 100644 --- a/tests/fixed-point-state-function.cc +++ b/tests/fixed-point-state-function.cc @@ -48,7 +48,7 @@ int run_test () Spline spline (timeRange, 3, params, "before"); typedef FreeTimeTrajectory<Spline::derivabilityOrder> freeTimeTraj_t; - freeTimeTraj_t ftt (spline, 1.); + freeTimeTraj_t ftt (spline, 2.); for (unsigned i = 0; i < 10; ++i) { diff --git a/tests/fixed-point-state-function.stdout b/tests/fixed-point-state-function.stdout index 3792f3e..e3d41d3 100644 --- a/tests/fixed-point-state-function.stdout +++ b/tests/fixed-point-state-function.stdout @@ -19,19 +19,19 @@ Check state cost gradient. State cost evaluation: -[1](3.90625) +[1](7.8125) State cost gradient: -[13](0,-0.15625,0,15.2995,0.15625,0,0.325521,0,0,0,0,0,0) +[13](0,-0.3125,0,30.599,0.3125,0,0.651042,0,0,0,0,0,0) Trajectory state (splitted): [3](0.520833,2.08333,0) -[3](3.90625,15.625,0) +[3](7.8125,31.25,0) Trajectory state (one call): -[6](0.520833,2.08333,0,3.90625,15.625,0) +[6](0.520833,2.08333,0,7.8125,31.25,0) Trajectory state variation (splitted): -[3,13]((1.5625,0.979167,0,0,0.0208333,0,0,0,0,0,0,0,0),(6.25,0,0.979167,0,0,0.0208333,0,0,0,0,0,0,0),(0,0,0,0.979167,0,0,0.0208333,0,0,0,0,0,0)) -[3,13]((5.46875,-0.15625,0,0,0.15625,0,0,0,0,0,0,0,0),(21.875,0,-0.15625,0,0,0.15625,0,0,0,0,0,0,0),(0,0,0,-0.15625,0,0,0.15625,0,0,0,0,0,0)) +[3,13]((0.78125,0.979167,0,0,0.0208333,0,0,0,0,0,0,0,0),(3.125,0,0.979167,0,0,0.0208333,0,0,0,0,0,0,0),(0,0,0,0.979167,0,0,0.0208333,0,0,0,0,0,0)) +[3,13]((5.46875,-0.3125,0,0,0.3125,0,0,0,0,0,0,0,0),(21.875,0,-0.3125,0,0,0.3125,0,0,0,0,0,0,0),(0,0,0,-0.3125,0,0,0.3125,0,0,0,0,0,0)) Trajectory state (one call): -[6,13]((1.5625,0.979167,0,0,0.0208333,0,0,0,0,0,0,0,0),(6.25,0,0.979167,0,0,0.0208333,0,0,0,0,0,0,0),(0,0,0,0.979167,0,0,0.0208333,0,0,0,0,0,0),(5.46875,-0.15625,0,0,0.15625,0,0,0,0,0,0,0,0),(21.875,0,-0.15625,0,0,0.15625,0,0,0,0,0,0,0),(0,0,0,-0.15625,0,0,0.15625,0,0,0,0,0,0)) +[6,13]((0.78125,0.979167,0,0,0.0208333,0,0,0,0,0,0,0,0),(3.125,0,0.979167,0,0,0.0208333,0,0,0,0,0,0,0),(0,0,0,0.979167,0,0,0.0208333,0,0,0,0,0,0),(5.46875,-0.3125,0,0,0.3125,0,0,0,0,0,0,0,0),(21.875,0,-0.3125,0,0,0.3125,0,0,0,0,0,0,0),(0,0,0,-0.3125,0,0,0.3125,0,0,0,0,0,0)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -39,19 +39,19 @@ Check state cost gradient. State cost evaluation: -[1](15.625) +[1](31.25) State cost gradient: -[13](0,-0.625,0,52.0833,0.625,0,10.4167,0,0,0,0,0,0) +[13](0,-1.25,0,104.167,1.25,0,20.8333,0,0,0,0,0,0) Trajectory state (splitted): [3](4.16667,16.6667,0) -[3](15.625,62.5,0) +[3](31.25,125,0) Trajectory state (one call): -[6](4.16667,16.6667,0,15.625,62.5,0) +[6](4.16667,16.6667,0,31.25,125,0) Trajectory state variation (splitted): -[3,13]((12.5,0.833333,0,0,0.166667,0,0,0,0,0,0,0,0),(50,0,0.833333,0,0,0.166667,0,0,0,0,0,0,0),(0,0,0,0.833333,0,0,0.166667,0,0,0,0,0,0)) -[3,13]((28.125,-0.625,0,0,0.625,0,0,0,0,0,0,0,0),(112.5,0,-0.625,0,0,0.625,0,0,0,0,0,0,0),(0,0,0,-0.625,0,0,0.625,0,0,0,0,0,0)) +[3,13]((6.25,0.833333,0,0,0.166667,0,0,0,0,0,0,0,0),(25,0,0.833333,0,0,0.166667,0,0,0,0,0,0,0),(0,0,0,0.833333,0,0,0.166667,0,0,0,0,0,0)) +[3,13]((28.125,-1.25,0,0,1.25,0,0,0,0,0,0,0,0),(112.5,0,-1.25,0,0,1.25,0,0,0,0,0,0,0),(0,0,0,-1.25,0,0,1.25,0,0,0,0,0,0)) Trajectory state (one call): -[6,13]((12.5,0.833333,0,0,0.166667,0,0,0,0,0,0,0,0),(50,0,0.833333,0,0,0.166667,0,0,0,0,0,0,0),(0,0,0,0.833333,0,0,0.166667,0,0,0,0,0,0),(28.125,-0.625,0,0,0.625,0,0,0,0,0,0,0,0),(112.5,0,-0.625,0,0,0.625,0,0,0,0,0,0,0),(0,0,0,-0.625,0,0,0.625,0,0,0,0,0,0)) +[6,13]((6.25,0.833333,0,0,0.166667,0,0,0,0,0,0,0,0),(25,0,0.833333,0,0,0.166667,0,0,0,0,0,0,0),(0,0,0,0.833333,0,0,0.166667,0,0,0,0,0,0),(28.125,-1.25,0,0,1.25,0,0,0,0,0,0,0,0),(112.5,0,-1.25,0,0,1.25,0,0,0,0,0,0,0),(0,0,0,-1.25,0,0,1.25,0,0,0,0,0,0)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -59,19 +59,19 @@ Check state cost gradient. State cost evaluation: -[1](31.25) +[1](62.5) State cost gradient: -[13](0,-0.9375,0,39.0625,0.78125,0,37.4349,0.15625,0,1.6276,0,0,0) +[13](0,-1.875,0,78.125,1.5625,0,74.8698,0.3125,0,3.25521,0,0,0) Trajectory state (splitted): [3](13.5417,47.9167,0) -[3](31.25,78.125,0) +[3](62.5,156.25,0) Trajectory state (one call): -[6](13.5417,47.9167,0,31.25,78.125,0) +[6](13.5417,47.9167,0,62.5,156.25,0) Trajectory state variation (splitted): -[3,13]((37.5,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0,0),(93.75,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0),(0,0,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0)) -[3,13]((68.75,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0,0),(171.875,0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0),(0,0,0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0)) +[3,13]((18.75,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0,0),(46.875,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0),(0,0,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0)) +[3,13]((68.75,-1.875,0,0,1.5625,0,0,0.3125,0,0,0,0,0),(171.875,0,-1.875,0,0,1.5625,0,0,0.3125,0,0,0,0),(0,0,0,-1.875,0,0,1.5625,0,0,0.3125,0,0,0)) Trajectory state (one call): -[6,13]((37.5,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0,0),(93.75,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0),(0,0,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0),(68.75,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0,0),(171.875,0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0),(0,0,0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0)) +[6,13]((18.75,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0,0),(46.875,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0),(0,0,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0),(68.75,-1.875,0,0,1.5625,0,0,0.3125,0,0,0,0,0),(171.875,0,-1.875,0,0,1.5625,0,0,0.3125,0,0,0,0),(0,0,0,-1.875,0,0,1.5625,0,0,0.3125,0,0,0)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -79,19 +79,19 @@ Check state cost gradient. State cost evaluation: -[1](46.875) +[1](93.75) State cost gradient: -[13](0,-0.625,0,0,0,0,0,0.625,0,0,0,0,0) +[13](0,-1.25,0,0,0,0,0,1.25,0,0,0,0,0) Trajectory state (splitted): [3](29.1667,66.6667,0) -[3](46.875,0,0) +[3](93.75,0,0) Trajectory state (one call): -[6](29.1667,66.6667,0,46.875,0,0) +[6](29.1667,66.6667,0,93.75,0,0) Trajectory state variation (splitted): -[3,13]((75,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0,0),(0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0),(0,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0)) -[3,13]((121.875,-0.625,0,0,0,0,0,0.625,0,0,0,0,0),(0,0,-0.625,0,0,0,0,0,0.625,0,0,0,0),(0,0,0,-0.625,0,0,0,0,0,0.625,0,0,0)) +[3,13]((37.5,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0,0),(0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0),(0,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0)) +[3,13]((121.875,-1.25,0,0,0,0,0,1.25,0,0,0,0,0),(0,0,-1.25,0,0,0,0,0,1.25,0,0,0,0),(0,0,0,-1.25,0,0,0,0,0,1.25,0,0,0)) Trajectory state (one call): -[6,13]((75,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0,0),(0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0),(0,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0),(121.875,-0.625,0,0,0,0,0,0.625,0,0,0,0,0),(0,0,-0.625,0,0,0,0,0,0.625,0,0,0,0),(0,0,0,-0.625,0,0,0,0,0,0.625,0,0,0)) +[6,13]((37.5,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0,0),(0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0),(0,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0),(121.875,-1.25,0,0,0,0,0,1.25,0,0,0,0,0),(0,0,-1.25,0,0,0,0,0,1.25,0,0,0,0),(0,0,0,-1.25,0,0,0,0,0,1.25,0,0,0)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -99,19 +99,19 @@ Check state cost gradient. State cost evaluation: -[1](54.6875) +[1](109.375) State cost gradient: -[13](0,-0.15625,0,-1.30208,-0.78125,0,-29.9479,0.78125,0,-29.9479,0.15625,0,-1.30208) +[13](0,-0.3125,0,-2.60417,-1.5625,0,-59.8958,1.5625,0,-59.8958,0.3125,0,-2.60417) Trajectory state (splitted): [3](50,50,0) -[3](54.6875,-62.5,0) +[3](109.375,-125,0) Trajectory state (one call): -[6](50,50,0,54.6875,-62.5,0) +[6](50,50,0,109.375,-125,0) Trajectory state variation (splitted): -[3,13]((109.375,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0,0),(-125,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0),(0,0,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333)) -[3,13]((164.062,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0,0),(-187.5,0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0),(0,0,0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625)) +[3,13]((54.6875,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0,0),(-62.5,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0),(0,0,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333)) +[3,13]((164.062,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125,0,0),(-187.5,0,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125,0),(0,0,0,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125)) Trajectory state (one call): -[6,13]((109.375,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0,0),(-125,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0),(0,0,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333),(164.062,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0,0),(-187.5,0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0),(0,0,0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625)) +[6,13]((54.6875,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0,0),(-62.5,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0),(0,0,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333),(164.062,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125,0,0),(-187.5,0,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125,0),(0,0,0,-0.3125,0,0,-1.5625,0,0,1.5625,0,0,0.3125)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -119,19 +119,19 @@ Check state cost gradient. State cost evaluation: -[1](46.875) +[1](93.75) State cost gradient: -[13](0,0,0,1.00781e-30,-0.625,0,-1.81198e-14,1.11022e-15,0,-7.24791e-14,0.625,0,-1.81198e-14) +[13](0,0,0,2.01563e-30,-1.25,0,-3.62395e-14,2.22045e-15,0,-1.44958e-13,1.25,0,-3.62395e-14) Trajectory state (splitted): [3](70.8333,33.3333,0) -[3](46.875,-1.08719e-13,0) +[3](93.75,-2.17437e-13,0) Trajectory state (one call): -[6](70.8333,33.3333,0,46.875,-1.08719e-13,0) +[6](70.8333,33.3333,0,93.75,-2.17437e-13,0) Trajectory state variation (splitted): -[3,13]((112.5,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0),(-2.60925e-13,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0),(0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667)) -[3,13]((159.375,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0,0),(-3.69643e-13,0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0),(0,0,0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625)) +[3,13]((56.25,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0),(-1.30462e-13,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0),(0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667)) +[3,13]((159.375,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25,0,0),(-3.69643e-13,0,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25,0),(0,0,0,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25)) Trajectory state (one call): -[6,13]((112.5,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0),(-2.60925e-13,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0),(0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667),(159.375,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0,0),(-3.69643e-13,0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0),(0,0,0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625)) +[6,13]((56.25,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0),(-1.30462e-13,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0),(0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667),(159.375,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25,0,0),(-3.69643e-13,0,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25,0),(0,0,0,0,0,0,-1.25,0,0,2.22045e-15,0,0,1.25)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -139,19 +139,19 @@ Check state cost gradient. State cost evaluation: -[1](31.25) +[1](62.5) State cost gradient: -[13](0,0,0,0,-0.15625,0,1.6276,-0.78125,0,37.4349,0.9375,0,39.0625) +[13](0,0,0,0,-0.3125,0,3.25521,-1.5625,0,74.8698,1.875,0,78.125) Trajectory state (splitted): [3](86.4583,52.0833,0) -[3](31.25,78.125,0) +[3](62.5,156.25,0) Trajectory state (one call): -[6](86.4583,52.0833,0,31.25,78.125,0) +[6](86.4583,52.0833,0,62.5,156.25,0) Trajectory state variation (splitted): -[3,13]((87.5,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0,0),(218.75,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0),(0,0,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5)) -[3,13]((118.75,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0,0),(296.875,0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0),(0,0,0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375)) +[3,13]((43.75,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0,0),(109.375,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0),(0,0,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5)) +[3,13]((118.75,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875,0,0),(296.875,0,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875,0),(0,0,0,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875)) Trajectory state (one call): -[6,13]((87.5,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0,0),(218.75,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0),(0,0,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5),(118.75,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0,0),(296.875,0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0),(0,0,0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375)) +[6,13]((43.75,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0,0),(109.375,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0),(0,0,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5),(118.75,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875,0,0),(296.875,0,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875,0),(0,0,0,0,0,0,-0.3125,0,0,-1.5625,0,0,1.875)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -159,19 +159,19 @@ Check state cost gradient. State cost evaluation: -[1](15.625) +[1](31.25) State cost gradient: -[13](0,0,0,0,0,0,-5.79371e-16,-0.625,0,10.4167,0.625,0,52.0833) +[13](0,0,0,0,0,0,-1.15874e-15,-1.25,0,20.8333,1.25,0,104.167) Trajectory state (splitted): [3](95.8333,83.3333,0) -[3](15.625,62.5,0) +[3](31.25,125,0) Trajectory state (one call): -[6](95.8333,83.3333,0,15.625,62.5,0) +[6](95.8333,83.3333,0,31.25,125,0) Trajectory state variation (splitted): -[3,13]((50,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0,0),(200,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0),(0,0,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333)) -[3,13]((65.625,0,0,0,0,0,0,-0.625,0,0,0.625,0,0),(262.5,0,0,0,0,0,0,0,-0.625,0,0,0.625,0),(0,0,0,0,0,0,0,0,0,-0.625,0,0,0.625)) +[3,13]((25,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0,0),(100,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0),(0,0,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333)) +[3,13]((65.625,0,0,0,0,0,0,-1.25,0,0,1.25,0,0),(262.5,0,0,0,0,0,0,0,-1.25,0,0,1.25,0),(0,0,0,0,0,0,0,0,0,-1.25,0,0,1.25)) Trajectory state (one call): -[6,13]((50,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0,0),(200,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0),(0,0,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333),(65.625,0,0,0,0,0,0,-0.625,0,0,0.625,0,0),(262.5,0,0,0,0,0,0,0,-0.625,0,0,0.625,0),(0,0,0,0,0,0,0,0,0,-0.625,0,0,0.625)) +[6,13]((25,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0,0),(100,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0),(0,0,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333),(65.625,0,0,0,0,0,0,-1.25,0,0,1.25,0,0),(262.5,0,0,0,0,0,0,0,-1.25,0,0,1.25,0),(0,0,0,0,0,0,0,0,0,-1.25,0,0,1.25)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. @@ -179,19 +179,19 @@ Check state cost gradient. State cost evaluation: -[1](3.90625) +[1](7.8125) State cost gradient: -[13](0,0,0,0,0,0,0,-0.15625,0,0.325521,0.15625,0,15.2995) +[13](0,0,0,0,0,0,0,-0.3125,0,0.651042,0.3125,0,30.599) Trajectory state (splitted): [3](99.4792,97.9167,0) -[3](3.90625,15.625,0) +[3](7.8125,31.25,0) Trajectory state (one call): -[6](99.4792,97.9167,0,3.90625,15.625,0) +[6](99.4792,97.9167,0,7.8125,31.25,0) Trajectory state variation (splitted): -[3,13]((14.0625,0,0,0,0,0,0,0.0208333,0,0,0.979167,0,0),(56.25,0,0,0,0,0,0,0,0.0208333,0,0,0.979167,0),(0,0,0,0,0,0,0,0,0,0.0208333,0,0,0.979167)) -[3,13]((17.9687,0,0,0,0,0,0,-0.15625,0,0,0.15625,0,0),(71.875,0,0,0,0,0,0,0,-0.15625,0,0,0.15625,0),(0,0,0,0,0,0,0,0,0,-0.15625,0,0,0.15625)) +[3,13]((7.03125,0,0,0,0,0,0,0.0208333,0,0,0.979167,0,0),(28.125,0,0,0,0,0,0,0,0.0208333,0,0,0.979167,0),(0,0,0,0,0,0,0,0,0,0.0208333,0,0,0.979167)) +[3,13]((17.9687,0,0,0,0,0,0,-0.3125,0,0,0.3125,0,0),(71.875,0,0,0,0,0,0,0,-0.3125,0,0,0.3125,0),(0,0,0,0,0,0,0,0,0,-0.3125,0,0,0.3125)) Trajectory state (one call): -[6,13]((14.0625,0,0,0,0,0,0,0.0208333,0,0,0.979167,0,0),(56.25,0,0,0,0,0,0,0,0.0208333,0,0,0.979167,0),(0,0,0,0,0,0,0,0,0,0.0208333,0,0,0.979167),(17.9687,0,0,0,0,0,0,-0.15625,0,0,0.15625,0,0),(71.875,0,0,0,0,0,0,0,-0.15625,0,0,0.15625,0),(0,0,0,0,0,0,0,0,0,-0.15625,0,0,0.15625)) +[6,13]((7.03125,0,0,0,0,0,0,0.0208333,0,0,0.979167,0,0),(28.125,0,0,0,0,0,0,0,0.0208333,0,0,0.979167,0),(0,0,0,0,0,0,0,0,0,0.0208333,0,0,0.979167),(17.9687,0,0,0,0,0,0,-0.3125,0,0,0.3125,0,0),(71.875,0,0,0,0,0,0,0,-0.3125,0,0,0.3125,0),(0,0,0,0,0,0,0,0,0,-0.3125,0,0,0.3125)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. commit e1616107146e2c29d22d8c094a911be9b67b3a09 Author: Thomas Moulard <tho...@gm...> Date: Wed Nov 4 17:59:40 2009 +0100 Implement resize in all trajectory classes. * include/roboptim/trajectory/free-time-trajectory.hh: Implement resize. * include/roboptim/trajectory/spline.hh: Implement resize and makeFixedTimeTrajectory. * include/roboptim/trajectory/trajectory.hh: Add resize as a virtual pure method. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 0bd2794..f2ea541 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2009-11-04 Thomas Moulard <tho...@gm...> + Implement resize in all trajectory classes. + * include/roboptim/trajectory/free-time-trajectory.hh: + Implement resize. + * include/roboptim/trajectory/spline.hh: Implement resize + and makeFixedTimeTrajectory. + * include/roboptim/trajectory/trajectory.hh: Add resize + as a virtual pure method. + +2009-11-04 Thomas Moulard <tho...@gm...> + Check FixedPointTrajectory class. * include/roboptim/trajectory/fixed-point-state-function.hh, * include/roboptim/trajectory/fixed-point-state-function.hxx: diff --git a/include/roboptim/trajectory/free-time-trajectory.hh b/include/roboptim/trajectory/free-time-trajectory.hh index 08b537a..a97f699 100644 --- a/include/roboptim/trajectory/free-time-trajectory.hh +++ b/include/roboptim/trajectory/free-time-trajectory.hh @@ -104,12 +104,33 @@ namespace roboptim /// \param index Angles index in parameter array. virtual void normalizeAngles (size_type index) throw (); - const Trajectory<DerivabilityOrder>& getFixedTimeTrajectory () - const throw () + const Trajectory<DerivabilityOrder>& + getFixedTimeTrajectory () const throw () { assert (trajectory_); return *trajectory_; } + + Trajectory<DerivabilityOrder>* + resize (interval_t timeRange) const throw () + { + assert (trajectory_); + value_type tMin = getLowerBound (this->timeRange ()); + value_type tMax = getUpperBound (this->timeRange ()); + value_type tmin = getLowerBound (this->trajectory_->timeRange ()); + value_type tmax = getUpperBound (this->trajectory_->timeRange ()); + value_type scale = (tmax - tmin) / (tMax - tMin); + + return new FreeTimeTrajectory<DerivabilityOrder> + (*trajectory_, scale); + } + + Trajectory<DerivabilityOrder>* + makeFixedTimeTrajectory () const throw () + { + assert (trajectory_); + return trajectory_->resize (this->timeRange ()); + } protected: void impl_compute (result_t&, double) const throw (); void impl_derivative (gradient_t& g, double x, size_type order) diff --git a/include/roboptim/trajectory/spline.hh b/include/roboptim/trajectory/spline.hh index 3bb7044..9a41255 100644 --- a/include/roboptim/trajectory/spline.hh +++ b/include/roboptim/trajectory/spline.hh @@ -77,6 +77,12 @@ namespace roboptim ROBOPTIM_IMPLEMENT_CLONE(Spline) + virtual Trajectory<derivabilityOrder>* resize (interval_t timeRange) + const throw () + { + return new Spline (timeRange, this->outputSize (), this->parameters ()); + } + /// \brief Display the function on the specified output stream. /// /// \param o output stream used for display diff --git a/include/roboptim/trajectory/trajectory.hh b/include/roboptim/trajectory/trajectory.hh index 2679e52..e7d934a 100644 --- a/include/roboptim/trajectory/trajectory.hh +++ b/include/roboptim/trajectory/trajectory.hh @@ -241,6 +241,10 @@ namespace roboptim virtual Trajectory<DerivabilityOrder>* clone () const throw () = 0; + /// \brief Clone and resize a trajectory. + virtual Trajectory<DerivabilityOrder>* resize (interval_t timeRange) + const throw () = 0; + virtual std::ostream& print (std::ostream&) const throw (); protected: void impl_compute (result_t&, StableTimePoint) const throw (); ----------------------------------------------------------------------- Summary of changes: ChangeLog | 19 +++ .../trajectory/fixed-point-state-function.hxx | 8 +- .../roboptim/trajectory/free-time-trajectory.hh | 25 ++++- include/roboptim/trajectory/spline.hh | 6 + include/roboptim/trajectory/trajectory.hh | 4 + tests/fixed-point-state-function.cc | 2 +- tests/fixed-point-state-function.stdout | 126 ++++++++++---------- 7 files changed, 120 insertions(+), 70 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-04 10:33:18
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 069c7b43f75a55a249ec92065c301001586c1872 (commit) from 4e4d008559a1549e566a2842019dc8d2e724db21 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 069c7b43f75a55a249ec92065c301001586c1872 Author: Thomas Moulard <tho...@gm...> Date: Wed Nov 4 11:33:01 2009 +0100 Check FixedPointTrajectory class. * include/roboptim/trajectory/fixed-point-state-function.hh, * include/roboptim/trajectory/fixed-point-state-function.hxx: Fix minor implementation problems. * tests/Makefile.am: Run test and distribute reference file. * tests/fixed-point-state-function.cc: New. * tests/fixed-point-state-function.stdout: New. * tests/testsuite.at: Run new test case. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 32cd048..0bd2794 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2009-11-04 Thomas Moulard <tho...@gm...> + + Check FixedPointTrajectory class. + * include/roboptim/trajectory/fixed-point-state-function.hh, + * include/roboptim/trajectory/fixed-point-state-function.hxx: + Fix minor implementation problems. + * tests/Makefile.am: Run test and distribute reference file. + * tests/fixed-point-state-function.cc: New. + * tests/fixed-point-state-function.stdout: New. + * tests/testsuite.at: Run new test case. + 2009-11-03 Thomas Moulard <tho...@gm...> Implement FixedPointStateFunction. diff --git a/include/roboptim/trajectory/fixed-point-state-function.hh b/include/roboptim/trajectory/fixed-point-state-function.hh index 762e4e9..15f0012 100644 --- a/include/roboptim/trajectory/fixed-point-state-function.hh +++ b/include/roboptim/trajectory/fixed-point-state-function.hh @@ -23,6 +23,7 @@ # include <roboptim/trajectory/fwd.hh> # include <roboptim/core/derivable-function.hh> +# include <roboptim/trajectory/free-time-trajectory.hh> # include <roboptim/trajectory/stable-time-point.hh> namespace roboptim @@ -54,7 +55,7 @@ namespace roboptim { public: /// \brief Trajectory type. - typedef FreeTimeTrajectory<T> trajectory_t; + typedef FreeTimeTrajectory<T::derivabilityOrder> trajectory_t; /// \brief Constructor. /// @@ -86,7 +87,8 @@ namespace roboptim const value_type t = (i + 1.) / (nConstraints + 1.); assert (t > 0. && t < 1.); shared_ptr<DerivableFunction> constraint - (new StateFunction (trajectory, function, t * tMax, order)); + (new FixedPointStateFunction + (trajectory, function, t * tMax, order)); problem.addConstraint (constraint, bounds); } } diff --git a/include/roboptim/trajectory/fixed-point-state-function.hxx b/include/roboptim/trajectory/fixed-point-state-function.hxx index eceb978..3fabf85 100644 --- a/include/roboptim/trajectory/fixed-point-state-function.hxx +++ b/include/roboptim/trajectory/fixed-point-state-function.hxx @@ -57,13 +57,14 @@ namespace roboptim FixedPointStateFunction<T>::impl_compute (result_t& res, const argument_t& p) const throw () { - static boost::shared_ptr<T> updatedTrajectory = - boost::shared_ptr<trajectory_t> - (trajectory_->getFixedPointTrajectory ().clone ()); + static boost::shared_ptr<Trajectory<T::derivabilityOrder> > updatedTrajectory = + boost::shared_ptr<Trajectory<T::derivabilityOrder> > + (trajectory_.getFixedTimeTrajectory ().clone ()); + updatedTrajectory->setParameters (removeScaleFromParameters (p)); (*function_) (res, updatedTrajectory->state - (tpt_.getTime (updatedTrajectory->timeRange ()), - this->order_)); + (tpt_.getTime (updatedTrajectory->timeRange ()), + this->order_)); } template <typename T> @@ -74,18 +75,19 @@ namespace roboptim { using namespace boost::numeric::ublas; - static boost::shared_ptr<T> updatedTrajectory = - boost::shared_ptr<trajectory_t> - (trajectory_->getFixedPointTrajectory ().clone ()); + static boost::shared_ptr<Trajectory<T::derivabilityOrder> > updatedTrajectory = + boost::shared_ptr<Trajectory<T::derivabilityOrder> > + (trajectory_.getFixedTimeTrajectory ().clone ()); updatedTrajectory->setParameters (removeScaleFromParameters (p)); const value_type t = tpt_.getTime (updatedTrajectory->timeRange ()); grad[0] = 0.; + subrange (grad, 1, grad.size ()) = prod (function_->gradient - (updatedTrajectory->state (t, this->order_), i), - updatedTrajectory->variationStateWrtParam (t, this->order_)); + (updatedTrajectory->state (t, this->order_), i), + updatedTrajectory->variationStateWrtParam (t, this->order_)); } } // end of namespace roboptim. diff --git a/tests/Makefile.am b/tests/Makefile.am index 6d7111b..9d70f2a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -42,6 +42,13 @@ check_PROGRAMS += state-function state_function_SOURCES = state-function.cc $(COMMON_SOURCES) state_function_LDADD = $(top_builddir)/src/libroboptim-trajectory.la +# fixed-point-state-function +check_PROGRAMS += fixed-point-state-function +fixed_point_state_function_SOURCES = fixed-point-state-function.cc \ + $(COMMON_SOURCES) +fixed_point_state_function_LDADD = $(top_builddir)/src/libroboptim-trajectory.la + + ######################################### # Tests which require the CFSQP solver. # ######################################### @@ -153,6 +160,7 @@ EXTRA_DIST += \ anthropomorphic-cost-function-case-4.stdout \ anthropomorphic-cost-function-case-5.stdout \ anthropomorphic-cost-function-case-6.stdout \ + fixed-point-state-function.stdout \ free-time-trajectory.stdout \ simple.stdout \ spline-gradient.stdout \ @@ -160,4 +168,4 @@ EXTRA_DIST += \ spline-bicycle-optim.stdout \ spline-time-optimization.stdout \ spline.stdout \ - state-cost.stdout + state-function.stdout diff --git a/tests/fixed-point-state-function.cc b/tests/fixed-point-state-function.cc new file mode 100644 index 0000000..c41006e --- /dev/null +++ b/tests/fixed-point-state-function.cc @@ -0,0 +1,104 @@ +// Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#include "common.hh" + +#include <roboptim/core/io.hh> +#include <roboptim/core/finite-difference-gradient.hh> + +#include <roboptim/trajectory/free-time-trajectory.hh> +#include <roboptim/trajectory/frontal-speed.hh> +#include <roboptim/trajectory/orthogonal-speed.hh> +#include <roboptim/trajectory/spline.hh> +#include <roboptim/trajectory/fixed-point-state-function.hh> + +using namespace roboptim; + +int run_test () +{ + const unsigned orderMax = 1; + Spline::vector_t params (12); + + // Initial position. + params[0] = 0., params[1] = 0., params[2] = 0.; + // Control point 1. + params[3] = 25., params[4] = 100., params[5] = 0.; + // Control point 2. + params[6] = 75., params[7] = 0., params[8] = 0.; + // Final position. + params[9] = 100., params[10] = 100., params[11] = 0.; + + Spline::vector_t fttParams = addScaleToParameters (params, 1.5); + + Spline::interval_t timeRange = Spline::makeInterval (0., 4.); + Spline spline (timeRange, 3, params, "before"); + + typedef FreeTimeTrajectory<Spline::derivabilityOrder> freeTimeTraj_t; + freeTimeTraj_t ftt (spline, 1.); + + for (unsigned i = 0; i < 10; ++i) + { + const StableTimePoint timePoint = i / 10. * tMax; + const double t = timePoint.getTime (ftt.timeRange ()); + + boost::shared_ptr<DerivableFunction> frontalSpeed (new FrontalSpeed ()); + FixedPointStateFunction<Spline> stateFunction + (ftt, frontalSpeed, timePoint, orderMax); + + boost::shared_ptr<DerivableFunction> orthogonalSpeed + (new OrthogonalSpeed ()); + FixedPointStateFunction<Spline> orthoStateFunction + (ftt, orthogonalSpeed, timePoint, orderMax); + + std::cout << "State cost evaluation:" << std::endl + << stateFunction (fttParams) << std::endl + << "State cost gradient:" << std::endl + << stateFunction.gradient (fttParams) << std::endl + << "Trajectory state (splitted):" << std::endl; + for (unsigned o = 0; o <= orderMax; ++o) + std::cout << ftt.derivative (t, o) << std::endl; + std::cout << "Trajectory state (one call):" << std::endl + << ftt.state (t, orderMax) << std::endl + << "Trajectory state variation (splitted):" << std::endl; + for (unsigned o = 0; o <= orderMax; ++o) + std::cout << ftt.variationDerivWrtParam (t, o) << std::endl; + std::cout << "Trajectory state (one call):" << std::endl + << ftt.variationStateWrtParam (t, orderMax) << std::endl; + + try + { + std::cout << "Check frontal speed gradient." << std::endl; + checkGradientAndThrow (*frontalSpeed, 0, ftt.state (t, orderMax)); + + std::cout << "Check orthogonal speed gradient." << std::endl; + checkGradientAndThrow (*orthogonalSpeed, 0, + ftt.state (t, orderMax)); + + std::cout << "Check state cost gradient." << std::endl; + checkGradientAndThrow (stateFunction, 0, fttParams); + } + catch (BadGradient& bg) + { + std::cout << bg << std::endl; + } + std::cout << "\n\n" << std::endl; + } + + return 0; +} + +GENERATE_TEST () diff --git a/tests/fixed-point-state-function.stdout b/tests/fixed-point-state-function.stdout new file mode 100644 index 0000000..3792f3e --- /dev/null +++ b/tests/fixed-point-state-function.stdout @@ -0,0 +1,200 @@ +State cost evaluation: +[1](0) +State cost gradient: +[13](0,0,0,0,0,0,0,0,0,0,0,0,0) +Trajectory state (splitted): +[3](0,0,0) +[3](0,0,0) +Trajectory state (one call): +[6](0,0,0,0,0,0) +Trajectory state variation (splitted): +[3,13]((0,1,0,0,0,0,0,0,0,0,0,0,0),(0,0,1,0,0,0,0,0,0,0,0,0,0),(0,0,0,1,0,0,0,0,0,0,0,0,0)) +[3,13]((0,0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0)) +Trajectory state (one call): +[6,13]((0,1,0,0,0,0,0,0,0,0,0,0,0),(0,0,1,0,0,0,0,0,0,0,0,0,0),(0,0,0,1,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](3.90625) +State cost gradient: +[13](0,-0.15625,0,15.2995,0.15625,0,0.325521,0,0,0,0,0,0) +Trajectory state (splitted): +[3](0.520833,2.08333,0) +[3](3.90625,15.625,0) +Trajectory state (one call): +[6](0.520833,2.08333,0,3.90625,15.625,0) +Trajectory state variation (splitted): +[3,13]((1.5625,0.979167,0,0,0.0208333,0,0,0,0,0,0,0,0),(6.25,0,0.979167,0,0,0.0208333,0,0,0,0,0,0,0),(0,0,0,0.979167,0,0,0.0208333,0,0,0,0,0,0)) +[3,13]((5.46875,-0.15625,0,0,0.15625,0,0,0,0,0,0,0,0),(21.875,0,-0.15625,0,0,0.15625,0,0,0,0,0,0,0),(0,0,0,-0.15625,0,0,0.15625,0,0,0,0,0,0)) +Trajectory state (one call): +[6,13]((1.5625,0.979167,0,0,0.0208333,0,0,0,0,0,0,0,0),(6.25,0,0.979167,0,0,0.0208333,0,0,0,0,0,0,0),(0,0,0,0.979167,0,0,0.0208333,0,0,0,0,0,0),(5.46875,-0.15625,0,0,0.15625,0,0,0,0,0,0,0,0),(21.875,0,-0.15625,0,0,0.15625,0,0,0,0,0,0,0),(0,0,0,-0.15625,0,0,0.15625,0,0,0,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](15.625) +State cost gradient: +[13](0,-0.625,0,52.0833,0.625,0,10.4167,0,0,0,0,0,0) +Trajectory state (splitted): +[3](4.16667,16.6667,0) +[3](15.625,62.5,0) +Trajectory state (one call): +[6](4.16667,16.6667,0,15.625,62.5,0) +Trajectory state variation (splitted): +[3,13]((12.5,0.833333,0,0,0.166667,0,0,0,0,0,0,0,0),(50,0,0.833333,0,0,0.166667,0,0,0,0,0,0,0),(0,0,0,0.833333,0,0,0.166667,0,0,0,0,0,0)) +[3,13]((28.125,-0.625,0,0,0.625,0,0,0,0,0,0,0,0),(112.5,0,-0.625,0,0,0.625,0,0,0,0,0,0,0),(0,0,0,-0.625,0,0,0.625,0,0,0,0,0,0)) +Trajectory state (one call): +[6,13]((12.5,0.833333,0,0,0.166667,0,0,0,0,0,0,0,0),(50,0,0.833333,0,0,0.166667,0,0,0,0,0,0,0),(0,0,0,0.833333,0,0,0.166667,0,0,0,0,0,0),(28.125,-0.625,0,0,0.625,0,0,0,0,0,0,0,0),(112.5,0,-0.625,0,0,0.625,0,0,0,0,0,0,0),(0,0,0,-0.625,0,0,0.625,0,0,0,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](31.25) +State cost gradient: +[13](0,-0.9375,0,39.0625,0.78125,0,37.4349,0.15625,0,1.6276,0,0,0) +Trajectory state (splitted): +[3](13.5417,47.9167,0) +[3](31.25,78.125,0) +Trajectory state (one call): +[6](13.5417,47.9167,0,31.25,78.125,0) +Trajectory state variation (splitted): +[3,13]((37.5,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0,0),(93.75,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0),(0,0,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0)) +[3,13]((68.75,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0,0),(171.875,0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0),(0,0,0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0)) +Trajectory state (one call): +[6,13]((37.5,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0,0),(93.75,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0),(0,0,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0),(68.75,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0,0),(171.875,0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0),(0,0,0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](46.875) +State cost gradient: +[13](0,-0.625,0,0,0,0,0,0.625,0,0,0,0,0) +Trajectory state (splitted): +[3](29.1667,66.6667,0) +[3](46.875,0,0) +Trajectory state (one call): +[6](29.1667,66.6667,0,46.875,0,0) +Trajectory state variation (splitted): +[3,13]((75,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0,0),(0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0),(0,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0)) +[3,13]((121.875,-0.625,0,0,0,0,0,0.625,0,0,0,0,0),(0,0,-0.625,0,0,0,0,0,0.625,0,0,0,0),(0,0,0,-0.625,0,0,0,0,0,0.625,0,0,0)) +Trajectory state (one call): +[6,13]((75,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0,0),(0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0),(0,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0),(121.875,-0.625,0,0,0,0,0,0.625,0,0,0,0,0),(0,0,-0.625,0,0,0,0,0,0.625,0,0,0,0),(0,0,0,-0.625,0,0,0,0,0,0.625,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](54.6875) +State cost gradient: +[13](0,-0.15625,0,-1.30208,-0.78125,0,-29.9479,0.78125,0,-29.9479,0.15625,0,-1.30208) +Trajectory state (splitted): +[3](50,50,0) +[3](54.6875,-62.5,0) +Trajectory state (one call): +[6](50,50,0,54.6875,-62.5,0) +Trajectory state variation (splitted): +[3,13]((109.375,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0,0),(-125,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0),(0,0,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333)) +[3,13]((164.062,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0,0),(-187.5,0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0),(0,0,0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625)) +Trajectory state (one call): +[6,13]((109.375,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0,0),(-125,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0),(0,0,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333),(164.062,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0,0),(-187.5,0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0),(0,0,0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](46.875) +State cost gradient: +[13](0,0,0,1.00781e-30,-0.625,0,-1.81198e-14,1.11022e-15,0,-7.24791e-14,0.625,0,-1.81198e-14) +Trajectory state (splitted): +[3](70.8333,33.3333,0) +[3](46.875,-1.08719e-13,0) +Trajectory state (one call): +[6](70.8333,33.3333,0,46.875,-1.08719e-13,0) +Trajectory state variation (splitted): +[3,13]((112.5,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0),(-2.60925e-13,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0),(0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667)) +[3,13]((159.375,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0,0),(-3.69643e-13,0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0),(0,0,0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625)) +Trajectory state (one call): +[6,13]((112.5,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0),(-2.60925e-13,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0),(0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667),(159.375,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0,0),(-3.69643e-13,0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0),(0,0,0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](31.25) +State cost gradient: +[13](0,0,0,0,-0.15625,0,1.6276,-0.78125,0,37.4349,0.9375,0,39.0625) +Trajectory state (splitted): +[3](86.4583,52.0833,0) +[3](31.25,78.125,0) +Trajectory state (one call): +[6](86.4583,52.0833,0,31.25,78.125,0) +Trajectory state variation (splitted): +[3,13]((87.5,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0,0),(218.75,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0),(0,0,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5)) +[3,13]((118.75,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0,0),(296.875,0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0),(0,0,0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375)) +Trajectory state (one call): +[6,13]((87.5,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0,0),(218.75,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0),(0,0,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5),(118.75,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0,0),(296.875,0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0),(0,0,0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](15.625) +State cost gradient: +[13](0,0,0,0,0,0,-5.79371e-16,-0.625,0,10.4167,0.625,0,52.0833) +Trajectory state (splitted): +[3](95.8333,83.3333,0) +[3](15.625,62.5,0) +Trajectory state (one call): +[6](95.8333,83.3333,0,15.625,62.5,0) +Trajectory state variation (splitted): +[3,13]((50,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0,0),(200,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0),(0,0,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333)) +[3,13]((65.625,0,0,0,0,0,0,-0.625,0,0,0.625,0,0),(262.5,0,0,0,0,0,0,0,-0.625,0,0,0.625,0),(0,0,0,0,0,0,0,0,0,-0.625,0,0,0.625)) +Trajectory state (one call): +[6,13]((50,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0,0),(200,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0),(0,0,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333),(65.625,0,0,0,0,0,0,-0.625,0,0,0.625,0,0),(262.5,0,0,0,0,0,0,0,-0.625,0,0,0.625,0),(0,0,0,0,0,0,0,0,0,-0.625,0,0,0.625)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](3.90625) +State cost gradient: +[13](0,0,0,0,0,0,0,-0.15625,0,0.325521,0.15625,0,15.2995) +Trajectory state (splitted): +[3](99.4792,97.9167,0) +[3](3.90625,15.625,0) +Trajectory state (one call): +[6](99.4792,97.9167,0,3.90625,15.625,0) +Trajectory state variation (splitted): +[3,13]((14.0625,0,0,0,0,0,0,0.0208333,0,0,0.979167,0,0),(56.25,0,0,0,0,0,0,0,0.0208333,0,0,0.979167,0),(0,0,0,0,0,0,0,0,0,0.0208333,0,0,0.979167)) +[3,13]((17.9687,0,0,0,0,0,0,-0.15625,0,0,0.15625,0,0),(71.875,0,0,0,0,0,0,0,-0.15625,0,0,0.15625,0),(0,0,0,0,0,0,0,0,0,-0.15625,0,0,0.15625)) +Trajectory state (one call): +[6,13]((14.0625,0,0,0,0,0,0,0.0208333,0,0,0.979167,0,0),(56.25,0,0,0,0,0,0,0,0.0208333,0,0,0.979167,0),(0,0,0,0,0,0,0,0,0,0.0208333,0,0,0.979167),(17.9687,0,0,0,0,0,0,-0.15625,0,0,0.15625,0,0),(71.875,0,0,0,0,0,0,0,-0.15625,0,0,0.15625,0),(0,0,0,0,0,0,0,0,0,-0.15625,0,0,0.15625)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + diff --git a/tests/testsuite.at b/tests/testsuite.at index 9b23cd5..073654f 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -33,6 +33,7 @@ CHECK_STDOUT([spline], [Check Spline class.]) CHECK_STDOUT([spline-gradient], [Check Spline gradient.]) CHECK_STDOUT([free-time-trajectory], [Check free time trajectory.]) CHECK_STDOUT([state-function], [Check state function.]) +CHECK_STDOUT([fixed-point-state-function], [Check fixed point state function.]) AT_BANNER([Optimization (require solver plug-in)]) CHECK_STDOUT([spline-optimization], [Optimize a Spline with Cfsqp.], ----------------------------------------------------------------------- Summary of changes: ChangeLog | 11 + .../trajectory/fixed-point-state-function.hh | 6 +- .../trajectory/fixed-point-state-function.hxx | 22 ++- tests/Makefile.am | 10 +- ...e-function.cc => fixed-point-state-function.cc} | 36 ++-- tests/fixed-point-state-function.stdout | 200 ++++++++++++++++++++ tests/testsuite.at | 1 + 7 files changed, 258 insertions(+), 28 deletions(-) copy tests/{state-function.cc => fixed-point-state-function.cc} (72%) create mode 100644 tests/fixed-point-state-function.stdout hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-03 16:50:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 4e4d008559a1549e566a2842019dc8d2e724db21 (commit) from 826959a7d6d886a5eb6fe7ff64540ae447b635f9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4e4d008559a1549e566a2842019dc8d2e724db21 Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 3 17:49:47 2009 +0100 Implement FixedPointStateFunction. * include/Makefile.am: Distribute new files. * include/roboptim/trajectory/fixed-point-state-function.hh: New. * include/roboptim/trajectory/fixed-point-state-function.hxx: New. * include/roboptim/trajectory/free-time-trajectory.hh: Add getter to allow access to interal fixed time trajectory. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index d41ce68..32cd048 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2009-11-03 Thomas Moulard <tho...@gm...> + Implement FixedPointStateFunction. + * include/Makefile.am: Distribute new files. + * include/roboptim/trajectory/fixed-point-state-function.hh: New. + * include/roboptim/trajectory/fixed-point-state-function.hxx: New. + * include/roboptim/trajectory/free-time-trajectory.hh: Add + getter to allow access to interal fixed time trajectory. + +2009-11-03 Thomas Moulard <tho...@gm...> + Make StateFunction only usable with fixed point trajectory. * include/roboptim/trajectory/fwd.hh: Fix forward declaration. * include/roboptim/trajectory/state-function.hh, diff --git a/include/Makefile.am b/include/Makefile.am index 71a5d08..c471d02 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -4,6 +4,8 @@ include $(top_srcdir)/build-aux/init.mk nobase_include_HEADERS = \ roboptim/trajectory/anthropomorphic-cost-function.hh \ roboptim/trajectory/anthropomorphic-cost-function.hxx \ + roboptim/trajectory/fixed-point-state-function.hh \ + roboptim/trajectory/fixed-point-state-function.hxx \ roboptim/trajectory/free-time-trajectory.hh \ roboptim/trajectory/free-time-trajectory.hxx \ roboptim/trajectory/freeze.hh \ diff --git a/include/roboptim/trajectory/fixed-point-state-function.hh b/include/roboptim/trajectory/fixed-point-state-function.hh new file mode 100644 index 0000000..762e4e9 --- /dev/null +++ b/include/roboptim/trajectory/fixed-point-state-function.hh @@ -0,0 +1,111 @@ +// Copyright (C) 2009 by Florent Lamiraux, Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#ifndef ROBOPTIM_TRAJECTORY_FIXED_POINT_STATE_FUNCTION_HH +# define ROBOPTIM_TRAJECTORY_FIXED_POINT_STATE_FUNCTION_HH +# include <roboptim/trajectory/sys.hh> + +# include <boost/shared_ptr.hpp> + +# include <roboptim/trajectory/fwd.hh> +# include <roboptim/core/derivable-function.hh> +# include <roboptim/trajectory/stable-time-point.hh> + +namespace roboptim +{ + /// \addtogroup roboptim_meta_function + /// @{ + + /// \brief Trajectory cost function defined by state evaluation at parameter. + /// + /// The state along a trajectory is defined as the vector containing the + /// configuration and derivatives up to order \f$r\f$ of the + /// configuration. + /**\f[ +\textbf{Cost}(\Gamma) = cost +\left({\Gamma(t)}, {\dot{\Gamma}(t)},\cdots,\frac{d^{r}\Gamma}{dt^{r}}(t) +\right) + \f]*/ + /// where + /// - \f$\textbf{Cost}\f$ is the trajectory cost, + /// - \f$cost\f$ is the state cost, + /// - \f$t\f$ is the parameter along the trajectory where the cost is + /// evaluated (fixed at construction), + /// - \f$r\f$ is called the order of the state. + /// + /// \tparam T trajectory type + + template <typename T> + class FixedPointStateFunction : public DerivableFunction + { + public: + /// \brief Trajectory type. + typedef FreeTimeTrajectory<T> trajectory_t; + + /// \brief Constructor. + /// + /// \param gamma Trajectory \f$\Gamma\f$ along which the state is evaluated. + /// \param cost state cost: \f$cost\f$. + /// \param tpt parameter \f$t\f$ where the state is evaluated. + /// \param order order \f$r\f$ of derivation. + FixedPointStateFunction (const trajectory_t& gamma, + boost::shared_ptr<DerivableFunction> cost, + const StableTimePoint tpt, + size_type order = 1) throw (); + + virtual ~FixedPointStateFunction () throw (); + + size_type order () const throw (); + + template <typename F, typename CLIST> + static void addToProblem (const trajectory_t& trajectory, + boost::shared_ptr<DerivableFunction> function, + unsigned order, + Problem<F, CLIST>& problem, + typename Function::interval_t bounds, + unsigned nConstraints) + { + using namespace boost; + + for (unsigned i = 0; i < nConstraints; ++i) + { + const value_type t = (i + 1.) / (nConstraints + 1.); + assert (t > 0. && t < 1.); + shared_ptr<DerivableFunction> constraint + (new StateFunction (trajectory, function, t * tMax, order)); + problem.addConstraint (constraint, bounds); + } + } + + protected: + void impl_compute (result_t&, const argument_t&) const throw (); + void impl_gradient (gradient_t&, const argument_t&, size_type) + const throw (); + + private: + const trajectory_t& trajectory_; + boost::shared_ptr<DerivableFunction> function_; + StableTimePoint tpt_; + size_type order_; + }; + + /// @} + +} // end of namespace roboptim. + +# include <roboptim/trajectory/fixed-point-state-function.hxx> +#endif //! ROBOPTIM_TRAJECTORY_FIXED_POINT_STATE_FUNCTION_HH diff --git a/include/roboptim/trajectory/fixed-point-state-function.hxx b/include/roboptim/trajectory/fixed-point-state-function.hxx new file mode 100644 index 0000000..eceb978 --- /dev/null +++ b/include/roboptim/trajectory/fixed-point-state-function.hxx @@ -0,0 +1,94 @@ +// Copyright (C) 2009 by Florent Lamiraux, Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#ifndef ROBOPTIM_TRAJECTORY_FIXED_POINT_STATE_COST_HXX +# define ROBOPTIM_TRAJECTORY_FIXED_POINT_STATE_COST_HXX +# include <boost/format.hpp> + +namespace roboptim +{ + template <typename T> + FixedPointStateFunction<T>::FixedPointStateFunction + (const trajectory_t& trajectory, + boost::shared_ptr<DerivableFunction> function, + const StableTimePoint tpt, + size_type order) throw () + : DerivableFunction (trajectory.parameters ().size (), + function->outputSize (), + (boost::format + ("fixed point state cost using function ``%1%''") + % function->getName ()).str ()), + trajectory_ (trajectory), + function_ (function), + tpt_ (tpt), + order_ (order) + { + assert (function_->inputSize () == trajectory_.outputSize () * (order + 1)); + } + + template <typename T> + FixedPointStateFunction<T>::~FixedPointStateFunction() throw () + { + } + + template <typename T> + typename FixedPointStateFunction<T>::size_type + FixedPointStateFunction<T>::order () const throw () + { + return order_; + } + + template <typename T> + void + FixedPointStateFunction<T>::impl_compute (result_t& res, + const argument_t& p) const throw () + { + static boost::shared_ptr<T> updatedTrajectory = + boost::shared_ptr<trajectory_t> + (trajectory_->getFixedPointTrajectory ().clone ()); + updatedTrajectory->setParameters (removeScaleFromParameters (p)); + (*function_) (res, updatedTrajectory->state + (tpt_.getTime (updatedTrajectory->timeRange ()), + this->order_)); + } + + template <typename T> + void + FixedPointStateFunction<T>::impl_gradient (gradient_t& grad, + const argument_t& p, + size_type i) const throw () + { + using namespace boost::numeric::ublas; + + static boost::shared_ptr<T> updatedTrajectory = + boost::shared_ptr<trajectory_t> + (trajectory_->getFixedPointTrajectory ().clone ()); + updatedTrajectory->setParameters (removeScaleFromParameters (p)); + + const value_type t = tpt_.getTime (updatedTrajectory->timeRange ()); + + grad[0] = 0.; + subrange (grad, 1, grad.size ()) = + prod (function_->gradient + (updatedTrajectory->state (t, this->order_), i), + updatedTrajectory->variationStateWrtParam (t, this->order_)); + } + +} // end of namespace roboptim. + +#endif //! ROBOPTIM_TRAJECTORY_FIXED_POINT_STATE_COST_HXX + diff --git a/include/roboptim/trajectory/free-time-trajectory.hh b/include/roboptim/trajectory/free-time-trajectory.hh index 3e315a1..08b537a 100644 --- a/include/roboptim/trajectory/free-time-trajectory.hh +++ b/include/roboptim/trajectory/free-time-trajectory.hh @@ -104,6 +104,12 @@ namespace roboptim /// \param index Angles index in parameter array. virtual void normalizeAngles (size_type index) throw (); + const Trajectory<DerivabilityOrder>& getFixedTimeTrajectory () + const throw () + { + assert (trajectory_); + return *trajectory_; + } protected: void impl_compute (result_t&, double) const throw (); void impl_derivative (gradient_t& g, double x, size_type order) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 9 +++ include/Makefile.am | 2 + ...e-function.hh => fixed-point-state-function.hh} | 18 +++--- ...function.hxx => fixed-point-state-function.hxx} | 63 +++++++++++-------- .../roboptim/trajectory/free-time-trajectory.hh | 6 ++ 5 files changed, 62 insertions(+), 36 deletions(-) copy include/roboptim/trajectory/{state-function.hh => fixed-point-state-function.hh} (87%) copy include/roboptim/trajectory/{state-function.hxx => fixed-point-state-function.hxx} (51%) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-03 15:31:39
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 826959a7d6d886a5eb6fe7ff64540ae447b635f9 (commit) via f69580ece9be1f7d002c047eadc16b6a6bed14f5 (commit) via c7c2c10b8e4c19401832a494223aeac0a05f6a2e (commit) from bc9d6d192dfdd0077f73b744b1c162038619ae35 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 826959a7d6d886a5eb6fe7ff64540ae447b635f9 Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 3 16:31:15 2009 +0100 Make StateFunction only usable with fixed point trajectory. * include/roboptim/trajectory/fwd.hh: Fix forward declaration. * include/roboptim/trajectory/state-function.hh, * include/roboptim/trajectory/state-function.hxx: Template StateFunction by derivability order. * tests/state-function.cc: Update to new interface. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 9214128..d41ce68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2009-11-03 Thomas Moulard <tho...@gm...> + Make StateFunction only usable with fixed point trajectory. + * include/roboptim/trajectory/fwd.hh: Fix forward declaration. + * include/roboptim/trajectory/state-function.hh, + * include/roboptim/trajectory/state-function.hxx: Template + StateFunction by derivability order. + * tests/state-function.cc: Update to new interface. + +2009-11-03 Thomas Moulard <tho...@gm...> + Rename StateCost class into StateFunction. * include/roboptim/trajectory/state-function.hh, * include/roboptim/trajectory/state-function.hxx: Rename class. diff --git a/include/roboptim/trajectory/fwd.hh b/include/roboptim/trajectory/fwd.hh index 596c6e0..f51ae03 100644 --- a/include/roboptim/trajectory/fwd.hh +++ b/include/roboptim/trajectory/fwd.hh @@ -24,8 +24,8 @@ namespace roboptim template <unsigned dorder> class Trajectory; - template <typename T> - class StateCost; + template <unsigned dorder> + class StateFunction; template <typename T> class SumCost; diff --git a/include/roboptim/trajectory/state-function.hh b/include/roboptim/trajectory/state-function.hh index 1c200d5..72211e1 100644 --- a/include/roboptim/trajectory/state-function.hh +++ b/include/roboptim/trajectory/state-function.hh @@ -49,12 +49,12 @@ namespace roboptim /// /// \tparam T trajectory type - template <typename T> + template <unsigned DerivabilityOrder> class StateFunction : public DerivableFunction { public: /// \brief Trajectory type. - typedef T trajectory_t; + typedef Trajectory<DerivabilityOrder> trajectory_t; /// \brief Constructor. /// @@ -72,7 +72,7 @@ namespace roboptim size_type order () const throw (); template <typename F, typename CLIST> - static void addToProblem (const T& trajectory, + static void addToProblem (const trajectory_t& trajectory, boost::shared_ptr<DerivableFunction> function, unsigned order, Problem<F, CLIST>& problem, diff --git a/include/roboptim/trajectory/state-function.hxx b/include/roboptim/trajectory/state-function.hxx index 53ee301..e4013d2 100644 --- a/include/roboptim/trajectory/state-function.hxx +++ b/include/roboptim/trajectory/state-function.hxx @@ -21,11 +21,11 @@ namespace roboptim { - template <typename T> - StateFunction<T>::StateFunction (const trajectory_t& trajectory, - boost::shared_ptr<DerivableFunction> function, - const StableTimePoint tpt, - size_type order) throw () + template <unsigned N> + StateFunction<N>::StateFunction (const trajectory_t& trajectory, + boost::shared_ptr<DerivableFunction> function, + const StableTimePoint tpt, + size_type order) throw () : DerivableFunction (trajectory.parameters ().size (), function->outputSize (), (boost::format ("state cost using function ``%1%''") @@ -38,43 +38,45 @@ namespace roboptim assert (function_->inputSize () == trajectory_.outputSize () * (order + 1)); } - template <typename T> - StateFunction<T>::~StateFunction() throw () + template <unsigned N> + StateFunction<N>::~StateFunction() throw () { } - template <typename T> - typename StateFunction<T>::size_type - StateFunction<T>::order () const throw () + template <unsigned N> + typename StateFunction<N>::size_type + StateFunction<N>::order () const throw () { return order_; } - template <typename T> + template <unsigned N> void - StateFunction<T>::impl_compute (result_t& res, + StateFunction<N>::impl_compute (result_t& res, const argument_t& p) const throw () { - static trajectory_t updatedTrajectory = trajectory_; - updatedTrajectory.setParameters (p); - (*function_) (res, updatedTrajectory.state - (tpt_.getTime (updatedTrajectory.timeRange ()), + static boost::shared_ptr<trajectory_t> updatedTrajectory = + boost::shared_ptr<trajectory_t> (trajectory_.clone ()); + updatedTrajectory->setParameters (p); + (*function_) (res, updatedTrajectory->state + (tpt_.getTime (updatedTrajectory->timeRange ()), this->order_)); } - template <typename T> + template <unsigned N> void - StateFunction<T>::impl_gradient (gradient_t& grad, + StateFunction<N>::impl_gradient (gradient_t& grad, const argument_t& p, size_type i) const throw () { using namespace boost::numeric::ublas; - static trajectory_t updatedTrajectory = trajectory_; - updatedTrajectory.setParameters (p); - const value_type t = tpt_.getTime (updatedTrajectory.timeRange ()); + static boost::shared_ptr<trajectory_t> updatedTrajectory = + boost::shared_ptr<trajectory_t> (trajectory_.clone ()); + updatedTrajectory->setParameters (p); + const value_type t = tpt_.getTime (updatedTrajectory->timeRange ()); grad = prod (function_->gradient - (updatedTrajectory.state (t, this->order_), i), - updatedTrajectory.variationStateWrtParam (t, this->order_)); + (updatedTrajectory->state (t, this->order_), i), + updatedTrajectory->variationStateWrtParam (t, this->order_)); } } // end of namespace roboptim. diff --git a/tests/state-function.cc b/tests/state-function.cc index 8bcf44e..426d204 100644 --- a/tests/state-function.cc +++ b/tests/state-function.cc @@ -50,13 +50,13 @@ int run_test () const double t = timePoint.getTime (spline.timeRange ()); boost::shared_ptr<DerivableFunction> frontalSpeed (new FrontalSpeed ()); - StateFunction<Spline> stateFunction + StateFunction<Spline::derivabilityOrder> stateFunction (spline, frontalSpeed, timePoint, orderMax); boost::shared_ptr<DerivableFunction> orthogonalSpeed (new OrthogonalSpeed ()); - StateFunction<Spline> orthoStateFunction (spline, orthogonalSpeed, - timePoint, orderMax); + StateFunction<Spline::derivabilityOrder> orthoStateFunction + (spline, orthogonalSpeed, timePoint, orderMax); std::cout << "State cost evaluation:" << std::endl << stateFunction (params) << std::endl commit f69580ece9be1f7d002c047eadc16b6a6bed14f5 Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 3 11:14:39 2009 +0100 Rename StateCost class into StateFunction. * include/roboptim/trajectory/state-function.hh, * include/roboptim/trajectory/state-function.hxx: Rename class. * tests/state-function.cc: Update class name. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index c25cc3e..9214128 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-11-03 Thomas Moulard <tho...@gm...> + Rename StateCost class into StateFunction. + * include/roboptim/trajectory/state-function.hh, + * include/roboptim/trajectory/state-function.hxx: Rename class. + * tests/state-function.cc: Update class name. + +2009-11-03 Thomas Moulard <tho...@gm...> + Rename state-cost into state-function. * include/Makefile.am: Rename distributed headers. * include/roboptim/trajectory/state-function.hh: diff --git a/include/roboptim/trajectory/state-function.hh b/include/roboptim/trajectory/state-function.hh index bf3d1a5..1c200d5 100644 --- a/include/roboptim/trajectory/state-function.hh +++ b/include/roboptim/trajectory/state-function.hh @@ -50,7 +50,7 @@ namespace roboptim /// \tparam T trajectory type template <typename T> - class StateCost : public DerivableFunction + class StateFunction : public DerivableFunction { public: /// \brief Trajectory type. @@ -62,12 +62,12 @@ namespace roboptim /// \param cost state cost: \f$cost\f$. /// \param tpt parameter \f$t\f$ where the state is evaluated. /// \param order order \f$r\f$ of derivation. - StateCost (const trajectory_t& gamma, + StateFunction (const trajectory_t& gamma, boost::shared_ptr<DerivableFunction> cost, const StableTimePoint tpt, size_type order = 1) throw (); - virtual ~StateCost () throw (); + virtual ~StateFunction () throw (); size_type order () const throw (); @@ -86,14 +86,15 @@ namespace roboptim const value_type t = (i + 1.) / (nConstraints + 1.); assert (t > 0. && t < 1.); shared_ptr<DerivableFunction> constraint - (new StateCost (trajectory, function, t * tMax, order)); + (new StateFunction (trajectory, function, t * tMax, order)); problem.addConstraint (constraint, bounds); } } protected: void impl_compute (result_t&, const argument_t&) const throw (); - void impl_gradient (gradient_t&, const argument_t&, size_type) const throw (); + void impl_gradient (gradient_t&, const argument_t&, size_type) + const throw (); private: const trajectory_t& trajectory_; diff --git a/include/roboptim/trajectory/state-function.hxx b/include/roboptim/trajectory/state-function.hxx index 7dc96a3..53ee301 100644 --- a/include/roboptim/trajectory/state-function.hxx +++ b/include/roboptim/trajectory/state-function.hxx @@ -22,7 +22,7 @@ namespace roboptim { template <typename T> - StateCost<T>::StateCost (const trajectory_t& trajectory, + StateFunction<T>::StateFunction (const trajectory_t& trajectory, boost::shared_ptr<DerivableFunction> function, const StableTimePoint tpt, size_type order) throw () @@ -39,36 +39,41 @@ namespace roboptim } template <typename T> - StateCost<T>::~StateCost() throw () + StateFunction<T>::~StateFunction() throw () { } template <typename T> - typename StateCost<T>::size_type - StateCost<T>::order () const throw () + typename StateFunction<T>::size_type + StateFunction<T>::order () const throw () { return order_; } template <typename T> void - StateCost<T>::impl_compute (result_t& res, const argument_t& p) const throw () + StateFunction<T>::impl_compute (result_t& res, + const argument_t& p) const throw () { static trajectory_t updatedTrajectory = trajectory_; updatedTrajectory.setParameters (p); (*function_) (res, updatedTrajectory.state - (tpt_.getTime (updatedTrajectory.timeRange ()), this->order_)); + (tpt_.getTime (updatedTrajectory.timeRange ()), + this->order_)); } template <typename T> void - StateCost<T>::impl_gradient (gradient_t& grad, const argument_t& p, size_type i) const throw () + StateFunction<T>::impl_gradient (gradient_t& grad, + const argument_t& p, + size_type i) const throw () { using namespace boost::numeric::ublas; static trajectory_t updatedTrajectory = trajectory_; updatedTrajectory.setParameters (p); const value_type t = tpt_.getTime (updatedTrajectory.timeRange ()); - grad = prod (function_->gradient (updatedTrajectory.state (t, this->order_), i), + grad = prod (function_->gradient + (updatedTrajectory.state (t, this->order_), i), updatedTrajectory.variationStateWrtParam (t, this->order_)); } diff --git a/tests/state-function.cc b/tests/state-function.cc index d8fe00c..8bcf44e 100644 --- a/tests/state-function.cc +++ b/tests/state-function.cc @@ -50,15 +50,18 @@ int run_test () const double t = timePoint.getTime (spline.timeRange ()); boost::shared_ptr<DerivableFunction> frontalSpeed (new FrontalSpeed ()); - StateCost<Spline> stateCost (spline, frontalSpeed, timePoint, orderMax); + StateFunction<Spline> stateFunction + (spline, frontalSpeed, timePoint, orderMax); - boost::shared_ptr<DerivableFunction> orthogonalSpeed (new OrthogonalSpeed ()); - StateCost<Spline> orthoStateCost (spline, orthogonalSpeed, timePoint, orderMax); + boost::shared_ptr<DerivableFunction> orthogonalSpeed + (new OrthogonalSpeed ()); + StateFunction<Spline> orthoStateFunction (spline, orthogonalSpeed, + timePoint, orderMax); std::cout << "State cost evaluation:" << std::endl - << stateCost (params) << std::endl + << stateFunction (params) << std::endl << "State cost gradient:" << std::endl - << stateCost.gradient (params) << std::endl + << stateFunction.gradient (params) << std::endl << "Trajectory state (splitted):" << std::endl; for (unsigned o = 0; o <= orderMax; ++o) std::cout << spline.derivative (t, o) << std::endl; @@ -76,10 +79,11 @@ int run_test () checkGradientAndThrow (*frontalSpeed, 0, spline.state (t, orderMax)); std::cout << "Check orthogonal speed gradient." << std::endl; - checkGradientAndThrow (*orthogonalSpeed, 0, spline.state (t, orderMax)); + checkGradientAndThrow (*orthogonalSpeed, 0, + spline.state (t, orderMax)); std::cout << "Check state cost gradient." << std::endl; - checkGradientAndThrow (stateCost, 0, params); + checkGradientAndThrow (stateFunction, 0, params); } catch (BadGradient& bg) { commit c7c2c10b8e4c19401832a494223aeac0a05f6a2e Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 3 11:05:58 2009 +0100 Rename state-cost into state-function. * include/Makefile.am: Rename distributed headers. * include/roboptim/trajectory/state-function.hh: Rename from include/roboptim/trajectory/state-cost.hh. * include/roboptim/trajectory/state-function.hxx: Rename from include/roboptim/trajectory/state-cost.hxx. * tests/Makefile.am: Rename distributed files. * tests/state-function.cc: Rename from tests/state-cost.cc. * tests/state-function.stdout: Rename from tests/state-cost.stdout. * tests/testsuite.at: Rename test case. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index cacc5ec..c25cc3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,18 @@ 2009-11-03 Thomas Moulard <tho...@gm...> + Rename state-cost into state-function. + * include/Makefile.am: Rename distributed headers. + * include/roboptim/trajectory/state-function.hh: + Rename from include/roboptim/trajectory/state-cost.hh. + * include/roboptim/trajectory/state-function.hxx: + Rename from include/roboptim/trajectory/state-cost.hxx. + * tests/Makefile.am: Rename distributed files. + * tests/state-function.cc: Rename from tests/state-cost.cc. + * tests/state-function.stdout: Rename from tests/state-cost.stdout. + * tests/testsuite.at: Rename test case. + +2009-11-03 Thomas Moulard <tho...@gm...> + Synchronize. * build-aux: Synchronize. diff --git a/include/Makefile.am b/include/Makefile.am index 1674a6c..71a5d08 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -18,8 +18,8 @@ nobase_include_HEADERS = \ roboptim/trajectory/spline.hh \ roboptim/trajectory/spline-length.hh \ roboptim/trajectory/stable-time-point.hh \ - roboptim/trajectory/state-cost.hh \ - roboptim/trajectory/state-cost.hxx \ + roboptim/trajectory/state-function.hh \ + roboptim/trajectory/state-function.hxx \ roboptim/trajectory/sys.hh \ roboptim/trajectory/trajectory-cost.hh \ roboptim/trajectory/trajectory-cost.hxx \ diff --git a/include/roboptim/trajectory/state-cost.hh b/include/roboptim/trajectory/state-function.hh similarity index 94% rename from include/roboptim/trajectory/state-cost.hh rename to include/roboptim/trajectory/state-function.hh index 3061f0f..bf3d1a5 100644 --- a/include/roboptim/trajectory/state-cost.hh +++ b/include/roboptim/trajectory/state-function.hh @@ -15,8 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with roboptim. If not, see <http://www.gnu.org/licenses/>. -#ifndef ROBOPTIM_TRAJECTORY_STATE_COST_HH -# define ROBOPTIM_TRAJECTORY_STATE_COST_HH +#ifndef ROBOPTIM_TRAJECTORY_STATE_FUNCTION_HH +# define ROBOPTIM_TRAJECTORY_STATE_FUNCTION_HH # include <roboptim/trajectory/sys.hh> # include <boost/shared_ptr.hpp> @@ -106,5 +106,5 @@ namespace roboptim } // end of namespace roboptim. -# include <roboptim/trajectory/state-cost.hxx> -#endif //! ROBOPTIM_TRAJECTORY_STATE_COST_HH +# include <roboptim/trajectory/state-function.hxx> +#endif //! ROBOPTIM_TRAJECTORY_STATE_FUNCTION_HH diff --git a/include/roboptim/trajectory/state-cost.hxx b/include/roboptim/trajectory/state-function.hxx similarity index 100% rename from include/roboptim/trajectory/state-cost.hxx rename to include/roboptim/trajectory/state-function.hxx diff --git a/tests/Makefile.am b/tests/Makefile.am index 64840ff..6d7111b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -37,10 +37,10 @@ free_time_trajectory_SOURCES = free-time-trajectory.cc $(COMMON_SOURCES) free_time_trajectory_LDADD = $(top_builddir)/src/libroboptim-trajectory.la -# state-cost -check_PROGRAMS += state-cost -state_cost_SOURCES = state-cost.cc $(COMMON_SOURCES) -state_cost_LDADD = $(top_builddir)/src/libroboptim-trajectory.la +# state-function +check_PROGRAMS += state-function +state_function_SOURCES = state-function.cc $(COMMON_SOURCES) +state_function_LDADD = $(top_builddir)/src/libroboptim-trajectory.la ######################################### # Tests which require the CFSQP solver. # @@ -62,9 +62,6 @@ check_PROGRAMS += spline-time-optimization spline_time_optimization_SOURCES = spline-time-optimization.cc $(COMMON_SOURCES) spline_time_optimization_LDADD = $(top_builddir)/src/libroboptim-trajectory.la -endif - - # anthropomorphic-cost-function-case-1 check_PROGRAMS += anthropomorphic-cost-function-case-1 anthropomorphic_cost_function_case_1_SOURCES = \ @@ -125,6 +122,8 @@ anthropomorphic_cost_function_case_6_SOURCES = \ anthropomorphic_cost_function_case_6_LDADD = \ $(top_builddir)/src/libroboptim-trajectory.la +endif + .PHONY: generate-reference diff --git a/tests/state-cost.cc b/tests/state-function.cc similarity index 98% rename from tests/state-cost.cc rename to tests/state-function.cc index 78f0aa6..d8fe00c 100644 --- a/tests/state-cost.cc +++ b/tests/state-function.cc @@ -23,7 +23,7 @@ #include <roboptim/trajectory/frontal-speed.hh> #include <roboptim/trajectory/orthogonal-speed.hh> #include <roboptim/trajectory/spline.hh> -#include <roboptim/trajectory/state-cost.hh> +#include <roboptim/trajectory/state-function.hh> using namespace roboptim; diff --git a/tests/state-cost.stdout b/tests/state-function.stdout similarity index 100% rename from tests/state-cost.stdout rename to tests/state-function.stdout diff --git a/tests/testsuite.at b/tests/testsuite.at index af812c3..9b23cd5 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -32,7 +32,7 @@ CHECK_STDOUT([simple], [Check basic features.]) CHECK_STDOUT([spline], [Check Spline class.]) CHECK_STDOUT([spline-gradient], [Check Spline gradient.]) CHECK_STDOUT([free-time-trajectory], [Check free time trajectory.]) -CHECK_STDOUT([state-cost], [Check state cost.]) +CHECK_STDOUT([state-function], [Check state function.]) AT_BANNER([Optimization (require solver plug-in)]) CHECK_STDOUT([spline-optimization], [Optimize a Spline with Cfsqp.], ----------------------------------------------------------------------- Summary of changes: ChangeLog | 29 +++++++++++ include/Makefile.am | 4 +- include/roboptim/trajectory/fwd.hh | 4 +- .../{state-cost.hh => state-function.hh} | 25 +++++----- .../{state-cost.hxx => state-function.hxx} | 53 +++++++++++--------- tests/Makefile.am | 13 ++--- tests/{state-cost.cc => state-function.cc} | 20 +++++--- tests/{state-cost.stdout => state-function.stdout} | 0 tests/testsuite.at | 2 +- 9 files changed, 95 insertions(+), 55 deletions(-) rename include/roboptim/trajectory/{state-cost.hh => state-function.hh} (84%) rename include/roboptim/trajectory/{state-cost.hxx => state-function.hxx} (52%) rename tests/{state-cost.cc => state-function.cc} (83%) rename tests/{state-cost.stdout => state-function.stdout} (100%) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-03 09:23:32
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via bc9d6d192dfdd0077f73b744b1c162038619ae35 (commit) from 7af2f9d39c496d03b8e1daeee92d219828d63c47 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit bc9d6d192dfdd0077f73b744b1c162038619ae35 Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 3 10:23:17 2009 +0100 Synchronize. * build-aux: Synchronize. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 3f2f939..cacc5ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-03 Thomas Moulard <tho...@gm...> + + Synchronize. + * build-aux: Synchronize. + 2009-11-02 Thomas Moulard <tho...@gm...> Regenerate test suite output. diff --git a/build-aux b/build-aux index 3e4dfa5..b137297 160000 --- a/build-aux +++ b/build-aux @@ -1 +1 @@ -Subproject commit 3e4dfa59a74db09fce05d56664e4ddeebeb791ad +Subproject commit b1372979b2d6470c8687c2787b6f48fc2c743b0e ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ build-aux | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-03 09:18:38
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core". The branch, master has been updated via 7691dacca434fc7c47b545f80e0aaca89a9bb955 (commit) from 298b7dfcb3f689e835930d1baa8302c6b4ed4124 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7691dacca434fc7c47b545f80e0aaca89a9bb955 Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 3 10:18:24 2009 +0100 Synchronize. * build-aux: Synchronize. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 6b6848d..f2a5636 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-03 Thomas Moulard <tho...@gm...> + + Synchronize. + * build-aux: Synchronize. + 2009-11-02 Thomas Moulard <tho...@gm...> Add ``this->'' in template code to help the compiler. diff --git a/build-aux b/build-aux index 44b7eea..b137297 160000 --- a/build-aux +++ b/build-aux @@ -1 +1 @@ -Subproject commit 44b7eea6e4c7883cd9f824ca706b737dabf03f96 +Subproject commit b1372979b2d6470c8687c2787b6f48fc2c743b0e ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ build-aux | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) hooks/post-receive -- roboptim-core |
From: Thomas M. <tho...@us...> - 2009-11-03 09:14:05
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "build-aux". The branch, master has been updated via b1372979b2d6470c8687c2787b6f48fc2c743b0e (commit) via 4d2c6f2654942ba47dd2a979dedc684cb6268616 (commit) from 3e4dfa59a74db09fce05d56664e4ddeebeb791ad (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b1372979b2d6470c8687c2787b6f48fc2c743b0e Merge: 4d2c6f2 3e4dfa5 Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 3 10:13:52 2009 +0100 Merge branch 'master' of ssh://roboptim.git.sourceforge.net/gitroot/roboptim/build-aux diff --cc ChangeLog index 6d9026c,ef91d30..ca6a624 --- a/ChangeLog +++ b/ChangeLog @@@ -1,11 -1,10 +1,16 @@@ +2009-11-03 Thomas Moulard <tho...@gm...> + + Regenerate the ``.pc'' file if package configuration changes. + * pkg-config.mk: Make the ``.pc'' file depends on + ``config.status''. + 2009-11-02 Thomas Moulard <tho...@gm...> + Handle doxygendocdir in jrl-pkg-config. + * jrl-pkg-config.m4: Search for Doxygen documentation. + + 2009-11-02 Thomas Moulard <tho...@gm...> + Fix Doxygen generation rule. * doxygen.mk: Doxygen extra distributed files should be copied in doxygen-html, not Doxygen dependencies! commit 4d2c6f2654942ba47dd2a979dedc684cb6268616 Author: Thomas Moulard <tho...@gm...> Date: Tue Nov 3 10:13:38 2009 +0100 Regenerate the ``.pc'' file if package configuration changes. * pkg-config.mk: Make the ``.pc'' file depends on ``config.status''. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index ee470be..6d9026c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-03 Thomas Moulard <tho...@gm...> + + Regenerate the ``.pc'' file if package configuration changes. + * pkg-config.mk: Make the ``.pc'' file depends on + ``config.status''. + 2009-11-02 Thomas Moulard <tho...@gm...> Fix Doxygen generation rule. diff --git a/pkg-config.mk b/pkg-config.mk index e7fe0e1..7a1658b 100644 --- a/pkg-config.mk +++ b/pkg-config.mk @@ -49,7 +49,12 @@ EXTRA_DIST += build-aux/pkg-config.pc.in CLEANFILES += $(pkg_config_file) # pkg-config generation. -@PACKAGE_TARNAME@.pc: $(srcdir)/build-aux/pkg-config.pc.in +# One has to make sure the ``.pc'' file is regenerated if: +# - the package version +# - or the compilation flags +# are changed. +@PACKAGE_TARNAME@.pc: $(srcdir)/build-aux/pkg-config.pc.in \ + $(top_builddir)/config.status $(top_builddir)/config.status \ --file="$@":"$(srcdir)/build-aux/pkg-config.pc.in" ----------------------------------------------------------------------- Summary of changes: ChangeLog | 6 ++++++ pkg-config.mk | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletions(-) hooks/post-receive -- build-aux |
From: Thomas M. <tho...@us...> - 2009-11-02 18:03:49
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 7af2f9d39c496d03b8e1daeee92d219828d63c47 (commit) from 54cdbe0082cd8ee4ce71c0bf1c13ab5eebc3dc2e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7af2f9d39c496d03b8e1daeee92d219828d63c47 Author: Thomas Moulard <tho...@gm...> Date: Mon Nov 2 19:03:36 2009 +0100 Regenerate test suite output. * tests/free-time-trajectory.stdout, * tests/spline-bicycle-optim.stdout, * tests/spline-gradient.stdout, * tests/spline-optimization.stdout, * tests/spline.stdout: Regenerate. * tests/testsuite.at: Do not tag bicycle optimization as XFAIL anymore. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index d304402..3f2f939 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2009-11-02 Thomas Moulard <tho...@gm...> + Regenerate test suite output. + * tests/free-time-trajectory.stdout, + * tests/spline-bicycle-optim.stdout, + * tests/spline-gradient.stdout, + * tests/spline-optimization.stdout, + * tests/spline.stdout: Regenerate. + * tests/testsuite.at: Do not tag bicycle optimization + as XFAIL anymore. + +2009-11-02 Thomas Moulard <tho...@gm...> + Add optional dependency toward CFSQP plug-in. * Makefile.am: Factorize rules. * build-aux: Synchornize. diff --git a/tests/free-time-trajectory.stdout b/tests/free-time-trajectory.stdout index 8bc7003..5c55044 100644 --- a/tests/free-time-trajectory.stdout +++ b/tests/free-time-trajectory.stdout @@ -177,44 +177,310 @@ Variation of the configuration w.r.t to parameters: Variation of the derivative w.r.t to parameters: [1,4]((0,0,0,0)) [1,5]((0,0,0,0,0)) +bad gradient + X: [1](0.1) + Analytical gradient: [1](0.268555) + Finite difference gradient: [1](0.732422) + Max. delta: 0.463867 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.00976562,0.00976562,0,0)) [1,5]((0.268555,-0.00976562,0.00976562,0,0)) +bad gradient + X: [1](0.2) + Analytical gradient: [1](1.17188) + Finite difference gradient: [1](2.92969) + Max. delta: 1.75781 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.0390625,0.0390625,0,0)) [1,5]((1.17188,-0.0390625,0.0390625,0,0)) +bad gradient + X: [1](0.3) + Analytical gradient: [1](2.85645) + Finite difference gradient: [1](6.5918) + Max. delta: 3.73535 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.0878906,0.0878906,0,0)) [1,5]((2.85645,-0.0878906,0.0878906,0,0)) +bad gradient + X: [1](0.4) + Analytical gradient: [1](5.46875) + Finite difference gradient: [1](11.7187) + Max. delta: 6.25 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.15625,0.15625,0,0)) [1,5]((5.46875,-0.15625,0.15625,0,0)) +bad gradient + X: [1](0.5) + Analytical gradient: [1](9.15527) + Finite difference gradient: [1](18.3105) + Max. delta: 9.15527 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.244141,0.244141,0,0)) [1,5]((9.15527,-0.244141,0.244141,0,0)) +bad gradient + X: [1](0.6) + Analytical gradient: [1](14.0625) + Finite difference gradient: [1](26.3672) + Max. delta: 12.3047 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.351562,0.351562,0,0)) [1,5]((14.0625,-0.351562,0.351562,0,0)) +bad gradient + X: [1](0.7) + Analytical gradient: [1](20.3369) + Finite difference gradient: [1](35.8887) + Max. delta: 15.5518 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.478516,0.478516,0,0)) [1,5]((20.3369,-0.478516,0.478516,0,0)) +bad gradient + X: [1](0.8) + Analytical gradient: [1](28.125) + Finite difference gradient: [1](46.875) + Max. delta: 18.75 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.625,0.625,0,0)) [1,5]((28.125,-0.625,0.625,0,0)) +bad gradient + X: [1](0.9) + Analytical gradient: [1](37.1094) + Finite difference gradient: [1](54.6875) + Max. delta: 17.5781 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.761719,0.751953,0.00976562,0)) [1,5]((37.1094,-0.761719,0.751953,0.00976562,0)) +bad gradient + X: [1](1) + Analytical gradient: [1](46.875) + Finite difference gradient: [1](62.5) + Max. delta: 15.625 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.859375,0.820312,0.0390625,0)) [1,5]((46.875,-0.859375,0.820312,0.0390625,0)) +bad gradient + X: [1](1.1) + Analytical gradient: [1](57.4219) + Finite difference gradient: [1](70.3125) + Max. delta: 12.8906 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.917969,0.830078,0.0878906,0)) [1,5]((57.4219,-0.917969,0.830078,0.0878906,0)) +bad gradient + X: [1](1.2) + Analytical gradient: [1](68.75) + Finite difference gradient: [1](78.125) + Max. delta: 9.375 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.9375,0.78125,0.15625,0)) [1,5]((68.75,-0.9375,0.78125,0.15625,0)) +bad gradient + X: [1](1.3) + Analytical gradient: [1](80.8594) + Finite difference gradient: [1](85.9375) + Max. delta: 5.07812 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.917969,0.673828,0.244141,0)) [1,5]((80.8594,-0.917969,0.673828,0.244141,0)) [1,4]((-0.859375,0.507812,0.351562,0)) [1,5]((93.75,-0.859375,0.507812,0.351562,0)) +bad gradient + X: [1](1.5) + Analytical gradient: [1](107.422) + Finite difference gradient: [1](101.563) + Max. delta: 5.85937 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.761719,0.283203,0.478516,0)) [1,5]((107.422,-0.761719,0.283203,0.478516,0)) +bad gradient + X: [1](1.6) + Analytical gradient: [1](121.875) + Finite difference gradient: [1](109.375) + Max. delta: 12.5 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.625,-1.11022e-15,0.625,-0)) [1,5]((121.875,-0.625,-1.11022e-15,0.625,-0)) +bad gradient + X: [1](1.7) + Analytical gradient: [1](135.791) + Finite difference gradient: [1](100.098) + Max. delta: 35.6934 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.478516,-0.283203,0.751953,0.00976563)) [1,5]((135.791,-0.478516,-0.283203,0.751953,0.00976563)) +bad gradient + X: [1](1.8) + Analytical gradient: [1](147.656) + Finite difference gradient: [1](87.8906) + Max. delta: 59.7656 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.351562,-0.507813,0.820313,0.0390625)) [1,5]((147.656,-0.351562,-0.507813,0.820313,0.0390625)) +bad gradient + X: [1](1.9) + Analytical gradient: [1](157.178) + Finite difference gradient: [1](72.7539) + Max. delta: 84.4238 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.244141,-0.673828,0.830078,0.0878906)) [1,5]((157.178,-0.244141,-0.673828,0.830078,0.0878906)) +bad gradient + X: [1](2) + Analytical gradient: [1](164.063) + Finite difference gradient: [1](54.6875) + Max. delta: 109.375 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.15625,-0.78125,0.78125,0.15625)) [1,5]((164.063,-0.15625,-0.78125,0.78125,0.15625)) +bad gradient + X: [1](2.1) + Analytical gradient: [1](168.018) + Finite difference gradient: [1](33.6914) + Max. delta: 134.326 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.0878906,-0.830078,0.673828,0.244141)) [1,5]((168.018,-0.0878906,-0.830078,0.673828,0.244141)) +bad gradient + X: [1](2.2) + Analytical gradient: [1](168.75) + Finite difference gradient: [1](9.76563) + Max. delta: 158.984 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.0390625,-0.820312,0.507812,0.351563)) [1,5]((168.75,-0.0390625,-0.820312,0.507812,0.351563)) +bad gradient + X: [1](2.3) + Analytical gradient: [1](165.967) + Finite difference gradient: [1](-17.0898) + Max. delta: 183.057 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.00976562,-0.751953,0.283203,0.478516)) [1,5]((165.967,-0.00976562,-0.751953,0.283203,0.478516)) +bad gradient + X: [1](2.4) + Analytical gradient: [1](159.375) + Finite difference gradient: [1](-46.875) + Max. delta: 206.25 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.625,-2.22045e-15,0.625)) [1,5]((159.375,0,-0.625,-2.22045e-15,0.625)) +bad gradient + X: [1](2.5) + Analytical gradient: [1](150.391) + Finite difference gradient: [1](-54.6875) + Max. delta: 205.078 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.478516,-0.283203,0.761719)) [1,5]((150.391,0,-0.478516,-0.283203,0.761719)) +bad gradient + X: [1](2.6) + Analytical gradient: [1](140.625) + Finite difference gradient: [1](-62.5) + Max. delta: 203.125 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.351562,-0.507813,0.859375)) [1,5]((140.625,0,-0.351562,-0.507813,0.859375)) +bad gradient + X: [1](2.7) + Analytical gradient: [1](130.078) + Finite difference gradient: [1](-70.3125) + Max. delta: 200.391 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.244141,-0.673828,0.917969)) [1,5]((130.078,0,-0.244141,-0.673828,0.917969)) +bad gradient + X: [1](2.8) + Analytical gradient: [1](118.75) + Finite difference gradient: [1](-78.125) + Max. delta: 196.875 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.15625,-0.78125,0.9375)) [1,5]((118.75,0,-0.15625,-0.78125,0.9375)) +bad gradient + X: [1](2.9) + Analytical gradient: [1](106.641) + Finite difference gradient: [1](-85.9375) + Max. delta: 192.578 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.0878906,-0.830078,0.917969)) [1,5]((106.641,0,-0.0878906,-0.830078,0.917969)) +bad gradient + X: [1](3) + Analytical gradient: [1](93.75) + Finite difference gradient: [1](-93.75) + Max. delta: 187.5 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.0390625,-0.820312,0.859375)) [1,5]((93.75,0,-0.0390625,-0.820312,0.859375)) +bad gradient + X: [1](3.1) + Analytical gradient: [1](80.0781) + Finite difference gradient: [1](-101.563) + Max. delta: 181.641 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.00976562,-0.751953,0.761719)) [1,5]((80.0781,0,-0.00976562,-0.751953,0.761719)) +bad gradient + X: [1](3.2) + Analytical gradient: [1](65.625) + Finite difference gradient: [1](-109.375) + Max. delta: 175 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.625,0.625)) [1,5]((65.625,0,0,-0.625,0.625)) +bad gradient + X: [1](3.3) + Analytical gradient: [1](51.4404) + Finite difference gradient: [1](-100.83) + Max. delta: 152.271 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.478516,0.478516)) [1,5]((51.4404,0,0,-0.478516,0.478516)) +bad gradient + X: [1](3.4) + Analytical gradient: [1](38.6719) + Finite difference gradient: [1](-90.8203) + Max. delta: 129.492 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.351562,0.351562)) [1,5]((38.6719,0,0,-0.351562,0.351562)) +bad gradient + X: [1](3.5) + Analytical gradient: [1](27.4658) + Finite difference gradient: [1](-79.3457) + Max. delta: 106.812 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.244141,0.244141)) [1,5]((27.4658,0,0,-0.244141,0.244141)) +bad gradient + X: [1](3.6) + Analytical gradient: [1](17.9687) + Finite difference gradient: [1](-66.4063) + Max. delta: 84.375 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.15625,0.15625)) [1,5]((17.9687,0,0,-0.15625,0.15625)) +bad gradient + X: [1](3.7) + Analytical gradient: [1](10.3271) + Finite difference gradient: [1](-52.002) + Max. delta: 62.3291 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.0878906,0.0878906)) [1,5]((10.3271,0,0,-0.0878906,0.0878906)) +bad gradient + X: [1](3.8) + Analytical gradient: [1](4.6875) + Finite difference gradient: [1](-36.1328) + Max. delta: 40.8203 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.0390625,0.0390625)) [1,5]((4.6875,0,0,-0.0390625,0.0390625)) +bad gradient + X: [1](3.9) + Analytical gradient: [1](1.19629) + Finite difference gradient: [1](-18.7988) + Max. delta: 19.9951 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.00976562,0.00976562)) [1,5]((1.19629,0,0,-0.00976562,0.00976562)) [1,4]((0,0,0,0)) [1,5]((-1.04083e-13,0,0,0,0)) @@ -557,84 +823,630 @@ N/A [1,5]((7.50511e-14,0,0,-9.2699 Variation of the derivative w.r.t to parameters: [1,4]((0,0,0,0)) [1,5]((0,0,0,0,0)) +bad gradient + X: [1](0.1) + Analytical gradient: [1](0.0640869) + Finite difference gradient: [1](0.183105) + Max. delta: 0.119019 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.00976562,0.00976562,0,0)) [1,5]((0.0640869,-0.0012207,0.0012207,0,0)) +bad gradient + X: [1](0.2) + Analytical gradient: [1](0.268555) + Finite difference gradient: [1](0.732422) + Max. delta: 0.463867 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.0390625,0.0390625,0,0)) [1,5]((0.268555,-0.00488281,0.00488281,0,0)) +bad gradient + X: [1](0.3) + Analytical gradient: [1](0.631714) + Finite difference gradient: [1](1.64795) + Max. delta: 1.01624 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.0878906,0.0878906,0,0)) [1,5]((0.631714,-0.0109863,0.0109863,0,0)) +bad gradient + X: [1](0.4) + Analytical gradient: [1](1.17188) + Finite difference gradient: [1](2.92969) + Max. delta: 1.75781 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.15625,0.15625,0,0)) [1,5]((1.17188,-0.0195312,0.0195312,0,0)) +bad gradient + X: [1](0.5) + Analytical gradient: [1](1.90735) + Finite difference gradient: [1](4.57764) + Max. delta: 2.67029 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.244141,0.244141,0,0)) [1,5]((1.90735,-0.0305176,0.0305176,0,0)) +bad gradient + X: [1](0.6) + Analytical gradient: [1](2.85645) + Finite difference gradient: [1](6.5918) + Max. delta: 3.73535 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.351562,0.351562,0,0)) [1,5]((2.85645,-0.0439453,0.0439453,0,0)) +bad gradient + X: [1](0.7) + Analytical gradient: [1](4.03748) + Finite difference gradient: [1](8.97217) + Max. delta: 4.93469 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.478516,0.478516,0,0)) [1,5]((4.03748,-0.0598145,0.0598145,0,0)) +bad gradient + X: [1](0.8) + Analytical gradient: [1](5.46875) + Finite difference gradient: [1](11.7187) + Max. delta: 6.25 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.625,0.625,0,0)) [1,5]((5.46875,-0.078125,0.078125,0,0)) +bad gradient + X: [1](0.9) + Analytical gradient: [1](7.16858) + Finite difference gradient: [1](14.8315) + Max. delta: 7.66296 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.761719,0.751953,0.00976562,0)) [1,5]((7.16858,-0.098877,0.098877,0,0)) +bad gradient + X: [1](1) + Analytical gradient: [1](9.15527) + Finite difference gradient: [1](18.3105) + Max. delta: 9.15527 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.859375,0.820312,0.0390625,0)) [1,5]((9.15527,-0.12207,0.12207,0,0)) +bad gradient + X: [1](1.1) + Analytical gradient: [1](11.4471) + Finite difference gradient: [1](22.1558) + Max. delta: 10.7086 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.917969,0.830078,0.0878906,0)) [1,5]((11.4471,-0.147705,0.147705,0,0)) +bad gradient + X: [1](1.2) + Analytical gradient: [1](14.0625) + Finite difference gradient: [1](26.3672) + Max. delta: 12.3047 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.9375,0.78125,0.15625,0)) [1,5]((14.0625,-0.175781,0.175781,0,0)) +bad gradient + X: [1](1.3) + Analytical gradient: [1](17.0197) + Finite difference gradient: [1](30.9448) + Max. delta: 13.9252 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.917969,0.673828,0.244141,0)) [1,5]((17.0197,-0.206299,0.206299,0,0)) +bad gradient + X: [1](1.4) + Analytical gradient: [1](20.3369) + Finite difference gradient: [1](35.8887) + Max. delta: 15.5518 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.859375,0.507812,0.351562,0)) [1,5]((20.3369,-0.239258,0.239258,0,0)) +bad gradient + X: [1](1.5) + Analytical gradient: [1](24.0326) + Finite difference gradient: [1](41.1987) + Max. delta: 17.1661 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.761719,0.283203,0.478516,0)) [1,5]((24.0326,-0.274658,0.274658,0,0)) +bad gradient + X: [1](1.6) + Analytical gradient: [1](28.125) + Finite difference gradient: [1](46.875) + Max. delta: 18.75 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.625,-1.11022e-15,0.625,-0)) [1,5]((28.125,-0.3125,0.3125,1.54074e-32,0)) +bad gradient + X: [1](1.7) + Analytical gradient: [1](32.5195) + Finite difference gradient: [1](50.7813) + Max. delta: 18.2617 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.478516,-0.283203,0.751953,0.00976563)) [1,5]((32.5195,-0.349121,0.3479,0.0012207,0)) +bad gradient + X: [1](1.8) + Analytical gradient: [1](37.1094) + Finite difference gradient: [1](54.6875) + Max. delta: 17.5781 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.351562,-0.507813,0.820313,0.0390625)) [1,5]((37.1094,-0.380859,0.375977,0.00488281,0)) +bad gradient + X: [1](1.9) + Analytical gradient: [1](41.8945) + Finite difference gradient: [1](58.5938) + Max. delta: 16.6992 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.244141,-0.673828,0.830078,0.0878906)) [1,5]((41.8945,-0.407715,0.396729,0.0109863,0)) +bad gradient + X: [1](2) + Analytical gradient: [1](46.875) + Finite difference gradient: [1](62.5) + Max. delta: 15.625 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.15625,-0.78125,0.78125,0.15625)) [1,5]((46.875,-0.429688,0.410156,0.0195313,0)) +bad gradient + X: [1](2.1) + Analytical gradient: [1](52.0508) + Finite difference gradient: [1](66.4063) + Max. delta: 14.3555 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.0878906,-0.830078,0.673828,0.244141)) [1,5]((52.0508,-0.446777,0.41626,0.0305176,0)) +bad gradient + X: [1](2.2) + Analytical gradient: [1](57.4219) + Finite difference gradient: [1](70.3125) + Max. delta: 12.8906 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.0390625,-0.820312,0.507812,0.351563)) [1,5]((57.4219,-0.458984,0.415039,0.0439453,0)) +bad gradient + X: [1](2.3) + Analytical gradient: [1](62.9883) + Finite difference gradient: [1](74.2188) + Max. delta: 11.2305 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.00976562,-0.751953,0.283203,0.478516)) [1,5]((62.9883,-0.466309,0.406494,0.0598145,0)) +bad gradient + X: [1](2.4) + Analytical gradient: [1](68.75) + Finite difference gradient: [1](78.125) + Max. delta: 9.37501 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.625,-2.22045e-15,0.625)) [1,5]((68.75,-0.46875,0.390625,0.078125,0)) +bad gradient + X: [1](2.5) + Analytical gradient: [1](74.707) + Finite difference gradient: [1](82.0313) + Max. delta: 7.32423 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.478516,-0.283203,0.761719)) [1,5]((74.707,-0.466309,0.367432,0.098877,0)) +bad gradient + X: [1](2.6) + Analytical gradient: [1](80.8594) + Finite difference gradient: [1](85.9375) + Max. delta: 5.07813 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.351562,-0.507813,0.859375)) [1,5]((80.8594,-0.458984,0.336914,0.12207,0)) +bad gradient + X: [1](2.7) + Analytical gradient: [1](87.207) + Finite difference gradient: [1](89.8438) + Max. delta: 2.63673 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.244141,-0.673828,0.917969)) [1,5]((87.207,-0.446777,0.299072,0.147705,0)) [1,4]((0,-0.15625,-0.78125,0.9375)) [1,5]((93.75,-0.429687,0.253906,0.175781,0)) +bad gradient + X: [1](2.9) + Analytical gradient: [1](100.488) + Finite difference gradient: [1](97.6563) + Max. delta: 2.83202 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.0878906,-0.830078,0.917969)) [1,5]((100.488,-0.407715,0.201416,0.206299,0)) +bad gradient + X: [1](3) + Analytical gradient: [1](107.422) + Finite difference gradient: [1](101.563) + Max. delta: 5.85936 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.0390625,-0.820312,0.859375)) [1,5]((107.422,-0.380859,0.141602,0.239258,0)) +bad gradient + X: [1](3.1) + Analytical gradient: [1](114.551) + Finite difference gradient: [1](105.469) + Max. delta: 9.08202 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,-0.00976562,-0.751953,0.761719)) [1,5]((114.551,-0.349121,0.0744629,0.274658,0)) +bad gradient + X: [1](3.2) + Analytical gradient: [1](121.875) + Finite difference gradient: [1](109.375) + Max. delta: 12.5 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.625,0.625)) [1,5]((121.875,-0.3125,-1.11022e-15,0.3125,-0)) +bad gradient + X: [1](3.3) + Analytical gradient: [1](129.071) + Finite difference gradient: [1](105.103) + Max. delta: 23.9685 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.478516,0.478516)) [1,5]((129.071,-0.274658,-0.0744629,0.3479,0.0012207)) +bad gradient + X: [1](3.4) + Analytical gradient: [1](135.791) + Finite difference gradient: [1](100.098) + Max. delta: 35.6933 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.351562,0.351562)) [1,5]((135.791,-0.239258,-0.141602,0.375977,0.00488281)) +bad gradient + X: [1](3.5) + Analytical gradient: [1](141.998) + Finite difference gradient: [1](94.3604) + Max. delta: 47.6379 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.244141,0.244141)) [1,5]((141.998,-0.206299,-0.201416,0.396729,0.0109863)) +bad gradient + X: [1](3.6) + Analytical gradient: [1](147.656) + Finite difference gradient: [1](87.8906) + Max. delta: 59.7656 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.15625,0.15625)) [1,5]((147.656,-0.175781,-0.253906,0.410156,0.0195313)) +bad gradient + X: [1](3.7) + Analytical gradient: [1](152.728) + Finite difference gradient: [1](80.6885) + Max. delta: 72.0398 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.0878906,0.0878906)) [1,5]((152.728,-0.147705,-0.299072,0.41626,0.0305176)) +bad gradient + X: [1](3.8) + Analytical gradient: [1](157.178) + Finite difference gradient: [1](72.7539) + Max. delta: 84.4238 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.0390625,0.0390625)) [1,5]((157.178,-0.12207,-0.336914,0.415039,0.0439453)) +bad gradient + X: [1](3.9) + Analytical gradient: [1](160.968) + Finite difference gradient: [1](64.0869) + Max. delta: 96.8811 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((0,0,-0.00976562,0.00976562)) [1,5]((160.968,-0.098877,-0.367432,0.406494,0.0598145)) +bad gradient + X: [1](4) + Analytical gradient: [1](164.063) + Finite difference gradient: [1](54.6875) + Max. delta: 109.375 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((164.063,-0.078125,-0.390625,0.390625,0.078125)) +bad gradient + X: [1](4.1) + Analytical gradient: [1](166.425) + Finite difference gradient: [1](44.5557) + Max. delta: 121.869 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((166.425,-0.0598145,-0.406494,0.367432,0.098877)) +bad gradient + X: [1](4.2) + Analytical gradient: [1](168.018) + Finite difference gradient: [1](33.6914) + Max. delta: 134.326 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((168.018,-0.0439453,-0.415039,0.336914,0.12207)) +bad gradient + X: [1](4.3) + Analytical gradient: [1](168.805) + Finite difference gradient: [1](22.0947) + Max. delta: 146.71 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((168.805,-0.0305176,-0.41626,0.299072,0.147705)) +bad gradient + X: [1](4.4) + Analytical gradient: [1](168.75) + Finite difference gradient: [1](9.76562) + Max. delta: 158.984 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((168.75,-0.0195312,-0.410156,0.253906,0.175781)) +bad gradient + X: [1](4.5) + Analytical gradient: [1](167.816) + Finite difference gradient: [1](-3.29591) + Max. delta: 171.112 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((167.816,-0.0109863,-0.396729,0.201416,0.206299)) +bad gradient + X: [1](4.6) + Analytical gradient: [1](165.967) + Finite difference gradient: [1](-17.0898) + Max. delta: 183.057 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((165.967,-0.00488281,-0.375977,0.141602,0.239258)) +bad gradient + X: [1](4.7) + Analytical gradient: [1](163.165) + Finite difference gradient: [1](-31.6162) + Max. delta: 194.781 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((163.165,-0.0012207,-0.3479,0.0744629,0.274658)) +bad gradient + X: [1](4.8) + Analytical gradient: [1](159.375) + Finite difference gradient: [1](-46.875) + Max. delta: 206.25 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((159.375,0,-0.3125,1.11022e-15,0.3125)) +bad gradient + X: [1](4.9) + Analytical gradient: [1](154.98) + Finite difference gradient: [1](-50.7813) + Max. delta: 205.762 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((154.98,0,-0.274658,-0.0744629,0.349121)) +bad gradient + X: [1](5) + Analytical gradient: [1](150.391) + Finite difference gradient: [1](-54.6875) + Max. delta: 205.078 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((150.391,0,-0.239258,-0.141602,0.380859)) +bad gradient + X: [1](5.1) + Analytical gradient: [1](145.605) + Finite difference gradient: [1](-58.5937) + Max. delta: 204.199 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((145.605,0,-0.206299,-0.201416,0.407715)) +bad gradient + X: [1](5.2) + Analytical gradient: [1](140.625) + Finite difference gradient: [1](-62.5) + Max. delta: 203.125 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((140.625,0,-0.175781,-0.253906,0.429687)) +bad gradient + X: [1](5.3) + Analytical gradient: [1](135.449) + Finite difference gradient: [1](-66.4063) + Max. delta: 201.855 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((135.449,0,-0.147705,-0.299072,0.446777)) +bad gradient + X: [1](5.4) + Analytical gradient: [1](130.078) + Finite difference gradient: [1](-70.3125) + Max. delta: 200.391 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((130.078,0,-0.12207,-0.336914,0.458984)) +bad gradient + X: [1](5.5) + Analytical gradient: [1](124.512) + Finite difference gradient: [1](-74.2188) + Max. delta: 198.73 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((124.512,0,-0.098877,-0.367432,0.466309)) +bad gradient + X: [1](5.6) + Analytical gradient: [1](118.75) + Finite difference gradient: [1](-78.125) + Max. delta: 196.875 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((118.75,0,-0.078125,-0.390625,0.46875)) +bad gradient + X: [1](5.7) + Analytical gradient: [1](112.793) + Finite difference gradient: [1](-82.0313) + Max. delta: 194.824 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((112.793,0,-0.0598145,-0.406494,0.466309)) +bad gradient + X: [1](5.8) + Analytical gradient: [1](106.641) + Finite difference gradient: [1](-85.9375) + Max. delta: 192.578 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((106.641,0,-0.0439453,-0.415039,0.458984)) +bad gradient + X: [1](5.9) + Analytical gradient: [1](100.293) + Finite difference gradient: [1](-89.8438) + Max. delta: 190.137 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((100.293,0,-0.0305176,-0.41626,0.446777)) +bad gradient + X: [1](6) + Analytical gradient: [1](93.75) + Finite difference gradient: [1](-93.75) + Max. delta: 187.5 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((93.75,0,-0.0195313,-0.410156,0.429688)) +bad gradient + X: [1](6.1) + Analytical gradient: [1](87.0117) + Finite difference gradient: [1](-97.6563) + Max. delta: 184.668 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((87.0117,0,-0.0109863,-0.396729,0.407715)) +bad gradient + X: [1](6.2) + Analytical gradient: [1](80.0781) + Finite difference gradient: [1](-101.563) + Max. delta: 181.641 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((80.0781,0,-0.00488281,-0.375977,0.380859)) +bad gradient + X: [1](6.3) + Analytical gradient: [1](72.9492) + Finite difference gradient: [1](-105.469) + Max. delta: 178.418 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((72.9492,0,-0.0012207,-0.3479,0.349121)) +bad gradient + X: [1](6.4) + Analytical gradient: [1](65.625) + Finite difference gradient: [1](-109.375) + Max. delta: 175 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((65.625,0,0,-0.3125,0.3125)) +bad gradient + X: [1](6.5) + Analytical gradient: [1](58.3649) + Finite difference gradient: [1](-105.286) + Max. delta: 163.65 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((58.3649,0,0,-0.274658,0.274658)) +bad gradient + X: [1](6.6) + Analytical gradient: [1](51.4404) + Finite difference gradient: [1](-100.83) + Max. delta: 152.27 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((51.4404,0,0,-0.239258,0.239258)) +bad gradient + X: [1](6.7) + Analytical gradient: [1](44.87) + Finite difference gradient: [1](-96.0083) + Max. delta: 140.878 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((44.87,0,0,-0.206299,0.206299)) +bad gradient + X: [1](6.8) + Analytical gradient: [1](38.6719) + Finite difference gradient: [1](-90.8203) + Max. delta: 129.492 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((38.6719,0,0,-0.175781,0.175781)) +bad gradient + X: [1](6.9) + Analytical gradient: [1](32.8644) + Finite difference gradient: [1](-85.2661) + Max. delta: 118.13 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((32.8644,0,0,-0.147705,0.147705)) +bad gradient + X: [1](7) + Analytical gradient: [1](27.4658) + Finite difference gradient: [1](-79.3457) + Max. delta: 106.811 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((27.4658,0,0,-0.12207,0.12207)) +bad gradient + X: [1](7.1) + Analytical gradient: [1](22.4945) + Finite difference gradient: [1](-73.0591) + Max. delta: 95.5536 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((22.4945,0,0,-0.098877,0.098877)) +bad gradient + X: [1](7.2) + Analytical gradient: [1](17.9688) + Finite difference gradient: [1](-66.4063) + Max. delta: 84.375 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((17.9688,0,0,-0.078125,0.078125)) +bad gradient + X: [1](7.3) + Analytical gradient: [1](13.9069) + Finite difference gradient: [1](-59.3872) + Max. delta: 73.2941 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((13.9069,0,0,-0.0598145,0.0598145)) +bad gradient + X: [1](7.4) + Analytical gradient: [1](10.3271) + Finite difference gradient: [1](-52.002) + Max. delta: 62.3291 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((10.3271,0,0,-0.0439453,0.0439453)) +bad gradient + X: [1](7.5) + Analytical gradient: [1](7.24792) + Finite difference gradient: [1](-44.2505) + Max. delta: 51.4984 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((7.24792,0,0,-0.0305176,0.0305176)) +bad gradient + X: [1](7.6) + Analytical gradient: [1](4.6875) + Finite difference gradient: [1](-36.1328) + Max. delta: 40.8203 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((4.6875,0,0,-0.0195313,0.0195313)) +bad gradient + X: [1](7.7) + Analytical gradient: [1](2.66418) + Finite difference gradient: [1](-27.6489) + Max. delta: 30.3131 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((2.66418,0,0,-0.0109863,0.0109863)) +bad gradient + X: [1](7.8) + Analytical gradient: [1](1.19629) + Finite difference gradient: [1](-18.7989) + Max. delta: 19.9952 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((1.19629,0,0,-0.00488281,0.00488281)) +bad gradient + X: [1](7.9) + Analytical gradient: [1](0.302124) + Finite difference gradient: [1](-9.58258) + Max. delta: 9.8847 + Max. delta in component: 0 + Max. allowed delta: 0.0001 N/A [1,5]((0.302124,0,0,-0.0012207,0.0012207)) N/A [1,5]((4.69069e-14,0,0,0,2.22045e-16)) @@ -737,24 +1549,150 @@ Variation of the configuration w.r.t to parameters: Variation of the derivative w.r.t to parameters: [1,4]((0,0,0,0)) [1,5]((0,0,0,0,0)) +bad gradient + X: [1](0.1) + Analytical gradient: [1](1.17188) + Finite difference gradient: [1](2.92969) + Max. delta: 1.75781 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.00976562,0.00976562,0,0)) [1,5]((1.17188,-0.078125,0.078125,0,0)) +bad gradient + X: [1](0.2) + Analytical gradient: [1](5.46875) + Finite difference gradient: [1](11.7188) + Max. delta: 6.25 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.0390625,0.0390625,0,0)) [1,5]((5.46875,-0.3125,0.3125,0,0)) +bad gradient + X: [1](0.3) + Analytical gradient: [1](14.0625) + Finite difference gradient: [1](26.3672) + Max. delta: 12.3047 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.0878906,0.0878906,0,0)) [1,5]((14.0625,-0.703125,0.703125,0,0)) +bad gradient + X: [1](0.4) + Analytical gradient: [1](28.125) + Finite difference gradient: [1](46.875) + Max. delta: 18.75 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.15625,0.15625,0,0)) [1,5]((28.125,-1.25,1.25,0,0)) +bad gradient + X: [1](0.5) + Analytical gradient: [1](46.875) + Finite difference gradient: [1](62.5) + Max. delta: 15.625 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.244141,0.244141,0,0)) [1,5]((46.875,-1.71875,1.64062,0.078125,0)) +bad gradient + X: [1](0.6) + Analytical gradient: [1](68.75) + Finite difference gradient: [1](78.125) + Max. delta: 9.375 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.351562,0.351562,0,0)) [1,5]((68.75,-1.875,1.5625,0.3125,0)) [1,4]((-0.478516,0.478516,0,0)) [1,5]((93.75,-1.71875,1.01563,0.703125,0)) +bad gradient + X: [1](0.8) + Analytical gradient: [1](121.875) + Finite difference gradient: [1](109.375) + Max. delta: 12.5 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.625,0.625,0,0)) [1,5]((121.875,-1.25,1.11022e-15,1.25,0)) +bad gradient + X: [1](0.9) + Analytical gradient: [1](147.656) + Finite difference gradient: [1](87.8906) + Max. delta: 59.7656 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.761719,0.751953,0.00976562,0)) [1,5]((147.656,-0.703125,-1.01562,1.64062,0.078125)) +bad gradient + X: [1](1) + Analytical gradient: [1](164.062) + Finite difference gradient: [1](54.6875) + Max. delta: 109.375 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.859375,0.820312,0.0390625,0)) [1,5]((164.062,-0.3125,-1.5625,1.5625,0.3125)) +bad gradient + X: [1](1.1) + Analytical gradient: [1](168.75) + Finite difference gradient: [1](9.76562) + Max. delta: 158.984 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.917969,0.830078,0.0878906,0)) [1,5]((168.75,-0.078125,-1.64063,1.01563,0.703125)) +bad gradient + X: [1](1.2) + Analytical gradient: [1](159.375) + Finite difference gradient: [1](-46.875) + Max. delta: 206.25 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.9375,0.78125,0.15625,0)) [1,5]((159.375,0,-1.25,2.22045e-15,1.25)) +bad gradient + X: [1](1.3) + Analytical gradient: [1](140.625) + Finite difference gradient: [1](-62.5) + Max. delta: 203.125 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.917969,0.673828,0.244141,0)) [1,5]((140.625,0,-0.703125,-1.01562,1.71875)) +bad gradient + X: [1](1.4) + Analytical gradient: [1](118.75) + Finite difference gradient: [1](-78.125) + Max. delta: 196.875 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.859375,0.507812,0.351562,0)) [1,5]((118.75,0,-0.3125,-1.5625,1.875)) +bad gradient + X: [1](1.5) + Analytical gradient: [1](93.75) + Finite difference gradient: [1](-93.75) + Max. delta: 187.5 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.761719,0.283203,0.478516,0)) [1,5]((93.75,0,-0.078125,-1.64062,1.71875)) +bad gradient + X: [1](1.6) + Analytical gradient: [1](65.625) + Finite difference gradient: [1](-109.375) + Max. delta: 175 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.625,-1.11022e-15,0.625,-0)) [1,5]((65.625,0,0,-1.25,1.25)) +bad gradient + X: [1](1.7) + Analytical gradient: [1](38.6719) + Finite difference gradient: [1](-90.8203) + Max. delta: 129.492 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.478516,-0.283203,0.751953,0.00976563)) [1,5]((38.6719,0,0,-0.703125,0.703125)) +bad gradient + X: [1](1.8) + Analytical gradient: [1](17.9687) + Finite difference gradient: [1](-66.4062) + Max. delta: 84.375 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.351562,-0.507813,0.820313,0.0390625)) [1,5]((17.9687,0,0,-0.3125,0.3125)) +bad gradient + X: [1](1.9) + Analytical gradient: [1](4.6875) + Finite difference gradient: [1](-36.1328) + Max. delta: 40.8203 + Max. delta in component: 0 + Max. allowed delta: 0.0001 [1,4]((-0.244141,-0.673828,0.830078,0.0878906)) [1,5]((4.6875,0,0,-0.078125,0.078125)) [1,4]((-0.15625,-0.78125,0.78125,0.15625)) [1,5]((-1.04083e-13,0,0,0,0)) diff --git a/tests/spline-bicycle-optim.stdout b/tests/spline-bicycle-optim.stdout index e69de29..b30a85b 100644 --- a/tests/spline-bicycle-optim.stdout +++ b/tests/spline-bicycle-optim.stdout @@ -0,0 +1,208 @@ +#!/usr/bin/gnuplot +# Generated by RobOptim core library 0.3.20-298b +set terminal wxt persist +set multiplot layout 1,2 +set grid +plot '-' title 'before' with line +0.000029 -0.000576 +0.000230 -0.004608 +0.000778 -0.015552 +0.001843 -0.036864 +0.003600 -0.072000 +0.006221 -0.124416 +0.009878 -0.197568 +0.014746 -0.294912 +0.020978 -0.419392 +0.028533 -0.568000 +0.037241 -0.733888 +0.046927 -0.910144 +0.057420 -1.089856 +0.068546 -1.266112 +0.080133 -1.432000 +0.092009 -1.580608 +0.104000 -1.705088 +0.116000 -1.802432 +0.128000 -1.875584 +0.140000 -1.928000 +0.152000 -1.963136 +0.164000 -1.984448 +0.176000 -1.995392 +0.188000 -1.999424 +0.200000 -2.000000 +0.212000 -2.000000 +0.224000 -2.000000 +0.236000 -2.000000 +0.248000 -2.000000 +0.260000 -2.000000 +0.272000 -2.000000 +0.284000 -2.000000 +0.296000 -2.000000 +0.308000 -2.000000 +0.320000 -2.000000 +0.332000 -2.000000 +0.344000 -2.000000 +0.356000 -2.000000 +0.368000 -2.000000 +0.380000 -2.000000 +0.392000 -2.000000 +0.404000 -2.000000 +0.416000 -2.000000 +0.428000 -2.000000 +0.440000 -2.000000 +0.452000 -2.000000 +0.464000 -2.000000 +0.476000 -2.000000 +0.488000 -2.000000 +0.500000 -2.000000 +0.512000 -2.000000 +0.524000 -2.000000 +0.536000 -2.000000 +0.548000 -2.000000 +0.560000 -2.000000 +0.572000 -2.000000 +0.584000 -2.000000 +0.596000 -2.000000 +0.608000 -2.000000 +0.620000 -2.000000 +0.632000 -2.000000 +0.644000 -2.000000 +0.656000 -2.000000 +0.668000 -2.000000 +0.680000 -2.000000 +0.692000 -2.000000 +0.704000 -2.000000 +0.716000 -2.000000 +0.728000 -2.000000 +0.740000 -2.000000 +0.752000 -2.000000 +0.764000 -2.000000 +0.776000 -2.000000 +0.788000 -2.000000 +0.800000 -2.000000 +0.812000 -1.999395 +0.824000 -1.995162 +0.836000 -1.983670 +0.848000 -1.961293 +0.860000 -1.924400 +0.872000 -1.869363 +0.884000 -1.792554 +0.896000 -1.690342 +0.907991 -1.559638 +0.919867 -1.403600 +0.931454 -1.229418 +0.942580 -1.044349 +0.953073 -0.855651 +0.962759 -0.670582 +0.971467 -0.496400 +0.979022 -0.340362 +0.985254 -0.209658 +0.990122 -0.107446 +0.993779 -0.030637 +0.996400 0.024400 +0.998157 0.061293 +0.999222 0.083670 +0.999770 0.095162 +e + +plot '-' title 'after' with line +0.000041 -0.000001 +0.000327 -0.000006 +0.001102 -0.000019 +0.002612 -0.000045 +0.005102 -0.000088 +0.008817 -0.000152 +0.014001 -0.000242 +0.020900 -0.000361 +0.029728 -0.000513 +0.040353 -0.000691 +0.052417 -0.000883 +0.065560 -0.001074 +0.079422 -0.001252 +0.093640 -0.001403 +0.107856 -0.001514 +0.121707 -0.001572 +0.134836 -0.001564 +0.147080 -0.001484 +0.158580 -0.001339 +0.169501 -0.001136 +0.180009 -0.000885 +0.190268 -0.000592 +0.200445 -0.000266 +0.210706 0.000086 +0.221216 0.000457 +0.232101 0.000839 +0.243329 0.001235 +0.254831 0.001650 +0.266533 0.002088 +0.278366 0.002552 +0.290259 0.003047 +0.302139 0.003577 +0.313937 0.004146 +0.325586 0.004758 +0.337077 0.005413 +0.348437 0.006109 +0.359696 0.006841 +0.370880 0.007609 +0.382020 0.008409 +0.393142 0.009239 +0.404275 0.010096 +0.415447 0.010977 +0.426673 0.011882 +0.437947 0.012812 +0.449261 0.013771 +0.460607 0.014760 +0.471976 0.015783 +0.483362 0.016840 +0.494756 0.017936 +0.506151 0.019071 +0.517538 0.020248 +0.528911 0.021464 +0.540261 0.022714 +0.551582 0.023995 +0.562867 0.025303 +0.574108 0.026633 +0.585298 0.027982 +0.596430 0.029346 +0.607499 0.030721 +0.618518 0.032111 +0.629514 0.033524 +0.640515 0.034967 +0.651547 0.036449 +0.662637 0.037976 +0.673813 0.039559 +0.685102 0.041203 +0.696529 0.042917 +0.708087 0.044699 +0.719712 0.046532 +0.731336 0.048400 +0.742891 0.050284 +0.754309 0.052166 +0.765522 0.054030 +0.776462 0.055857 +0.787061 0.057630 +0.797289 0.059340 +0.807267 0.061017 +0.817152 0.062700 +0.827103 0.064428 +0.837277 0.066240 +0.847834 0.068174 +0.858932 0.070271 +0.870728 0.072568 +0.883356 0.075098 +0.896661 0.077826 +0.910303 0.080671 +0.923939 0.083552 +0.937224 0.086387 +0.949815 0.089095 +0.961369 0.091595 +0.971541 0.093805 +0.979992 0.095644 +0.986596 0.097082 +0.991559 0.098162 +0.995115 0.098937 +0.997499 0.099456 +0.998945 0.099770 +0.999687 0.099932 +e + +unset multiplot diff --git a/tests/spline-gradient.stdout b/tests/spline-gradient.stdout index 0077cf8..1e09f4a 100644 --- a/tests/spline-gradient.stdout +++ b/tests/spline-gradient.stdout @@ -65,7 +65,7 @@ plot '-' title 'spline' with line 0.570000 0.939716 0.580000 0.936487 0.590000 0.933145 -0.600000 0.929688 +0.600000 0.929687 0.610000 0.926113 0.620000 0.922419 0.630000 0.918604 @@ -429,7 +429,7 @@ plot '-' title 'spline derivative' with line 0.170000 -0.028223 0.180000 -0.031641 0.190000 -0.035254 -0.200000 -0.039063 +0.200000 -0.039062 0.210000 -0.043066 0.220000 -0.047266 0.230000 -0.051660 @@ -437,7 +437,7 @@ plot '-' title 'spline derivative' with line 0.250000 -0.061035 0.260000 -0.066016 0.270000 -0.071191 -0.280000 -0.076562 +0.280000 -0.076563 0.290000 -0.082129 0.300000 -0.087891 0.310000 -0.093848 diff --git a/tests/spline-optimization.stdout b/tests/spline-optimization.stdout index 9f6fc15..a3b748b 100644 --- a/tests/spline-optimization.stdout +++ b/tests/spline-optimization.stdout @@ -15,7 +15,7 @@ # [2,8]((0,0,0.111654,0,0.652018,0,0.236328,0),(0,0,0,0.111654,0,0.652018,0,0.236328)) # [2,8]((0,0,0,0,-9.26993e-18,0,1,0),(0,0,0,0,0,-9.26993e-18,0,1)) #!/usr/bin/gnuplot -# Generated by RobOptim core library 0.2 +# Generated by RobOptim core library 0.3.20-298b set terminal wxt persist set multiplot layout 1,2 set grid diff --git a/tests/spline.stdout b/tests/spline.stdout index 9c12328..ec93e09 100644 --- a/tests/spline.stdout +++ b/tests/spline.stdout @@ -11,510 +11,510 @@ # [2](12.5,12.5) # [2](0,0) #!/usr/bin/gnuplot -# Generated by RobOptim core library 0.2 +# Generated by RobOptim core library 0.3.20-298b set terminal wxt persist plot '-' title 'spline' with line -0.000000 0.000000 -0.000004 0.000008 -0.000033 0.000067 -0.000112 0.000225 -0.000267 0.000533 -0.000521 0.001042 -0.000900 0.001800 -0.001429 0.002858 -0.002133 0.004267 -0.003037 0.006075 -0.004167 0.008333 -0.005546 0.011092 -0.007200 0.014400 -0.009154 0.018308 -0.011433 0.022867 -0.014062 0.028125 -0.017067 0.034133 -0.020471 0.040942 -0.024300 0.048600 -0.028579 0.057158 -0.033333 0.066667 -0.038588 0.077175 -0.044367 0.088733 -0.050696 0.101392 -0.057600 0.115200 -0.065104 0.130208 -0.073233 0.146467 -0.082013 0.164025 -0.091467 0.182933 -0.101621 0.203242 -0.112500 0.225000 -0.124129 0.248258 -0.136533 0.273067 -0.149738 0.299475 -0.163767 0.327533 -0.178646 0.357292 -0.194400 0.388800 -0.211054 0.422108 -0.228633 0.457267 -0.247163 0.494325 -0.266667 0.533333 -0.287171 0.574342 -0.308700 0.617400 -0.331279 0.662558 -0.354933 0.709867 -0.379688 0.759375 -0.405567 0.811133 -0.432596 0.865192 -0.460800 0.921600 -0.490204 0.980408 -0.520833 1.041667 -0.552713 1.105425 -0.585867 1.171733 -0.620321 1.240642 -0.656100 1.312200 -0.693229 1.386458 -0.731733 1.463467 -0.771638 1.543275 -0.812967 1.625933 -0.855746 1.711492 -0.900000 1.800000 -0.945754 1.891508 -0.993033 1.986067 -1.041863 2.083725 -1.092267 2.184533 -1.144271 2.288542 -1.197900 2.395800 -1.253179 2.506358 -1.310133 2.620267 -1.368788 2.737575 -1.429167 2.858333 -1.491296 2.982592 -1.555200 3.110400 -1.620904 3.241808 -1.688433 3.376867 -1.757813 3.515625 -1.829067 3.658133 -1.902221 3.804442 -1.977300 3.954600 -2.054329 4.108658 -2.133333 4.266667 -2.214338 4.428675 -2.297367 4.594733 -2.382446 4.764892 -2.469600 4.939200 -2.558854 5.117708 -2.650233 5.300467 -2.743763 5.487525 -2.839467 5.678933 -2.937371 5.874742 -3.037500 6.075000 -3.139879 6.279758 -3.244533 6.489067 -3.351488 6.702975 -3.460767 6.921533 -3.572396 7.144792 -3.686400 7.372800 -3.802804 7.605608 -3.921633 7.843267 -4.042913 8.085825 -4.166667 8.333333 -4.292913 8.585813 -4.421633 8.843167 -4.552804 9.105271 -4.686400 9.372000 -4.822396 9.643229 -4.960767 9.918833 -5.101488 10.198688 -5.244533 10.482667 -5.389879 10.770646 -5.537500 11.062500 -5.687371 11.358104 -5.839467 11.657333 -5.993763 11.960063 -6.150233 12.266167 -6.308854 12.575521 -6.469600 12.888000 -6.632446 13.203479 -6.797367 13.521833 -6.964338 13.842938 -7.133333 14.166667 -7.304329 14.492896 -7.477300 14.821500 -7.652221 15.152354 -7.829067 15.485333 -8.007813 15.820313 -8.188433 16.157167 -8.370904 16.495771 -8.555200 16.836000 -8.741296 17.177729 -8.929167 17.520833 -9.118788 17.865188 -9.310133 18.210667 -9.503179 18.557146 -9.697900 18.904500 -9.894271 19.252604 -10.092267 19.601333 -10.291863 19.950563 -10.493033 20.300167 -10.695754 20.650021 -10.900000 21.000000 -11.105746 21.349979 -11.312967 21.699833 -11.521638 22.049438 -11.731733 22.398667 -11.943229 22.747396 -12.156100 23.095500 -12.370321 23.442854 -12.585867 23.789333 -12.802713 24.134813 -13.020833 24.479167 -13.240204 24.822271 -13.460800 25.164000 -13.682596 25.504229 -13.905567 25.842833 -14.129688 26.179688 -14.354933 26.514667 -14.581279 26.847646 -14.808700 27.178500 -15.037171 27.507104 -15.266667 27.833333 -15.497163 28.157063 -15.728633 28.478167 -15.961054 28.796521 -16.194400 29.112000 -16.428646 29.424479 -16.663767 29.733833 -16.899738 30.039938 -17.136533 30.342667 -17.374129 30.641896 -17.612500 30.937500 -17.851621 31.229354 -18.091467 31.517333 -18.332013 31.801313 -18.573233 32.081167 -18.815104 32.356771 -19.057600 32.628000 -19.300696 32.894729 -19.544367 33.156833 -19.788588 33.414188 -20.033333 33.666667 -20.278579 33.914146 -20.524300 34.156500 -20.770471 34.393604 -21.017067 34.625333 -21.264063 34.851563 -21.511433 35.072167 -21.759154 35.287021 -22.007200 35.496000 -22.255546 35.698979 -22.504167 35.895833 -22.753038 36.086438 -23.002133 36.270667 -23.251429 36.448396 -23.500900 36.619500 -23.750521 36.783854 -24.000267 36.941333 -24.250113 37.091813 -24.500033 37.235167 -24.750004 37.371271 -25.000000 37.500000 -25.250004 37.621279 -25.500033 37.735233 -25.750113 37.842038 -26.000267 37.941867 -26.250521 38.034896 -26.500900 38.121300 -26.751429 38.201254 -27.002133 38.274933 -27.253037 38.342512 -27.504167 38.404167 -27.755546 38.460071 -28.007200 38.510400 -28.259154 38.555329 -28.511433 38.595033 -28.764062 38.629687 -29.017067 38.659467 -29.270471 38.684546 -29.524300 38.705100 -29.778579 38.721304 -30.033333 38.733333 -30.288587 38.741363 -30.544367 38.745567 -30.800696 38.746121 -31.057600 38.743200 -31.315104 38.736979 -31.573233 38.727633 -31.832012 38.715338 -32.091467 38.700267 -32.351621 38.682596 -32.612500 38.662500 -32.874129 38.640154 -33.136533 38.615733 -33.399737 38.589413 -33.663767 38.561367 -33.928646 38.531771 -34.194400 38.500800 -34.461054 38.468629 -34.728633 38.435433 -34.997162 38.401388 -35.266667 38.366667 -35.537171 38.331446 -35.808700 38.295900 -36.081279 38.260204 -36.354933 38.224533 -36.629687 38.189063 -36.905567 38.153967 -37.182596 38.119421 -37.460800 38.085600 -37.740204 38.052679 -38.020833 38.020833 -38.302712 37.990238 -38.585867 37.961067 -38.870321 37.933496 -39.156100 37.907700 -39.443229 37.883854 -39.731733 37.862133 -40.021637 37.842713 -40.312967 37.825767 -40.605746 37.811471 -40.900000 37.800000 -41.195754 37.791529 -41.493033 37.786233 -41.791862 37.784287 -42.092267 37.785867 -42.394271 37.791146 -42.697900 37.800300 -43.003179 37.813504 -43.310133 37.830933 -43.618787 37.852762 -43.929167 37.879167 -44.241296 37.910321 -44.555200 37.946400 -44.870904 37.987579 -45.188433 38.034033 -45.507812 38.085937 -45.829067 38.143467 -46.152221 38.206796 -46.477300 38.276100 -46.804329 38.351554 -47.133333 38.433333 -47.464337 38.521612 -47.797367 38.616567 -48.132446 38.718371 -48.469600 38.827200 -48.808854 38.943229 -49.150233 39.066633 -49.493762 39.197587 -49.839467 39.336267 -50.187371 39.482846 -50.537500 39.637500 -50.889879 39.800404 -51.244533 39.971733 -51.601487 40.151662 -51.960767 40.340367 -52.322396 40.538021 -52.686400 40.744800 -53.052804 40.960879 -53.421633 41.186433 -53.792912 41.421637 -54.166667 41.666667 -54.542904 41.921637 -54.921567 42.186433 -55.302579 42.460879 -55.685867 42.744800 -56.071354 43.038021 -56.458967 43.340367 -56.848629 43.651662 -57.240267 43.971733 -57.633804 44.300404 -58.029167 44.637500 -58.426279 44.982846 -58.825067 45.336267 -59.225454 45.697587 -59.627367 46.066633 -60.030729 46.443229 -60.435467 46.827200 -60.841504 47.218371 -61.248767 47.616567 -61.657179 48.021612 -62.066667 48.433333 -62.477154 48.851554 -62.888567 49.276100 -63.300829 49.706796 -63.713867 50.143467 -64.127604 50.585937 -64.541967 51.034033 -64.956879 51.487579 -65.372267 51.946400 -65.788054 52.410321 -66.204167 52.879167 -66.620529 53.352762 -67.037067 53.830933 -67.453704 54.313504 -67.870367 54.800300 -68.286979 55.291146 -68.703467 55.785867 -69.119754 56.284287 -69.535767 56.786233 -69.951429 57.291529 -70.366667 57.800000 -70.781404 58.311471 -71.195567 58.825767 -71.609079 59.342712 -72.021867 59.862133 -72.433854 60.383854 -72.844967 60.907700 -73.255129 61.433496 -73.664267 61.961067 -74.072304 62.490237 -74.479167 63.020833 -74.884779 63.552679 -75.289067 64.085600 -75.691954 64.619421 -76.093367 65.153967 -76.493229 65.689062 -76.891467 66.224533 -77.288004 66.760204 -77.682767 67.295900 -78.075679 67.831446 -78.466667 68.366667 -78.855654 68.901387 -79.242567 69.435433 -79.627329 69.968629 -80.009867 70.500800 -80.390104 71.031771 -80.767967 71.561367 -81.143379 72.089412 -81.516267 72.615733 -81.886554 73.140154 -82.254167 73.662500 -82.619029 74.182596 -82.981067 74.700267 -83.340204 75.215337 -83.696367 75.727633 -84.049479 76.236979 -84.399467 76.743200 -84.746254 77.246121 -85.089767 77.745567 -85.429929 78.241362 -85.766667 78.733333 -86.099904 79.221304 -86.429567 79.705100 -86.755579 80.184546 -87.077867 80.659467 -87.396354 81.129687 -87.710967 81.595033 -88.021629 82.055329 -88.328267 82.510400 -88.630804 82.960071 -88.929167 83.404167 -89.223279 83.842512 -89.513067 84.274933 -89.798454 84.701254 -90.079367 85.121300 -90.355729 85.534896 -90.627467 85.941867 -90.894504 86.342037 -91.156767 86.735233 -91.414179 87.121279 -91.666667 87.500000 -91.914175 87.871262 -92.156733 88.235100 -92.394392 88.591587 -92.627200 88.940800 -92.855208 89.282812 -93.078467 89.617700 -93.297025 89.945537 -93.510933 90.266400 -93.720242 90.580362 -93.925000 90.887500 -94.125258 91.187887 -94.321067 91.481600 -94.512475 91.768712 -94.699533 92.049300 -94.882292 92.323437 -95.060800 92.591200 -95.235108 92.852662 -95.405267 93.107900 -95.571325 93.356987 -95.733333 93.600000 -95.891342 93.837012 -96.045400 94.068100 -96.195558 94.293337 -96.341867 94.512800 -96.484375 94.726562 -96.623133 94.934700 -96.758192 95.137287 -96.889600 95.334400 -97.017408 95.526112 -97.141667 95.712500 -97.262425 95.893637 -97.379733 96.069600 -97.493642 96.240462 -97.604200 96.406300 -97.711458 96.567187 -97.815467 96.723200 -97.916275 96.874412 -98.013933 97.020900 -98.108492 97.162737 -98.200000 97.300000 -98.288508 97.432762 -98.374067 97.561100 -98.456725 97.685087 -98.536533 97.804800 -98.613542 97.920312 -98.687800 98.031700 -98.759358 98.139037 -98.828267 98.242400 -98.894575 98.341862 -98.958333 98.437500 -99.019592 98.529387 -99.078400 98.617600 -99.134808 98.702212 -99.188867 98.783300 -99.240625 98.860937 -99.290133 98.935200 -99.337442 99.006162 -99.382600 99.073900 -99.425658 99.138487 -99.466667 99.200000 -99.505675 99.258512 -99.542733 99.314100 -99.577892 99.366837 -99.611200 99.416800 -99.642708 99.464062 -99.672467 99.508700 -99.700525 99.550787 -99.726933 99.590400 -99.751742 99.627612 -99.775000 99.662500 -99.796758 99.695137 -99.817067 99.725600 -99.835975 99.753962 -99.853533 99.780300 -99.869792 99.804687 -99.884800 99.827200 -99.898608 99.847912 -99.911267 99.866900 -99.922825 99.884237 -99.933333 99.900000 -99.942842 99.914262 -99.951400 99.927100 -99.959058 99.938587 -99.965867 99.948800 -99.971875 99.957812 -99.977133 99.965700 -99.981692 99.972537 -99.985600 99.978400 -99.988908 99.983362 -99.991667 99.987500 -99.993925 99.990887 -99.995733 99.993600 -99.997142 99.995712 -99.998200 99.997300 -99.998958 99.998437 -99.999467 99.999200 -99.999775 99.999662 -99.999933 99.999900 -99.999992 99.999988 -100.000000 100.000000 +0.00 0.00 +0.00 0.00 +0.00 0.00 +0.00 0.00 +0.00 0.00 +0.00 0.00 +0.00 0.00 +0.00 0.00 +0.00 0.00 +0.00 0.01 +0.00 0.01 +0.01 0.01 +0.01 0.01 +0.01 0.02 +0.01 0.02 +0.01 0.03 +0.02 0.03 +0.02 0.04 +0.02 0.05 +0.03 0.06 +0.03 0.07 +0.04 0.08 +0.04 0.09 +0.05 0.10 +0.06 0.12 +0.07 0.13 +0.07 0.15 +0.08 0.16 +0.09 0.18 +0.10 0.20 +0.11 0.23 +0.12 0.25 +0.14 0.27 +0.15 0.30 +0.16 0.33 +0.18 0.36 +0.19 0.39 +0.21 0.42 +0.23 0.46 +0.25 0.49 +0.27 0.53 +0.29 0.57 +0.31 0.62 +0.33 0.66 +0.35 0.71 +0.38 0.76 +0.41 0.81 +0.43 0.87 +0.46 0.92 +0.49 0.98 +0.52 1.04 +0.55 1.11 +0.59 1.17 +0.62 1.24 +0.66 1.31 +0.69 1.39 +0.73 1.46 +0.77 1.54 +0.81 1.63 +0.86 1.71 +0.90 1.80 +0.95 1.89 +0.99 1.99 +1.04 2.08 +1.09 2.18 +1.14 2.29 +1.20 2.40 +1.25 2.51 +1.31 2.62 +1.37 2.74 +1.43 2.86 +1.49 2.98 +1.56 3.11 +1.62 3.24 +1.69 3.38 +1.76 3.52 +1.83 3.66 +1.90 3.80 +1.98 3.95 +2.05 4.11 +2.13 4.27 +2.21 4.43 +2.30 4.59 +2.38 4.76 +2.47 4.94 +2.56 5.12 +2.65 5.30 +2.74 5.49 +2.84 5.68 +2.94 5.87 +3.04 6.08 +3.14 6.28 +3.24 6.49 +3.35 6.70 +3.46 6.92 +3.57 7.14 +3.69 7.37 +3.80 7.61 +3.92 7.84 +4.04 8.09 +4.17 8.33 +4.29 8.59 +4.42 8.84 +4.55 9.11 +4.69 9.37 +4.82 9.64 +4.96 9.92 +5.10 10.20 +5.24 10.48 +5.39 10.77 +5.54 11.06 +5.69 11.36 +5.84 11.66 +5.99 11.96 +6.15 12.27 +6.31 12.58 +6.47 12.89 +6.63 13.20 +6.80 13.52 +6.96 13.84 +7.13 14.17 +7.30 14.49 +7.48 14.82 +7.65 15.15 +7.83 15.49 +8.01 15.82 +8.19 16.16 +8.37 16.50 +8.56 16.84 +8.74 17.18 +8.93 17.52 +9.12 17.87 +9.31 18.21 +9.50 18.56 +9.70 18.90 +9.89 19.25 +10.09 19.60 +10.29 19.95 +10.49 20.30 +10.70 20.65 +10.90 21.00 +11.11 21.35 +11.31 21.70 +11.52 22.05 +11.73 22.40 +11.94 22.75 +12.16 23.10 +12.37 23.44 +12.59 23.79 +12.80 24.13 +13.02 24.48 +13.24 24.82 +13.46 25.16 +13.68 25.50 +13.91 25.84 +14.13 26.18 +14.35 26.51 +14.58 26.85 +14.81 27.18 +15.04 27.51 +15.27 27.83 +15.50 28.16 +15.73 28.48 +15.96 28.80 +16.19 29.11 +16.43 29.42 +16.66 29.73 +16.90 30.04 +17.14 30.34 +17.37 30.64 +17.61 30.94 +17.85 31.23 +18.09 31.52 +18.33 31.80 +18.57 32.08 +18.82 32.36 +19.06 32.63 +19.30 32.89 +19.54 33.16 +19.79 33.41 +20.03 33.67 +20.28 33.91 +20.52 34.16 +20.77 34.39 +21.02 34.63 +21.26 34.85 +21.51 35.07 +21.76 35.29 +22.01 35.50 +22.26 35.70 +22.50 35.90 +22.75 36.09 +23.00 36.27 +23.25 36.45 +23.50 36.62 +23.75 36.78 +24.00 36.94 +24.25 37.09 +24.50 37.24 +24.75 37.37 +25.00 37.50 +25.25 37.62 +25.50 37.74 +25.75 37.84 +26.00 37.94 +26.25 38.03 +26.50 38.12 +26.75 38.20 +27.00 38.27 +27.25 38.34 +27.50 38.40 +27.76 38.46 +28.01 38.51 +28.26 38.56 +28.51 38.60 +28.76 38.63 +29.02 38.66 +29.27 38.68 +29.52 38.71 +29.78 38.72 +30.03 38.73 +30.29 38.74 +30.54... [truncated message content] |
From: Thomas M. <tho...@us...> - 2009-11-02 17:43:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 54cdbe0082cd8ee4ce71c0bf1c13ab5eebc3dc2e (commit) from 08f45afa8d2b60f05f1bbc3f63ab2ecf3367b6ec (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 54cdbe0082cd8ee4ce71c0bf1c13ab5eebc3dc2e Author: Thomas Moulard <tho...@gm...> Date: Mon Nov 2 18:43:02 2009 +0100 Add optional dependency toward CFSQP plug-in. * Makefile.am: Factorize rules. * build-aux: Synchornize. * configure.ac, * tests/Makefile.am, * tests/atlocal.in, * tests/package.m4.in, * tests/testsuite.at: Handle optional dependency toward CFSQP plug-in. Do not compile/run tests which require CFSQP plug-in if not available. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 75e9c26..d304402 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2009-11-02 Thomas Moulard <tho...@gm...> + + Add optional dependency toward CFSQP plug-in. + * Makefile.am: Factorize rules. + * build-aux: Synchornize. + * configure.ac, + * tests/Makefile.am, + * tests/atlocal.in, + * tests/package.m4.in, + * tests/testsuite.at: + Handle optional dependency toward CFSQP plug-in. + Do not compile/run tests which require CFSQP plug-in if + not available. + 2009-10-27 Thomas Moulard <tho...@gm...> Fix variationDerivWrtParam check in test suite. diff --git a/Makefile.am b/Makefile.am index 50cae1f..936a8e2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,21 +11,14 @@ SUBDIRS = \ # Provide bootstrap with the generated package. -EXTRA_DIST += bootstrap build-aux/bootstrap - +EXTRA_DIST += bootstrap \ + build-aux/bootstrap # Nothing to do in this directory. all: -# Libtool rules -LIBTOOL_DEPS = @LIBTOOL_DEPS@ -libtool: $(LIBTOOL_DEPS) - +# Include various rules... +include $(top_srcdir)/build-aux/doc-recursive.mk +include $(top_srcdir)/build-aux/libtool.mk include $(top_srcdir)/build-aux/pkg-config.mk - -# -- Generate documentation -.PHONY: doc html -doc html: - cd doc && $(MAKE) $(AM_MAKEFLAGS) $@ - -include $(top_srcdir)/build-aux/git-version-gen.mk +include $(top_srcdir)/build-aux/git-version-gen.mk \ No newline at end of file diff --git a/build-aux b/build-aux index d9d1710..3e4dfa5 160000 --- a/build-aux +++ b/build-aux @@ -1 +1 @@ -Subproject commit d9d17105cd9c7405c7b2a438e7b0a185d3d2a8b6 +Subproject commit 3e4dfa59a74db09fce05d56664e4ddeebeb791ad diff --git a/configure.ac b/configure.ac index 55599a6..0910385 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # Don't expend macros beginning by JRL_. m4_pattern_forbid([^JRL_]) -AC_PREREQ([2.59]) +AC_PREREQ([2.63]) ## --------------------- ## ## Package configuration ## @@ -14,6 +14,9 @@ AC_INIT([RobOptim trajectory library], # Auxiliary files. AC_CONFIG_AUX_DIR([build-aux]) +# Macros are stored in build-aux. +AC_CONFIG_MACRO_DIR([build-aux]) + # Automake. AM_INIT_AUTOMAKE([1.9.6 dist-bzip2 -Wall nostdinc]) @@ -43,9 +46,6 @@ JRL_CXX_WARNINGS([[-Wall], [-Wmissing-declarations], [-Wnested-externs]]) -# Macros are stored in build-aux. -AC_CONFIG_MACRO_DIR([build-aux]) - ## ------------------- ## ## Additionnal tools. ## ## ------------------- ## @@ -63,6 +63,15 @@ LT_INIT([dlopen]) # Search for RobOptim core. ROBOPTIM_CORE_PKG_CONFIG([roboptim-core >= 0.2]) +# Search for Roboptim core CFSQP plug-in. +AC_CHECK_HEADERS([roboptim/core/plugin/cfsqp.hh], + [have_roboptim_core_cfsqp_plugin=yes], + [have_roboptim_core_cfsqp_plugin=no]) + +AM_CONDITIONAL([HAVE_ROBOPTIM_CORE_CFSQP_PLUGIN], + [test x$have_roboptim_core_cfsqp_plugin = xyes]) +AC_SUBST([HAVE_ROBOPTIM_CORE_CFSQP_PLUGIN], + [$have_roboptim_core_cfsqp_plugin]) ## ------------ ## ## Pkg-config. ## diff --git a/tests/Makefile.am b/tests/Makefile.am index 8d78fa2..64840ff 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -31,6 +31,22 @@ check_PROGRAMS += spline-gradient spline_gradient_SOURCES = spline-gradient.cc $(COMMON_SOURCES) spline_gradient_LDADD = $(top_builddir)/src/libroboptim-trajectory.la +# free-time-trajectory +check_PROGRAMS += free-time-trajectory +free_time_trajectory_SOURCES = free-time-trajectory.cc $(COMMON_SOURCES) +free_time_trajectory_LDADD = $(top_builddir)/src/libroboptim-trajectory.la + + +# state-cost +check_PROGRAMS += state-cost +state_cost_SOURCES = state-cost.cc $(COMMON_SOURCES) +state_cost_LDADD = $(top_builddir)/src/libroboptim-trajectory.la + +######################################### +# Tests which require the CFSQP solver. # +######################################### +if HAVE_ROBOPTIM_CORE_CFSQP_PLUGIN + # spline-optimization check_PROGRAMS += spline-optimization spline_optimization_SOURCES = spline-optimization.cc $(COMMON_SOURCES) @@ -41,21 +57,12 @@ check_PROGRAMS += spline-bicycle-optim spline_bicycle_optim_SOURCES = spline-bicycle-optim.cc $(COMMON_SOURCES) spline_bicycle_optim_LDADD = $(top_builddir)/src/libroboptim-trajectory.la -# free-time-trajectory -check_PROGRAMS += free-time-trajectory -free_time_trajectory_SOURCES = free-time-trajectory.cc $(COMMON_SOURCES) -free_time_trajectory_LDADD = $(top_builddir)/src/libroboptim-trajectory.la - # spline-time-optimization check_PROGRAMS += spline-time-optimization spline_time_optimization_SOURCES = spline-time-optimization.cc $(COMMON_SOURCES) spline_time_optimization_LDADD = $(top_builddir)/src/libroboptim-trajectory.la -# state-cost -check_PROGRAMS += state-cost -state_cost_SOURCES = state-cost.cc $(COMMON_SOURCES) -state_cost_LDADD = $(top_builddir)/src/libroboptim-trajectory.la - +endif # anthropomorphic-cost-function-case-1 diff --git a/tests/atlocal.in b/tests/atlocal.in index 66e93b5..d5fb14f 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -23,3 +23,6 @@ PATH=@abs_builddir@:$PATH # Pass current roboptim-core version to test suite. ROBOPTIMCORE_VERSION=@ROBOPTIMCORE_VERSION@ + +# Pass whether CFSQP plug-in is available or not. +HAVE_ROBOPTIM_CORE_CFSQP_PLUGIN=@HAVE_ROBOPTIM_CORE_CFSQP_PLUGIN@ diff --git a/tests/package.m4.in b/tests/package.m4.in index 9f231e3..ec8caf0 100644 --- a/tests/package.m4.in +++ b/tests/package.m4.in @@ -21,6 +21,3 @@ m4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@]) m4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@]) m4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@]) m4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@]) - -m4_define([CFSQP], [@CFSQP_LIBADD@]) -m4_define([IPOPT], [@IPOPT_LIBADD@]) diff --git a/tests/testsuite.at b/tests/testsuite.at index e3a50a8..dd7422a 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -35,10 +35,13 @@ CHECK_STDOUT([free-time-trajectory], [Check free time trajectory.]) CHECK_STDOUT([state-cost], [Check state cost.]) AT_BANNER([Optimization (require solver plug-in)]) -CHECK_STDOUT([spline-optimization], [Optimize a Spline with Cfsqp.]) -CHECK_STDOUT([spline-bicycle-optim], [Optimize a Spline with Cfsqp (2).], [], +CHECK_STDOUT([spline-optimization], [Optimize a Spline with Cfsqp.], + [! test x$HAVE_ROBOPTIM_CORE_CFSQP_PLUGIN = xyes]) +CHECK_STDOUT([spline-bicycle-optim], [Optimize a Spline with Cfsqp (2).], + [! test x$HAVE_ROBOPTIM_CORE_CFSQP_PLUGIN = xyes], [true]) -CHECK_STDOUT([spline-time-optimization], [Optimize a free time trajectory.]) +CHECK_STDOUT([spline-time-optimization], [Optimize a free time trajectory.], + [! test x$HAVE_ROBOPTIM_CORE_CFSQP_PLUGIN = xyes]) AT_BANNER([Long tests (disabled unless ALL_TESTS=1)]) # Do ``ALL_TESTS=1 make check'' to run those tests, ----------------------------------------------------------------------- Summary of changes: ChangeLog | 14 ++++++++++++++ Makefile.am | 19 ++++++------------- build-aux | 2 +- configure.ac | 17 +++++++++++++---- tests/Makefile.am | 27 +++++++++++++++++---------- tests/atlocal.in | 3 +++ tests/package.m4.in | 3 --- tests/testsuite.at | 9 ++++++--- 8 files changed, 60 insertions(+), 34 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-11-02 17:05:54
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "build-aux". The branch, master has been updated via 3e4dfa59a74db09fce05d56664e4ddeebeb791ad (commit) from 44b7eea6e4c7883cd9f824ca706b737dabf03f96 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3e4dfa59a74db09fce05d56664e4ddeebeb791ad Author: Thomas Moulard <tho...@gm...> Date: Mon Nov 2 18:05:38 2009 +0100 Handle doxygendocdir in jrl-pkg-config. * jrl-pkg-config.m4: Search for Doxygen documentation. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index ee470be..ef91d30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-11-02 Thomas Moulard <tho...@gm...> + Handle doxygendocdir in jrl-pkg-config. + * jrl-pkg-config.m4: Search for Doxygen documentation. + +2009-11-02 Thomas Moulard <tho...@gm...> + Fix Doxygen generation rule. * doxygen.mk: Doxygen extra distributed files should be copied in doxygen-html, not Doxygen dependencies! diff --git a/jrl-pkg-config.m4 b/jrl-pkg-config.m4 index 6df337a..66ab491 100644 --- a/jrl-pkg-config.m4 +++ b/jrl-pkg-config.m4 @@ -46,6 +46,8 @@ AC_DEFUN([JRL_PKGCONFIGCHECK], AC_SUBST([$1_LIBS]) AC_SUBST([$1_PREFIX], [`$PKG_CONFIG $PKGNAME --variable=prefix`]) AC_SUBST([$1_DOCDIR], [`$PKG_CONFIG $PKGNAME --variable=docdir`]) + AC_SUBST([$1_DOXYGENDOCDIR], + [`$PKG_CONFIG $PKGNAME --variable=doxygendocdir`]) ]) # JRL_PKGCONFIGCHECK_ADDDEP([VARIABLE_PREFIX], [PACKAGE_NAME]) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ jrl-pkg-config.m4 | 2 ++ 2 files changed, 7 insertions(+), 0 deletions(-) hooks/post-receive -- build-aux |