Public Member Functions | Private Member Functions | Private Attributes | List of all members
exotica::AvoidLookAtSphere Class Reference

Avoids pointing end-effector at a given spherical object. More...

#include <avoid_look_at_sphere.h>

Inheritance diagram for exotica::AvoidLookAtSphere:
Inheritance graph
[legend]

Public Member Functions

void Instantiate (const AvoidLookAtSphereInitializer &init) override
 
int TaskSpaceDim () override
 
void Update (Eigen::VectorXdRefConst x, Eigen::VectorXdRef phi) override
 
void Update (Eigen::VectorXdRefConst x, Eigen::VectorXdRef phi, Eigen::MatrixXdRef jacobian) override
 
- Public Member Functions inherited from exotica::TaskMap
virtual void AssignScene (ScenePtr scene)
 
std::vector< KinematicFrameRequestGetFrames () const
 
virtual std::vector< TaskVectorEntryGetLieGroupIndices ()
 
virtual void InstantiateBase (const Initializer &init)
 
virtual void PreUpdate ()
 
virtual int TaskSpaceJacobianDim ()
 
virtual void Update (Eigen::VectorXdRefConst x, Eigen::VectorXdRefConst u, Eigen::VectorXdRef phi, Eigen::MatrixXdRef dphi_dx, Eigen::MatrixXdRef dphi_du)
 
virtual void Update (Eigen::VectorXdRefConst x, Eigen::VectorXdRefConst u, Eigen::VectorXdRef phi)
 
virtual void Update (Eigen::VectorXdRefConst x, Eigen::VectorXdRefConst u, Eigen::VectorXdRef phi, Eigen::MatrixXdRef dphi_dx, Eigen::MatrixXdRef dphi_du, HessianRef ddphi_ddx, HessianRef ddphi_ddu, HessianRef ddphi_dxdu)
 
virtual void Update (Eigen::VectorXdRefConst q, Eigen::VectorXdRef phi, Eigen::MatrixXdRef jacobian, HessianRef hessian)
 
- Public Member Functions inherited from exotica::Object
std::string GetObjectName ()
 
void InstantiateObject (const Initializer &init)
 
 Object ()
 
virtual std::string Print (const std::string &prepend) const
 
virtual std::string type () const
 
virtual ~Object ()
 
- Public Member Functions inherited from exotica::InstantiableBase
 InstantiableBase ()=default
 
virtual ~InstantiableBase ()=default
 
- Public Member Functions inherited from exotica::Instantiable< AvoidLookAtSphereInitializer >
std::vector< InitializerGetAllTemplates () const override
 
Initializer GetInitializerTemplate () override
 
const AvoidLookAtSphereInitializer & GetParameters () const
 
void InstantiateInternal (const Initializer &init) override
 

Private Member Functions

void PublishObjectsAsMarkerArray ()
 
void UpdateAsCostWithJacobian (Eigen::VectorXdRefConst x, Eigen::VectorXdRef phi, Eigen::MatrixXdRef jacobian)
 
void UpdateAsCostWithoutJacobian (Eigen::VectorXdRefConst x, Eigen::VectorXdRef phi)
 
void UpdateAsInequalityConstraintWithJacobian (Eigen::VectorXdRefConst x, Eigen::VectorXdRef phi, Eigen::MatrixXdRef jacobian)
 
void UpdateAsInequalityConstraintWithoutJacobian (Eigen::VectorXdRefConst x, Eigen::VectorXdRef phi)
 

Private Attributes

Eigen::VectorXd diameter_
 The diameter of each object. More...
 
int n_objects_
 Number of spherical objects. More...
 
ros::Publisher pub_markers_
 publish marker for RViz More...
 
Eigen::VectorXd radii_squared_
 The square of each object radii. More...
 
void(AvoidLookAtSphere::* UpdateTaskMapWithJacobian )(Eigen::VectorXdRefConst, Eigen::VectorXdRef, Eigen::MatrixXdRef)
 
void(AvoidLookAtSphere::* UpdateTaskMapWithoutJacobian )(Eigen::VectorXdRefConst, Eigen::VectorXdRef)
 

Additional Inherited Members

- Public Attributes inherited from exotica::TaskMap
int id
 
bool is_used
 
std::vector< KinematicSolutionkinematics
 
int length
 
int length_jacobian
 
int start
 
int start_jacobian
 
- Public Attributes inherited from exotica::Object
bool debug_
 
std::string ns_
 
std::string object_name_
 
- Protected Attributes inherited from exotica::TaskMap
std::vector< KinematicFrameRequestframes_
 
ScenePtr scene_
 
- Protected Attributes inherited from exotica::Instantiable< AvoidLookAtSphereInitializer >
AvoidLookAtSphereInitializer parameters_
 

Detailed Description

