Skip to content

Commit

Permalink
Added waitForServer to the joint trajectory controller action client
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Apr 20, 2021
1 parent d8190a0 commit 24bff74
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion play_motion/src/move_joint_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ namespace play_motion
controller_name_(controller_name),
joint_names_(joint_names),
client_(controller_name_ + "/follow_joint_trajectory", false)
{ }
{
//Wait for server
if(!client_.waitForServer(ros::Duration(0.5)))
{
ROS_ERROR_STREAM("Error connecting to the client : " << controller_name_ << "/follow_joint_trajectory !");
}
}

void MoveJointGroup::alCallback()
{
Expand Down

0 comments on commit 24bff74

Please sign in to comment.