Aikido
aikido::control::ros Namespace Reference

Classes

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  RosPositionCommandExecutor
 This class uses actionlib to command an action of the type pr_control_msgs/SetPosition. 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...
 

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...
 
sensor_msgs::JointState positionsToJointState (const Eigen::VectorXd &goalPositions, const std::vector< std::string > &jointNames)
 Converts Eigen VectorXd and joint names to JointState. More...
 
template<class ActionSpec , class TimeoutDuration , class PeriodDuration >
bool waitForActionServer (actionlib::ActionClient< ActionSpec > &actionClient, ::ros::CallbackQueue &callbackQueue, TimeoutDuration timeoutDuration, PeriodDuration periodDuration)
 

Function Documentation

◆ positionsToJointState()

sensor_msgs::JointState aikido::control::ros::positionsToJointState ( const Eigen::VectorXd &  goalPositions,
const std::vector< std::string > &  jointNames 
)

Converts Eigen VectorXd and joint names to JointState.

Parameters
[in]goalPositionsThe required positions for the fingers
[in]jointNamesThe corresponding names of the joints
Returns
The JointState message object

◆ 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 
)