JointWrench.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 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 /* Desc: Specification of a contact
18  * Author: Nate Koenig
19  * Date: 10 Nov 2009
20  */
21 
22 #ifndef GAZEBO_PHYSICS_JOINTWRENCH_HH_
23 #define GAZEBO_PHYSICS_JOINTWRENCH_HH_
24 
25 #include <ignition/math/Vector3.hh>
26 
27 #include "gazebo/util/system.hh"
28 
29 namespace gazebo
30 {
31  namespace physics
32  {
35 
40  class GZ_PHYSICS_VISIBLE JointWrench
41  {
45  public: JointWrench &operator =(const JointWrench &_wrench)
46  {
47  this->body1Force = _wrench.body1Force;
48  this->body2Force = _wrench.body2Force;
49 
50  this->body1Torque = _wrench.body1Torque;
51  this->body2Torque = _wrench.body2Torque;
52  return *this;
53  }
54 
58  public: inline JointWrench &operator +(const JointWrench &_wrench)
59  {
60  this->body1Force += _wrench.body1Force;
61  this->body2Force += _wrench.body2Force;
62 
63  this->body1Torque += _wrench.body1Torque;
64  this->body2Torque += _wrench.body2Torque;
65  return *this;
66  }
67 
71  public: inline JointWrench &operator -(const JointWrench &_wrench)
72  {
73  this->body1Force -= _wrench.body1Force;
74  this->body2Force -= _wrench.body2Force;
75 
76  this->body1Torque -= _wrench.body1Torque;
77  this->body2Torque -= _wrench.body2Torque;
78  return *this;
79  }
80 
82  public: ignition::math::Vector3d body1Force;
83 
85  public: ignition::math::Vector3d body2Force;
86 
88  public: ignition::math::Vector3d body1Torque;
89 
91  public: ignition::math::Vector3d body2Torque;
92  };
94  }
95 }
96 #endif
Forward declarations for the common classes.
Definition: Animation.hh:26
ignition::math::Vector3d body1Torque
Torque on the first link.
Definition: JointWrench.hh:88
ignition::math::Vector3d body2Torque
Torque on the second link.
Definition: JointWrench.hh:91
ignition::math::Vector3d body2Force
Force on the second link.
Definition: JointWrench.hh:85
ignition::math::Vector3d body1Force
Force on the first link.
Definition: JointWrench.hh:82
Wrench information from a joint.
Definition: JointWrench.hh:40