SonarSensorPrivate.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef _GAZEBO_SENSORS_SONARSENSOR_PRIVATE_HH_
18 #define _GAZEBO_SENSORS_SONARSENSOR_PRIVATE_HH_
19 
20 #include <list>
21 #include <mutex>
22 #include <ignition/math/Pose3.hh>
23 
24 #include "gazebo/msgs/msgs.hh"
27 
28 namespace gazebo
29 {
30  namespace sensors
31  {
35  {
37  typedef std::list<boost::shared_ptr<msgs::Contacts const> > ContactMsgs_L;
38 
41 
44 
47 
50 
53 
56 
58  public: msgs::SonarStamped sonarMsg;
59 
61  public: std::mutex mutex;
62 
64  public: ContactMsgs_L incomingContacts;
65 
67  public: ignition::math::Pose3d sonarMidPose;
68 
70  public: double rangeMin;
71 
73  public: double rangeMax;
74 
76  public: double radius;
77 
80  public: int emptyContactCount;
81  };
82  }
83 }
84 #endif
std::mutex mutex
Mutex used to protect reading/writing the sonar message.
Definition: SonarSensorPrivate.hh:61
double rangeMin
Minimum range.
Definition: SonarSensorPrivate.hh:70
ignition::math::Pose3d sonarMidPose
Pose of the sonar shape's midpoint.
Definition: SonarSensorPrivate.hh:67
Definition: SonarSensorPrivate.hh:34
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:53
Forward declarations for transport.
default namespace for gazebo
physics::EntityPtr parentEntity
Parent entity of this sensor.
Definition: SonarSensorPrivate.hh:49
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:104
double rangeMax
Maximum range.
Definition: SonarSensorPrivate.hh:73
transport::SubscriberPtr contactSub
Subscription to contact messages from the physics engine.
Definition: SonarSensorPrivate.hh:52
boost::shared_ptr< Entity > EntityPtr
Definition: PhysicsTypes.hh:80
int emptyContactCount
Counts the number of times there were no contacts.
Definition: SonarSensorPrivate.hh:80
physics::MeshShapePtr sonarShape
Shape used to generate contact information.
Definition: SonarSensorPrivate.hh:46
event::EventT< void(msgs::SonarStamped)> update
Update event.
Definition: SonarSensorPrivate.hh:40
ContactMsgs_L incomingContacts
List of received contacts from the sonar collision shape.
Definition: SonarSensorPrivate.hh:64
msgs::SonarStamped sonarMsg
Store current sonar info.
Definition: SonarSensorPrivate.hh:58
physics::CollisionPtr sonarCollision
Collison object that holds the sonarShape.
Definition: SonarSensorPrivate.hh:43
boost::shared_ptr< MeshShape > MeshShapePtr
Definition: PhysicsTypes.hh:176
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
transport::PublisherPtr sonarPub
Publishes the sonarMsg.
Definition: SonarSensorPrivate.hh:55
double radius
Radius of the sonar cone at maximum range.
Definition: SonarSensorPrivate.hh:76