  We address an optimal reachability problem for a planar manipulator in a
constrained environment. After introducing the optmization problem in full
generality, we practically embed the geometry of the workspace in the problem,
by considering some classes of obstacles. To this end, we present an analytical
approximation of the distance function from the ellipse. We then apply our
method to particular models of hyper-redundant and soft manipulators, by also
presenting some numerical experiments.
