Skip to content
Snippets Groups Projects
Commit 592ecb37 authored by Nicolas Mansard's avatar Nicolas Mansard Committed by Nicolas Mansard
Browse files

Moved and split algo/collision to algo/geometry.

parent bb8d9d50
No related branches found
No related tags found
No related merge requests found
......@@ -257,7 +257,8 @@ IF(HPP_FCL_FOUND)
multibody/geometry.hxx
)
LIST(APPEND ${PROJECT_NAME}_ALGORITHM_HEADERS
algorithm/collisions.hpp
algorithm/geometry.hpp
algorithm/geometry.hxx
)
ENDIF(HPP_FCL_FOUND)
......
//
// Copyright (c) 2015-2016 CNRS
//
// This file is part of Pinocchio
// Pinocchio 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.
//
// Pinocchio 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
// General Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// Pinocchio If not, see
// <http://www.gnu.org/licenses/>.
#ifndef __se3_geometry_hpp__
#define __se3_geometry_hpp__
#include "pinocchio/multibody/visitor.hpp"
#include "pinocchio/multibody/model.hpp"
#include "pinocchio/algorithm/kinematics.hpp"
#include "pinocchio/multibody/geometry.hpp"
namespace se3
{
///
/// \brief Apply a forward kinematics and update the placement of the geometry objects.
///
/// \param[in] model The model structure of the rigid body system.
/// \param[in] data The data structure of the rigid body system.
/// \param[in] geom The geometry model containing the collision objects.
/// \param[out] geom_data The geometry data containing the placements of the collision objects. See oMg field in GeometryData.
/// \param[in] q The joint configuration vector (dim model.nq).
///
inline void updateGeometryPlacements(const Model & model,
Data & data,
const GeometryModel & geom,
GeometryData & geom_data,
const Eigen::VectorXd & q
);
///
/// \brief Update the placement of the geometry objects according to the current joint placements contained in data.
///
/// \param[in] model The model structure of the rigid body system.
/// \param[in] data The data structure of the rigid body system.
/// \param[in] geom The geometry model containing the collision objects.
/// \param[out] geom_data The geometry data containing the placements of the collision objects. See oMg field in GeometryData.
///
inline void updateGeometryPlacements(const Model & model,
const Data & data,
const GeometryModel & geom,
GeometryData & geom_data
);
inline bool computeCollisions(const Model & model,
Data & data,
const GeometryModel & model_geom,
GeometryData & data_geom,
const Eigen::VectorXd & q,
const bool stopAtFirstCollision = false
);
inline bool computeCollisions(GeometryData & data_geom,
const bool stopAtFirstCollision = false
);
inline void computeDistances(GeometryData & data_geom);
inline void computeDistances(const Model & model,
Data & data,
const GeometryModel & model_geom,
GeometryData & data_geom,
const Eigen::VectorXd & q
);
inline void computeBodyRadius(const GeometryModel & geomModel,
GeometryData & geomData);
} // namespace se3
/* --- Details -------------------------------------------------------------------- */
#include "pinocchio/algorithm/geometry.hxx"
#endif // ifndef __se3_geometry_hpp__
......@@ -15,73 +15,9 @@
// Pinocchio If not, see
// <http://www.gnu.org/licenses/>.
#ifndef __se3_collisions_hpp__
#define __se3_collisions_hpp__
#ifndef __se3_geometry_hxx__
#define __se3_geometry_hxx__
#include "pinocchio/multibody/visitor.hpp"
#include "pinocchio/multibody/model.hpp"
#include "pinocchio/algorithm/kinematics.hpp"
#include "pinocchio/multibody/geometry.hpp"
namespace se3
{
///
/// \brief Apply a forward kinematics and update the placement of the geometry objects.
///
/// \param[in] model The model structure of the rigid body system.
/// \param[in] data The data structure of the rigid body system.
/// \param[in] geom The geometry model containing the collision objects.
/// \param[out] geom_data The geometry data containing the placements of the collision objects. See oMg field in GeometryData.
/// \param[in] q The joint configuration vector (dim model.nq).
///
inline void updateGeometryPlacements(const Model & model,
Data & data,
const GeometryModel & geom,
GeometryData & geom_data,
const Eigen::VectorXd & q
);
///
/// \brief Update the placement of the geometry objects according to the current joint placements contained in data.
///
/// \param[in] model The model structure of the rigid body system.
/// \param[in] data The data structure of the rigid body system.
/// \param[in] geom The geometry model containing the collision objects.
/// \param[out] geom_data The geometry data containing the placements of the collision objects. See oMg field in GeometryData.
///
inline void updateGeometryPlacements(const Model & model,
const Data & data,
const GeometryModel & geom,
GeometryData & geom_data
);
inline bool computeCollisions(const Model & model,
Data & data,
const GeometryModel & model_geom,
GeometryData & data_geom,
const Eigen::VectorXd & q,
const bool stopAtFirstCollision = false
);
inline bool computeCollisions(GeometryData & data_geom,
const bool stopAtFirstCollision = false
);
inline void computeDistances(GeometryData & data_geom);
inline void computeDistances(const Model & model,
Data & data,
const GeometryModel & model_geom,
GeometryData & data_geom,
const Eigen::VectorXd & q
);
} // namespace se3
/* --- Details -------------------------------------------------------------------- */
namespace se3
{
......@@ -162,4 +98,4 @@ namespace se3
} // namespace se3
#endif // ifndef __se3_collisions_hpp__
#endif __se3_geometry_hxx__
......@@ -40,7 +40,7 @@
#include "pinocchio/multibody/geometry.hpp"
#include "pinocchio/python/geometry-model.hpp"
#include "pinocchio/python/geometry-data.hpp"
#include "pinocchio/algorithm/collisions.hpp"
#include "pinocchio/algorithm/geometry.hpp"
#endif
namespace se3
......
......@@ -34,7 +34,7 @@
#include "pinocchio/multibody/model.hpp"
#include "pinocchio/parsers/sample-models.hpp"
#include "pinocchio/algorithm/kinematics.hpp"
#include "pinocchio/algorithm/collisions.hpp"
#include "pinocchio/algorithm/geometry.hpp"
#include "pinocchio/parsers/urdf.hpp"
#include "pinocchio/spatial/explog.hpp"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment