ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Simple, but tricky error: You are using the vector's fill constructor here:
std::vector<double> a(3);
std::vector<double> b(3);
a and b will already be filled with zeros like this:
2 | No.2 Revision |
Simple, but tricky error: You are using the vector's fill constructor here:
std::vector<double> a(3);
std::vector<double> b(3);
a and b will already be filled with zeros like this:
a = [0 0 0]
b = [0 0 0]
with the command push_back
you'll add another three values:
a = [0 0 0 1 2 3]
b = [0 0 0 4 5 6]
but this values won't be used in the calculation on your server, since your loop only iterates over the first three elements.
So either don't fill your vector in the beginning or don't use push_back