Class
List
Heirarchy
Modules
Common
Events
Math
Messages
Physics
Rendering
Sensors
Transport
Links
Gazebo Website
Wiki
Tutorials
Download
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
gazebo
physics
bullet
BulletScrewJoint.hh
Go to the documentation of this file.
1
/*
2
* Gazebo - Outdoor Multi-Robot Simulator
3
* Copyright (C) 2003
4
* Nate Koenig
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
*
20
*/
21
/* Desc: A screw or primastic joint
22
* Author: Nate Koenig
23
* Date: 24 May 2009
24
*/
25
26
#ifndef _BULLETSCREWJOINT_HH_
27
#define _BULLETSCREWJOINT_HH_
28
29
#include "
physics/bullet/BulletJoint.hh
"
30
#include "
physics/ScrewJoint.hh
"
31
32
class
btSliderConstraint;
33
34
namespace
gazebo
35
{
36
namespace
physics
37
{
41
43
class
BulletScrewJoint
:
public
ScrewJoint
<BulletJoint>
44
{
46
public
:
BulletScrewJoint
(btDynamicsWorld *
world
,
BasePtr
_parent);
47
49
public
:
virtual
~BulletScrewJoint
();
50
52
protected
:
virtual
void
Load
(
sdf::ElementPtr
_sdf);
53
55
public
:
void
Attach
(
LinkPtr
_one,
LinkPtr
_two);
56
58
public
:
void
SetAxis
(
int
_index,
const
math::Vector3
&_axis);
59
61
public
:
virtual
void
SetDamping
(
int
_index,
double
_damping);
62
64
public
:
virtual
void
SetHighStop
(
int
_index,
const
math::Angle
&_angle);
65
67
public
:
virtual
void
SetLowStop
(
int
_index,
const
math::Angle
&_angle);
68
70
public
:
virtual
math::Angle
GetHighStop
(
int
_index);
71
73
public
:
virtual
math::Angle
GetLowStop
(
int
_index);
74
76
public
:
virtual
math::Angle
GetAngle
(
int
_index)
const
;
77
79
public
:
virtual
double
GetVelocity
(
int
_index)
const
;
80
82
public
:
virtual
void
SetVelocity
(
int
_index,
double
_angle);
83
85
public
:
virtual
void
SetForce
(
int
_index,
double
_force);
86
88
public
:
virtual
void
SetMaxForce
(
int
_index,
double
_t);
89
91
public
:
virtual
double
GetMaxForce
(
int
_index);
92
94
public
:
virtual
math::Vector3
GetGlobalAxis
(
int
_index)
const
;
95
97
public
:
virtual
math::Angle
GetAngleImpl
(
int
_index)
const
;
98
99
private
: btSliderConstraint *btScrew;
100
};
102
}
103
}
104
#endif