  Stable dynamical systems are a flexible tool to plan robotic motions in
real-time. In the robotic literature, dynamical system motions are typically
planned without considering possible limitations in the robot's workspace. This
work presents a novel approach to learn workspace constraints from human
demonstrations and to generate motion trajectories for the robot that lie in
the constrained workspace. Training data are incrementally clustered into
different linear subspaces and used to fit a low dimensional representation of
each subspace. By considering the learned constraint subspaces as zeroing
barrier functions, we are able to design a control input that keeps the system
trajectory within the learned bounds. This control input is effectively
combined with the original system dynamics preserving eventual asymptotic
properties of the unconstrained system. Simulations and experiments on a real
robot show the effectiveness of the proposed approach.
