IRSensor.hh
00001 /* 00002 * Copyright 2011 Nate Koenig & Andrew Howard 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 * 00016 */ 00017 /* Desc: IRSensor proximity sensor 00018 * Author: Carle Cote 00019 * Date: 23 february 2004 00020 */ 00021 00022 #ifndef IRSENSOR_HH 00023 #define IRSENSOR_HH 00024 00025 #include <vector> 00026 00027 #include "Sensor.hh" 00028 #include "Body.hh" 00029 00030 namespace gazebo 00031 { 00032 class RayCollision; 00033 class RaySensor; 00034 00035 namespace sensors 00036 { 00039 00045 class IRSensor: public Sensor 00046 { 00050 public: IRSensor(Body *body); 00051 00053 public: virtual ~IRSensor(); 00054 00057 protected: virtual void LoadChild( sdf::ElementPtr &_sdf ); 00058 00060 protected: virtual void InitChild(); 00061 00063 protected: virtual void UpdateChild(); 00064 00066 protected: virtual void FiniChild(); 00067 00070 public: unsigned int GetIRCount() const; 00071 00074 public: double GetRange(unsigned int index) const; 00075 00076 public: Pose GetPose(unsigned int index) const; 00077 00078 private: std::vector<RaySensor*> irBeams; 00079 00080 }; 00082 } 00083 } 00084 00085 #endif

1.7.5.1