ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

unable to access members of control_msgs::FollowJointTrajectoryAction

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

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;
point.positions={5};
point.time_from_start=ros::Duration(5.0);

goal.desired = point;

ac.sendGoal(goal);
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

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

zenifed gravatar image

it seems that I have misunderstood the .action file to be like message definition. Reading the http://wiki.ros.org/actionlib 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

Question Tools

1 follower

Stats

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

Seen: 893 times

Last updated: Oct 06 '15