For any control problem, attacking the mathematical model of the system is your first goal.
Here, we have a cart that has one degree of freedom. Let's call the position of the cart \$x\$. In addition, you've identified the velocity (\$v = \dot{x}\$) as an important variable.
The only relevant physical law here is Newton's 3rd: \$F = m a = m \ddot{x}\$. What forces are applied to the cart in the \$x\$-axis? I assume there's a motor. Disregarding things like slippage, we might model the wheels to be linear with respect to the input current \$F_w = k_e i\$. Assume that we care about drag, which is proportional to speed: \$F_d = k_d v\$, so \$F = F_w - F_d\$.
Model: As is usual, we try to form a linear model of the form \$\dot{\mathbf{x}}=A\mathbf{x}+B\mathbf{u}\$: $$a = \ddot{x} = \frac{d}{dt}\dot{x} = \frac{1}{M}F = \frac{k_e}{M} i - \frac{k_d}{M} \dot{x} \\
v = \frac{d}{dt}x = \dot{x}$$
Or, by setting our state vector to \$\mathbf{x} = [\dot{x},x]^T\$, we get:
$$
\dot{\mathbf{x}}=\frac{d}{dt}\pmatrix{\dot{x}\\x}=\pmatrix{-k_d/M & 0\\1 & 0}\pmatrix{\dot{x}\\x}+\pmatrix{k_e/M\\0}i=A\mathbf{x}+Bi$$
So, the position and the velocity is our state vector (the system output). The current \$i\$ is our system input (the only way we can affect the system).
Assume that we can measure the position by a voltage signal, so that 5V corresponds to 50cm, or: \$v_m = \frac{x_m}{50\text{cm}}5\text{V} = (0.1\ \text{V/cm}) x_m\ = k_m x_m\$. So, our measurement is \$x_m = v_m / k_m\$.
Finally, the control input is the difference between our measurement \$x_m\$ and the reference signal \$x_r\$.
As to your question, both position and velocity could be controlled variables. To take velocity into account, all you need is a way of measuring (or estimating) it. (We write \$\mathbf{y} = D\mathbf{x}\$ for that connection.) Either way, the only input to the system is the engine current, which again affects both position and velocity of the system.
To summarize:
Model: $$\dot{\mathbf{x}} = A\mathbf{x} + B\mathbf{u}$$
Measurements: $$\mathbf{y} = D\mathbf{x}$$
Error: $$\mathbf{e} = \mathbf{r} - \mathbf{y}$$
Control: $$\mathbf{u} = C\mathbf{e}$$