3-point position information. More...
#include <Position.h>
Public Member Functions | |
double | getX () const |
X value accessor. | |
double | getY () const |
Y value accessor. | |
double | getZ () const |
Z value accessor. | |
Position (const double x=0, const double y=0, const double z=0) | |
Create a new Position. | |
Position (const geometry_msgs::Point &point) | |
Create a new Position. | |
Position (const geometry_msgs::Vector3 &v) | |
Create a new Position. | |
Position (const tf2::Vector3 &v) | |
Create a new Position. | |
void | setX (const double x) |
X value mutator. | |
void | setY (const double y) |
Y value mutator. | |
void | setZ (const double z) |
Z value mutator. | |
geometry_msgs::Point | toROSPointMessage () const |
geometry_msgs::Vector3 | toROSVector3Message () const |
tf2::Vector3 | toTF2Vector3 () const |
Private Attributes | |
double | x_ |
double | y_ |
double | z_ |
3-point position information.
A position simply contains x, y, and z value. This class is useful for internal data management within the graspdb library. Convenience functions are added for use with ROS messages.
Definition at line 37 of file Position.h.
Position::Position | ( | const double | x = 0 , |
const double | y = 0 , |
||
const double | z = 0 |
||
) |
Create a new Position.
Creates a new Position with the given x, y, and z values (defaults are 0).
x | The x value (default of 0). |
y | The y value (default of 0). |
z | The z value (default of 0). |
Definition at line 18 of file Position.cpp.
Position::Position | ( | const geometry_msgs::Point & | point | ) |
Create a new Position.
Creates a new Position with the given x, y, and z values from the ROS Point message.
point | The ROS Point message to extract values from. |
Definition at line 26 of file Position.cpp.
Position::Position | ( | const geometry_msgs::Vector3 & | v | ) |
Create a new Position.
Creates a new Position with the given x, y, and z values from the ROS Vector3 message.
point | The ROS Vector3 message to extract values from. |
Definition at line 34 of file Position.cpp.
Position::Position | ( | const tf2::Vector3 & | v | ) |
double Position::getX | ( | ) | const |
X value accessor.
Get the x value of this Position.
Definition at line 55 of file Position.cpp.
double Position::getY | ( | ) | const |
Y value accessor.
Get the y value of this Position.
Definition at line 65 of file Position.cpp.
double Position::getZ | ( | ) | const |
Z value accessor.
Get the z value of this Position.
Definition at line 75 of file Position.cpp.
void Position::setX | ( | const double | x | ) |
X value mutator.
Set the x value of this Position.
x | The new x value. |
Definition at line 50 of file Position.cpp.
void Position::setY | ( | const double | y | ) |
Y value mutator.
Set the y value of this Position.
y | The new y value. |
Definition at line 60 of file Position.cpp.
void Position::setZ | ( | const double | z | ) |
Z value mutator.
Set the z value of this Position.
z | The new z value. |
Definition at line 70 of file Position.cpp.
geometry_msgs::Point Position::toROSPointMessage | ( | ) | const |
Converts this Position object into a ROS Point message.
Definition at line 80 of file Position.cpp.
geometry_msgs::Vector3 Position::toROSVector3Message | ( | ) | const |
Converts this Position object into a ROS Vector3 message.
Definition at line 89 of file Position.cpp.
tf2::Vector3 Position::toTF2Vector3 | ( | ) | const |
Converts this Position object into a ROS tf2 Vector3.
Definition at line 98 of file Position.cpp.
double rail::pick_and_place::graspdb::Position::x_ [private] |
Members to hold values.
Definition at line 155 of file Position.h.
double rail::pick_and_place::graspdb::Position::y_ [private] |
Definition at line 155 of file Position.h.
double rail::pick_and_place::graspdb::Position::z_ [private] |
Definition at line 155 of file Position.h.