Go to the documentation of this file. 1 #ifndef AIKIDO_CONTROL_JOINTCOMMANDEXECUTOR_HPP_
2 #define AIKIDO_CONTROL_JOINTCOMMANDEXECUTOR_HPP_
8 #include <dart/dart.hpp>
20 template <ExecutorType T>
28 const std::vector<dart::dynamics::DegreeOfFreedom*> dofs,
29 const std::set<ExecutorType> otherTypes = std::set<ExecutorType>(),
48 virtual std::future<int>
execute(
49 const std::vector<double>& command,
50 const std::chrono::duration<double>& timeout,
51 const std::chrono::system_clock::time_point& timepoint)
61 const std::vector<double>& command,
62 const std::chrono::duration<double>& timeout)
64 return this->
execute(command, timeout, std::chrono::system_clock::now());
69 const std::chrono::system_clock::time_point& timepoint)
override = 0;
Abstract class for executing a command of a single type on a group of joints.
Definition: JointCommandExecutor.hpp:21
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
virtual void step(const std::chrono::system_clock::time_point &timepoint) override=0
Step to a point in time.
virtual std::future< int > execute(const std::vector< double > &command, const std::chrono::duration< double > &timeout, const std::chrono::system_clock::time_point &timepoint)=0
Execute a Joint Command, setting future upon completion.
std::set< ExecutorType > concatenateTypes(std::set< ExecutorType > first, std::set< ExecutorType > second)
Concatenate two sets of ExecutorTypes Useful for initializer-list constructors.
Definition: util.hpp:29
JointCommandExecutor(const std::vector< dart::dynamics::DegreeOfFreedom * > dofs, const std::set< ExecutorType > otherTypes=std::set< ExecutorType >(), const std::chrono::milliseconds threadRate=defaultThreadRate)
Constructor.
Definition: JointCommandExecutor.hpp:27
constexpr std::chrono::milliseconds defaultThreadRate
Default rate for ExecutorThread to call step()
Definition: Executor.hpp:47
ExecutorType
Type of executor Can be used to determine if 2 executors make conflicting demands of individual degre...
Definition: Executor.hpp:35
virtual std::future< int > execute(const std::vector< double > &command, const std::chrono::duration< double > &timeout)
Execute a Joint Command, setting future upon completion.
Definition: JointCommandExecutor.hpp:60
virtual ~JointCommandExecutor()
Definition: JointCommandExecutor.hpp:38
virtual void cancel()=0
Cancels the current command.
Abstract class for executing commands on degrees of freedom.
Definition: Executor.hpp:50