Aikido
|
This class uses actionlib to command an action of the type pr_control_msgs/JointModeCommandAction. More...
#include <aikido/control/ros/RosJointModeCommandClient.hpp>
Public Member Functions | |
RosJointModeCommandClient (const ::ros::NodeHandle &node, const std::string &serverName, const std::vector< std::string > jointNames, const std::chrono::milliseconds connectionTimeout=std::chrono::milliseconds{1000}, const std::chrono::milliseconds connectionPollingPeriod=std::chrono::milliseconds{20}) | |
Constructor. More... | |
virtual | ~RosJointModeCommandClient () |
std::future< int > | execute (const std::vector< hardware_interface::JointCommandModes > &goal) |
Send command to ROS server for execution. More... | |
void | step () |
void | cancel () |
Cancel current command. More... | |
Private Types | |
using | JointModeCommandActionClient = actionlib::ActionClient< pr_control_msgs::JointModeCommandAction > |
using | GoalHandle = JointModeCommandActionClient::GoalHandle |
Private Member Functions | |
void | transitionCallback (GoalHandle handle) |
Private Attributes | |
const ::ros::NodeHandle | mNode |
::ros::CallbackQueue | mCallbackQueue |
JointModeCommandActionClient | mClient |
JointModeCommandActionClient::GoalHandle | mGoalHandle |
std::vector< std::string > | mJointNames |
std::chrono::milliseconds | mConnectionTimeout |
std::chrono::milliseconds | mConnectionPollingPeriod |
bool | mInProgress |
std::unique_ptr< std::promise< int > > | mPromise |
std::mutex | mMutex |
Manages access to mInProgress, mPromise. More... | |
This class uses actionlib to command an action of the type pr_control_msgs/JointModeCommandAction.
It specifies a target joint mode command and sends it to the ROS server for setting
|
private |
|
private |
aikido::control::ros::RosJointModeCommandClient::RosJointModeCommandClient | ( | const ::ros::NodeHandle & | node, |
const std::string & | serverName, | ||
const std::vector< std::string > | jointNames, | ||
const std::chrono::milliseconds | connectionTimeout = std::chrono::milliseconds{1000} , |
||
const std::chrono::milliseconds | connectionPollingPeriod = std::chrono::milliseconds{20} |
||
) |
Constructor.
[in] | node | ROS node handle for action client. |
[in] | serverName | Name of the server to send mode target to. |
[in] | jointNames | The names of the joints to set mode targets for |
[in] | connectionTimeout | Timeout for server connection. |
[in] | connectionPollingPeriod | Polling period for server connection. |
|
virtual |
void aikido::control::ros::RosJointModeCommandClient::cancel | ( | ) |
Cancel current command.
Should trigger exception for active std::promise
std::future<int> aikido::control::ros::RosJointModeCommandClient::execute | ( | const std::vector< hardware_interface::JointCommandModes > & | goal | ) |
Send command to ROS server for execution.
[in] | goal | target joint command mode of target positions for each joint |
[in] | timeout | How long until command should expire |
void aikido::control::ros::RosJointModeCommandClient::step | ( | ) |
To be executed on a separate thread. Regularly checks for the completion of a sent command.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
Manages access to mInProgress, mPromise.
|
private |
|
private |