Ask Your Question

unable to access members of control_msgs::FollowJointTrajectoryAction

asked 2015-10-06 03:48:16 -0600

zenifed gravatar image

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;

goal.desired = point;

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2015-10-06 04:27:46 -0600

zenifed gravatar image

it seems that I have misunderstood the .action file to be like message definition. Reading the documentation , it will seem that the action file will generate 3 message object

  • FollowJointTrajectoryGoal
  • FollowJointTrajectoryResult
  • FollowJointTrajectoryFeedBack

each for the different action state.

The objectType FollowJointTrajectoryGoal will be used to send the goals.

Will test this out and update the result.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-10-06 03:48:16 -0600

Seen: 590 times

Last updated: Oct 06 '15