17 #ifndef GAZEBO_PHYSICS_HEIGHTMAPSHAPE_HH_ 
   18 #define GAZEBO_PHYSICS_HEIGHTMAPSHAPE_HH_ 
   22 #include <ignition/transport/Node.hh> 
   24 #include <ignition/math/Vector2.hh> 
   56       public: 
virtual void Load(sdf::ElementPtr _sdf);
 
   59       public: 
virtual void Init();
 
   63       public: 
virtual void SetScale(
const ignition::math::Vector3d &_scale);
 
   67       public: std::string GetURI() 
const;
 
   71       public: ignition::math::Vector3d Size() 
const;
 
   75       public: ignition::math::Vector3d Pos() 
const;
 
   81       public: ignition::math::Vector2i VertexCount() 
const;
 
   87       public: 
float GetHeight(
int _x, 
int _y) 
const;
 
   93       public: 
void FillMsg(msgs::Geometry &_msg);
 
   97       public: 
void FillHeights(msgs::Geometry &_msg) 
const;
 
  101       public: 
virtual void ProcessMsg(
const msgs::Geometry &_msg);
 
  104       public: 
virtual double ComputeVolume() 
const;
 
  108       public: 
float GetMaxHeight() 
const;
 
  112       public: 
float GetMinHeight() 
const;
 
  116       public: 
int GetSubSampling() 
const;
 
  129       private: 
int LoadTerrainFile(
const std::string &_filename);
 
  133       private: 
void OnRequest(ConstRequestPtr &_msg);
 
  163       private: std::string fileFormat;
 
  166       private: ignition::math::Vector3d heightmapSize;
 
  177       private: ignition::transport::Node nodeIgn;
 
  180       private: ignition::transport::Node::Publisher responsePubIgn;
 
HeightmapShape collision shape builds a heightmap from an image. 
Definition: HeightmapShape.hh:45
std::vector< float > heights
Lookup table of heights. 
Definition: HeightmapShape.hh:136
Encapsulates a generic heightmap data file. 
Definition: HeightmapData.hh:39
Forward declarations for transport. 
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:53
Base class for all shapes. 
Definition: Shape.hh:45
Encapsulates an image that will be interpreted as a heightmap. 
Definition: ImageHeightmap.hh:38
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
default namespace for gazebo 
unsigned int vertSize
Size of the height lookup table. 
Definition: HeightmapShape.hh:145
int subSampling
The amount of subsampling. Default is 2. 
Definition: HeightmapShape.hh:151
bool flipY
True to flip the heights along the y direction. 
Definition: HeightmapShape.hh:148
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message. 
common::ImageHeightmap img
Image used to generate the heights. 
Definition: HeightmapShape.hh:139
Encapsulates an image. 
Definition: Image.hh:75
common::HeightmapData * heightmapData
HeightmapData used to generate the heights. 
Definition: HeightmapShape.hh:142
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:113