Aikido
aikido::control::ros Namespace Reference

Classes

class  RosJointCommandExecutor
 This Executor uses pr_control_msgs/JointGroupCommandAction to execute joint-wise commands. More...
 
class  RosJointGroupCommandClient
 This class uses actionlib to command an action of the type pr_control_msgs/JointGroupCommandAction. More...
 
class  RosJointModeCommandClient
 This class uses actionlib to command an action of the type pr_control_msgs/JointModeCommandAction. More...
 
class  RosJointStateClient
 Client that listens for JointState messages for each skeleton joint and provides a method for extracting the most recent position of each joint. More...
 
class  RosTrajectoryExecutionException
 This class wraps various exceptions that may arise during trajectory execution over ROS. More...
 
class  RosTrajectoryExecutor
 This class sends trajectory commands to ROS server. More...
 

Typedefs

using RosJointPositionExecutor = RosJointCommandExecutor< ExecutorType::POSITION >
 
using RosJointVelocityExecutor = RosJointCommandExecutor< ExecutorType::VELOCITY >
 
using RosJointEffortExecutor = RosJointCommandExecutor< ExecutorType::EFFORT >
 

Functions

std::unique_ptr< aikido::trajectory::SplinetoSplineJointTrajectory (const std::shared_ptr< aikido::statespace::dart::MetaSkeletonStateSpace > &space, const trajectory_msgs::JointTrajectory &jointTrajectory)
 Converts a ROS JointTrajectory into an aikido's Spline trajectory. More...
 
std::unique_ptr< aikido::trajectory::SplinetoSplineJointTrajectory (const std::shared_ptr< aikido::statespace::dart::MetaSkeletonStateSpace > &space, const trajectory_msgs::JointTrajectory &jointTrajectory, const Eigen::VectorXd &startPositions)
 Converts a ROS JointTrajectory into an aikido's Spline trajectory. More...
 
trajectory_msgs::JointTrajectory toRosJointTrajectory (const aikido::trajectory::ConstTrajectoryPtr &trajectory, double timestep)
 Converts Aikido Trajectory to ROS JointTrajectory. More...
 
static std::vector< std::string > jointNamesFromDofs (const std::vector< dart::dynamics::DegreeOfFreedom * > &dofs)
 
template<class ActionSpec , class TimeoutDuration , class PeriodDuration >
bool waitForActionServer (actionlib::ActionClient< ActionSpec > &actionClient, ::ros::CallbackQueue &callbackQueue, TimeoutDuration timeoutDuration, PeriodDuration periodDuration)
 
static int intFromMode (hardware_interface::JointCommandModes mode)
 

Variables

constexpr int DEFAULT_CON_TIMEOUT_MS {1000}
 Default actionlib client connection timeout (ms) More...
 
constexpr int DEFAULT_POLL_PERIOD_MS {20}
 Default actionlib client polling period (ms) More...
 

Typedef Documentation

◆ RosJointEffortExecutor

◆ RosJointPositionExecutor

◆ RosJointVelocityExecutor

Function Documentation

◆ intFromMode()

static int aikido::control::ros::intFromMode ( hardware_interface::JointCommandModes  mode)
inlinestatic

◆ jointNamesFromDofs()

static std::vector<std::string> aikido::control::ros::jointNamesFromDofs ( const std::vector< dart::dynamics::DegreeOfFreedom * > &  dofs)
static

◆ toRosJointTrajectory()

trajectory_msgs::JointTrajectory aikido::control::ros::toRosJointTrajectory ( const aikido::trajectory::ConstTrajectoryPtr trajectory,
double  timestep 
)

Converts Aikido Trajectory to ROS JointTrajectory.

Supports only 1D RnJoints and SO2Joints.

Parameters
[in]trajectoryAikido trajectory to be converted.
[in]timestepTimestep between two consecutive waypoints.

◆ toSplineJointTrajectory() [1/2]

std::unique_ptr<aikido::trajectory::Spline> aikido::control::ros::toSplineJointTrajectory ( const std::shared_ptr< aikido::statespace::dart::MetaSkeletonStateSpace > &  space,
const trajectory_msgs::JointTrajectory &  jointTrajectory 
)

Converts a ROS JointTrajectory into an aikido's Spline trajectory.

This method only handles single-DOF joints.

Parameters
[in]spaceMetaSkeletonStateSpace for Spline trajectory. Subspaces must be either R1Joint or SO2Joint.
[in]jointTrajectoryROS JointTrajectory to be converted.
Returns
Spline trajectory.

◆ toSplineJointTrajectory() [2/2]

std::unique_ptr<aikido::trajectory::Spline> aikido::control::ros::toSplineJointTrajectory ( const std::shared_ptr< aikido::statespace::dart::MetaSkeletonStateSpace > &  space,
const trajectory_msgs::JointTrajectory &  jointTrajectory,
const Eigen::VectorXd &  startPositions 
)

Converts a ROS JointTrajectory into an aikido's Spline trajectory.

This method only handles single-DOF joints.

Parameters
[in]spaceMetaSkeletonStateSpace for Spline trajectory. Subspaces must be either R1Joint or SO2Joint.
[in]jointTrajectoryROS JointTrajectory to be converted.
[in]startPositionsIf empty, jointTrajectory must specify all joints in the space. If non-empty, jointTrajectory only needs to specify a subset of the joints in the space. The remaining unspecified joint positions are filled with the corresponding positions in startPositions, which must have the same size as the space. Velocities and accelerations are filled with zero.
Returns
Spline trajectory.

◆ waitForActionServer()

template<class ActionSpec , class TimeoutDuration , class PeriodDuration >
bool aikido::control::ros::waitForActionServer ( actionlib::ActionClient< ActionSpec > &  actionClient,
::ros::CallbackQueue &  callbackQueue,
TimeoutDuration  timeoutDuration,
PeriodDuration  periodDuration 
)

Variable Documentation

◆ DEFAULT_CON_TIMEOUT_MS

constexpr int aikido::control::ros::DEFAULT_CON_TIMEOUT_MS {1000}
constexpr

Default actionlib client connection timeout (ms)

◆ DEFAULT_POLL_PERIOD_MS

constexpr int aikido::control::ros::DEFAULT_POLL_PERIOD_MS {20}
constexpr

Default actionlib client polling period (ms)