ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I have tried the following but I'm not getting any correct results so far:
tf::Vector3 fwd{1.0, 0.0, 0.0}; tf::Vector3 newFwd{(pointToHere - pointFromHere).normalized()}; tf::Vector3 ax{fwd.cross(newFwd)}; double alpha = acos(fwd.dot(newFwd)); tf::Quaternion newOrientation{ax, alpha}; newOrientation.normalize();
My idea is to construct the orientation with respect to my world frame, so all vectors I am using here have been appropriately transformed into my world coordinate system. My steps (as detailed in the code above) are as follows: 1. Get the new pointing direction via pointToHere-pointFromHere 2. Calculate the axis of rotation using the cross product of what I consider my old and new forward vector (which is the x-axis of my manipulator) 3. Get the corresponding angle using the dot product 4. Build the quaternion and normalize it
In most cases where I get a valid pose, the direction of my forward axis is actually completely wrong. It should be pointing the other way...
Any ideas on what I may be missing here?
2 | No.2 Revision |
I have tried the following but I'm not getting any correct results so far:
tf::Vector3 fwd{1.0, 0.0, 0.0};
tf::Vector3 newFwd{(pointToHere - pointFromHere).normalized()};
tf::Vector3 ax{fwd.cross(newFwd)};
double alpha = acos(fwd.dot(newFwd));
tf::Quaternion newOrientation{ax, alpha};
My idea is to construct the orientation with respect to my world frame, so all vectors I am using here have been appropriately transformed into my world coordinate system. My steps (as detailed in the code above) are as follows:
1. follows:
In most cases where I get a valid pose, the direction of my forward axis is actually completely wrong. It should be pointing the other way...
Any ideas on what I may be missing here?
3 | No.3 Revision |
I have tried the following but I'm not getting any correct results so far:
tf::Vector3 fwd{1.0, 0.0, 0.0};
tf::Vector3 newFwd{(pointToHere - pointFromHere).normalized()};
tf::Vector3 ax{fwd.cross(newFwd)};
double alpha = acos(fwd.dot(newFwd));
tf::Quaternion newOrientation{ax, newOrientation{ax.normazed(), alpha};
newOrientation.normalize();
My idea is to construct the orientation with respect to my world frame, so all vectors I am using here have been appropriately transformed into my world coordinate system. My steps (as detailed in the code above) are as follows:
In most cases where I get a valid pose, the direction of my forward axis is actually completely wrong. It should be pointing the other way...
Any ideas on what I may be missing here?
4 | No.4 Revision |
I have tried the following but I'm not getting any correct results so far:
tf::Vector3 fwd{1.0, 0.0, 0.0};
tf::Vector3 newFwd{(pointToHere - pointFromHere).normalized()};
tf::Vector3 ax{fwd.cross(newFwd)};
double alpha = acos(fwd.dot(newFwd));
tf::Quaternion newOrientation{ax.normazed(), alpha};
newOrientation.normalize();
My idea is to construct the orientation with respect to my world frame, so all vectors I am using here have been appropriately transformed into my world coordinate system. My steps (as detailed in the code above) are as follows:
In most cases where I get a valid pose, the direction of my forward axis is actually completely wrong. It should be pointing the other way...
Any ideas on what I may be missing here?
5 | No.5 Revision |
I have tried the following but I'm not getting any correct results so far:
tf::Vector3 fwd{1.0, 0.0, 0.0};
tf::Vector3 newFwd{(pointToHere - pointFromHere).normalized()};
tf::Vector3 ax{fwd.cross(newFwd)};
double alpha = acos(fwd.dot(newFwd));
tf::Quaternion newOrientation{ax.normazed(), newOrientation{ax.normalized(), alpha};
My idea is to construct the orientation with respect to my world frame, so all vectors I am using here have been appropriately transformed into my world coordinate system. My steps (as detailed in the code above) are as follows:
In most cases where I get a valid pose, the direction of my forward axis is actually completely wrong. It should be pointing the other way...
Any ideas on what I may be missing here?
6 | No.6 Revision |
I have tried the following but I'm not getting any correct results so far:
tf::Vector3 fwd{1.0, 0.0, 0.0};
tf::Vector3 newFwd{(pointToHere - pointFromHere).normalized()};
tf::Vector3 ax{fwd.cross(newFwd)};
double alpha = acos(fwd.dot(newFwd));
tf::Quaternion newOrientation{ax.normalized(), alpha};
My idea is to construct the orientation with respect to my world frame, so all vectors I am using here have been appropriately transformed into my world coordinate system. My steps (as detailed in the code above) are as follows:
In most cases where I get a valid pose, the direction of my forward axis is actually completely wrong. It should be pointing the other way...
Any ideas on what I may be missing here?