Aikido
Robot.hpp
Go to the documentation of this file.
1 #ifndef AIKIDO_ROBOT_ROBOT_HPP_
2 #define AIKIDO_ROBOT_ROBOT_HPP_
3 
4 #include <chrono>
5 #include <unordered_map>
6 
7 #include <Eigen/Core>
8 #include <dart/dynamics/dynamics.hpp>
9 
10 #include "aikido/common/RNG.hpp"
17 
18 namespace aikido {
19 namespace robot {
20 
22 
23 class Robot
27 {
28 public:
29  virtual ~Robot() = default;
30 
33  virtual std::future<void> executeTrajectory(
34  const trajectory::TrajectoryPtr& trajectory) const = 0;
35 
39  virtual boost::optional<Eigen::VectorXd> getNamedConfiguration(
40  const std::string& name) const = 0;
41 
44  virtual void setNamedConfigurations(
45  std::unordered_map<std::string, const Eigen::VectorXd>
46  namedConfigurations)
47  = 0;
48 
50  virtual std::string getName() const = 0;
51 
53  virtual dart::dynamics::ConstMetaSkeletonPtr getMetaSkeleton() const = 0;
54 
56  dart::dynamics::MetaSkeletonPtr getMetaSkeleton();
57 
60  getStateSpace() const = 0;
61 
64 
67  virtual void setRoot(Robot* robot) = 0;
68 
72  virtual void step(const std::chrono::system_clock::time_point& timepoint) = 0;
73 
79  const dart::dynamics::MetaSkeletonPtr& metaSkeleton) const = 0;
80 
90  const dart::dynamics::MetaSkeletonPtr& metaSkeleton,
91  const constraint::dart::CollisionFreePtr& collisionFree) const = 0;
92 };
93 
94 } // namespace robot
95 } // namespace aikido
96 
97 #endif // AIKIDO_ROBOT_ROBOT_HPP_
aikido::statespace::dart::ConstMetaSkeletonStateSpacePtr
std::shared_ptr< const MetaSkeletonStateSpace > ConstMetaSkeletonStateSpacePtr
Definition: MetaSkeletonStateSpace.hpp:17
aikido::robot::Robot::getMetaSkeleton
virtual dart::dynamics::ConstMetaSkeletonPtr getMetaSkeleton() const =0
aikido::statespace::dart::MetaSkeletonStateSpacePtr
std::shared_ptr< MetaSkeletonStateSpace > MetaSkeletonStateSpacePtr
Definition: MetaSkeletonStateSpace.hpp:17
aikido::robot::Robot::setNamedConfigurations
virtual void setNamedConfigurations(std::unordered_map< std::string, const Eigen::VectorXd > namedConfigurations)=0
Sets the list of named configurations.
RNG.hpp
aikido
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
TSR.hpp
aikido::robot::Robot::~Robot
virtual ~Robot()=default
aikido::robot::Robot::getSelfCollisionConstraint
virtual constraint::dart::CollisionFreePtr getSelfCollisionConstraint(const statespace::dart::ConstMetaSkeletonStateSpacePtr &space, const dart::dynamics::MetaSkeletonPtr &metaSkeleton) const =0
Returns self-collision constraint.
aikido::robot::Robot::getName
virtual std::string getName() const =0
Spline.hpp
aikido::constraint::dart::CollisionFreePtr
std::shared_ptr< CollisionFree > CollisionFreePtr
Definition: CollisionFree.hpp:22
aikido::trajectory::TrajectoryPtr
std::shared_ptr< Trajectory > TrajectoryPtr
Definition: Trajectory.hpp:13
CollisionFree.hpp
Trajectory.hpp
aikido::robot::Robot::setRoot
virtual void setRoot(Robot *robot)=0
Sets the root of this robot.
MetaSkeletonStateSpace.hpp
aikido::robot::Robot::executeTrajectory
virtual std::future< void > executeTrajectory(const trajectory::TrajectoryPtr &trajectory) const =0
Executes a trajectory.
aikido::robot::Robot
Robot interface for defining basic behaviors of a robot.
Definition: Robot.hpp:26
aikido::robot::Robot::step
virtual void step(const std::chrono::system_clock::time_point &timepoint)=0
Simulates up to the provided timepoint.
aikido::constraint::TestablePtr
std::shared_ptr< Testable > TestablePtr
Definition: Testable.hpp:13
TrajectoryExecutor.hpp
AIKIDO_DECLARE_POINTERS
#define AIKIDO_DECLARE_POINTERS(X)
Definition: pointers.hpp:21
aikido::robot::Robot::getNamedConfiguration
virtual boost::optional< Eigen::VectorXd > getNamedConfiguration(const std::string &name) const =0
Returns a named configuration.
aikido::robot::Robot::getStateSpace
virtual aikido::statespace::dart::ConstMetaSkeletonStateSpacePtr getStateSpace() const =0
aikido::robot::Robot::getFullCollisionConstraint
virtual constraint::TestablePtr getFullCollisionConstraint(const statespace::dart::ConstMetaSkeletonStateSpacePtr &space, const dart::dynamics::MetaSkeletonPtr &metaSkeleton, const constraint::dart::CollisionFreePtr &collisionFree) const =0
TODO: Consider changing this to return a CollisionFreePtr.