Task.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2011-2017, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package ArmarX
19 * @author Mirko Waechter( mirko.waechter at kit dot edu)
20 * @date 2017
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24#pragma once
25
27
30#include <RobotComponents/interface/components/MotionPlanning/Tasks/BiRRT/Task.h>
31
32namespace armarx::birrt
33{
34 class Task : public virtual MotionPlanningTaskWithDefaultMembers, public virtual TaskBase
35 {
36 public:
37 Task(const CSpaceBasePtr& cspace,
38 const VectorXf& startCfg,
39 const VectorXf& goalCfg,
40 const std::string& taskName = "BiRRTTask",
41 //general
42 Ice::Long maximalPlanningTimeInSeconds = 300,
43 float dcdStep = 0.01f);
44
45 // MotionPlanningTaskControlInterface interface
46 public:
47 void abortTask(const ::Ice::Current&) override;
48 Path getPath(const ::Ice::Current&) const override;
49
50 // MotionPlanningTaskBase interface
51 public:
52 void run(const RemoteObjectNodePrxList&, const ::Ice::Current&) override;
53
55
56 protected:
57 Task() = default;
58
59 mutable std::mutex mtx;
60 Path solution = {{}, "BiRRT-Path"};
61 std::atomic_bool taskIsAborted{false};
62
63 private:
64 template <class Base, class Derived>
65 friend class ::armarx::GenericFactory;
66 };
67
68} // namespace armarx::birrt
69
70namespace armarx
71{
75
76} // namespace armarx
MotionPlanningTaskWithDefaultMembers(const VectorXf &startCfg, const VectorXf &goalCfg, const CSpaceBasePtr &cspace, Ice::Float dcdStep, Ice::Long maximalPlanningTimeInSeconds, const std::string &taskName)
ctor
The RemoteHandle class wrapps a ClientSideRemoteHandleControlBlock and can be used just as a Ice prox...
Task(const CSpaceBasePtr &cspace, const VectorXf &startCfg, const VectorXf &goalCfg, const std::string &taskName="BiRRTTask", Ice::Long maximalPlanningTimeInSeconds=300, float dcdStep=0.01f)
Definition Task.cpp:42
void abortTask(const ::Ice::Current &) override
Definition Task.cpp:65
void run(const RemoteObjectNodePrxList &, const ::Ice::Current &) override
Definition Task.cpp:77
std::atomic_bool taskIsAborted
Definition Task.h:61
Path getPath(const ::Ice::Current &) const override
Definition Task.cpp:70
std::mutex mtx
Definition Task.h:59
SimoxCSpacePtr getOriginalCSpace() const
Definition Task.cpp:253
This file offers overloads of toIce() and fromIce() functions for STL container types.
birrt::Task BiRRTTask
Definition Task.h:72
RemoteHandle< MotionPlanningTaskControlInterfacePrx > BiRRTTaskHandle
Definition Task.h:74
IceUtil::Handle< BiRRTTask > BiRRTTaskPtr
Definition Task.h:73
IceInternal::Handle< SimoxCSpace > SimoxCSpacePtr
An ice handle for a SimoxCSpace.
Definition SimoxCSpace.h:56