joint.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2008, Willow Garage, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of the Willow Garage nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 /*
35  *
36  */
37 #ifndef JOINT_H
38 #define JOINT_H
39 
40 #include <tinyxml.h>
41 #include <urdf_model/joint.h>
42 
43 
44 namespace pr2_mechanism_model {
45 
46 class JointState;
47 
49 {
50  public:
53  violated_limits_(false), initialized_(false){}
54 
55  void update(JointState* s);
56  void reset();
57 
58  double odometer_;
63 
64  private:
66  double old_position_;
67 };
68 
69 
70 
72 {
73 public:
75  void enforceLimits();
76 
78  void getLimits(double &effort_low, double &effort_high);
79 
82 
84  double position_;
85 
87  double velocity_;
88 
91 
92  // joint statistics
94 
97 
100 
103 
105  JointState() : position_(0.0), velocity_(0.0), measured_effort_(0.0),
106  commanded_effort_(0.0), calibrated_(false), reference_position_(0.0){}
107 };
108 
109 enum
110 {
118 };
119 
120 
121 }
122 
123 #endif /* JOINT_H */
XmlRpcServer s
double velocity_
The joint velocity in randians/sec or meters/sec (read-only variable)
Definition: joint.h:87
boost::shared_ptr< const urdf::Joint > joint_
A pointer to the corresponding urdf::Joint from the urdf::Model.
Definition: joint.h:81
void update(JointState *s)
Definition: joint.cpp:45
bool calibrated_
Bool to indicate if the joint has been calibrated or not.
Definition: joint.h:99
double position_
The joint position in radians or meters (read-only variable)
Definition: joint.h:84
JointState()
Constructor.
Definition: joint.h:105
double commanded_effort_
The effort the joint should apply in Nm or N (write-to variable)
Definition: joint.h:96
double measured_effort_
The measured joint effort in Nm or N (read-only variable)
Definition: joint.h:90
double reference_position_
The position of the optical flag that was used to calibrate this joint.
Definition: joint.h:102
JointStatistics joint_statistics_
Definition: joint.h:93


pr2_mechanism_model
Author(s): Eric Berger berger@willowgarage.com, Stuart Glaser, Wim Meeussen
autogenerated on Mon Jun 10 2019 14:19:04