Commit c24024d6 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

add pinocchio dependencies and replace all namespace model

parent 64dbc6d4
......@@ -116,6 +116,7 @@ SET(${PROJECT_NAME}_HEADERS
include/hpp/core/subchain-path.hh
)
ADD_REQUIRED_DEPENDENCY("hpp-pinocchio")
ADD_REQUIRED_DEPENDENCY("hpp-util >= 3")
ADD_REQUIRED_DEPENDENCY("hpp-statistics")
ADD_REQUIRED_DEPENDENCY("hpp-constraints >= 3")
......
......@@ -20,9 +20,9 @@
# define HPP_CORE_BASIC_CONFIGURATION_SHOOTER_HH
# include <sstream>
# include <hpp/model/device.hh>
# include <hpp/model/joint.hh>
# include <hpp/model/joint-configuration.hh>
# include <hpp/pinocchio/device.hh>
# include <hpp/pinocchio/joint.hh>
# include <hpp/pinocchio/joint-configuration.hh>
# include <hpp/core/configuration-shooter.hh>
namespace hpp {
......
......@@ -19,7 +19,7 @@
#ifndef HPP_CORE_COLLISION_VALIDATION_REPORT_HH
# define HPP_CORE_COLLISION_VALIDATION_REPORT_HH
# include <hpp/model/collision-object.hh>
# include <hpp/pinocchio/collision-object.hh>
# include <hpp/core/validation-report.hh>
# include <hpp/fcl/collision_data.h>
......
......@@ -19,7 +19,7 @@
#ifndef HPP_CORE_DISTANCE_HH
# define HPP_CORE_DISTANCE_HH
# include <hpp/model/fwd.hh>
# include <hpp/pinocchio/fwd.hh>
# include <hpp/core/fwd.hh>
# include <hpp/core/config.hh>
# include <hpp/core/node.hh>
......
......@@ -95,8 +95,8 @@ namespace hpp {
typedef boost::shared_ptr < BasicConfigurationShooter >
BasicConfigurationShooterPtr_t;
typedef boost::shared_ptr <BiRRTPlanner> BiRRTPlannerPtr_t;
typedef hpp::model::Body Body;
typedef hpp::model::BodyPtr_t BodyPtr_t;
typedef hpp::pinocchio::Body Body;
typedef hpp::pinocchio::BodyPtr_t BodyPtr_t;
typedef boost::shared_ptr <CollisionPathValidationReport>
CollisionPathValidationReportPtr_t;
typedef std::vector <CollisionPathValidationReport>
......@@ -104,11 +104,11 @@ namespace hpp {
typedef boost::shared_ptr <CollisionValidation> CollisionValidationPtr_t;
typedef boost::shared_ptr <CollisionValidationReport>
CollisionValidationReportPtr_t;
typedef model::CollisionObjectPtr_t CollisionObjectPtr_t;
typedef model::Configuration_t Configuration_t;
typedef model::ConfigurationIn_t ConfigurationIn_t;
typedef model::ConfigurationOut_t ConfigurationOut_t;
typedef model::ConfigurationPtr_t ConfigurationPtr_t;
typedef pinocchio::CollisionObjectPtr_t CollisionObjectPtr_t;
typedef pinocchio::Configuration_t Configuration_t;
typedef pinocchio::ConfigurationIn_t ConfigurationIn_t;
typedef pinocchio::ConfigurationOut_t ConfigurationOut_t;
typedef pinocchio::ConfigurationPtr_t ConfigurationPtr_t;
typedef std::vector <ConfigurationPtr_t> Configurations_t;
typedef Configurations_t::iterator ConfigIterator_t;
typedef Configurations_t::const_iterator ConfigConstIterator_t;
......@@ -122,10 +122,10 @@ namespace hpp {
typedef boost::shared_ptr <ConstraintSet> ConstraintSetPtr_t;
typedef boost::shared_ptr <const ConstraintSet> ConstraintSetConstPtr_t;
typedef std::deque <ConstraintPtr_t> Constraints_t;
typedef model::Device Device_t;
typedef model::DevicePtr_t DevicePtr_t;
typedef model::DeviceWkPtr_t DeviceWkPtr_t;
typedef model::CenterOfMassComputationPtr_t CenterOfMassComputationPtr_t;
typedef pinocchio::Device Device_t;
typedef pinocchio::DevicePtr_t DevicePtr_t;
typedef pinocchio::DeviceWkPtr_t DeviceWkPtr_t;
typedef pinocchio::CenterOfMassComputationPtr_t CenterOfMassComputationPtr_t;
typedef std::deque <DevicePtr_t> Devices_t;
typedef constraints::DifferentiableFunction DifferentiableFunction;
typedef constraints::DifferentiableFunctionPtr_t
......@@ -138,8 +138,8 @@ namespace hpp {
typedef boost::shared_ptr <Distance> DistancePtr_t;
typedef boost::shared_ptr <DistanceBetweenObjects>
DistanceBetweenObjectsPtr_t;
typedef model::DistanceResult DistanceResult;
typedef model::DistanceResults_t DistanceResults_t;
typedef pinocchio::DistanceResult DistanceResult;
typedef pinocchio::DistanceResults_t DistanceResults_t;
typedef Edge* EdgePtr_t;
typedef std::list <Edge*> Edges_t;
typedef boost::shared_ptr <ExplicitNumericalConstraint>
......@@ -148,26 +148,26 @@ namespace hpp {
ExplicitRelativeTransformationPtr_t;
typedef boost::shared_ptr <ExtractedPath> ExtractedPathPtr_t;
typedef boost::shared_ptr <SubchainPath> SubchainPathPtr_t;
typedef model::JointJacobian_t JointJacobian_t;
typedef model::Joint Joint;
typedef model::JointConstPtr_t JointConstPtr_t;
typedef model::JointPtr_t JointPtr_t;
typedef pinocchio::JointJacobian_t JointJacobian_t;
typedef pinocchio::Joint Joint;
typedef pinocchio::JointConstPtr_t JointConstPtr_t;
typedef pinocchio::JointPtr_t JointPtr_t;
typedef boost::shared_ptr <JointBoundValidation> JointBoundValidationPtr_t;
typedef boost::shared_ptr <JointBoundValidationReport>
JointBoundValidationReportPtr_t;
typedef model::HalfJointJacobian_t HalfJointJacobian_t;
typedef model::JointVector_t JointVector_t;
typedef pinocchio::HalfJointJacobian_t HalfJointJacobian_t;
typedef pinocchio::JointVector_t JointVector_t;
typedef KDTree* KDTreePtr_t;
typedef boost::shared_ptr <LockedJoint> LockedJointPtr_t;
typedef boost::shared_ptr <Equation> EquationPtr_t;
typedef boost::shared_ptr <const LockedJoint> LockedJointConstPtr_t;
typedef boost::shared_ptr <NumericalConstraint> NumericalConstraintPtr_t;
typedef std::list <LockedJointPtr_t> LockedJoints_t;
typedef model::matrix_t matrix_t;
typedef pinocchio::matrix_t matrix_t;
typedef constraints::matrixIn_t matrixIn_t;
typedef constraints::matrixOut_t matrixOut_t;
typedef model::size_type size_type;
typedef model::value_type value_type;
typedef pinocchio::size_type size_type;
typedef pinocchio::value_type value_type;
typedef std::pair<value_type, value_type> interval_t;
/// Interval of indices as (first index, number of indices)
typedef std::pair<size_type, size_type> SizeInterval_t;
......@@ -176,7 +176,7 @@ namespace hpp {
typedef Node* NodePtr_t;
typedef std::list <NodePtr_t> Nodes_t;
typedef std::vector <NodePtr_t> NodeVector_t;
typedef model::ObjectVector_t ObjectVector_t;
typedef pinocchio::ObjectVector_t ObjectVector_t;
typedef boost::shared_ptr <Path> PathPtr_t;
typedef boost::shared_ptr <const Path> PathConstPtr_t;
typedef boost::shared_ptr <PathOptimizer> PathOptimizerPtr_t;
......@@ -203,12 +203,12 @@ namespace hpp {
typedef std::vector <PathPtr_t> Paths_t;
typedef std::vector <PathVectorPtr_t> PathVectors_t;
typedef std::vector <PathVectorPtr_t> PathVectors_t;
typedef model::Transform3f Transform3f;
typedef model::vector3_t vector3_t;
typedef pinocchio::Transform3f Transform3f;
typedef pinocchio::vector3_t vector3_t;
typedef Eigen::Matrix<value_type, 2, 1> vector2_t;
typedef model::vector_t vector_t;
typedef model::vectorIn_t vectorIn_t;
typedef model::vectorOut_t vectorOut_t;
typedef pinocchio::vector_t vector_t;
typedef pinocchio::vectorIn_t vectorIn_t;
typedef pinocchio::vectorOut_t vectorOut_t;
typedef Eigen::Matrix<value_type, 1, Eigen::Dynamic> rowvector_t;
typedef boost::shared_ptr <VisibilityPrmPlanner> VisibilityPrmPlannerPtr_t;
typedef boost::shared_ptr <ValidationReport> ValidationReportPtr_t;
......
......@@ -32,7 +32,7 @@ namespace hpp {
/// This type of path is the return type of PathProjector algorithms.
///
/// Degrees of freedom are interpolated depending on the type of
/// \link hpp::model::Joint joint \endlink
/// \link hpp::pinocchio::Joint joint \endlink
/// they parameterize:
/// \li linear interpolation for translation joints, bounded rotation
/// joints, and translation part of freeflyer joints,
......
......@@ -19,7 +19,7 @@
#ifndef HPP_CORE_JOINT_BOUND_VALIDATION_HH
# define HPP_CORE_JOINT_BOUND_VALIDATION_HH
# include <hpp/model/joint.hh>
# include <hpp/pinocchio/joint.hh>
# include <hpp/core/config-validation.hh>
namespace hpp {
......
......@@ -19,7 +19,7 @@
#ifndef HPP_CORE_NODE_HH
# define HPP_CORE_NODE_HH
# include <hpp/model/fwd.hh>
# include <hpp/pinocchio/fwd.hh>
# include <hpp/core/fwd.hh>
# include <hpp/core/config.hh>
......
......@@ -20,7 +20,7 @@
# define HPP_CORE_PATH_OPTIMIZATION_PARTIAL_SPLINE_PATH_HH
# include <roboptim/trajectory/fwd.hh>
# include <hpp/model/device.hh>
# include <hpp/pinocchio/device.hh>
# include <hpp/core/path.hh>
# include <hpp/core/path-vector.hh>
# include <boost/make_shared.hpp>
......
......@@ -19,7 +19,7 @@
#ifndef HPP_CORE_PATH_VECTOR_HH
# define HPP_CORE_PATH_VECTOR_HH
# include <hpp/model/device.hh>
# include <hpp/pinocchio/device.hh>
# include <hpp/core/fwd.hh>
# include <hpp/core/path.hh>
......
......@@ -21,7 +21,7 @@
# include <stdexcept>
# include <hpp/model/fwd.hh>
# include <hpp/pinocchio/fwd.hh>
# include <boost/function.hpp>
# include <hpp/core/deprecated.hh>
# include <hpp/core/problem.hh>
......
......@@ -22,7 +22,7 @@
# include <boost/any.hpp>
# include <hpp/model/device.hh>
# include <hpp/pinocchio/device.hh>
# include <hpp/util/pointer.hh>
# include <hpp/core/config.hh>
......@@ -36,8 +36,8 @@ namespace hpp {
/// Defines a path planning problem for one robot.
/// A path planning problem is defined by
/// \li a robot: instance of class hpp::model::Device,
/// \li a set of obstacles: a list of hpp::model::CollisionObject,
/// \li a robot: instance of class hpp::pinocchio::Device,
/// \li a set of obstacles: a list of hpp::pinocchio::CollisionObject,
/// \li initial and goal configurations,
/// \li a SteeringMethod to handle the robot dynamics,
/// Additional objects are stored in this object:
......
......@@ -19,7 +19,7 @@
#ifndef HPP_CORE_REEDS_SHEPP_PATH_HH
# define HPP_CORE_REEDS_SHEPP_PATH_HH
# include <hpp/model/device.hh>
# include <hpp/pinocchio/device.hh>
# include <hpp/core/fwd.hh>
# include <hpp/core/config.hh>
......@@ -34,7 +34,7 @@ namespace hpp {
///
/// Implement a Reeds and Shepp motion generation on the base joint.
/// Degrees of freedom are interpolated depending on the type of
/// \link hpp::model::Joint joint \endlink
/// \link hpp::pinocchio::Joint joint \endlink
/// they parameterize:
/// The following interpolation is made:
/// \li Reeds and Shepp interpolation for the base_joint_xy and
......@@ -55,7 +55,7 @@ namespace hpp {
/// \param device Robot corresponding to configurations
/// \param init, end Start and end configurations of the path
/// \param rho The radius of a turn.
static ReedsSheppPathPtr_t create (const model::DevicePtr_t& device,
static ReedsSheppPathPtr_t create (const pinocchio::DevicePtr_t& device,
ConfigurationIn_t init,
ConfigurationIn_t end,
value_type rho,
......
......@@ -21,9 +21,9 @@
#include <Eigen/Core>
#include <hpp/model/fwd.hh>
#include <hpp/pinocchio/fwd.hh>
#include <hpp/core/fwd.hh>
#include <hpp/model/joint.hh>
#include <hpp/pinocchio/joint.hh>
namespace hpp {
namespace core {
......
......@@ -31,7 +31,7 @@ namespace hpp {
/// Linear interpolation between two configurations
///
/// Degrees of freedom are interpolated depending on the type of
/// \link hpp::model::Joint joint \endlink
/// \link hpp::pinocchio::Joint joint \endlink
/// they parameterize:
/// \li linear interpolation for translation joints, bounded rotation
/// joints, and translation part of freeflyer joints,
......
......@@ -84,6 +84,7 @@ ADD_LIBRARY(${LIBRARY_NAME}
${${LIBRARY_NAME}_SOURCES}
)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-pinocchio)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-util)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-statistics)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-constraints)
......
......@@ -18,8 +18,8 @@
#include <boost/tuple/tuple.hpp>
#include <hpp/util/debug.hh>
#include <hpp/model/configuration.hh>
#include <hpp/model/device.hh>
#include <hpp/pinocchio/configuration.hh>
#include <hpp/pinocchio/device.hh>
#include <hpp/core/config-projector.hh>
#include <hpp/core/bi-rrt-planner.hh>
#include <hpp/core/node.hh>
......@@ -33,7 +33,7 @@
namespace hpp {
namespace core {
using model::displayConfig;
using pinocchio::displayConfig;
BiRRTPlannerPtr_t BiRRTPlanner::createWithRoadmap
(const Problem& problem, const RoadmapPtr_t& roadmap)
......
......@@ -17,9 +17,9 @@
// <http://www.gnu.org/licenses/>.
#include <hpp/fcl/collision.h>
#include <hpp/model/body.hh>
#include <hpp/model/collision-object.hh>
#include <hpp/model/configuration.hh>
#include <hpp/pinocchio/body.hh>
#include <hpp/pinocchio/collision-object.hh>
#include <hpp/pinocchio/configuration.hh>
#include <hpp/core/collision-validation.hh>
#include <hpp/core/collision-validation-report.hh>
#include <hpp/core/relative-motion.hh>
......@@ -44,9 +44,9 @@ namespace hpp {
return false;
}
}
using model::displayConfig;
using pinocchio::displayConfig;
typedef model::JointConfiguration* JointConfigurationPtr_t;
typedef pinocchio::JointConfiguration* JointConfigurationPtr_t;
CollisionValidationPtr_t CollisionValidation::create
(const DevicePtr_t& robot)
{
......@@ -78,7 +78,7 @@ namespace hpp {
void CollisionValidation::addObstacle (const CollisionObjectPtr_t& object)
{
using model::COLLISION;
using pinocchio::COLLISION;
const JointVector_t& jv = robot_->getJointVector ();
for (JointVector_t::const_iterator it = jv.begin (); it != jv.end ();
++it) {
......@@ -97,7 +97,7 @@ namespace hpp {
void CollisionValidation::removeObstacleFromJoint
(const JointPtr_t& joint, const CollisionObjectPtr_t& obstacle)
{
using model::COLLISION;
using pinocchio::COLLISION;
BodyPtr_t body = joint->linkedBody ();
if (body) {
const ObjectVector_t& bodyObjects = body->innerObjects (COLLISION);
......@@ -169,9 +169,9 @@ namespace hpp {
parameterizedPairs_(), disabledPairs_(),
checkParameterized_(false)
{
using model::COLLISION;
typedef hpp::model::Device::CollisionPairs_t JointPairs_t;
using model::ObjectVector_t;
using pinocchio::COLLISION;
typedef hpp::pinocchio::Device::CollisionPairs_t JointPairs_t;
using pinocchio::ObjectVector_t;
const JointPairs_t& jointPairs (robot->collisionPairs (COLLISION));
// build collision pairs for internal objects
for (JointPairs_t::const_iterator it = jointPairs.begin ();
......
......@@ -19,9 +19,9 @@
#include <limits>
#include <hpp/util/debug.hh>
#include <hpp/util/timer.hh>
#include <hpp/model/configuration.hh>
#include <hpp/model/device.hh>
#include <hpp/model/joint.hh>
#include <hpp/pinocchio/configuration.hh>
#include <hpp/pinocchio/device.hh>
#include <hpp/pinocchio/joint.hh>
#include <hpp/constraints/svd.hh>
#include <hpp/constraints/macros.hh>
#include <hpp/core/config-projector.hh>
......@@ -585,7 +585,7 @@ namespace hpp {
while (squareNorm_ > squareErrorThreshold_ && errorDecreased &&
iter < maxIterations_) {
computePrioritizedIncrement (value_, reducedJacobian_, alpha, dq_);
model::integrate (robot_, configuration, dq_, configuration);
pinocchio::integrate (robot_, configuration, dq_, configuration);
// Increase alpha towards alphaMax
computeValueAndJacobian (configuration, value_, reducedJacobian_);
alpha = alphaMax - .8*(alphaMax - alpha);
......@@ -618,7 +618,7 @@ namespace hpp {
{
computeValueAndJacobian (configuration, value_, reducedJacobian_);
computePrioritizedIncrement (value_, reducedJacobian_, alpha, dq);
model::integrate (robot_, configuration, dq, configuration);
pinocchio::integrate (robot_, configuration, dq, configuration);
return isSatisfied (configuration);
}
......@@ -636,14 +636,14 @@ namespace hpp {
computeValueAndJacobian (configuration, value_, reducedJacobian_);
do {
computePrioritizedIncrement (value_, reducedJacobian_, alpha, dq_);
model::integrate (robot_, configuration, dq_, current);
pinocchio::integrate (robot_, configuration, dq_, current);
computeValueAndJacobian (current, value_, reducedJacobian_);
computeError ();
if (squareNorm_ >= squareErrorThreshold_) {
/// Ignore last level
computePrioritizedIncrement (value_, reducedJacobian_, 1, dq_,
stack_.size() - 1);
model::integrate (robot_, current, dq_, current);
pinocchio::integrate (robot_, current, dq_, current);
computeValueAndJacobian (current, value_, reducedJacobian_);
computeError ();
if (squareNorm_ >= squareErrorThreshold_) break;
......@@ -691,9 +691,9 @@ namespace hpp {
result = to;
return;
}
model::difference (robot_, to, from, toMinusFrom_);
pinocchio::difference (robot_, to, from, toMinusFrom_);
projectVectorOnKernel (from, toMinusFrom_, projMinusFrom_);
model::integrate (robot_, from, projMinusFrom_, result);
pinocchio::integrate (robot_, from, projMinusFrom_, result);
}
void ConfigProjector::computeLockedDofs (ConfigurationOut_t configuration)
......
......@@ -17,7 +17,7 @@
// <http://www.gnu.org/licenses/>.
#include <hpp/util/debug.hh>
#include <hpp/model/configuration.hh>
#include <hpp/pinocchio/configuration.hh>
#include <hpp/core/constraint-set.hh>
#include <hpp/core/config-projector.hh>
......
Supports Markdown
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