#include <ObjectFunctions.h>
Public Member Functions | |
ObjectFunctions () | |
Static Public Member Functions | |
static bool | getObjectPose (const object_msgs::Object &object, geometry_msgs::PoseStamped &pose) |
Static Private Member Functions | |
static geometry_msgs::Point | getAveragePointFrom (const std::vector< geometry_msgs::Pose > &poses) |
static bool | getPoseFromFields (const std_msgs::Header &object_header, int idx, const std::vector< geometry_msgs::Pose > &poses, const geometry_msgs::Pose &origin, geometry_msgs::PoseStamped &pose) |
Provides a collection of convenience function for object_msgs/Object.
Definition at line 16 of file ObjectFunctions.h.
object_msgs_tools::ObjectFunctions::ObjectFunctions | ( | ) | [inline] |
Definition at line 20 of file ObjectFunctions.h.
geometry_msgs::Point ObjectFunctions::getAveragePointFrom | ( | const std::vector< geometry_msgs::Pose > & | poses | ) | [static, private] |
Computes the average pose of several positions. Because the average of several quaternions can only be determined approximately when the quaternions are close together, the orientation parts are ignored, and only the position is returned.
Definition at line 65 of file ObjectFunctions.cpp.
bool ObjectFunctions::getObjectPose | ( | const object_msgs::Object & | object, |
geometry_msgs::PoseStamped & | pose | ||
) | [static] |
Get the object pose out of the information in object according to what's specified in the message (fields object.primitive_origin and/or object.mesh_origin). If both mesh and primitive origins are enabled, the primitives are used to determine the object pose.
Definition at line 7 of file ObjectFunctions.cpp.
bool ObjectFunctions::getPoseFromFields | ( | const std_msgs::Header & | object_header, |
int | idx, | ||
const std::vector< geometry_msgs::Pose > & | poses, | ||
const geometry_msgs::Pose & | origin, | ||
geometry_msgs::PoseStamped & | pose | ||
) | [static, private] |
idx | the value of either Object::primitive_origin or Object::mesh_origin |
object_header | the header of the Object message. |
poses | the poses, either Object::primitive_poses or Object::mesh_poses |
origin | the field Object::origin, in case it is required. |
Definition at line 29 of file ObjectFunctions.cpp.