-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move plan_request_adapters into planning interface package Add callRequestAdapterChain function Differentiate between request and response adapters Restore planning_pipeline.cpp Add response_adapters parameter and cleanup adapter chain calls Add response adapter loading chain Address compiler errors Fix parameter type Fix compilation errors Rename planning_request_adapters to *_adapter Cleanup + fix errors Fix plugins and print description Remove unused adapters Planners plan, Adapters adapt ... Format + fix compilation error Simplify by removing callRequest/ResponseAdapterChain Remove unneeded PlannerFn Make clang tidy happy Add loadPluginVector template and make callAdapterChain private Add documentation Remove TODOs Cleanups and move templates into annonymous namespace Add more debug information and fix bugs in adapters Fix bugs Remove commented out CMake lines Update parameter description Apply suggestions from code review Co-authored-by: Abishalini Sivaraman <abi.gpuram@gmail.com> Address review Remove instrospection dir Make parameters read only Make sure that pipeline does not abort if no request adapter is configured Remove anonymous namespace in header Move adapter params into separate namespace Delete outdated unittest Apply suggestions from code review Co-authored-by: Sebastian Castro <4603398+sea-bass@users.noreply.github.com> ruckig -> Ruckig! Address comments part 2 Remove wrong request_adapters initilization from PILZ config Update migration guide Update logging Remove response argument from PlanningRequestAdapter::adapt Make adapter naming consistent Add pipeline state publisher Pull stacked constraints check out of planning pipeline Update planning request adapters Format! Remove unused params and fix clang tidy Fix error Move validity check and path publisher in separate adapters Fix DISPLAY_PATH_TOPIC Update config yamls Add MoveItStatus and return with request adapter Revert outdated change Request adapters adapt returns void now Planner solve function returns void now Update license in header Apply suggestions from code review Co-authored-by: Sebastian Castro <4603398+sea-bass@users.noreply.github.com> Update migration guide Address review Don't make initialize purely virtual & address review
- Loading branch information
Showing
76 changed files
with
1,630 additions
and
2,605 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
planning_plugin: chomp_interface/CHOMPPlanner | ||
enable_failure_recovery: true | ||
jiggle_fraction: 0.05 | ||
request_adapters: >- | ||
default_planner_request_adapters/AddTimeOptimalParameterization | ||
default_planner_request_adapters/ResolveConstraintFrames | ||
default_planner_request_adapters/FixWorkspaceBounds | ||
default_planner_request_adapters/FixStartStateBounds | ||
default_planner_request_adapters/FixStartStateCollision | ||
default_planner_request_adapters/FixStartStatePathConstraints | ||
# The order of the elements in the adapter corresponds to the order they are processed by the motion planning pipeline. | ||
request_adapters: | ||
- default_planning_request_adapters/ResolveConstraintFrames | ||
- default_planning_request_adapters/ValidateWorkspaceBounds | ||
- default_planning_request_adapters/CheckStartStateBounds | ||
- default_planning_request_adapters/CheckStartStateCollision | ||
response_adapters: | ||
- default_planning_response_adapters/AddTimeOptimalParameterization | ||
- default_planning_response_adapters/ValidateSolution | ||
- default_planning_response_adapters/DisplayMotionPath | ||
|
||
ridge_factor: 0.01 | ||
start_state_max_bounds_error: 0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
planning_plugin: ompl_interface/OMPLPlanner | ||
start_state_max_bounds_error: 0.1 | ||
jiggle_fraction: 0.05 | ||
request_adapters: >- | ||
default_planner_request_adapters/AddTimeOptimalParameterization | ||
default_planner_request_adapters/ResolveConstraintFrames | ||
default_planner_request_adapters/FixWorkspaceBounds | ||
default_planner_request_adapters/FixStartStateBounds | ||
default_planner_request_adapters/FixStartStateCollision | ||
default_planner_request_adapters/FixStartStatePathConstraints | ||
# The order of the elements in the adapter corresponds to the order they are processed by the motion planning pipeline. | ||
request_adapters: | ||
- default_planning_request_adapters/ResolveConstraintFrames | ||
- default_planning_request_adapters/ValidateWorkspaceBounds | ||
- default_planning_request_adapters/CheckStartStateBounds | ||
- default_planning_request_adapters/CheckStartStateCollision | ||
response_adapters: | ||
- default_planning_response_adapters/AddTimeOptimalParameterization | ||
- default_planning_response_adapters/ValidateSolution | ||
- default_planning_response_adapters/DisplayMotionPath |
2 changes: 1 addition & 1 deletion
2
moveit_configs_utils/default_configs/pilz_industrial_motion_planner_planning.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
moveit_core/planning_interface/include/moveit/planning_interface/planning_request_adapter.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/********************************************************************* | ||
* Software License Agreement (BSD License) | ||
* | ||
* Copyright (c) 2023, PickNik Inc. | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* | ||
* * Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* * 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. | ||
* * Neither the name of PickNik Inc. nor the names of its | ||
* contributors may be used to endorse or promote products derived | ||
* from this software without specific prior written permission. | ||
* | ||
* 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 OWNER 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. | ||
*********************************************************************/ | ||
|
||
/* Author: Ioan Sucan, Sebastian Jahr | ||
Description: Generic interface to adapting motion planning requests | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <moveit/macros/class_forward.h> | ||
#include <moveit/planning_interface/planning_interface.h> | ||
#include <moveit/utils/moveit_status.h> | ||
#include <rclcpp/logging.hpp> | ||
#include <rclcpp/node.hpp> | ||
|
||
namespace planning_interface | ||
{ | ||
MOVEIT_CLASS_FORWARD(PlanningRequestAdapter); // Defines PlanningRequestAdapterPtr, ConstPtr, WeakPtr... etc | ||
|
||
/** @brief Concept in MoveIt which can be used to modify the planning problem(pre-processing) in a planning pipeline. | ||
* PlanningRequestAdapters enable adjusting to or validating a planning problem for a subsequent planning algorithm. | ||
*/ | ||
class PlanningRequestAdapter | ||
{ | ||
public: | ||
/** @brief Initialize parameters using the passed Node and parameter namespace. | ||
* @param node Node instance used by the adapter | ||
* @param parameter_namespace Parameter namespace for adapter | ||
@details If no initialization is needed, simply implement as empty */ | ||
virtual void initialize(const rclcpp::Node::SharedPtr& node, const std::string& parameter_namespace){}; | ||
|
||
/** @brief Get a description of this adapter | ||
* @return Returns a short string that identifies the planning request adapter | ||
*/ | ||
[[nodiscard]] virtual std::string getDescription() const = 0; | ||
|
||
/** @brief Adapt the planning request | ||
* @param planning_scene Representation of the environment for the planning | ||
* @param req Motion planning request with a set of constraints | ||
* @return True if response was generated correctly */ | ||
[[nodiscard]] virtual moveit::core::MoveItStatus adapt(const planning_scene::PlanningSceneConstPtr& planning_scene, | ||
planning_interface::MotionPlanRequest& req) const = 0; | ||
}; | ||
} // namespace planning_interface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
moveit_core/planning_interface/include/moveit/planning_interface/planning_response_adapter.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/********************************************************************* | ||
* Software License Agreement (BSD License) | ||
* | ||
* Copyright (c) 2023, PickNik Inc. | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* | ||
* * Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* * 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. | ||
* * Neither the name of PickNik Inc. nor the names of its | ||
* contributors may be used to endorse or promote products derived | ||
* from this software without specific prior written permission. | ||
* | ||
* 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 OWNER 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. | ||
*********************************************************************/ | ||
|
||
/* Author: Sebastian Jahr */ | ||
|
||
#pragma once | ||
|
||
#include <moveit/macros/class_forward.h> | ||
#include <moveit/planning_interface/planning_interface.h> | ||
#include <rclcpp/logging.hpp> | ||
#include <rclcpp/node.hpp> | ||
|
||
namespace planning_interface | ||
{ | ||
MOVEIT_CLASS_FORWARD(PlanningResponseAdapter); // Defines PlanningResponseAdapterPtr, ConstPtr, WeakPtr... etc | ||
|
||
/** @brief Concept in MoveIt which can be used to modify the planning solution (post-processing) in a planning pipeline. | ||
* PlanningResponseAdapters enable using for example smoothing and trajectory generation algorithms in sequence to | ||
* produce a trajectory. | ||
*/ | ||
class PlanningResponseAdapter | ||
{ | ||
public: | ||
/** @brief Initialize parameters using the passed Node and parameter namespace. | ||
* @param node Node instance used by the adapter | ||
* @param parameter_namespace Parameter namespace for adapter | ||
@details If no initialization is needed, simply implement as empty */ | ||
virtual void initialize(const rclcpp::Node::SharedPtr& node, const std::string& parameter_namespace){}; | ||
|
||
/** \brief Get a description of this adapter | ||
* @return Returns a short string that identifies the planning response adapter | ||
*/ | ||
[[nodiscard]] virtual std::string getDescription() const = 0; | ||
|
||
/** @brief Adapt the planning response | ||
* @param planning_scene Representation of the environment for the planning | ||
* @param req Motion planning request with a set of constraints | ||
* @param res Motion planning response containing the solution that is adapted. */ | ||
virtual void adapt(const planning_scene::PlanningSceneConstPtr& planning_scene, | ||
const planning_interface::MotionPlanRequest& req, | ||
planning_interface::MotionPlanResponse& res) const = 0; | ||
}; | ||
} // namespace planning_interface |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.