Aikido
aikido::robot::Robot Class Referenceabstract

Robot interface for defining basic behaviors of a robot. More...

#include <aikido/robot/Robot.hpp>

Inheritance diagram for aikido::robot::Robot:
aikido::robot::ConcreteRobot aikido::robot::Manipulator aikido::robot::ConcreteManipulator

Public Member Functions

virtual ~Robot ()=default
 
virtual std::unique_ptr< aikido::trajectory::SplinesmoothPath (const dart::dynamics::MetaSkeletonPtr &metaSkeleton, const aikido::trajectory::Trajectory *path, const constraint::TestablePtr &constraint)=0
 Returns a timed trajectory that can be executed by the robot. More...
 
virtual std::unique_ptr< aikido::trajectory::SplineretimePath (const dart::dynamics::MetaSkeletonPtr &metaSkeleton, const aikido::trajectory::Trajectory *path)=0
 Returns a timed trajectory that can be executed by the robot. More...
 
virtual std::unique_ptr< aikido::trajectory::SplineretimePathWithKunz (const dart::dynamics::MetaSkeletonPtr &metaSkeleton, const aikido::trajectory::Trajectory *path, double maxDeviation, double timestep)=0
 Returns a timed trajectory computed with KunzRetimer. More...
 
virtual std::future< void > executeTrajectory (const trajectory::TrajectoryPtr &trajectory) const =0
 Executes a trajectory. More...
 
virtual boost::optional< Eigen::VectorXd > getNamedConfiguration (const std::string &name) const =0
 Returns a named configuration. More...
 
virtual void setNamedConfigurations (std::unordered_map< std::string, const Eigen::VectorXd > namedConfigurations)=0
 Sets the list of named configurations. More...
 
virtual std::string getName () const =0
 
virtual dart::dynamics::ConstMetaSkeletonPtr getMetaSkeleton () const =0
 
dart::dynamics::MetaSkeletonPtr getMetaSkeleton ()
 
virtual aikido::statespace::dart::ConstMetaSkeletonStateSpacePtr getStateSpace () const =0
 
aikido::statespace::dart::MetaSkeletonStateSpacePtr getStateSpace ()
 
virtual void setRoot (Robot *robot)=0
 Sets the root of this robot. More...
 
virtual void step (const std::chrono::system_clock::time_point &timepoint)=0
 Simulates up to the provided timepoint. More...
 
virtual constraint::dart::CollisionFreePtr getSelfCollisionConstraint (const statespace::dart::ConstMetaSkeletonStateSpacePtr &space, const dart::dynamics::MetaSkeletonPtr &metaSkeleton) const =0
 Returns self-collision constraint. More...
 
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. More...
 

Detailed Description

Robot interface for defining basic behaviors of a robot.

A concrete implementation of robot should support a collection of planning methods.

Constructor & Destructor Documentation

◆ ~Robot()

virtual aikido::robot::Robot::~Robot ( )
virtualdefault

Member Function Documentation

◆ executeTrajectory()

virtual std::future<void> aikido::robot::Robot::executeTrajectory ( const trajectory::TrajectoryPtr trajectory) const
pure virtual

Executes a trajectory.

Parameters
[in]trajectoryTimed trajectory to execute

Implemented in aikido::robot::ConcreteRobot, and aikido::robot::ConcreteManipulator.

◆ getFullCollisionConstraint()

virtual constraint::TestablePtr aikido::robot::Robot::getFullCollisionConstraint ( const statespace::dart::ConstMetaSkeletonStateSpacePtr space,
const dart::dynamics::MetaSkeletonPtr &  metaSkeleton,
const constraint::dart::CollisionFreePtr collisionFree 
) const
pure virtual

TODO: Consider changing this to return a CollisionFreePtr.

Combines provided collision constraint with self collision constraint.

Parameters
[in]spaceSpace in which this collision constraint operates.
[in]metaSkeletonMetaskeleton for the statespace.
[in]collisionFreeCollision constraint.
Returns
Combined constraint.

Implemented in aikido::robot::ConcreteRobot, and aikido::robot::ConcreteManipulator.

◆ getMetaSkeleton() [1/2]

dart::dynamics::MetaSkeletonPtr aikido::robot::Robot::getMetaSkeleton ( )
Returns
MetaSkeleton of this robot.

◆ getMetaSkeleton() [2/2]

virtual dart::dynamics::ConstMetaSkeletonPtr aikido::robot::Robot::getMetaSkeleton ( ) const
pure virtual
Returns
[const] MetaSkeleton of this robot.

Implemented in aikido::robot::ConcreteRobot, and aikido::robot::ConcreteManipulator.

◆ getName()

