#include <chomp_collision_space.h>
Public Member Functions | |
ChompCollisionSpace () | |
template<typename Derived , typename DerivedOther > | |
bool | getCollisionPointPotentialGradient (const ChompCollisionPoint &collision_point, const Eigen::MatrixBase< Derived > &collision_point_pos, double &potential, Eigen::MatrixBase< DerivedOther > &gradient) const |
double | getDistanceGradient (double x, double y, double z, double &gradient_x, double &gradient_y, double &gradient_z) const |
void | gridToWorld (btVector3 origin, int gx, int gy, int gz, double &wx, double &wy, double &wz) const |
Convert from voxel grid coordinates to world coordinates. | |
bool | init (planning_environment::CollisionSpaceMonitor *monitor_, double max_radius_clearance, std::string &reference_frame) |
Callback for CollisionMap messages. | |
void | lock () |
Lock the collision space from updating/reading. | |
void | setStartState (const ChompRobotModel::ChompPlanningGroup &planning_group, const motion_planning_msgs::RobotState &robot_state) |
void | unlock () |
Unlock the collision space for updating/reading. | |
void | worldToGrid (btVector3 origin, double wx, double wy, double wz, int &gx, int &gy, int &gz) const |
virtual | ~ChompCollisionSpace () |
Private Member Functions | |
void | addAllBodiesButExcludeLinksToPoints (std::string group_name, std::vector< btVector3 > &body_points) |
void | addBodiesInGroupToPoints (const std::string &group, std::vector< btVector3 > &voxels) |
void | addCollisionCuboid (const std::string param_name) |
void | addCollisionObjectsToPoints (std::vector< btVector3 > &points, const btTransform &cur) |
double | dist (const btVector3 &v0, const btVector3 &v1) |
void | getVoxelsInBody (const bodies::Body &body, std::vector< btVector3 > &voxels) |
void | initCollisionCuboids () |
std::vector< btVector3 > | interpolateTriangle (btVector3 v0, btVector3 v1, btVector3 v2, double min_res) |
void | loadRobotBodies () |
void | updateRobotBodiesPoses (const planning_models::KinematicState &state) |
Private Attributes | |
planning_environment::CollisionModels * | collision_models_ |
std::vector< btVector3 > | cuboid_points_ |
std::map< std::string, std::vector< std::string > > | distance_exclude_links_ |
distance_field::PropagationDistanceField * | distance_field_ |
std::map< std::string, std::vector< std::string > > | distance_include_links_ |
double | field_bias_x_ |
double | field_bias_y_ |
double | field_bias_z_ |
double | max_expansion_ |
planning_environment::CollisionSpaceMonitor * | monitor_ |
boost::mutex | mutex_ |
ros::NodeHandle | node_handle_ |
std::map< std::string, std::vector< bodies::Body * > > | planning_group_bodies_ |
std::map< std::string, std::vector< std::string > > | planning_group_link_names_ |
std::string | reference_frame_ |
double | resolution_ |
ros::NodeHandle | root_handle_ |
Definition at line 54 of file chomp_collision_space.h.
chomp::ChompCollisionSpace::ChompCollisionSpace | ( | ) |
Definition at line 41 of file chomp_collision_space.cpp.
chomp::ChompCollisionSpace::~ChompCollisionSpace | ( | ) | [virtual] |
Definition at line 47 of file chomp_collision_space.cpp.
void chomp::ChompCollisionSpace::addAllBodiesButExcludeLinksToPoints | ( | std::string | group_name, | |
std::vector< btVector3 > & | body_points | |||
) | [private] |
Definition at line 577 of file chomp_collision_space.cpp.
void chomp::ChompCollisionSpace::addBodiesInGroupToPoints | ( | const std::string & | group, | |
std::vector< btVector3 > & | voxels | |||
) | [private] |
Definition at line 549 of file chomp_collision_space.cpp.
void chomp::ChompCollisionSpace::addCollisionCuboid | ( | const std::string | param_name | ) | [private] |
Definition at line 479 of file chomp_collision_space.cpp.
void chomp::ChompCollisionSpace::addCollisionObjectsToPoints | ( | std::vector< btVector3 > & | points, | |
const btTransform & | cur | |||
) | [private] |
Definition at line 212 of file chomp_collision_space.cpp.
double chomp::ChompCollisionSpace::dist | ( | const btVector3 & | v0, | |
const btVector3 & | v1 | |||
) | [inline, private] |
Definition at line 124 of file chomp_collision_space.h.
bool chomp::ChompCollisionSpace::getCollisionPointPotentialGradient | ( | const ChompCollisionPoint & | collision_point, | |
const Eigen::MatrixBase< Derived > & | collision_point_pos, | |||
double & | potential, | |||
Eigen::MatrixBase< DerivedOther > & | gradient | |||
) | const [inline] |
Definition at line 194 of file chomp_collision_space.h.
double chomp::ChompCollisionSpace::getDistanceGradient | ( | double | x, | |
double | y, | |||
double | z, | |||
double & | gradient_x, | |||
double & | gradient_y, | |||
double & | gradient_z | |||
) | const [inline] |
Definition at line 187 of file chomp_collision_space.h.
void chomp::ChompCollisionSpace::getVoxelsInBody | ( | const bodies::Body & | body, | |
std::vector< btVector3 > & | voxels | |||
) | [private] |
Definition at line 613 of file chomp_collision_space.cpp.
void chomp::ChompCollisionSpace::gridToWorld | ( | btVector3 | origin, | |
int | gx, | |||
int | gy, | |||
int | gz, | |||
double & | wx, | |||
double & | wy, | |||
double & | wz | |||
) | const [inline] |
Convert from voxel grid coordinates to world coordinates.
Definition at line 237 of file chomp_collision_space.h.
bool chomp::ChompCollisionSpace::init | ( | planning_environment::CollisionSpaceMonitor * | monitor_, | |
double | max_radius_clearance, | |||
std::string & | reference_frame | |||
) |
Callback for CollisionMap messages.
Initializes the collision space, listens for messages, etc
Definition at line 57 of file chomp_collision_space.cpp.
void chomp::ChompCollisionSpace::initCollisionCuboids | ( | ) | [private] |
Definition at line 468 of file chomp_collision_space.cpp.
std::vector<btVector3> chomp::ChompCollisionSpace::interpolateTriangle | ( | btVector3 | v0, | |
btVector3 | v1, | |||
btVector3 | v2, | |||
double | min_res | |||
) | [private] |
void chomp::ChompCollisionSpace::loadRobotBodies | ( | ) | [private] |
Definition at line 511 of file chomp_collision_space.cpp.
void chomp::ChompCollisionSpace::lock | ( | ) | [inline] |
Lock the collision space from updating/reading.
Definition at line 177 of file chomp_collision_space.h.
void chomp::ChompCollisionSpace::setStartState | ( | const ChompRobotModel::ChompPlanningGroup & | planning_group, | |
const motion_planning_msgs::RobotState & | robot_state | |||
) |
Definition at line 167 of file chomp_collision_space.cpp.
void chomp::ChompCollisionSpace::unlock | ( | ) | [inline] |
Unlock the collision space for updating/reading.
Definition at line 182 of file chomp_collision_space.h.
void chomp::ChompCollisionSpace::updateRobotBodiesPoses | ( | const planning_models::KinematicState & | state | ) | [private] |
Definition at line 538 of file chomp_collision_space.cpp.
void chomp::ChompCollisionSpace::worldToGrid | ( | btVector3 | origin, | |
double | wx, | |||
double | wy, | |||
double | wz, | |||
int & | gx, | |||
int & | gy, | |||
int & | gz | |||
) | const [inline] |
Definition at line 230 of file chomp_collision_space.h.
planning_environment::CollisionModels* chomp::ChompCollisionSpace::collision_models_ [private] |
Definition at line 158 of file chomp_collision_space.h.
std::vector<btVector3> chomp::ChompCollisionSpace::cuboid_points_ [private] |
Definition at line 143 of file chomp_collision_space.h.
std::map<std::string, std::vector<std::string> > chomp::ChompCollisionSpace::distance_exclude_links_ [private] |
Definition at line 167 of file chomp_collision_space.h.
distance_field::PropagationDistanceField* chomp::ChompCollisionSpace::distance_field_ [private] |
Definition at line 132 of file chomp_collision_space.h.
std::map<std::string, std::vector<std::string> > chomp::ChompCollisionSpace::distance_include_links_ [private] |
Definition at line 168 of file chomp_collision_space.h.
double chomp::ChompCollisionSpace::field_bias_x_ [private] |
Definition at line 147 of file chomp_collision_space.h.
double chomp::ChompCollisionSpace::field_bias_y_ [private] |
Definition at line 148 of file chomp_collision_space.h.
double chomp::ChompCollisionSpace::field_bias_z_ [private] |
Definition at line 149 of file chomp_collision_space.h.
double chomp::ChompCollisionSpace::max_expansion_ [private] |
Definition at line 145 of file chomp_collision_space.h.
planning_environment::CollisionSpaceMonitor* chomp::ChompCollisionSpace::monitor_ [private] |
Definition at line 151 of file chomp_collision_space.h.
boost::mutex chomp::ChompCollisionSpace::mutex_ [private] |
Definition at line 142 of file chomp_collision_space.h.
ros::NodeHandle chomp::ChompCollisionSpace::node_handle_ [private] |
Definition at line 131 of file chomp_collision_space.h.
std::map<std::string, std::vector<bodies::Body *> > chomp::ChompCollisionSpace::planning_group_bodies_ [private] |
Definition at line 153 of file chomp_collision_space.h.
std::map<std::string, std::vector<std::string> > chomp::ChompCollisionSpace::planning_group_link_names_ [private] |
Definition at line 152 of file chomp_collision_space.h.
std::string chomp::ChompCollisionSpace::reference_frame_ [private] |
Definition at line 141 of file chomp_collision_space.h.
double chomp::ChompCollisionSpace::resolution_ [private] |
Definition at line 146 of file chomp_collision_space.h.
ros::NodeHandle chomp::ChompCollisionSpace::root_handle_ [private] |
Definition at line 131 of file chomp_collision_space.h.