Avoids pointing end-effector at a given spherical object.

This task map avoids pointing the end-effector a number of given spherical objects. AvoidLookAtSphere can be used as either a cost term or an inequality constraint. Each spherical object in the scene is defined by a position $o\in\mathbb{R}^3$ and radius $0<r\in\mathbb{R}$. The position and radii of each object must be given.

When using AvoidLookAtSphere as a cost term, the forward mapping defining the task map is expressed by

\[ \Phi_i(x) := \begin{cases}(1 - \frac{d_i^2}{r_i^2})^2 & d_i<r_i\\0 & \text{otherwise}\end{cases} \]

for all $i=1{:}N$ where $N$ is the number of objects, $d$ is the orthogonal distance between the object center and the end-effector approach vector.

When using AvoidLookAtSphere as an inequality constraint, the forward mapping defining the task map is expressed by

\[ \Phi_i(x) = r_i^2 - d_i^2 \]

for all $i=1{:}N$.

taskmap_avoid_look_at_sphere.png
AvoidLookAtSphere task map.

Definition at line 62 of file avoid_look_at_sphere.h.

Member Function Documentation

void exotica::AvoidLookAtSphere::Instantiate ( const AvoidLookAtSphereInitializer &  init)
overridevirtual
void exotica::AvoidLookAtSphere::PublishObjectsAsMarkerArray ( )
private

Definition at line 88 of file avoid_look_at_sphere.cpp.

int exotica::AvoidLookAtSphere::TaskSpaceDim ( )
overridevirtual

Implements exotica::TaskMap.

Definition at line 167 of file avoid_look_at_sphere.cpp.

void exotica::AvoidLookAtSphere::Update ( Eigen::VectorXdRefConst  x,
Eigen::VectorXdRef  phi 
)
overridevirtual

Implements exotica::TaskMap.

Definition at line 119 of file avoid_look_at_sphere.cpp.

void exotica::AvoidLookAtSphere::Update ( Eigen::VectorXdRefConst  x,
Eigen::VectorXdRef  phi,
Eigen::MatrixXdRef  jacobian 
)
overridevirtual

Reimplemented from exotica::TaskMap.

Definition at line 125 of file avoid_look_at_sphere.cpp.

void exotica::AvoidLookAtSphere::UpdateAsCostWithJacobian ( Eigen::VectorXdRefConst  x,
Eigen::VectorXdRef  phi,
Eigen::MatrixXdRef  jacobian 
)
private

Definition at line 58 of file avoid_look_at_sphere.cpp.

void exotica::AvoidLookAtSphere::UpdateAsCostWithoutJacobian ( Eigen::VectorXdRefConst  x,
Eigen::VectorXdRef  phi 
)
private

Definition at line 37 of file avoid_look_at_sphere.cpp.

void exotica::AvoidLookAtSphere::UpdateAsInequalityConstraintWithJacobian ( Eigen::VectorXdRefConst  x,
Eigen::VectorXdRef  phi,
Eigen::MatrixXdRef  jacobian 
)
private

Definition at line 77 of file avoid_look_at_sphere.cpp.

void exotica::AvoidLookAtSphere::UpdateAsInequalityConstraintWithoutJacobian ( Eigen::VectorXdRefConst  x,
Eigen::VectorXdRef  phi 
)
private

Definition at line 53 of file avoid_look_at_sphere.cpp.

Member Data Documentation

Eigen::VectorXd exotica::AvoidLookAtSphere::diameter_
private

The diameter of each object.

Definition at line 81 of file avoid_look_at_sphere.h.

int exotica::AvoidLookAtSphere::n_objects_
private

Number of spherical objects.

Definition at line 80 of file avoid_look_at_sphere.h.

ros::Publisher exotica::AvoidLookAtSphere::pub_markers_
private

publish marker for RViz

Definition at line 83 of file avoid_look_at_sphere.h.

Eigen::VectorXd exotica::AvoidLookAtSphere::radii_squared_
private

The square of each object radii.

Definition at line 82 of file avoid_look_at_sphere.h.

void(AvoidLookAtSphere::* exotica::AvoidLookAtSphere::UpdateTaskMapWithJacobian) (Eigen::VectorXdRefConst, Eigen::VectorXdRef, Eigen::MatrixXdRef)
private

Definition at line 79 of file avoid_look_at_sphere.h.

void(AvoidLookAtSphere::* exotica::AvoidLookAtSphere::UpdateTaskMapWithoutJacobian) (Eigen::VectorXdRefConst, Eigen::VectorXdRef)
private

Definition at line 78 of file avoid_look_at_sphere.h.


The documentation for this class was generated from the following files:


exotica_core_task_maps
Author(s): Yiming Yang, Michael Camilleri
autogenerated on Sat Apr 10 2021 02:36:09