virtual std::string aikido::robot::Robot::getName ( ) const
pure virtual
Returns
Name of this Robot

Implemented in aikido::robot::ConcreteRobot, and aikido::robot::ConcreteManipulator.

◆ getNamedConfiguration()

virtual boost::optional<Eigen::VectorXd> aikido::robot::Robot::getNamedConfiguration ( const std::string &  name) const
pure virtual

Returns a named configuration.

Parameters
[in]nameName of the configuration
Returns
Configuration

Implemented in aikido::robot::ConcreteRobot, and aikido::robot::ConcreteManipulator.

◆ getSelfCollisionConstraint()

virtual constraint::dart::CollisionFreePtr aikido::robot::Robot::getSelfCollisionConstraint ( const statespace::dart::ConstMetaSkeletonStateSpacePtr space,
const dart::dynamics::MetaSkeletonPtr &  metaSkeleton 
) const
pure virtual

Returns self-collision constraint.

Parameters
[in]spaceSpace in which this collision constraint operates.
[in]metaSkeletonMetaskeleton for the statespace.

Implemented in aikido::robot::ConcreteRobot, and aikido::robot::ConcreteManipulator.

◆ getStateSpace() [1/2]

aikido::statespace::dart::MetaSkeletonStateSpacePtr aikido::robot::Robot::getStateSpace ( )
Returns
MetaSkeletonStateSpace of this robot.

◆ getStateSpace() [2/2]

virtual aikido::statespace::dart::ConstMetaSkeletonStateSpacePtr aikido::robot::Robot::getStateSpace ( ) const
pure virtual
Returns
[const] MetaSkeletonStateSpace of this robot.

Implemented in aikido::robot::ConcreteRobot, and aikido::robot::ConcreteManipulator.

◆ retimePath()

virtual std::unique_ptr<aikido::trajectory::Spline> aikido::robot::Robot::retimePath ( const dart::dynamics::MetaSkeletonPtr &  metaSkeleton,
const aikido::trajectory::Trajectory path 
)
pure virtual

Returns a timed trajectory that can be executed by the robot.

Parameters
[in]metaSkeletonMetaskeleton of the path.
[in]pathGeometric path to execute.

Implemented in aikido::robot::ConcreteRobot, and aikido::robot::ConcreteManipulator.

◆ retimePathWithKunz()

virtual std::unique_ptr<aikido::trajectory::Spline> aikido::robot::Robot::retimePathWithKunz ( const dart::dynamics::MetaSkeletonPtr &  metaSkeleton,
const aikido::trajectory::Trajectory path,
double  maxDeviation,
double  timestep 
)
pure virtual

Returns a timed trajectory computed with KunzRetimer.

Parameters
[in]metaSkeletonMetaskeleton of the path.
[in]pathGeometric path to execute.
[in]maxDeviationMaximum deviation allowed from original path.
[in]timestepTime step between trajectory points.

Implemented in aikido::robot::ConcreteRobot, and aikido::robot::ConcreteManipulator.

◆ setNamedConfigurations()

virtual void aikido::robot::Robot::setNamedConfigurations ( std::unordered_map< std::string, const Eigen::VectorXd >  namedConfigurations)
pure virtual

Sets the list of named configurations.

Parameters
[in]namedConfigurationsMap of name, configuration

Implemented in aikido::robot::ConcreteRobot, and aikido::robot::ConcreteManipulator.

◆ setRoot()

virtual void aikido::robot::Robot::setRoot ( Robot robot)
pure virtual

Sets the root of this robot.

Parameters
[in]robotParent robot

Implemented in aikido::robot::ConcreteRobot, and aikido::robot::ConcreteManipulator.

◆ smoothPath()

virtual std::unique_ptr<aikido::trajectory::Spline> aikido::robot::Robot::smoothPath ( const dart::dynamics::MetaSkeletonPtr &  metaSkeleton,
const aikido::trajectory::Trajectory path,
const constraint::TestablePtr constraint 
)
pure virtual

Returns a timed trajectory that can be executed by the robot.

Parameters
[in]metaSkeletonMetaskeleton of the path.
[in]pathGeometric path to execute.
[in]constraintMust be satisfied after postprocessing. Typically collision constraint is passed.

Implemented in aikido::robot::ConcreteRobot, and aikido::robot::ConcreteManipulator.

◆ step()

virtual void aikido::robot::Robot::step ( const std::chrono::system_clock::time_point &  timepoint)
pure virtual

Simulates up to the provided timepoint.

Note
Assumes that the robot's skeleton is locked.
Parameters
[in]timepointTime to simulate to.

Implemented in aikido::robot::ConcreteRobot, and aikido::robot::ConcreteManipulator.