unable to access members of control_msgs::FollowJointTrajectoryAction
I am trying to write a action client to send pose command to my dynamixal servo. Following the tutorial , I created a cpp version. I had issues in accessing the member attribute joint_names for control_msgs::FollowJointTrajectoryAction object and was given
error: ‘control_msgs::FollowJointTrajectoryAction’ has no member named ‘joint_names’
The documentation clearly shows the member attribute declared. I am really not sure what is causing the issue.
Below is a snippet of the code
actionlib::SimpleActionClient<control_msgs::FollowJointTrajectoryAction> ac("/left_arm_controller/follow_joint_trajectory/", true);
ROS_INFO("Waiting for action server to start.");
// wait for the action server to start
ac.waitForServer(); //will wait for infinite time
ROS_INFO("Action server started, sending goal.");
control_msgs::FollowJointTrajectoryAction goal;
goal.joint_names = {"Shoulder"};
trajectory_msgs::JointTrajectoryPoint point;
point.positions={5};
point.time_from_start=ros::Duration(5.0);
goal.desired = point;
ac.sendGoal(goal);