-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
425 additions
and
158 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#! /usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
from moveit.task_constructor import core, stages | ||
from geometry_msgs.msg import PoseStamped | ||
from moveit_commander.roscpp_initializer import roscpp_initialize | ||
import time | ||
|
||
roscpp_initialize("mtc_tutorial_compute_ik") | ||
|
||
# Specify the planning group | ||
group = "air" | ||
|
||
# Create a task | ||
task = core.Task() | ||
|
||
# Get the current robot state | ||
currentState = stages.CurrentState("current state") | ||
task.add(currentState) | ||
|
||
# Create a planner instance that is used to connect | ||
# the current state to the grasp approach pose | ||
pipelinePlanner = core.PipelinePlanner() | ||
pipelinePlanner.planner = "RRTConnectkConfigDefault" | ||
planners = [(group, pipelinePlanner)] | ||
|
||
# Connect the two stages | ||
connect = stages.Connect("connect1", planners) | ||
connect.properties.configureInitFrom(core.Stage.PropertyInitializerSource.PARENT) | ||
task.add(connect) | ||
|
||
# [initAndConfigGeneratePose] | ||
# create an example pose wrt. the origin of the | ||
# panda arm link8 | ||
pose = PoseStamped() | ||
pose.header.frame_id = "qbhand_base_link" | ||
|
||
# Calculate the inverse kinematics for the current robot state | ||
generatePose = stages.GeneratePose("generate pose") | ||
|
||
# spwan a pose whenever there is a solution of the monitored stage | ||
generatePose.setMonitoredStage(task["current state"]) | ||
generatePose.pose = pose | ||
|
||
# Add the stage to the task hierarchy | ||
task.add(generatePose) | ||
# [initAndConfigGeneratePose] | ||
|
||
if task.plan(): | ||
task.publish(task.solutions[0]) | ||
time.sleep(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
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,14 @@ | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Changelog for package moveit_task_constructor_capabilities | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
0.1.2 (2023-02-24) | ||
------------------ | ||
|
||
0.1.1 (2023-02-15) | ||
------------------ | ||
|
||
0.1.0 (2023-02-02) | ||
------------------ | ||
* Initial release | ||
* Contributors: Michael Görner, Robert Haschke |
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,30 @@ | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Changelog for package moveit_task_constructor_core | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
0.1.2 (2023-02-24) | ||
------------------ | ||
* Remove moveit/__init__.py during .deb builds to avoid installation conflicts | ||
* MultiPlanner solver (`#429 <https://github.com/ros-planning/moveit_task_constructor/issues/429>`_): a planner that tries multiple planners in sequence | ||
|
||
* CartesianPath: Deprecate redundant property setters | ||
* PlannerInterface: provide "timeout" property | ||
* PlannerInterface: provide setters for properties | ||
* JointInterpolation: fix timeout handling | ||
* Contributors: Robert Haschke | ||
|
||
0.1.1 (2023-02-15) | ||
------------------ | ||
* Resort to MoveIt's python tools | ||
* Provide ComputeIK.ik_frame as full PoseStamped | ||
* Fixed build farm issues | ||
|
||
* Removed unused eigen_conversions includes | ||
* Fixed odr compiler warning on Buster | ||
* Fixed missing dependency declarations | ||
* Contributors: Robert Haschke | ||
|
||
0.1.0 (2023-02-02) | ||
------------------ | ||
* Initial release | ||
* Contributors: Michael Görner, Robert Haschke, Captain Yoshi, Christian Petersmeier, Henning Kayser, Jafar Abdi, Tyler Weaver |
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
7 changes: 5 additions & 2 deletions
7
moveit_task_constructor/core/include/moveit/python/task_constructor/properties.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
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
77 changes: 77 additions & 0 deletions
77
moveit_task_constructor/core/include/moveit/task_constructor/solvers/multi_planner.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,77 @@ | ||
/********************************************************************* | ||
* Software License Agreement (BSD License) | ||
* | ||
* Copyright (c) 2023, Bielefeld University | ||
* 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 Bielefeld University 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. | ||
*********************************************************************/ | ||
|
||
/* Authors: Robert Haschke | ||
Desc: meta planner, running multiple planners in parallel or sequence | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <moveit/task_constructor/solvers/planner_interface.h> | ||
#include <vector> | ||
|
||
namespace moveit { | ||
namespace task_constructor { | ||
namespace solvers { | ||
|
||
MOVEIT_CLASS_FORWARD(MultiPlanner); | ||
|
||
/** A meta planner that runs multiple alternative planners in sequence and returns the first found solution. | ||
* | ||
* This is useful to sequence different planning strategies of increasing complexity, | ||
* e.g. Cartesian or joint-space interpolation first, then OMPL, ... | ||
* This is (slightly) different from the Fallbacks container, as the MultiPlanner directly applies its planners to each | ||
* individual planning job. In contrast, the Fallbacks container first runs the active child to exhaustion before | ||
* switching to the next child, which possibly applies a different planning strategy. | ||
*/ | ||
class MultiPlanner : public PlannerInterface, public std::vector<solvers::PlannerInterfacePtr> | ||
{ | ||
public: | ||
using PlannerList = std::vector<solvers::PlannerInterfacePtr>; | ||
using PlannerList::PlannerList; // inherit all std::vector constructors | ||
|
||
void init(const moveit::core::RobotModelConstPtr& robot_model) override; | ||
|
||
bool plan(const planning_scene::PlanningSceneConstPtr& from, const planning_scene::PlanningSceneConstPtr& to, | ||
const moveit::core::JointModelGroup* jmg, double timeout, robot_trajectory::RobotTrajectoryPtr& result, | ||
const moveit_msgs::Constraints& path_constraints = moveit_msgs::Constraints()) override; | ||
|
||
bool plan(const planning_scene::PlanningSceneConstPtr& from, const moveit::core::LinkModel& link, | ||
const Eigen::Isometry3d& offset, const Eigen::Isometry3d& target, const moveit::core::JointModelGroup* jmg, | ||
double timeout, robot_trajectory::RobotTrajectoryPtr& result, | ||
const moveit_msgs::Constraints& path_constraints = moveit_msgs::Constraints()) override; | ||
}; | ||
} // namespace solvers | ||
} // namespace task_constructor | ||
} // namespace moveit |
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
Oops, something went wrong.