You should do something like this:
Code:
// Calculate all available solutions:
tJoints joints = ROBOT->Joints();
QList joints_list = ROBOT->SolveIK_All(ROBOT->SolveFK(joints));
// Iterate over all available solutions:
for (int i=0; i// Choose your preferred robot joints
tConfig jnts_config;
ROBOT->JointsConfig(joints_list[i], jnts_config);
}
// Set your preferred/optimal robot joints:
ROBOT->setJoints(new_joints);