[roboptim-commit] [SCM] roboptim-trajectory branch, master, updated. v0.2-43-g986b993
Status: Beta
Brought to you by:
flamiraux
From: Thomas M. <tho...@us...> - 2009-11-15 22:53: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-trajectory". The branch, master has been updated via 986b993344881b3e2406344c110bdf0ae76f5bc1 (commit) from 44a25844ed32193956cd2417101e5e22a7eb4c0d (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 986b993344881b3e2406344c110bdf0ae76f5bc1 Author: Thomas Moulard <tho...@gm...> Date: Sun Nov 15 23:50:21 2009 +0100 Normalize Gnuplot output and tests output. * include/roboptim/trajectory/visualization/limit-speed.hh, * include/roboptim/trajectory/visualization/speed.hh, * include/roboptim/trajectory/visualization/trajectory.hh: Normalize output. * tests/free-time-trajectory-stable-time-point.cc, * tests/free-time-trajectory.cc, * tests/spline-gradient.cc: Normalize test output. * tests/free-time-trajectory.stdout, * tests/spline-gradient.stdout, * tests/stable-point-state-function.stdout, * tests/state-function.stdout: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 311e5fc..8305c18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,20 @@ 2009-11-15 Thomas Moulard <tho...@gm...> + Normalize Gnuplot output and tests output. + * include/roboptim/trajectory/visualization/limit-speed.hh, + * include/roboptim/trajectory/visualization/speed.hh, + * include/roboptim/trajectory/visualization/trajectory.hh: + Normalize output. + * tests/free-time-trajectory-stable-time-point.cc, + * tests/free-time-trajectory.cc, + * tests/spline-gradient.cc: Normalize test output. + * tests/free-time-trajectory.stdout, + * tests/spline-gradient.stdout, + * tests/stable-point-state-function.stdout, + * tests/state-function.stdout: Regenerate. + +2009-11-15 Thomas Moulard <tho...@gm...> + Normalize test output. * tests/stable-point-state-function.cc, * tests/state-function.cc: Here. diff --git a/include/roboptim/trajectory/visualization/limit-speed.hh b/include/roboptim/trajectory/visualization/limit-speed.hh index e123a17..23b4cdc 100644 --- a/include/roboptim/trajectory/visualization/limit-speed.hh +++ b/include/roboptim/trajectory/visualization/limit-speed.hh @@ -22,6 +22,7 @@ # include <boost/format.hpp> # include <boost/optional.hpp> +# include <roboptim/core/visualization/gnuplot.hh> # include <roboptim/core/visualization/gnuplot-commands.hh> # include <roboptim/trajectory/limit-speed.hh> @@ -59,7 +60,9 @@ namespace roboptim LimitSpeed<T> speedLimit (t / tmax * tMax, trajectory_); Function::vector_t res = speedLimit (trajectory_.parameters ()); - str_ += (format ("%1% %2%\n") % t % res[0]).str (); + str_ += (format ("%1.2f %2.2f\n") + % normalize (t) + % normalize (res[0])).str (); } private: diff --git a/include/roboptim/trajectory/visualization/speed.hh b/include/roboptim/trajectory/visualization/speed.hh index 9ef3a29..b80728b 100644 --- a/include/roboptim/trajectory/visualization/speed.hh +++ b/include/roboptim/trajectory/visualization/speed.hh @@ -21,6 +21,7 @@ # include <boost/format.hpp> +# include <roboptim/core/visualization/gnuplot.hh> # include <roboptim/core/visualization/gnuplot-commands.hh> # include <roboptim/trajectory/trajectory.hh> # include <roboptim/trajectory/stable-time-point.hh> @@ -64,9 +65,9 @@ namespace roboptim StableTimePoint timePoint = i * tMax; double t = timePoint.getTime (traj.timeRange ()); - str += (format ("%1f %2f\n") - % t - % frontalSpeed (traj.state (t, 1))[0]).str (); + str += (format ("%1.2f %2.2f\n") + % normalize (t) + % normalize (frontalSpeed (traj.state (t, 1))[0])).str (); } str += "e\n"; } @@ -78,9 +79,10 @@ namespace roboptim StableTimePoint timePoint = i * tMax; double t = timePoint.getTime (traj.timeRange ()); - str += (format ("%1f %2f\n") - % t - % orthogonalSpeed (traj.state(t, 1))[0]).str (); + str += (format ("%1.2f %2.2f\n") + % normalize (t) + % normalize + (orthogonalSpeed (traj.state (t, 1))[0])).str (); } str += "e\n"; } @@ -91,9 +93,9 @@ namespace roboptim StableTimePoint timePoint = i * tMax; double t = timePoint.getTime (traj.timeRange ()); - str += (format ("%1f %2f\n") - % t - % traj.derivative (timePoint, 1)[2]).str (); + str += (format ("%1.2f %2.2f\n") + % normalize (t) + % normalize (traj.derivative (timePoint, 1)[2])).str (); } str += "e\n"; } diff --git a/include/roboptim/trajectory/visualization/trajectory.hh b/include/roboptim/trajectory/visualization/trajectory.hh index 14525be..5510ebe 100644 --- a/include/roboptim/trajectory/visualization/trajectory.hh +++ b/include/roboptim/trajectory/visualization/trajectory.hh @@ -21,6 +21,7 @@ # include <boost/format.hpp> +# include <roboptim/core/visualization/gnuplot.hh> # include <roboptim/core/visualization/gnuplot-commands.hh> # include <roboptim/trajectory/trajectory.hh> # include <roboptim/trajectory/stable-time-point.hh> @@ -85,7 +86,9 @@ namespace roboptim for (double i = step; i < 1. - step; i += step) { Function::vector_t res = traj (i * tMax); - str += (format ("%1f %2f\n") % res[0] % res [1]).str (); + str += (format ("%1f %2f\n") + % normalize (res[0]) + % normalize (res [1])).str (); } str += "e\n"; @@ -131,9 +134,9 @@ namespace roboptim { StableTimePoint timePoint = i * tMax; Function::vector_t res = traj (timePoint); - str += (format ("%1f %2f\n") - % timePoint.getTime (traj.timeRange ()) - % res [component]).str (); + str += (format ("%1.2f %2.2f\n") + % normalize (timePoint.getTime (traj.timeRange ())) + % normalize (res [component])).str (); } str += "e\n"; } diff --git a/tests/free-time-trajectory-stable-time-point.cc b/tests/free-time-trajectory-stable-time-point.cc index 113caf8..8166be5 100644 --- a/tests/free-time-trajectory-stable-time-point.cc +++ b/tests/free-time-trajectory-stable-time-point.cc @@ -23,6 +23,7 @@ #include <roboptim/core/finite-difference-gradient.hh> #include <roboptim/core/io.hh> #include <roboptim/core/util.hh> +#include <roboptim/core/visualization/gnuplot.hh> #include <roboptim/trajectory/free-time-trajectory.hh> #include <roboptim/trajectory/fwd.hh> @@ -35,6 +36,7 @@ using boost::format; using boost::io::group; using namespace roboptim; +using namespace roboptim::visualization; typedef FreeTimeTrajectory<Spline::derivabilityOrder> freeTime_t; @@ -161,10 +163,10 @@ void printTable (const Spline& spline, const freeTime_t& freeTimeTraj) 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]; + fmter % normalize (spline (alpha * tMax)[0]); + fmter % normalize (freeTimeTraj (alpha * tMax)[0]); + fmter % normalize (spline.derivative (alpha * tMax, 1)[0]); + fmter % normalize (freeTimeTraj.derivative (alpha * tMax, 1)[0]); std:: cout << fmter << std::endl; } std::cout << "\\---------------------------------------" @@ -205,11 +207,11 @@ void printTable (const Spline& spline, const freeTime_t& freeTimeTraj) Spline::jacobian_t splineVarConfig = spline.variationConfigWrtParam (alpha * tMax); - fmterConfig % splineVarConfig; + fmterConfig % normalize (splineVarConfig); freeTime_t::jacobian_t fttVarConfig = freeTimeTraj.variationConfigWrtParam (alpha * tMax); - fmterConfig % fttVarConfig; + fmterConfig % normalize (fttVarConfig); try { @@ -237,11 +239,11 @@ void printTable (const Spline& spline, const freeTime_t& freeTimeTraj) Spline::jacobian_t splineVarDeriv = spline.variationDerivWrtParam (alpha * tMax, 1); - fmterDeriv % splineVarDeriv; + fmterDeriv % normalize (splineVarDeriv); freeTime_t::jacobian_t fttVarDeriv = freeTimeTraj.variationDerivWrtParam (alpha * tMax, 1); - fmterDeriv % fttVarDeriv; + fmterDeriv % normalize (fttVarDeriv); for (unsigned gradientId = 0; gradientId < freeTimeTraj.parameters ().size (); ++gradientId) diff --git a/tests/free-time-trajectory.cc b/tests/free-time-trajectory.cc index d5c65df..bfb555d 100644 --- a/tests/free-time-trajectory.cc +++ b/tests/free-time-trajectory.cc @@ -23,6 +23,7 @@ #include <roboptim/core/finite-difference-gradient.hh> #include <roboptim/core/io.hh> #include <roboptim/core/util.hh> +#include <roboptim/core/visualization/gnuplot.hh> #include <roboptim/trajectory/free-time-trajectory.hh> #include <roboptim/trajectory/fwd.hh> @@ -35,6 +36,7 @@ using boost::format; using boost::io::group; using namespace roboptim; +using namespace roboptim::visualization; typedef FreeTimeTrajectory<Spline::derivabilityOrder> freeTime_t; @@ -154,15 +156,15 @@ void printTable (const Spline& spline, const freeTime_t& freeTimeTraj) fmter % t; if (tmin <= t && t <= tmax) - fmter % spline (t)[0]; + fmter % normalize (spline (t)[0]); else fmter % "N/A"; fmter % freeTimeTraj (t)[0]; if (tmin <= t && t <= tmax) - fmter % spline.derivative (t, 1)[0]; + fmter % normalize (spline.derivative (t, 1)[0]); else fmter % "N/A"; - fmter % freeTimeTraj.derivative (t, 1)[0]; + fmter % normalize (freeTimeTraj.derivative (t, 1)[0]); std:: cout << fmter << std::endl; } @@ -207,14 +209,14 @@ void printTable (const Spline& spline, const freeTime_t& freeTimeTraj) { Spline::jacobian_t splineVarConfig = spline.variationConfigWrtParam (t); - fmterConfig % splineVarConfig; + fmterConfig % normalize (splineVarConfig); } else fmterConfig % "N/A"; freeTime_t::jacobian_t fttVarConfig = freeTimeTraj.variationConfigWrtParam (t); - fmterConfig % fttVarConfig; + fmterConfig % normalize (fttVarConfig); try { @@ -242,14 +244,14 @@ void printTable (const Spline& spline, const freeTime_t& freeTimeTraj) { Spline::jacobian_t splineVarDeriv = spline.variationDerivWrtParam (t, 1); - fmterDeriv % splineVarDeriv; + fmterDeriv % normalize (splineVarDeriv); } else fmterDeriv % "N/A"; freeTime_t::jacobian_t fttVarDeriv = freeTimeTraj.variationDerivWrtParam (t, 1); - fmterDeriv % fttVarDeriv; + fmterDeriv % normalize (fttVarDeriv); for (unsigned gradientId = 0; gradientId < freeTimeTraj.parameters ().size (); ++gradientId) diff --git a/tests/free-time-trajectory.stdout b/tests/free-time-trajectory.stdout index b90abcc..e631f25 100644 --- a/tests/free-time-trajectory.stdout +++ b/tests/free-time-trajectory.stdout @@ -202,7 +202,7 @@ Variation of the derivative w.r.t to parameters: [1,4]((-0.92,0.67,0.24,0.00)) [1,5]((85.94,-0.92,0.67,0.24,0.00)) [1,4]((-0.86,0.51,0.35,0.00)) [1,5]((93.75,-0.86,0.51,0.35,0.00)) [1,4]((-0.76,0.28,0.48,0.00)) [1,5]((101.56,-0.76,0.28,0.48,0.00)) -[1,4]((-0.62,-0.00,0.63,-0.00)) [1,5]((109.37,-0.62,-0.00,0.63,-0.00)) +[1,4]((-0.62,0.00,0.63,0.00)) [1,5]((109.37,-0.62,0.00,0.63,0.00)) [1,4]((-0.48,-0.28,0.75,0.01)) [1,5]((100.10,-0.48,-0.28,0.75,0.01)) [1,4]((-0.35,-0.51,0.82,0.04)) [1,5]((87.89,-0.35,-0.51,0.82,0.04)) [1,4]((-0.24,-0.67,0.83,0.09)) [1,5]((72.75,-0.24,-0.67,0.83,0.09)) @@ -210,7 +210,7 @@ Variation of the derivative w.r.t to parameters: [1,4]((-0.09,-0.83,0.67,0.24)) [1,5]((33.69,-0.09,-0.83,0.67,0.24)) [1,4]((-0.04,-0.82,0.51,0.35)) [1,5]((9.77,-0.04,-0.82,0.51,0.35)) [1,4]((-0.01,-0.75,0.28,0.48)) [1,5]((-17.09,-0.01,-0.75,0.28,0.48)) -[1,4]((0.00,-0.62,-0.00,0.63)) [1,5]((-46.87,0.00,-0.62,-0.00,0.63)) +[1,4]((0.00,-0.62,0.00,0.63)) [1,5]((-46.87,0.00,-0.62,0.00,0.63)) [1,4]((0.00,-0.48,-0.28,0.76)) [1,5]((-54.69,0.00,-0.48,-0.28,0.76)) [1,4]((0.00,-0.35,-0.51,0.86)) [1,5]((-62.50,0.00,-0.35,-0.51,0.86)) [1,4]((0.00,-0.24,-0.67,0.92)) [1,5]((-70.31,0.00,-0.24,-0.67,0.92)) @@ -226,7 +226,7 @@ Variation of the derivative w.r.t to parameters: [1,4]((0.00,0.00,-0.09,0.09)) [1,5]((-52.00,0.00,0.00,-0.09,0.09)) [1,4]((0.00,0.00,-0.04,0.04)) [1,5]((-36.13,0.00,0.00,-0.04,0.04)) [1,4]((0.00,0.00,-0.01,0.01)) [1,5]((-18.80,0.00,0.00,-0.01,0.01)) -[1,4]((0.00,0.00,0.00,0.00)) [1,5]((-0.00,0.00,0.00,0.00,0.00)) +[1,4]((0.00,0.00,0.00,0.00)) [1,5]((0.00,0.00,0.00,0.00,0.00)) Spline range: [0, 4] FTT range: [0, 8] @@ -582,7 +582,7 @@ Variation of the derivative w.r.t to parameters: [1,4]((-0.92,0.67,0.24,0.00)) [1,5]((30.94,-0.21,0.21,0.00,0.00)) [1,4]((-0.86,0.51,0.35,0.00)) [1,5]((35.89,-0.24,0.24,0.00,0.00)) [1,4]((-0.76,0.28,0.48,0.00)) [1,5]((41.20,-0.27,0.27,0.00,0.00)) -[1,4]((-0.62,-0.00,0.63,-0.00)) [1,5]((46.88,-0.31,0.31,0.00,0.00)) +[1,4]((-0.62,0.00,0.63,0.00)) [1,5]((46.88,-0.31,0.31,0.00,0.00)) [1,4]((-0.48,-0.28,0.75,0.01)) [1,5]((50.78,-0.35,0.35,0.00,0.00)) [1,4]((-0.35,-0.51,0.82,0.04)) [1,5]((54.69,-0.38,0.38,0.00,0.00)) [1,4]((-0.24,-0.67,0.83,0.09)) [1,5]((58.59,-0.41,0.40,0.01,0.00)) @@ -590,7 +590,7 @@ Variation of the derivative w.r.t to parameters: [1,4]((-0.09,-0.83,0.67,0.24)) [1,5]((66.41,-0.45,0.42,0.03,0.00)) [1,4]((-0.04,-0.82,0.51,0.35)) [1,5]((70.31,-0.46,0.42,0.04,0.00)) [1,4]((-0.01,-0.75,0.28,0.48)) [1,5]((74.22,-0.47,0.41,0.06,0.00)) -[1,4]((0.00,-0.62,-0.00,0.63)) [1,5]((78.13,-0.47,0.39,0.08,0.00)) +[1,4]((0.00,-0.62,0.00,0.63)) [1,5]((78.13,-0.47,0.39,0.08,0.00)) [1,4]((0.00,-0.48,-0.28,0.76)) [1,5]((82.03,-0.47,0.37,0.10,0.00)) [1,4]((0.00,-0.35,-0.51,0.86)) [1,5]((85.94,-0.46,0.34,0.12,0.00)) [1,4]((0.00,-0.24,-0.67,0.92)) [1,5]((89.84,-0.45,0.30,0.15,0.00)) @@ -598,7 +598,7 @@ Variation of the derivative w.r.t to parameters: [1,4]((0.00,-0.09,-0.83,0.92)) [1,5]((97.66,-0.41,0.20,0.21,0.00)) [1,4]((0.00,-0.04,-0.82,0.86)) [1,5]((101.56,-0.38,0.14,0.24,0.00)) [1,4]((0.00,-0.01,-0.75,0.76)) [1,5]((105.47,-0.35,0.07,0.27,0.00)) -[1,4]((0.00,0.00,-0.62,0.62)) [1,5]((109.37,-0.31,-0.00,0.31,-0.00)) +[1,4]((0.00,0.00,-0.62,0.62)) [1,5]((109.37,-0.31,0.00,0.31,0.00)) [1,4]((0.00,0.00,-0.48,0.48)) [1,5]((105.10,-0.27,-0.07,0.35,0.00)) [1,4]((0.00,0.00,-0.35,0.35)) [1,5]((100.10,-0.24,-0.14,0.38,0.00)) [1,4]((0.00,0.00,-0.24,0.24)) [1,5]((94.36,-0.21,-0.20,0.40,0.01)) @@ -660,7 +660,7 @@ bad gradient Max. delta in component: 0.00 Max. allowed delta: 0.00 N/A [1,5]((-9.58,0.00,0.00,-0.00,0.00)) -N/A [1,5]((-0.00,0.00,0.00,0.00,0.00)) +N/A [1,5]((0.00,0.00,0.00,0.00,0.00)) Spline range: [0, 4] FTT range: [0, 2] @@ -776,9 +776,9 @@ Variation of the derivative w.r.t to parameters: [1,4]((-0.92,0.67,0.24,0.00)) [1,5]((-62.50,0.00,-0.70,-1.02,1.72)) [1,4]((-0.86,0.51,0.35,0.00)) [1,5]((-78.12,0.00,-0.31,-1.56,1.88)) [1,4]((-0.76,0.28,0.48,0.00)) [1,5]((-93.75,0.00,-0.08,-1.64,1.72)) -[1,4]((-0.62,-0.00,0.63,-0.00)) [1,5]((-109.37,0.00,0.00,-1.25,1.25)) +[1,4]((-0.62,0.00,0.63,0.00)) [1,5]((-109.37,0.00,0.00,-1.25,1.25)) [1,4]((-0.48,-0.28,0.75,0.01)) [1,5]((-90.82,0.00,0.00,-0.70,0.70)) [1,4]((-0.35,-0.51,0.82,0.04)) [1,5]((-66.41,0.00,0.00,-0.31,0.31)) [1,4]((-0.24,-0.67,0.83,0.09)) [1,5]((-36.13,0.00,0.00,-0.08,0.08)) -[1,4]((-0.16,-0.78,0.78,0.16)) [1,5]((-0.00,0.00,0.00,0.00,0.00)) +[1,4]((-0.16,-0.78,0.78,0.16)) [1,5]((0.00,0.00,0.00,0.00,0.00)) diff --git a/tests/spline-gradient.cc b/tests/spline-gradient.cc index e32882e..f0f0d31 100644 --- a/tests/spline-gradient.cc +++ b/tests/spline-gradient.cc @@ -84,7 +84,9 @@ int run_test () t += boost::get<2> (window)) { Spline::vector_t grad = spline.derivative (t, i); - std::cout << (boost::format ("%1.2f %2.2f\n") % t % grad (0)).str (); + std::cout << (boost::format ("%1.2f %2.2f\n") + % normalize (t) + % normalize (grad (0))).str (); try { @@ -126,7 +128,9 @@ int run_test () t += boost::get<2> (window)) { Spline::matrix_t jac = spline.variationDerivWrtParam (t, i); - std::cout << (boost::format ("%1.2f %2.2f\n") % t % jac (0, j)).str (); + std::cout << (boost::format ("%1.2f %2.2f\n") + % normalize (t) + % normalize (jac (0, j))).str (); } std::cout << "e" << std::endl; } diff --git a/tests/spline-gradient.stdout b/tests/spline-gradient.stdout index 80feebc..23abfd8 100644 --- a/tests/spline-gradient.stdout +++ b/tests/spline-gradient.stdout @@ -2993,7 +2993,7 @@ plot '-' title 'derivative (1)' with line 1.57 0.09 1.58 0.06 1.59 0.03 -1.60 -0.00 +1.60 0.00 1.61 -0.03 1.62 -0.06 1.63 -0.09 @@ -5417,7 +5417,7 @@ plot '-' title 'derivative (3)' with line 1.57 0.00 1.58 0.00 1.59 0.00 -1.60 -0.00 +1.60 0.00 1.61 0.00 1.62 0.00 1.63 0.00 @@ -6061,7 +6061,7 @@ plot '-' title '2nd derivative (3)' with line 3.97 -0.06 3.98 -0.04 3.99 -0.02 -4.00 -0.00 +4.00 0.00 e unset multiplot set term wxt persist title 'Spline: base functions' 1 font ',5' @@ -6635,7 +6635,7 @@ plot '-' title 'spline derivative' with line 1.57 0.09 1.58 0.06 1.59 0.03 -1.60 -0.00 +1.60 0.00 1.61 -0.03 1.62 -0.06 1.63 -0.09 @@ -9059,7 +9059,7 @@ plot '-' title 'derivative (1)' with line 1.57 0.09 1.58 0.06 1.59 0.03 -1.60 -0.00 +1.60 0.00 1.61 -0.03 1.62 -0.06 1.63 -0.09 @@ -11483,7 +11483,7 @@ plot '-' title 'derivative (3)' with line 1.57 0.00 1.58 0.00 1.59 0.00 -1.60 -0.00 +1.60 0.00 1.61 0.00 1.62 0.00 1.63 0.00 @@ -12127,7 +12127,7 @@ plot '-' title '2nd derivative (3)' with line 3.97 -0.06 3.98 -0.04 3.99 -0.02 -4.00 -0.00 +4.00 0.00 e unset multiplot set term wxt persist title 'Spline: base functions' 2 font ',5' @@ -15125,7 +15125,7 @@ plot '-' title 'derivative (1)' with line 1.57 0.09 1.58 0.06 1.59 0.03 -1.60 -0.00 +1.60 0.00 1.61 -0.03 1.62 -0.06 1.63 -0.09 @@ -17549,7 +17549,7 @@ plot '-' title 'derivative (3)' with line 1.57 0.00 1.58 0.00 1.59 0.00 -1.60 -0.00 +1.60 0.00 1.61 0.00 1.62 0.00 1.63 0.00 @@ -18193,7 +18193,7 @@ plot '-' title '2nd derivative (3)' with line 3.97 -0.06 3.98 -0.04 3.99 -0.02 -4.00 -0.00 +4.00 0.00 e unset multiplot set term wxt persist title 'Spline: base functions' 3 font ',5' @@ -19411,7 +19411,7 @@ plot '-' title 'spline 2nd derivative' with line 3.97 -0.06 3.98 -0.04 3.99 -0.02 -4.00 -0.00 +4.00 0.00 e plot '-' title 'configuration (0)' with line @@ -21191,7 +21191,7 @@ plot '-' title 'derivative (1)' with line 1.57 0.09 1.58 0.06 1.59 0.03 -1.60 -0.00 +1.60 0.00 1.61 -0.03 1.62 -0.06 1.63 -0.09 @@ -23615,7 +23615,7 @@ plot '-' title 'derivative (3)' with line 1.57 0.00 1.58 0.00 1.59 0.00 -1.60 -0.00 +1.60 0.00 1.61 0.00 1.62 0.00 1.63 0.00 @@ -24259,6 +24259,6 @@ plot '-' title '2nd derivative (3)' with line 3.97 -0.06 3.98 -0.04 3.99 -0.02 -4.00 -0.00 +4.00 0.00 e unset multiplot diff --git a/tests/stable-point-state-function.stdout b/tests/stable-point-state-function.stdout index a2d312a..97f5e93 100644 --- a/tests/stable-point-state-function.stdout +++ b/tests/stable-point-state-function.stdout @@ -121,17 +121,17 @@ Check state cost gradient. State cost evaluation: [1](70.31) State cost gradient: -[13](46.88,0.00,0.00,-0.00,-0.94,0.00,-0.00,0.00,0.00,-0.00,0.94,0.00,-0.00) +[13](46.88,0.00,0.00,0.00,-0.94,0.00,0.00,0.00,0.00,0.00,0.94,0.00,0.00) Trajectory state (splitted): [3](70.83,33.33,0.00) -[3](93.75,-0.00,0.00) +[3](93.75,0.00,0.00) Trajectory state (one call): -[6](70.83,33.33,0.00,93.75,-0.00,0.00) +[6](70.83,33.33,0.00,93.75,0.00,0.00) Trajectory state variation (splitted): -[3,13]((56.25,0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17,0.00,0.00),(-0.00,0.00,0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17,0.00),(0.00,0.00,0.00,0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17)) +[3,13]((56.25,0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17,0.00,0.00),(0.00,0.00,0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17,0.00),(0.00,0.00,0.00,0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17)) [3,13]((-46.87,0.00,0.00,0.00,-1.25,0.00,0.00,0.00,0.00,0.00,1.25,0.00,0.00),(750.00,0.00,0.00,0.00,0.00,-1.25,0.00,0.00,0.00,0.00,0.00,1.25,0.00),(0.00,0.00,0.00,0.00,0.00,0.00,-1.25,0.00,0.00,0.00,0.00,0.00,1.25)) Trajectory state (one call): -[6,13]((56.25,0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17,0.00,0.00),(-0.00,0.00,0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17,0.00),(0.00,0.00,0.00,0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17),(-46.87,0.00,0.00,0.00,-1.25,0.00,0.00,0.00,0.00,0.00,1.25,0.00,0.00),(750.00,0.00,0.00,0.00,0.00,-1.25,0.00,0.00,0.00,0.00,0.00,1.25,0.00),(0.00,0.00,0.00,0.00,0.00,0.00,-1.25,0.00,0.00,0.00,0.00,0.00,1.25)) +[6,13]((56.25,0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17,0.00,0.00),(0.00,0.00,0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17,0.00),(0.00,0.00,0.00,0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17),(-46.87,0.00,0.00,0.00,-1.25,0.00,0.00,0.00,0.00,0.00,1.25,0.00,0.00),(750.00,0.00,0.00,0.00,0.00,-1.25,0.00,0.00,0.00,0.00,0.00,1.25,0.00),(0.00,0.00,0.00,0.00,0.00,0.00,-1.25,0.00,0.00,0.00,0.00,0.00,1.25)) Check frontal speed gradient. Check orthogonal speed gradient. Check state cost gradient. diff --git a/tests/state-function.stdout b/tests/state-function.stdout index 3159a21..939427c 100644 --- a/tests/state-function.stdout +++ b/tests/state-function.stdout @@ -121,12 +121,12 @@ Check state cost gradient. State cost evaluation: [1](46.88) State cost gradient: -[12](0.00,0.00,-0.00,-0.63,0.00,-0.00,0.00,0.00,-0.00,0.62,0.00,-0.00) +[12](0.00,0.00,0.00,-0.63,0.00,0.00,0.00,0.00,0.00,0.62,0.00,0.00) Trajectory state (splitted): [3](70.83,33.33,0.00) -[3](46.88,-0.00,0.00) +[3](46.88,0.00,0.00) Trajectory state (one call): -[6](70.83,33.33,0.00,46.88,-0.00,0.00) +[6](70.83,33.33,0.00,46.88,0.00,0.00) Trajectory state variation (splitted): [3,12]((0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17,0.00,0.00),(0.00,0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17,0.00),(0.00,0.00,0.00,0.00,0.00,0.17,0.00,0.00,0.67,0.00,0.00,0.17)) [3,12]((0.00,0.00,0.00,-0.63,0.00,0.00,0.00,0.00,0.00,0.62,0.00,0.00),(0.00,0.00,0.00,0.00,-0.63,0.00,0.00,0.00,0.00,0.00,0.62,0.00),(0.00,0.00,0.00,0.00,0.00,-0.63,0.00,0.00,0.00,0.00,0.00,0.62)) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 15 ++++++++++ .../trajectory/visualization/limit-speed.hh | 5 +++- include/roboptim/trajectory/visualization/speed.hh | 20 ++++++++------ .../trajectory/visualization/trajectory.hh | 11 +++++--- tests/free-time-trajectory-stable-time-point.cc | 18 +++++++----- tests/free-time-trajectory.cc | 16 ++++++----- tests/free-time-trajectory.stdout | 18 ++++++------ tests/spline-gradient.cc | 8 ++++- tests/spline-gradient.stdout | 28 ++++++++++---------- tests/stable-point-state-function.stdout | 10 +++--- tests/state-function.stdout | 6 ++-- 11 files changed, 93 insertions(+), 62 deletions(-) hooks/post-receive -- roboptim-trajectory |