Unverified Commit 0bfb5ce4 authored by Fernbach Pierre's avatar Fernbach Pierre Committed by GitHub
Browse files

Merge pull request #56 from pFernbach/topic/refactor_curve

Refactoring hpp-spline -> Curves
parents e788a314 a9e56d84
from hpp_spline import bezier, bezier6, polynom, exact_cubic, curve_constraints, spline_deriv_constraint, from_bezier
from curves import bezier, polynomial
from numpy import matrix
from numpy.linalg import norm
......
......@@ -18,7 +18,7 @@
from hpp.corbaserver.rbprm import Client as RbprmClient
from hpp.corbaserver.robot import Robot
from hpp_spline import bezier
from curves import bezier
from numpy import array, matrix
......@@ -988,7 +988,7 @@ class FullBody(Robot):
wp = curvesWp[cid]
if len(wp[0]) == 1: # length is provided :
waypoints = matrix(wp[1:]).transpose()
curve = bezier(waypoints, wp[0][0])
curve = bezier(waypoints, 0., wp[0][0])
else:
waypoints = matrix(wp).transpose()
curve = bezier(waypoints)
......@@ -1000,7 +1000,7 @@ class FullBody(Robot):
path = self.clientRbprm.rbprm.getPathAsBezier(pathId)
t = path[0][0]
wps = matrix(path[1:]).transpose()
curve = bezier(wps, t)
curve = bezier(wps, 0., t)
return curve
# # return the contacts variation between two states
......
......@@ -43,7 +43,6 @@
#include <hpp/rbprm/planner/rbprm-steering-kinodynamic.hh>
#include <algorithm> // std::random_shuffle
#include <hpp/rbprm/interpolation/time-constraint-helper.hh>
#include <hpp/spline/bezier_curve.h>
#include <hpp/rbprm/interpolation/polynom-trajectory.hh>
#include <hpp/rbprm/planner/random-shortcut-dynamic.hh>
#include <hpp/rbprm/planner/oriented-path-optimizer.hh>
......@@ -59,7 +58,6 @@
namespace hpp {
namespace rbprm {
typedef spline::bezier_curve<> bezier;
namespace impl {
const pinocchio::Computation_t flag =
......@@ -1807,7 +1805,7 @@ CORBA::Short RbprmBuilder::straightPath(const hpp::floatSeqSeq& positions) throw
CORBA::Short RbprmBuilder::generateCurveTraj(const hpp::floatSeqSeq& positions) throw(hpp::Error) {
try {
T_Configuration c = doubleDofArrayToConfig(3, positions);
bezier* curve = new bezier(c.begin(), c.end());
bezier_t* curve = new bezier_t(c.begin(), c.end());
hpp::rbprm::interpolation::PolynomPtr_t curvePtr(curve);
hpp::rbprm::interpolation::PolynomTrajectoryPtr_t path =
hpp::rbprm::interpolation::PolynomTrajectory::create(curvePtr);
......@@ -1824,7 +1822,7 @@ CORBA::Short RbprmBuilder::generateCurveTrajParts(const hpp::floatSeqSeq& positi
try {
pinocchio::Configuration_t config = dofArrayToConfig((std::size_t)partitions.length(), partitions);
T_Configuration c = doubleDofArrayToConfig(3, positions);
bezier* curve = new bezier(c.begin(), c.end());
bezier_t* curve = new bezier_t(c.begin(), c.end());
hpp::rbprm::interpolation::PolynomPtr_t curvePtr(curve);
hpp::rbprm::interpolation::PolynomTrajectoryPtr_t path =
hpp::rbprm::interpolation::PolynomTrajectory::create(curvePtr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment