Public Member Functions | Private Attributes
rail::pick_and_place::graspdb::Position Class Reference

3-point position information. More...

#include <Position.h>

List of all members.

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_

Detailed Description

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.


Constructor & Destructor Documentation

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).

Parameters:
xThe x value (default of 0).
yThe y value (default of 0).
zThe 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.

Parameters:
pointThe 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.

Parameters:
pointThe ROS Vector3 message to extract values from.

Definition at line 34 of file Position.cpp.

Position::Position ( const tf2::Vector3 &  v)

Create a new Position.

Creates a new Position with the given x, y, and z values from the ROS tf2 Vector3.

Parameters:
pointThe ROS tf2 Vector3 to extract values from.

Definition at line 42 of file Position.cpp.


Member Function Documentation

double Position::getX ( ) const

X value accessor.

Get the x value of this Position.

Returns:
The x value.

Definition at line 55 of file Position.cpp.

double Position::getY ( ) const

Y value accessor.

Get the y value of this Position.

Returns:
The y value.

Definition at line 65 of file Position.cpp.

double Position::getZ ( ) const

Z value accessor.

Get the z value of this Position.

Returns:
The z value.

Definition at line 75 of file Position.cpp.

void Position::setX ( const double  x)

X value mutator.

Set the x value of this Position.

Parameters:
xThe 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.

Parameters:
yThe 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.

Parameters:
zThe 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.

Returns:
The ROS Point message with this position data.

Definition at line 80 of file Position.cpp.

geometry_msgs::Vector3 Position::toROSVector3Message ( ) const

Converts this Position object into a ROS Vector3 message.

Returns:
The ROS Vector3 message with this position data.

Definition at line 89 of file Position.cpp.

tf2::Vector3 Position::toTF2Vector3 ( ) const

Converts this Position object into a ROS tf2 Vector3.

Returns:
The ROS tf2 Vector3 with this position data.

Definition at line 98 of file Position.cpp.


Member Data Documentation

Members to hold values.

Definition at line 155 of file Position.h.

Definition at line 155 of file Position.h.

Definition at line 155 of file Position.h.


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


graspdb
Author(s): Russell Toris
autogenerated on Thu Jun 6 2019 19:44:01