Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I just solved it by some coding I get the current state of joints and copy them to a variable, and then just edit the needed joint only.

here is the code

std::vector<double> x;
group.getCurrentState() ->copyJointGroupPositions(group.getCurrentState() ->getRobotModel() ->getJointModelGroup(group.getName()), x);
x[/joint number/]=/value/;

The code is available in ROS book chapter 6 6.2 Planning to a joint goal