Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gsaurel/hpp-manipulation
  • humanoid-path-planner/hpp-manipulation
2 results
Show changes
Commits on Source (729)
Showing with 655 additions and 352 deletions
# format (Guilhem Saurel, 2022-05-31)
fa649fc248b998a890e2730d8b56b238ca1e29df
# format (Guilhem Saurel, 2022-04-19)
2504d66d880b757858a5d90d2c7e4bf98e6e6139
# pre-commit run -a (Guilhem Saurel, 2022-10-05)
ccd75ad4f6e33d1690353b17383f4bca6dab2907
name: "CI - Nix"
on:
push:
jobs:
tests:
name: "Nix build on ${{ matrix.os }}"
runs-on: "${{ matrix.os }}-latest"
strategy:
matrix:
os: [ubuntu]
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- uses: cachix/cachix-action@v15
with:
name: gepetto
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build -L
include: https://rainboard.laas.fr/project/hpp-manipulation/.gitlab-ci.yml
[submodule "cmake"]
path = cmake
url = git://github.com/jrl-umi3218/jrl-cmakemodules.git
url = https://github.com/jrl-umi3218/jrl-cmakemodules.git
pull_request_rules:
- name: merge automatically when CI passes and PR is approved
conditions:
- check-success = "gitlab-ci"
- check-success = "Nix build on ubuntu"
- check-success = "pre-commit.ci - pr"
- or:
- author = pre-commit-ci[bot]
- author = dependabot[bot]
actions:
merge:
ci:
autoupdate_branch: devel
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
hooks:
- id: ruff
args:
- --fix
- --exit-non-zero-on-fix
- id: ruff-format
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
- repo: https://github.com/pappasam/toml-sort
rev: v0.24.2
hooks:
- id: toml-sort-fix
exclude: poetry.lock
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.4
hooks:
- id: clang-format
args:
- --style=Google
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
#
# Copyright (c) 2014 CNRS
# Authors: Florent Lamiraux
# Copyright (c) 2014, 2020 CNRS Authors: Florent Lamiraux, Guilhem Saurel
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# This file is part of hpp-manipulation
# hpp-manipulation 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.
# 1. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# hpp-manipulation 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
# hpp-manipulation If not, see
# <http://www.gnu.org/licenses/>.
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(CXX_DISABLE_WERROR TRUE)
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
SET(PROJECT_NAME hpp-manipulation)
SET(PROJECT_URL "")
SET(PROJECT_DESCRIPTION "Classes for manipulation planning.")
SETUP_PROJECT()
# Activate hpp-util logging if requested
SET (HPP_DEBUG FALSE CACHE BOOL "trigger hpp-util debug output")
IF (HPP_DEBUG)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHPP_DEBUG")
ENDIF()
SET (HPP_BENCHMARK FALSE CACHE BOOL "trigger hpp-util benchmarking output")
IF (HPP_BENCHMARK)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHPP_ENABLE_BENCHMARK")
ENDIF()
# Activate test using UR5 if requested
SET (TEST_UR5 FALSE CACHE BOOL "Activate tests using ur5")
SEARCH_FOR_BOOST()
ADD_DOC_DEPENDENCY("hpp-model >= 3.0.0")
ADD_DOC_DEPENDENCY("hpp-fcl")
ADD_REQUIRED_DEPENDENCY("hpp-core >= 3.0.0")
ADD_REQUIRED_DEPENDENCY("hpp-constraints >= 3.0.0")
ADD_REQUIRED_DEPENDENCY("hpp-statistics >= 0.1")
ADD_OPTIONAL_DEPENDENCY("hpp-wholebody-step")
IF (TEST_UR5)
ADD_REQUIRED_DEPENDENCY(hpp-model-urdf >= 3.0.0)
ENDIF ()
SET(HPP_MANIPULATION_HAS_WHOLEBODY_STEP ${HPP_WHOLEBODY_STEP_FOUND}
CACHE BOOL "Compile with dependency to hpp-wholebody-step")
CONFIG_FILES (doc/main.hh
include/hpp/manipulation/package-config.hh)
SET (${PROJECT_NAME}_HEADERS
${CMAKE_BINARY_DIR}/include/hpp/manipulation/package-config.hh
include/hpp/manipulation/fwd.hh
include/hpp/manipulation/axial-handle.hh
include/hpp/manipulation/handle.hh
include/hpp/manipulation/problem.hh
include/hpp/manipulation/problem-solver.hh
include/hpp/manipulation/device.hh
include/hpp/manipulation/weighed-distance.hh
include/hpp/manipulation/constraint-set.hh
include/hpp/manipulation/roadmap.hh
include/hpp/manipulation/roadmap-node.hh
include/hpp/manipulation/connected-component.hh
include/hpp/manipulation/manipulation-planner.hh
include/hpp/manipulation/graph-path-validation.hh
include/hpp/manipulation/graph-steering-method.hh
include/hpp/manipulation/graph-optimizer.hh
include/hpp/manipulation/graph/node.hh
include/hpp/manipulation/graph/edge.hh
include/hpp/manipulation/graph/node-selector.hh
include/hpp/manipulation/graph/guided-node-selector.hh
include/hpp/manipulation/graph/graph.hh
include/hpp/manipulation/graph/statistics.hh
include/hpp/manipulation/graph/graph-component.hh
include/hpp/manipulation/graph/fwd.hh
include/hpp/manipulation/graph/dot.hh
include/hpp/manipulation/graph/helper.hh
include/hpp/manipulation/path-optimization/small-steps.hh
include/hpp/manipulation/path-optimization/config-optimization.hh
)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(tests)
# Add dependency toward hpp-manipulation library in pkg-config file.
PKG_CONFIG_APPEND_LIBS("hpp-manipulation")
SETUP_PROJECT_FINALIZE()
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cmake_minimum_required(VERSION 3.10)
set(PROJECT_NAME hpp-manipulation)
set(PROJECT_DESCRIPTION "Classes for manipulation planning.")
set(PROJECT_USE_CMAKE_EXPORT TRUE)
set(CXX_DISABLE_WERROR TRUE)
# Check if the submodule cmake have been initialized
set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake")
if(EXISTS "${JRL_CMAKE_MODULES}/base.cmake")
message(STATUS "JRL cmakemodules found in 'cmake/' git submodule")
else()
find_package(jrl-cmakemodules QUIET CONFIG)
if(jrl-cmakemodules_FOUND)
get_property(
JRL_CMAKE_MODULES
TARGET jrl-cmakemodules::jrl-cmakemodules
PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
message(STATUS "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}")
elseif(${CMAKE_VERSION} VERSION_LESS "3.14.0")
message(
FATAL_ERROR
"\nCan't find jrl-cmakemodules. Please either:\n"
" - use git submodule: 'git submodule update --init'\n"
" - or install https://github.com/jrl-umi3218/jrl-cmakemodules\n"
" - or upgrade your CMake version to >= 3.14 to allow automatic fetching\n"
)
else()
message(STATUS "JRL cmakemodules not found. Let's fetch it.")
include(FetchContent)
FetchContent_Declare(
"jrl-cmakemodules"
GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git")
FetchContent_MakeAvailable("jrl-cmakemodules")
FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES)
endif()
endif()
include("${JRL_CMAKE_MODULES}/hpp.cmake")
include("${JRL_CMAKE_MODULES}/boost.cmake")
include("${JRL_CMAKE_MODULES}/test.cmake")
compute_project_args(PROJECT_ARGS LANGUAGES CXX)
project(${PROJECT_NAME} ${PROJECT_ARGS})
list(APPEND PKG_CONFIG_ADDITIONAL_VARIABLES cmake_plugin)
# Ask Doxygen to create a tree view in html documentation
set(DOXYGEN_TREEVIEW
"NO"
CACHE STRING "Set to YES to generate a tree view in the html documentation")
add_project_dependency(Boost REQUIRED COMPONENTS regex)
add_project_dependency("hpp-core" REQUIRED)
if(BUILD_TESTING)
find_package(Boost REQUIRED COMPONENTS unit_test_framework)
add_project_dependency("example-robot-data" REQUIRED)
endif()
config_files(doc/main.hh include/hpp/manipulation/package-config.hh)
set(${PROJECT_NAME}_HEADERS
${CMAKE_BINARY_DIR}/include/hpp/manipulation/package-config.hh
include/hpp/manipulation/fwd.hh
include/hpp/manipulation/handle.hh
include/hpp/manipulation/problem.hh
include/hpp/manipulation/problem-solver.hh
include/hpp/manipulation/device.hh
include/hpp/manipulation/weighed-distance.hh
include/hpp/manipulation/constraint-set.hh
include/hpp/manipulation/roadmap.hh
include/hpp/manipulation/roadmap-node.hh
include/hpp/manipulation/connected-component.hh
include/hpp/manipulation/leaf-connected-comp.hh
include/hpp/manipulation/manipulation-planner.hh
include/hpp/manipulation/graph-path-validation.hh
include/hpp/manipulation/graph-optimizer.hh
include/hpp/manipulation/graph/state.hh
include/hpp/manipulation/graph/edge.hh
include/hpp/manipulation/graph/state-selector.hh
include/hpp/manipulation/graph/guided-state-selector.hh
include/hpp/manipulation/graph/graph.hh
include/hpp/manipulation/graph/statistics.hh
include/hpp/manipulation/graph/graph-component.hh
include/hpp/manipulation/graph/fwd.hh
include/hpp/manipulation/graph/dot.hh
include/hpp/manipulation/graph/helper.hh
include/hpp/manipulation/graph/validation.hh
include/hpp/manipulation/path-optimization/enforce-transition-semantic.hh
include/hpp/manipulation/path-optimization/random-shortcut.hh
include/hpp/manipulation/path-optimization/spline-gradient-based.hh
include/hpp/manipulation/path-planner/end-effector-trajectory.hh
include/hpp/manipulation/path-planner/states-path-finder.hh
include/hpp/manipulation/path-planner/transition-planner.hh
include/hpp/manipulation/problem-target/state.hh
include/hpp/manipulation/serialization.hh
include/hpp/manipulation/steering-method/cross-state-optimization.hh
include/hpp/manipulation/steering-method/fwd.hh
include/hpp/manipulation/steering-method/graph.hh
include/hpp/manipulation/steering-method/end-effector-trajectory.hh)
set(${PROJECT_NAME}_SOURCES
src/handle.cc
src/manipulation-planner.cc
src/problem-solver.cc
src/roadmap.cc
src/connected-component.cc
src/leaf-connected-comp.cc
src/constraint-set.cc
src/roadmap-node.cc
src/device.cc
src/weighed-distance.cc
src/problem.cc
src/graph-path-validation.cc
src/graph-optimizer.cc
src/graph/state.cc
src/graph/edge.cc
src/graph/graph.cc
src/graph/graph-component.cc
src/graph/state-selector.cc
src/graph/guided-state-selector.cc
src/graph/statistics.cc
src/graph/helper.cc
src/graph/dot.cc
src/graph/validation.cc
src/path-optimization/random-shortcut.cc
src/path-optimization/enforce-transition-semantic.cc
src/path-planner/end-effector-trajectory.cc
src/path-planner/states-path-finder.cc
src/path-planner/transition-planner.cc
src/problem-target/state.cc
src/serialization.cc
src/steering-method/end-effector-trajectory.cc
src/steering-method/cross-state-optimization.cc
src/steering-method/graph.cc)
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
target_include_directories(
${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
target_link_libraries(${PROJECT_NAME} hpp-core::hpp-core Boost::regex)
install(
TARGETS ${PROJECT_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION lib)
# GPL licenced part
set(${PROJECT_NAME}_SOURCES_GPL src/path-optimization/spline-gradient-based.cc)
add_library(${PROJECT_NAME}-gpl SHARED ${${PROJECT_NAME}_SOURCES_GPL})
target_link_libraries(${PROJECT_NAME}-gpl ${PROJECT_NAME}
hpp-core::hpp-core-gpl)
install(
TARGETS ${PROJECT_NAME}-gpl
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION lib)
add_subdirectory(plugins)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()
pkg_config_append_libs(${PROJECT_NAME})
install(FILES package.xml DESTINATION share/${PROJECT_NAME})
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2014/12/03 - Release 1.1
* Add projector for paths.
* Add information in the tooltips of the DOT graph.
-*- outline -*-
* Dependency to hpp-wholebody-step has been removed.
New in 4.10.0
* In graph::steeringMethod, if q1 == q2, the steering method calls the problem
inner steering method. This avoids a failure if no loop transition has been
set on the state containing q1.
* In class Edge,
- different security margins for different pairs of links can
be set for collision checking,
- rename some methods for homogeneity with python bindings
- applyConstraints -> generateTargetConfig
- configConstraint -> targetConstraint,
- from -> stateFrom, to -> stateTo,
* In class WaypointEdge,
- specialize initialization.
* In class LevelSetEdge,
- write documentation,
- rename method applyConstraintsWithOffset into generateTargetConfigOnLeaf,
- add read access to condition and parameterization constraints.
* In class GraphComponent,
- add cost
* Add end-effector-tracjectory plugin.
* In class ManipulationPlanner,
- call the problem PathValidation instead of the edge one.
* In class ProblemSolver
- register contact constraints and complement in constraint graph.
2014/12/03 - Release 1.0.2
* Fix bug when projection using WaypointEdge
New in 4.8.0
* Rewrite steering method CrossStateOptimization.
* In graph component classes (State, Edge, Graph) locked joints are handled as other numerical constraints.
- decouple waypoint computations.
2014/12/03 - Release 1.0.1
* Fix bug in WaypointEdge
New in 4.6.0
* Add setter to relative motion matrix in edges.
* Add method Edge::neighborEdges.
* Enrich API of EndEffectorTrajectory steeringMethod.
* Fix API of Problem: make steeringMethod setter accessible.
* Always use edge validation and steering method in ManipulationPlanner.
* Make GraphPathValidation not mandatory.
* Remove SymbolicPlanner.
* Keep the default validation from hpp-core.
2014/11/18 - Release 1.0
* Manipulation planner based on RRT.
* A graph of constraint.
* graph::Edge has 3 implementations: Edge, WaypointEdge, LevelSetEdge
* WaypointEdge supports several waypoints.
* LevelSetEdge solves the zero-probability problem.
New in 4.1
* Reset data when inserting robot.
* Fix detection of hpp-wholebody-step.
* In GraphSteeringMethod; create a inner steering method at construction.
* Move lockedJointPtr_t to hpp-core in hpp::manipulation::ProblemSolver
* Remove unused static method Handle::createGrasp.
* Make class AxialHandle deprecated.
* Add a method createGraspAndComplement in Handle classes
* Add className static members in classes Handle and AxialHandle.
* Add a method createGraspAndComplement in Handle classes.
* Dectect pairs (constraint, complement) and replace by relative transformation.
* Make robot type hpp::manipulation::Device in ProblemSolver.
* Check input path of GraphPathValidation
* In class Roadmap call parent implementation in init method
* Rename class SymbolicComponent into LeafConnectedCompo.
* Rewrite implementation of class LeafConnectedComp.
* Add class problemTarget::State.
* Fix case where robot already exists in Device::didInsertRobot.
* Add parameter ManipulationPlanner/ExtendStep.
* Class Handle takes a mask as input.
* Update to changes about ConfigProjector::updateRightHandSize.
* Add LockedJoint before NumericalConstraint into ConfigProjector.
* GraphSteeringMethod is built with a const Problem& (not a ProblemPtr_t).
* Fix Roadmap::clear (remove symbolic components).
* Add possibility to provide placement constraint for automatic graph creation.
* Add SplineGradientBased for manipulation path
* Add possibility to set derivatives at state change to zero (SplineGradientBased).
* GraphOptimizer uses path validation of edge for optimization.
* Improve initialization of the graph and fix more const-correctness errors.
* ProblemSolver has a map of graph::GraphPtr_t.
* Prevent name collision in graph construction.
New in 1.1
* Add projector for paths.
* Add information in the tooltips of the DOT graph.
New in 1.0.2
* Fix bug when projection using WaypointEdge
New in 1.0.1
* Fix bug in WaypointEdge
New in 1.0
* Manipulation planner based on RRT.
* A graph of constraint.
* graph::Edge has 3 implementations: Edge, WaypointEdge, LevelSetEdge
* WaypointEdge supports several waypoints.
* LevelSetEdge solves the zero-probability problem.
# hpp-manipulation
[![Building Status](https://travis-ci.org/humanoid-path-planner/hpp-manipulation.svg?branch=master)](https://travis-ci.org/humanoid-path-planner/hpp-manipulation)
[![Pipeline status](https://gitlab.laas.fr/humanoid-path-planner/hpp-manipulation/badges/master/pipeline.svg)](https://gitlab.laas.fr/humanoid-path-planner/hpp-manipulation/commits/master)
[![Coverage report](https://gitlab.laas.fr/humanoid-path-planner/hpp-manipulation/badges/master/coverage.svg?job=doc-coverage)](https://gepettoweb.laas.fr/doc/humanoid-path-planner/hpp-manipulation/master/coverage/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/humanoid-path-planner/hpp-manipulation/master.svg)](https://results.pre-commit.ci/latest/github/humanoid-path-planner/hpp-manipulation)
This package is part of the [HPP] software and extends the functionalities of hpp-core.
It implements a solver for manipulation planning problems.
### Version
1.1
### Dependencies
[hpp-manipulation] needs the following package to be installed:
......
- InStatePath::solve
BiRRT* does not work properly at all:
- discontinuities due to an algorithmic mistake involving qProj_
- not using path projectors, while it should
DiffusingPlanner does not work properly sometimes
- Some collisions were detected on paths solves for romeo-placard
both with discrete and continuous (Progressive, 0.2) path validations
- InStatePath::mergeLeafRoadmapWith
this is inefficient because the roadmap recomputes the connected
component at every step. A better merge function should be added to roadmap.cc
- path optimizations after solving once :
They are done "locally" (for each of the leafs separately) in C++ with a
hard-coded optimizer (Graph-RandomShortcut) and then globally with the
command ps.addPathOptimizer("Graph-RandomShortcut"). Due to how this works,
this is like doing two times the same thing so the first should be removed.
However bugs have been observed when the global optimization is used (Core
dumped). For unknown reasons, in GraphOptimizer::optimize, the dynamic
cast of current->constraints() may fail on *some* 0-length paths. Ignoring
empty paths (the "if" I have added) seems to make the problem disappear
but the reason why some 0-length paths don't have the right Constraint type
is still to be found.
Subproject commit b166d5e143fc4d5a212a34e7de43d7831a980774
Subproject commit 29c0eb4e659304f44d55a0389e2749812d858659
......@@ -2,15 +2,10 @@ INPUT = @CMAKE_SOURCE_DIR@/doc \
@CMAKE_SOURCE_DIR@/include \
@CMAKE_BINARY_DIR@/doc
TAGFILES = @HPP_MODEL_DOXYGENDOCDIR@/hpp-model.doxytag=@HPP_MODEL_DOXYGENDOCDIR@ \
@HPP_CORE_DOXYGENDOCDIR@/hpp-core.doxytag=@HPP_CORE_DOXYGENDOCDIR@ \
@HPP_CONSTRAINTS_DOXYGENDOCDIR@/hpp-constraints.doxytag=@HPP_CONSTRAINTS_DOXYGENDOCDIR@ \
@HPP_FCL_DOXYGENDOCDIR@/hpp-fcl.doxytag=@HPP_FCL_DOXYGENDOCDIR@ \
@HPP_STATISTICS_DOXYGENDOCDIR@/hpp-statistics.doxytag=@HPP_STATISTICS_DOXYGENDOCDIR@
HTML_EXTRA_FILES = @CMAKE_SOURCE_DIR@/doc/ObjectManipulation_MasterThesis_JosephMirabel.pdf
ALIASES += Link{1}="\ref \1"
ALIASES += Link{2}="\ref \1 \"\2\""
ALIASES += LHPP{2}="\Link{hpp::\1::\2,\2}"
ALIASES += LModel{1}="\LHPP{model,\1}"
ALIASES += LPinocchio{1}="\LHPP{pinocchio,\1}"
USE_MATHJAX= YES
doc/constraint-graph.png

367 KiB

namespace hpp {
namespace manipulation {
namespace graph {
/**
\mainpage
\mainpage hpp-manipulation documentation
\anchor hpp_manipulation_documentation
\section sec_intro_hpp_manipulation Introduction
\par Introduction
This package implements a solver for manipulation planning problems. A
manipulation planning problem is defined by:
\li Device: a collection of several \LModel{Device} with \ref Gripper
\li Device: a collection of several \LPinocchio{Device} with \ref Gripper
"grippers" and \ref Handle "handles",
\li Graph: A graph of constraints defining the rules of a manipulation
problem.
......@@ -16,42 +16,39 @@ namespace hpp {
ManipulationPlanner implements a RRT-based algorithm to solve manipulation
planning problems.
\section sec_graph_hpp_manipulation Constraint graph
\par Constraint graph
The graph of constraint, also referred to as constraint graph, represents the
rules of a manipulation problem. The component of the graph are:
\li Node represents a state of the Robot with constraints,
\li Edge represents a transition between two Node with parametric constraints.
\li graph::State represents a state of the Robot with constraints,
\li graph::Edge represents a transition between two graph::State with parametric constraints.
Node contains a set of \LHPP{core,Constraint} that a configuration of the
graph::State contains a set of \LHPP{core,Constraint} that a configuration of the
Robot should satisfy to be in the represented state. To ensure that a
configuration is in only one state, the Node are ordered in a NodeSelector.
The method NodeSelector::getNode(ConfigurationIn_t) const returns a pointer to
the first Node for which Node::contains(ConfigurationIn_t) const returns true.
configuration is in only one state, the graph::State are ordered in a graph::StateSelector.
The method graph::StateSelector::getState(ConfigurationIn_t) const returns a pointer to
the first graph::State for which graph::State::contains(ConfigurationIn_t) const returns true.
For optimization only, another set of \LHPP{core,Constraint} is used for
\LHPP{core,StraightPath} lying in this Node.
\LHPP{core,StraightPath} lying in this graph::State.
Edge has methods Edge::isInNodeFrom, to tell if a corresponding path lyes in
Edge::from() or Edge::to(), and Edge::node(), to retrive this Node.
Edge also contains two sets of \LHPP{core,Constraint}:
\li Edge::configConstraint() returns a \LHPP{core,ConstraintSet} used to
generate a configuration lying in Edge::to() and respecting the
graph::Edge has methods graph::Edge::state() to tell in which graph::State a corresponding path lyes
graph::Edge also contains two sets of \LHPP{core,Constraint}:
\li graph::Edge::configConstraint() returns a \LHPP{core,ConstraintSet} used to
generate a configuration lying in graph::Edge::to() and respecting the
\LHPP{core,ConfigProjector::rightHandSide},
\li Edge::pathConstraint() returns a \LHPP{core,ConstraintSet} to be inserted
in \LHPP{core,Path} represented by this Edge.
\li graph::Edge::pathConstraint() returns a \LHPP{core,ConstraintSet} to be inserted
in \LHPP{core,Path} represented by this graph::Edge.
\note
For implementation details, see graph::Graph.
For more information about parametric and non-parametric constraints, see
\LHPP{core,DifferentiableFunction} and \LHPP{core,ConfigProjector}
\section sec_solver_hpp_manipulation Manipulation planner
\par Manipulation planner
ManipulationPlanner class implements an algorithm based on RRT. See
<a href="ObjectManipulation_MasterThesis_JosephMirabel.pdf">this master
thesis</a> for details about the algorithm.
**/
}
}
}
} // namespace manipulation
} // namespace hpp
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1719877454,
"narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "4e3583423212f9303aa1a6337f8dffb415920e4f",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1727174734,
"narHash": "sha256-xa3TynMF5vaWonmTOg/Ejc1Fmo0GkQnCaVRVkBc3z2I=",
"owner": "gepetto",
"repo": "nixpkgs",
"rev": "0ad139a0e4372abc12320c8c92ee90e0e5e296e1",
"type": "github"
},
"original": {
"owner": "gepetto",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
{
description = "Classes for manipulation planning";
inputs = {
nixpkgs.url = "github:gepetto/nixpkgs";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
perSystem =
{ pkgs, self', ... }:
{
devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
packages = {
default = self'.packages.hpp-manipulation;
hpp-manipulation = pkgs.hpp-manipulation.overrideAttrs (_: {
src = pkgs.lib.fileset.toSource {
root = ./.;
fileset = pkgs.lib.fileset.unions [
./CMakeLists.txt
./doc
./include
./package.xml
./plugins
./src
./tests
];
};
});
};
};
};
}
///
/// Copyright (c) 2014 CNRS
/// Authors: Florent Lamiraux
///
///
// This file is part of hpp-manipulation.
// hpp-manipulation 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.
//
// hpp-manipulation 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
// hpp-manipulation. If not, see
// <http://www.gnu.org/licenses/>.
#ifndef HPP_MANIPULATION_AXIAL_HANDLE_HH
# define HPP_MANIPULATION_AXIAL_HANDLE_HH
# include <hpp/manipulation/handle.hh>
namespace hpp {
namespace manipulation {
/// Handle symmetric around its z-axis. The constraint defined for a grasp
/// by a gripper is free to rotate around z-axis.
class AxialHandle : public Handle
{
public:
/// Create constraint corresponding to a gripper grasping this object
/// \param robot the robot that grasps the handle,
/// \param grasp object containing the grasp information
/// \return the constraint of relative position between the handle and
/// the gripper. The rotation around x is not constrained.
static AxialHandlePtr_t create (const std::string& name,
const Transform3f& localPosition,
const JointPtr_t& joint)
{
AxialHandle* ptr = new AxialHandle (name, localPosition, joint);
AxialHandlePtr_t shPtr (ptr);
ptr->init (shPtr);
return shPtr;
}
/// Return a pointer to the copy of this
virtual HandlePtr_t clone () const;
/// Create constraint corresponding to a gripper grasping this object
/// \param grasp object containing the grasp information
/// \return the constraint of relative transformation between the handle and
/// the gripper. The rotation around x is not constrained.
virtual NumericalConstraintPtr_t createGrasp
(const GripperPtr_t& gripper) const;
/// Create constraint that acts on the non-constrained axis of the
/// constraint generated by Handle::createGrasp.
/// \param gripper object containing the gripper information
/// \return a relative orientation constraint between the handle and
/// the gripper. Only the rotation around the x-axis is constrained.
virtual NumericalConstraintPtr_t createGraspComplement
(const GripperPtr_t& gripper) const;
/// Create constraint corresponding to a pregrasping task.
/// \param gripper object containing the gripper information
/// \return the constraint of relative transformation between the handle and
/// the gripper.
/// \note The translation along x-axis and the rotation around z-axis are not constrained.
/// \todo this function is never called. It should follow changes of
/// Handle::createPreGrasp prototype.
virtual NumericalConstraintPtr_t createPreGrasp
(const GripperPtr_t& gripper) const;
/// Create constraint that acts on the non-constrained axis of the
/// constraint generated by Handle::createPreGrasp.
/// \param gripper object containing the gripper information
/// \param shift the target value along the x-axis
/// \param width width of the interval of freedom of gripper along x-axis.
/// \return the constraint of relative position between the handle and
/// the gripper.
/// \note The translation along x-axis and the rotation around z-axis are constrained.
virtual NumericalConstraintPtr_t createPreGraspComplement
(const GripperPtr_t& gripper, const value_type& shift,
const value_type& width) const;
virtual std::ostream& print (std::ostream& os) const;
protected:
/// Constructor
/// \param robot the robot that grasps the handle,
/// \param grasp object containing the grasp information
/// \return the constraint of relative position between the handle and
/// the gripper. The rotation around x is not constrained.
AxialHandle (const std::string& name, const Transform3f& localPosition,
const JointPtr_t& joint) : Handle (name, localPosition,
joint), weakPtr_ ()
{
}
void init (const AxialHandleWkPtr_t& weakPtr)
{
Handle::init (weakPtr);
weakPtr_ = weakPtr;
}
/// Weak pointer to itself
AxialHandleWkPtr_t weakPtr_;
}; // class AxialHandle
} // namespace manipulation
} // namespace hpp
#endif // HPP_MANIPULATION_AXIAL_HANDLE_HH
......@@ -2,19 +2,30 @@
// Copyright (c) 2015 CNRS
// Authors: Anna Seppala (seppala@laas.fr)
//
// This file is part of hpp-core
// hpp-core 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.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// hpp-core 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
// hpp-core If not, see
// <http://www.gnu.org/licenses/>.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
#ifndef HPP_MANIPULATION_CONNECTED_COMPONENT_HH
#define HPP_MANIPULATION_CONNECTED_COMPONENT_HH
......@@ -25,38 +36,45 @@
#include <hpp/manipulation/graph/fwd.hh>
namespace hpp {
namespace manipulation {
/// Extension of hpp::core::connected-component. Adds a list of roadmap nodes for
/// every contraint graph node within the connected component. Thus every roadmap
/// node is assigned to a grahp node, which minimises computation time.
class HPP_MANIPULATION_DLLAPI ConnectedComponent : public core::ConnectedComponent
{
public:
typedef std::vector<RoadmapNodePtr_t> RoadmapNodes_t;
/// Map of graph nodes within the connected component
typedef std::map <graph::NodePtr_t, RoadmapNodes_t> GraphNodes_t;
ConnectedComponent() {}
/// return a shared pointer to new instance of manipulation::ConnectedComponent
static ConnectedComponentPtr_t create (const RoadmapWkPtr_t& roadmap);
/// Merge two connected components (extension of core::ConnectedComponent::merge)
/// \param other manipulation connected component to merge into this one.
/// \note other will be empty after calling this method.
void merge (const core::ConnectedComponentPtr_t& otherCC);
/// Add roadmap node to connected component
/// \param roadmap node to be added
void addNode (const core::NodePtr_t& node);
RoadmapNodes_t getRoadmapNodes (const graph::NodePtr_t graphNode);
protected:
private:
GraphNodes_t graphNodeMap_;
RoadmapPtr_t roadmap_;
}; // class ConnectedComponent
} // namespace manipulation
} // namespace hpp
#endif // HPP_MANIPULATION_CONNECTED_COMPONENT_HH
namespace manipulation {
/// Extension of hpp::core::connected-component. Adds a list of roadmap nodes
/// for every contraint graph state within the connected component. Thus every
/// roadmap node is assigned to a grahp state, which minimises computation time.
class HPP_MANIPULATION_DLLAPI ConnectedComponent
: public core::ConnectedComponent {
public:
/// Map of graph states within the connected component
typedef std::map<graph::StatePtr_t, RoadmapNodes_t> GraphStates_t;
ConnectedComponent() {}
/// return a shared pointer to new instance of
/// manipulation::ConnectedComponent
static ConnectedComponentPtr_t create(const RoadmapWkPtr_t& roadmap);
/// Merge two connected components (extension of
/// core::ConnectedComponent::merge) \param other manipulation connected
/// component to merge into this one. \note other will be empty after calling
/// this method.
void merge(const core::ConnectedComponentPtr_t& otherCC);
/// Add roadmap node to connected component
/// \param roadmap node to be added
void addNode(const core::NodePtr_t& node);
const RoadmapNodes_t& getRoadmapNodes(
const graph::StatePtr_t graphState) const;
protected:
private:
bool check() const;
GraphStates_t graphStateMap_;
// a RoadmapWkPtr_t so that memory can be released ?
RoadmapWkPtr_t roadmap_;
static RoadmapNodes_t empty_;
HPP_SERIALIZABLE();
}; // class ConnectedComponent
} // namespace manipulation
} // namespace hpp
#endif // HPP_MANIPULATION_CONNECTED_COMPONENT_HH
// Copyright (c) 2015 CNRS
// Authors: Joseph Mirabel
//
// This file is part of hpp-manipulation
// hpp-manipulation 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.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// hpp-manipulation 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
// hpp-manipulation If not, see
// <http://www.gnu.org/licenses/>.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
#ifndef HPP_MANIPULATION_CONSTRAINT_SET_HH
# define HPP_MANIPULATION_CONSTRAINT_SET_HH
# include <hpp/core/constraint-set.hh>
#define HPP_MANIPULATION_CONSTRAINT_SET_HH
# include <hpp/manipulation/fwd.hh>
# include <hpp/manipulation/graph/fwd.hh>
# include <hpp/manipulation/config.hh>
#include <hpp/core/constraint-set.hh>
#include <hpp/manipulation/config.hh>
#include <hpp/manipulation/fwd.hh>
#include <hpp/manipulation/graph/fwd.hh>
namespace hpp {
namespace manipulation {
/// \addtogroup constraints
/// \{
namespace manipulation {
/// \addtogroup constraints
/// \{
/// a core::ConstraintSet remembering which edge created it
class HPP_MANIPULATION_DLLAPI ConstraintSet : public core::ConstraintSet {
public:
typedef core::ConstraintSet Parent_t;
/// Return shared pointer to new object
static ConstraintSetPtr_t create(const DevicePtr_t& robot,
const std::string& name);
/// Return shared pointer to new object
static ConstraintSetPtr_t createCopy(const ConstraintSetPtr_t& cs);
/// a core::ConstraintSet remembering which edge created it
class HPP_MANIPULATION_DLLAPI ConstraintSet : public core::ConstraintSet
{
public:
typedef core::ConstraintSet Parent_t;
/// return shared pointer to copy
virtual ConstraintPtr_t copy() const;
/// Return shared pointer to new object
static ConstraintSetPtr_t create (const DevicePtr_t& robot,
const std::string& name);
void edge(graph::EdgePtr_t edge);
/// Return shared pointer to new object
static ConstraintSetPtr_t createCopy (const ConstraintSetPtr_t& cs);
graph::EdgePtr_t edge() const;
/// return shared pointer to copy
virtual ConstraintPtr_t copy () const;
protected:
/// Constructor
ConstraintSet(const DevicePtr_t& robot, const std::string& name);
/// Copy constructor
ConstraintSet(const ConstraintSet& other);
/// Store weak pointer to itself.
void init(const ConstraintSetPtr_t& self);
void edge (graph::EdgePtr_t edge);
virtual std::ostream& print(std::ostream& os) const;
graph::EdgePtr_t edge () const;
private:
graph::EdgePtr_t edge_;
ConstraintSetWkPtr_t weak_;
protected:
/// Constructor
ConstraintSet (const DevicePtr_t& robot, const std::string& name);
/// Copy constructor
ConstraintSet (const ConstraintSet& other);
/// Store weak pointer to itself.
void init (const ConstraintSetPtr_t& self);
ConstraintSet() {}
HPP_SERIALIZABLE();
}; // class ConstraintSet
virtual std::ostream& print (std::ostream& os) const;
struct ConstraintAndComplement_t {
ImplicitPtr_t constraint;
ImplicitPtr_t complement;
ImplicitPtr_t both;
ConstraintAndComplement_t(const ImplicitPtr_t& constr,
const ImplicitPtr_t& comp, const ImplicitPtr_t& b)
: constraint(constr), complement(comp), both(b) {}
};
typedef std::vector<ConstraintAndComplement_t> ConstraintsAndComplements_t;
/// \}
} // namespace manipulation
} // namespace hpp
private:
graph::EdgePtr_t edge_;
ConstraintSetWkPtr_t weak_;
}; // class ConstraintSet
/// \}
} // namespace manipulation
} // namespace hpp
BOOST_CLASS_EXPORT_KEY(hpp::manipulation::ConstraintSet)
#endif // HPP_MANIPULATION_CONSTRAINT_SET_HH
#endif // HPP_MANIPULATION_CONSTRAINT_SET_HH