Skip to content
Snippets Groups Projects
Commit c50004e8 authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

Update to commit 07c3141 in hpp-core

  Add validation report classes for config and path validations.
parent aa84aeaf
No related branches found
No related tags found
No related merge requests found
...@@ -96,6 +96,7 @@ namespace hpp { ...@@ -96,6 +96,7 @@ namespace hpp {
typedef core::DifferentiableFunctionPtr_t DifferentiableFunctionPtr_t; typedef core::DifferentiableFunctionPtr_t DifferentiableFunctionPtr_t;
typedef core::ConfigurationShooter ConfigurationShooter; typedef core::ConfigurationShooter ConfigurationShooter;
typedef core::ConfigurationShooterPtr_t ConfigurationShooterPtr_t; typedef core::ConfigurationShooterPtr_t ConfigurationShooterPtr_t;
typedef core::ValidationReport ValidationReport;
typedef std::pair< GripperPtr_t, HandlePtr_t> Grasp_t; typedef std::pair< GripperPtr_t, HandlePtr_t> Grasp_t;
typedef boost::shared_ptr <Grasp_t> GraspPtr_t; typedef boost::shared_ptr <Grasp_t> GraspPtr_t;
......
...@@ -49,6 +49,19 @@ namespace hpp { ...@@ -49,6 +49,19 @@ namespace hpp {
/// the encapsulated PathValidation::validate. /// the encapsulated PathValidation::validate.
bool validate (const PathPtr_t& path, bool reverse, PathPtr_t& validPart); bool validate (const PathPtr_t& path, bool reverse, PathPtr_t& validPart);
/// Call the GraphPathValidation::validate without validation report.
///
/// \param path the path to check for validity,
/// \param reverse if true check from the end,
/// \retval the extracted valid part of the path, pointer to path if
/// path is valid,
/// \retval report information about the validation process. unused in
/// this case,
/// \return whether the whole path is valid.
virtual bool validate (const PathPtr_t& path, bool reverse,
PathPtr_t& validPart,
ValidationReport& report);
/// Set the encapsulated path validator. /// Set the encapsulated path validator.
void innerValidation (const PathValidationPtr_t& pathValidation) void innerValidation (const PathValidationPtr_t& pathValidation)
{ {
......
...@@ -39,6 +39,14 @@ namespace hpp { ...@@ -39,6 +39,14 @@ namespace hpp {
return success; return success;
} }
bool GraphPathValidation::validate
(const PathPtr_t& path, bool reverse, PathPtr_t& validPart,
ValidationReport&)
{
assert (path);
return impl_validate (path, reverse, validPart);
}
bool GraphPathValidation::impl_validate ( bool GraphPathValidation::impl_validate (
const PathVectorPtr_t& path, bool reverse, PathPtr_t& validPart) const PathVectorPtr_t& path, bool reverse, PathPtr_t& validPart)
{ {
......
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