Q:

Controlling the pose of a manipulator using inverse kinematics

I want to control a robotic manipulator in Cartesian space, using inverse kinematics. I know that I can do this using $\omega=J^{-1}v$, where $\omega$ is a vector of joint velocities, $J$ is the Jacobian, and $v$ is a vector of {position, orientation} velocities in Cartesian space. Here, the Jacobian expresses how the Cartesian {positions, orientations} change with respect to the joint angles.
My question is as follows. What I have, is two poses of the manipulator in Cartesian space, pose $A$ and pose $B$. And I want to move the manipulator from $A$ to $B$. How do I create the vector $v$ needed for the above inverse kinematics equation?
I am confused, because currently $A$ and $B$ are transformation matrices, expressing the pose of the manipulator in the fixed world coordinates. So, somehow I need to find the difference between the two poses, and then I need to convert this "difference" into the velocity vector $v$. Can anybody help me out please?

A:

As you already have the Jacobian vector, I assume you also solved the inverse kinematics problem. I will refer to the IK problem as $f^{-1}$
In order to get the joint space equivalent of the Cartesian pose A (position and orientation, denoted as $X_A$) you can use the inverse kinematics:
$$Q_A = f^{-1}(X_A) $$
similarly
$$Q_B = f^{-1}(X_B) $$
(Please note that in most cases the IK has more then one solutions, I am just considering one, pre-selected solution here.)
Now if you give the motors the reference position $Q_A$ or $Q_B$ "eventually" you will end up in pose $A$ and in pose $B$. In this case there are no guaranties that the motors will have the same travel time and there are no guarantees about the "shape" of the path the robot will take. 
You can define a straight line between $A$ and $B$ and interpolate between these points on this straight line. In this case there are solutions for an equivalent interpolation technique for the orientation also. For each of the Cartesian interpolated points you can calculate the joint space equivalent and use them as reference positions for the robot. In this case you will have a straight line path in joint space, but the path will very likely have an oscillating velocity profile as the distance to each point will eventually (in the closed loop position controller) will define the implicit velocity profile. 
This can be done using IK only. If you prefer to use the $J^{-1}$ you can subtract the current pose of the robot from your target pose.
$$ D = X_B - X_{Current}$$
If we consider D a velocity vector, we can interpret it as the velocity needed to reach point B in unit time. If we are talking about millimetre and seconds, then it is mm/s.
$$\omega = J^{-1} \times D $$
 If you give this as a constant reference velocity to the robot it will travel in the direction of B and then surpass B and continue. If you cyclically re-evaluate $D$ using the current position it will slow down the robot until eventually almost reaching point $B$. You can add a multiplication factor to this equation and if it is cyclically evaluated with the updated robot positions you will have the effect of a proportional velocity controller. But the velocity profile obtained this way will still be an implicit profile, which slows down towards the end of the path (only) linearly and tries to start with a high velocity.
In order to have a more controlled velocity profile and a straight line you can design an explicit velocity profile. This is called trajectory planning and, most commonly uses an S shaped curve. More about this here.
If you define a velocity profile in Cartesian space (or Task space if we consider pose not just position) at each point in time you can evaluate the velocity profile function at one given point. This is your $v$ vector. You will need the Cartesian position or the joint space position, depending on how you derive your $J^{-1}$ it is usually $(J(Q))^{-1}$ or $J^{-1}(X)$. (One could argue that $(J(Q))^{-1}$ is more helpful as it can use the current joint space coordinates to convert the velocity vector.). To summarize: you define a path in Task space, you plan a velocity profile and you convert this velocity profile, based on the current time step and current robot pose to obtain a new velocity vector in joint space which is given to the velocity controller as a reference value. 

