Constraint to avoid obstacles. More...
#include <avoid_obstacles.h>
Classes | |
struct | AvoidObstaclesData |
This structure stores constraint data. More... | |
struct | LinkAvoidance |
Link avoidance data for a single link. More... | |
Public Member Functions | |
virtual void | addAvoidanceLink (const std::string &link_name) |
Adds an obstacle avoidance link. | |
virtual Eigen::VectorXd | calcError (const AvoidObstaclesData &cdata, const LinkAvoidance &link) const |
Creates vector representing velocity error term corresponding to calcJacobian() | |
virtual Eigen::MatrixXd | calcJacobian (const AvoidObstaclesData &cdata, const LinkAvoidance &link) const |
Creates Jacobian for avoiding a collision with link closest to a collision. | |
virtual bool | checkStatus (const AvoidObstaclesData &cdata, const LinkAvoidance &link) const |
Checks termination criteria There are no termination criteria for this constraint. | |
constrained_ik::ConstraintResults | evalConstraint (const SolverState &state) const override |
see base class for documentation | |
virtual double | getAmplitude (const std::string &link_name) const |
getter for link amplitude | |
virtual double | getAvoidanceDistance (const std::string &link_name) const |
getter for link avoidance distance | |
virtual std::vector< std::string > | getAvoidanceLinkNames () const |
getter for obstacle avoidance links | |
virtual double | getMinDistance (const std::string &link_name) const |
getter for link min_distance_ | |
virtual double | getWeight (const std::string &link_name) const |
getter for link weight_ | |
void | init (const Constrained_IK *ik) override |
Initialize constraint (overrides Constraint::init) Should be called before using class. | |
void | loadParameters (const XmlRpc::XmlRpcValue &constraint_xml) override |
see base class for documentation | |
virtual void | setAmplitude (const std::string &link_name, const double &litude) |
setter for link amplitude | |
virtual void | setAvoidanceDistance (const std::string &link_name, const double &avoidance_distance) |
setter for link avoidance distance | |
virtual void | setAvoidanceLinks (const std::vector< std::string > &link_names) |
setter for obstacle avoidance links | |
virtual void | setMinDistance (const std::string &link_name, const double &min_distance) |
setter for link min_distance_ | |
virtual void | setWeight (const std::string &link_name, const double &weight) |
setter for link weight_ | |
virtual void | updateDistanceThreshold () |
This updates the maximum distance threshold. | |
Protected Member Functions | |
LinkAvoidance * | getLinkData (const std::string link_name) |
Get a links avoidance data. | |
const LinkAvoidance *const | getLinkData (const std::string link_name) const |
Get a links avoidance data. | |
Protected Attributes | |
double | distance_threshold_ |
a distance threshold used to speed up distance queries | |
std::set< const robot_model::LinkModel * > | link_models_ |
a set of LinkModel for each link in link_names_ | |
std::vector< std::string > | link_names_ |
list of links that should avoid obstacles | |
std::map< std::string, LinkAvoidance > | links_ |
map from link name to its avoidance data |
Constraint to avoid obstacles.
Definition at line 50 of file avoid_obstacles.h.
virtual void constrained_ik::constraints::AvoidObstacles::addAvoidanceLink | ( | const std::string & | link_name | ) | [inline, virtual] |
Adds an obstacle avoidance link.
link_name | Name of link to add to link_names_ |
Definition at line 318 of file avoid_obstacles.h.
VectorXd constrained_ik::constraints::AvoidObstacles::calcError | ( | const AvoidObstaclesData & | cdata, |
const LinkAvoidance & | link | ||
) | const [virtual] |
Creates vector representing velocity error term corresponding to calcJacobian()
cdata | The constraint specific data. |
link | The link to process |
Definition at line 202 of file avoid_obstacles.cpp.
MatrixXd constrained_ik::constraints::AvoidObstacles::calcJacobian | ( | const AvoidObstaclesData & | cdata, |
const LinkAvoidance & | link | ||
) | const [virtual] |
Creates Jacobian for avoiding a collision with link closest to a collision.
cdata | The constraint specific data. |
link | The link to process |
Definition at line 223 of file avoid_obstacles.cpp.
bool constrained_ik::constraints::AvoidObstacles::checkStatus | ( | const AvoidObstaclesData & | cdata, |
const LinkAvoidance & | link | ||
) | const [virtual] |
Checks termination criteria There are no termination criteria for this constraint.
cdata | The constraint specific data. |
link | The link to process |
Definition at line 258 of file avoid_obstacles.cpp.
virtual double constrained_ik::constraints::AvoidObstacles::getAmplitude | ( | const std::string & | link_name | ) | const [inline, virtual] |
getter for link amplitude
link_name | Name of link to get amplitude data |
Definition at line 239 of file avoid_obstacles.h.
virtual double constrained_ik::constraints::AvoidObstacles::getAvoidanceDistance | ( | const std::string & | link_name | ) | const [inline, virtual] |
getter for link avoidance distance
link_name | Name of link to get avoidance distance data |
Definition at line 265 of file avoid_obstacles.h.
virtual std::vector<std::string> constrained_ik::constraints::AvoidObstacles::getAvoidanceLinkNames | ( | ) | const [inline, virtual] |
getter for obstacle avoidance links
Definition at line 293 of file avoid_obstacles.h.
LinkAvoidance* constrained_ik::constraints::AvoidObstacles::getLinkData | ( | const std::string | link_name | ) | [inline, protected] |
Get a links avoidance data.
link_name | name of the link |
Definition at line 91 of file avoid_obstacles.h.
const LinkAvoidance* const constrained_ik::constraints::AvoidObstacles::getLinkData | ( | const std::string | link_name | ) | const [inline, protected] |
Get a links avoidance data.
link_name | name of the link |
Definition at line 111 of file avoid_obstacles.h.
virtual double constrained_ik::constraints::AvoidObstacles::getMinDistance | ( | const std::string & | link_name | ) | const [inline, virtual] |
getter for link min_distance_
link_name | Name of link to get min_distance_ |
Definition at line 213 of file avoid_obstacles.h.
virtual double constrained_ik::constraints::AvoidObstacles::getWeight | ( | const std::string & | link_name | ) | const [inline, virtual] |
getter for link weight_
link_name | Name of link to get weight_ |
Definition at line 187 of file avoid_obstacles.h.
void constrained_ik::constraints::AvoidObstacles::init | ( | const Constrained_IK * | ik | ) | [override, virtual] |
Initialize constraint (overrides Constraint::init) Should be called before using class.
ik | Pointer to Constrained_IK used for base-class init |
Reimplemented from constrained_ik::Constraint.
Definition at line 59 of file avoid_obstacles.cpp.
virtual void constrained_ik::constraints::AvoidObstacles::setAmplitude | ( | const std::string & | link_name, |
const double & | amplitude | ||
) | [inline, virtual] |
setter for link amplitude
link_name | Name of link to set amplitude_ |
amplitude | Value to set amplitude_ to |
Definition at line 253 of file avoid_obstacles.h.
virtual void constrained_ik::constraints::AvoidObstacles::setAvoidanceDistance | ( | const std::string & | link_name, |
const double & | avoidance_distance | ||
) | [inline, virtual] |
setter for link avoidance distance
link_name | Name of link to set avoidance_distance_ |
avoidance_distance | Value to set avoidance_distance_ to |
Definition at line 279 of file avoid_obstacles.h.
virtual void constrained_ik::constraints::AvoidObstacles::setAvoidanceLinks | ( | const std::vector< std::string > & | link_names | ) | [inline, virtual] |
setter for obstacle avoidance links
link_names | List of link names to set link_names_ |
Definition at line 302 of file avoid_obstacles.h.
virtual void constrained_ik::constraints::AvoidObstacles::setMinDistance | ( | const std::string & | link_name, |
const double & | min_distance | ||
) | [inline, virtual] |
setter for link min_distance_
link_name | Name of link to set min_distance_ |
min_distance | Value to set min_distance_ to |
Definition at line 227 of file avoid_obstacles.h.
virtual void constrained_ik::constraints::AvoidObstacles::setWeight | ( | const std::string & | link_name, |
const double & | weight | ||
) | [inline, virtual] |
setter for link weight_
link_name | Name of link to set weight_ |
weight | Value to set weight_ to |
Definition at line 201 of file avoid_obstacles.h.