function [ new_robots_pos ] = getRobotGoalPosition( x, positions )
%GETROBOTGOALPOSITION Calculate transformed positions of a robot based on
%their initial values and a goal state vector containing the transformation
%translation, scale and quaternion.

t = x(1:3);
s = x(4);
q = x(5:8);

f_robot_pos = positions;
new_robots_pos = [];
for i=1:size(f_robot_pos,1)
    new_robots_pos = [new_robots_pos, [t+[s*quatRotateVec(q',f_robot_pos(i,:)')']]'];
end
end

