We would like the robot's end-effector to stay inside a disk shaped region defined by its center $\nd x_c$:x_c
and its radius
$r$:param.radius
($\mathcal{C}_{\nd p}$) while respecting joint limits ($\mathcal{C}_{\nd q}$)
$\mathcal{C}_{\nd q}=\{\nd q| \text{lim}_{\text{lower}}\leq\nd q\leq \text{lim}_{\text{upper}}\}$
$\mathcal{C}_{\nd p}=\{\nd p| \norm{\nd x-\nd x_c}_2^2 \leq r^2\}$
\begin{equation*} \begin{array}{rll} \min_{\nd q, \nd p} & \norm{\nd q - \nd q_0}_2^2\\ \st & \nd f(\nd q) - \nd p = \nd 0, \\ & \nd q \in \mathcal{C}_{\nd q}, \\ & \nd p \in \mathcal{C}_{\nd p}, \end{array} \end{equation*}
We would like the robot's end-effector to stay mode
:inside/boundary/outside a rectangular region defined by its center $\nd x_c$:x_c
and its size $[L_x, L_y]$:param.size
($\mathcal{C}_{\nd p}$) while respecting joint limits ($\mathcal{C}_{\nd q}$)
$\mathcal{C}_{\nd q}=\{\nd q| \text{lim}_{\text{lower}}\leq\nd q\leq \text{lim}_{\text{upper}}\}$
$\mathcal{C}_{\nd p}=\{\nd p| \norm{\nd W(\nd x-\nd x_c)}_{\infty} \leq 0.5L_x\}$
$\nd W = \text{diag}(1., L_x/L_y)$
\begin{equation*} \begin{array}{rll} \min_{\nd q, \nd p} & \norm{\nd q - \nd q_0}_2^2\\ \st & \nd f(\nd q) - \nd p = \nd 0, \\ & \nd q \in \mathcal{C}_{\nd q}, \\ & \nd p \in \mathcal{C}_{\nd p}, \end{array} \end{equation*}
We would like the robot's end-effector to stay on a line defined by its slope $\nd a$:a
and passing through the origin
($\mathcal{C}_{\nd p}$) while respecting joint limits ($\mathcal{C}_{\nd q}$)
$\mathcal{C}_{\nd q}=\{\nd q| \text{lim}_{\text{lower}}\leq\nd q\leq \text{lim}_{\text{upper}}\}$
$\mathcal{C}_{\nd p}=\{\nd p| \nd a^\trsp \nd x = 0\}$
\begin{equation*} \begin{array}{rll} \min_{\nd q, \nd p} & \norm{\nd q - \nd q_0}_2^2\\ \st & \nd f(\nd q) - \nd p = \nd 0, \\ & \nd q \in \mathcal{C}_{\nd q}, \\ & \nd p \in \mathcal{C}_{\nd p}, \end{array} \end{equation*}
(press shift+enter or click on the green run button to run the code; objects and joints can be moved with the mouse)