SpaceNavPrivate.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-2015 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_SPACENAV_PRIVATE_HH_
18 #define _GAZEBO_SPACENAV_PRIVATE_HH_
19 
20 #define SCALE 512.0
21 
22 #include "gazebo/math/Vector3.hh"
23 #include "gazebo/transport/transport.hh"
24 
25 namespace gazebo
26 {
27  namespace gui
28  {
31  {
33  public: SpaceNavPrivate()
34  {
35  this->pollThread = NULL;
36  this->stop = false;
37  }
38 
40  public: virtual ~SpaceNavPrivate()
41  {
42  this->stop = true;
43  if (this->pollThread)
44  this->pollThread->join();
45  delete this->pollThread;
46  this->pollThread = NULL;
47  }
48 
50  public: boost::thread *pollThread;
51 
53  public: bool stop;
54 
57 
60 
63 
66  };
67  }
68 }
69 #endif
transport::PublisherPtr joyPub
Publisher pointer used to publish the messages.
Definition: SpaceNavPrivate.hh:59
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:43
virtual ~SpaceNavPrivate()
Destructor.
Definition: SpaceNavPrivate.hh:40
bool stop
Use to stop the additional thread that the plugin uses.
Definition: SpaceNavPrivate.hh:53
math::Vector3 deadbandTrans
Translation values below which joystick values return zero.
Definition: SpaceNavPrivate.hh:62
Private data for the SpaceNav class.
Definition: SpaceNavPrivate.hh:30
SpaceNavPrivate()
Constructor.
Definition: SpaceNavPrivate.hh:33
#define NULL
Definition: CommonTypes.hh:30
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
boost::thread * pollThread
Additional thread.
Definition: SpaceNavPrivate.hh:50
math::Vector3 deadbandRot
Rotation values below which joystick values return zero.
Definition: SpaceNavPrivate.hh:65
transport::NodePtr node
Gazebo communication node pointer.
Definition: SpaceNavPrivate.hh:56