Position.h
Go to the documentation of this file.
00001 
00012 #ifndef SPATIAL_TEMPORAL_LEARNING_WORLDLIB_GEOMETRY_POSITION_H_
00013 #define SPATIAL_TEMPORAL_LEARNING_WORLDLIB_GEOMETRY_POSITION_H_
00014 
00015 // ROS
00016 #include <geometry_msgs/Point.h>
00017 #include <geometry_msgs/Vector3.h>
00018 #include <tf2/LinearMath/Vector3.h>
00019 
00020 namespace rail
00021 {
00022 namespace spatial_temporal_learning
00023 {
00024 namespace worldlib
00025 {
00026 namespace geometry
00027 {
00028 
00036 class Position
00037 {
00038 public:
00048   Position(const double x = 0, const double y = 0, const double z = 0);
00049 
00057   Position(const geometry_msgs::Point &point);
00058 
00066   Position(const geometry_msgs::Vector3 &v);
00067 
00075   Position(const tf2::Vector3 &v);
00076 
00084   void setX(const double x);
00085 
00093   double getX() const;
00094 
00102   void setY(const double y);
00103 
00111   double getY() const;
00112 
00120   void setZ(const double z);
00121 
00129   double getZ() const;
00130 
00139   double distance(const Position &position) const;
00140 
00146   geometry_msgs::Point toROSPointMessage() const;
00147 
00153   geometry_msgs::Vector3 toROSVector3Message() const;
00154 
00160   tf2::Vector3 toTF2Vector3() const;
00161 
00162 private:
00164   double x_, y_, z_;
00165 };
00166 
00167 }
00168 }
00169 }
00170 }
00171 
00172 #endif


worldlib
Author(s): Russell Toris
autogenerated on Thu Jun 6 2019 20:55:36