Go to the documentation of this file. 1 #ifndef AIKIDO_CONTROL_VISUALSERVOINGVELOCITYEXECUTOR_HPP_
2 #define AIKIDO_CONTROL_VISUALSERVOINGVELOCITYEXECUTOR_HPP_
7 #include <dart/dynamics/Skeleton.hpp>
42 std::chrono::duration<double> timeout
44 std::chrono::milliseconds threadPeriod
67 ::dart::dynamics::BodyNode* eeNode,
68 std::shared_ptr<JacobianVelocityExecutor> executor =
nullptr,
84 std::function<std::shared_ptr<Eigen::Isometry3d>(
void)> perception)
86 return this->
execute(perception, std::chrono::system_clock::now());
88 virtual std::future<int>
execute(
89 std::function<std::shared_ptr<Eigen::Isometry3d>(
void)> perception,
90 const std::chrono::system_clock::time_point& timepoint);
97 void step(
const std::chrono::system_clock::time_point& timepoint)
override;
110 std::function<std::shared_ptr<Eigen::Isometry3d>(
void)>
mPerception;
std::chrono::system_clock::time_point mLastPerceivedTime
Time of command start.
Definition: VisualServoingVelocityExecutor.hpp:125
Properties(double goalTolerance=DEFAULT_GOAL_TOLERANCE, double approachVelocity=DEFAULT_APPROACH_VEL, std::chrono::duration< double > timeout=std::chrono::duration< double >(DEFAULT_TIMEOUT), std::chrono::milliseconds threadPeriod=std::chrono::milliseconds(DEFAULT_THREAD_PERIOD))
Struct Constructor.
Definition: VisualServoingVelocityExecutor.hpp:39
std::shared_ptr< JacobianVelocityExecutor > mExecutor
Underlying JacobianVelocityExecutor.
Definition: VisualServoingVelocityExecutor.hpp:107
void resetProperties(Properties properties=Properties())
Cancel current command and update properties.
Paramters for Vector Field Planner.
Definition: VisualServoingVelocityExecutor.hpp:25
double mApproachVelocity
Definition: VisualServoingVelocityExecutor.hpp:54
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
static constexpr double DEFAULT_GOAL_TOLERANCE
Definition: VisualServoingVelocityExecutor.hpp:27
std::chrono::duration< double > mTimeout
Definition: VisualServoingVelocityExecutor.hpp:55
double mGoalTolerance
Definition: VisualServoingVelocityExecutor.hpp:51
std::future< int > mFuture
Future for underlying executor call.
Definition: VisualServoingVelocityExecutor.hpp:122
Properties getProperties() const
Get current properties.
static constexpr double DEFAULT_APPROACH_VEL
Definition: VisualServoingVelocityExecutor.hpp:28
std::unique_ptr< std::promise< int > > mPromise
Promise whose future is returned by execute()
Definition: VisualServoingVelocityExecutor.hpp:113
void step(const std::chrono::system_clock::time_point &timepoint) override
Step to a point in time.
virtual ~VisualServoingVelocityExecutor()
Properties mProperties
Properties (see documentation above)
Definition: VisualServoingVelocityExecutor.hpp:119
std::function< std::shared_ptr< Eigen::Isometry3d >void)> mPerception
Perception Function (if empty, then executor not in progress)
Definition: VisualServoingVelocityExecutor.hpp:110
Executes end-effector R3 linear velocity command towards a perceived target Uses underlying JacobianV...
Definition: VisualServoingVelocityExecutor.hpp:21
static constexpr double DEFAULT_TIMEOUT
Definition: VisualServoingVelocityExecutor.hpp:29
::dart::dynamics::BodyNode * mEENode
End Effector Body Node Name.
Definition: VisualServoingVelocityExecutor.hpp:104
VisualServoingVelocityExecutor(::dart::dynamics::BodyNode *eeNode, std::shared_ptr< JacobianVelocityExecutor > executor=nullptr, Properties properties=Properties())
Constructor.
std::chrono::milliseconds mThreadPeriod
Definition: VisualServoingVelocityExecutor.hpp:56
Abstract class for executing commands on degrees of freedom.
Definition: Executor.hpp:50
virtual std::future< int > execute(std::function< std::shared_ptr< Eigen::Isometry3d >(void)> perception)
Execute a Visual Servoing Command, setting future upon completion.
Definition: VisualServoingVelocityExecutor.hpp:83
void cancel()
Cancels the current command.
std::mutex mMutex
Manages access to mPerception, mPromise.
Definition: VisualServoingVelocityExecutor.hpp:116
static constexpr long DEFAULT_THREAD_PERIOD
Definition: VisualServoingVelocityExecutor.hpp:30