AGX Dynamics
2.37.2.0
WheelJoint.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2024. Algoryx Simulation AB.
3
4
All AGX source code, intellectual property, documentation, sample code,
5
tutorials, scene files and technical white papers, are copyrighted, proprietary
6
and confidential material of Algoryx Simulation AB. You may not download, read,
7
store, distribute, publish, copy or otherwise disseminate, use or expose this
8
material unless having a written signed agreement with Algoryx Simulation AB, or having been
9
advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10
valid commercial license from Algoryx Simulation AB.
11
12
Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13
from using this software, unless otherwise stated in written agreements with
14
Algoryx Simulation AB.
15
*/
16
17
#pragma once
18
19
#include <
agxVehicle/export.h
>
20
#include <
agx/Constraint.h
>
21
22
23
namespace
agxVehicle
24
{
25
26
AGX_DECLARE_POINTER_TYPES
(
WheelJoint
);
27
28
32
class
CALLABLE
AGXVEHICLE_EXPORT
WheelJointFrame
:
public
agx::ConstraintFrame
33
{
34
public
:
35
46
WheelJointFrame
(
agx::Vec3
point,
agx::Vec3
wheelAxle,
agx::Vec3
steeringAxle );
47
48
};
49
50
51
73
class
CALLABLE
AGXVEHICLE_EXPORT
WheelJoint
:
public
agx::Constraint
{
74
public
:
75
82
WheelJoint
(
const
WheelJointFrame
& wjf,
agx::RigidBody
* rb1,
agx::RigidBody
* rb2 );
83
92
WheelJoint
(
agx::RigidBody
* rb1,
agx::RigidBody
* rb2,
const
agx::Vec3
& center,
const
agx::Vec3
& axis);
93
94
107
WheelJoint
(
agx::RigidBody
* rb1,
agx::Frame
* rb1AttachmentFrame,
agx::RigidBody
* rb2 =
nullptr
,
108
agx::Frame
* rb2AttachmentFrame =
nullptr
);
109
110
115
agx::RigidBody
* getWheelRigidBody();
116
121
agx::RigidBody
* getChassisRigidBody();
122
127
enum
DOF
{
128
ALL_DOF = -1,
129
TRANSLATIONAL_1 = 0,
130
TRANSLATIONAL_2 = 1,
131
ROTATIONAL_1 = 3,
132
NUM_DOF = 3
133
};
134
138
enum
SecondaryConstraint
{
139
STEERING = 0,
140
WHEEL = 1,
141
SUSPENSION = 2,
143
STEERINGCONSTRAINT_BOUNDS = 3,
146
NUM_FREEDOF = 3
147
};
148
152
int
getNumDOF()
const override
;
153
157
agx::Motor1D
* getMotor1D(
SecondaryConstraint
sc);
158
162
agx::Lock1D
* getLock1D(
SecondaryConstraint
sc);
163
167
agx::Range1D
* getRange1D(
SecondaryConstraint
sc);
168
169
173
agx::Real
getAngle
(
SecondaryConstraint
sc = STEERING )
const
;
174
178
void
render(
class
agxRender::RenderManager
* mgr,
float
scale)
const override
;
179
180
AGXSTREAM_DECLARE_SERIALIZABLE
(
agxVehicle::WheelJoint
);
181
182
WheelJoint
();
183
184
protected
:
185
virtual
~
WheelJoint
();
186
187
private
:
188
class
WheelJointImplementation* m_implementation;
189
};
190
191
}
//namespace agx
AGXVEHICLE_EXPORT
#define AGXVEHICLE_EXPORT
Definition:
agxVehicle/export.h:38
agxVehicle::WheelJointFrame
Helper class to define reference frames for WheelJoint.
Definition:
WheelJoint.h:32
agx::Constraint
The base class for a constraint.
Definition:
Constraint.h:88
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition:
Referenced.h:254
agxRender::RenderManager
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc...
Definition:
RenderManager.h:106
agx::LockController
Elementary secondary constraint to keep constraint angle at a given target position.
Definition:
ElementaryConstraint.h:1111
agx::RangeController
Elementary secondary constraint to keep constraint angle within two given values. ...
Definition:
ElementaryConstraint.h:1031
agxVehicle::WheelJoint::DOF
DOF
Enum used for specifying which Degree of Freedom (DOF) that should be accessed in calls to for exampl...
Definition:
WheelJoint.h:127
agxVehicle::WheelJoint
The wheel constraint is designed to attach two bodies such that one of them is free to rotate about a...
Definition:
WheelJoint.h:73
export.h
Constraint.h
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:54
CALLABLE
#define CALLABLE
Definition:
Object.h:73
agxVehicle
This namespace contains classes related to vehicles dynamics.
agx::Vec3T< Real >
agx::Frame
The object defining a frame of reference and providing transformations operations.
Definition:
Frame.h:67
AGXSTREAM_DECLARE_SERIALIZABLE
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition:
Serializable.h:207
agx::TargetSpeedController
Elementary secondary constraint to drive something given target speed (translational or rotational)...
Definition:
ElementaryConstraint.h:710
agxVehicle::WheelJoint::SecondaryConstraint
SecondaryConstraint
Enum for specifying which secondary constraint to access.
Definition:
WheelJoint.h:138
agx::Real
double Real
Definition:
Real.h:42
agx::getAngle
Real getAngle(const Vec3 &a, const Vec3 &b, const Vec3 &c)
a and b should be orthogonal
Definition:
ConstraintImplementation.h:1419
include
agxVehicle
WheelJoint.h
Generated on Sun Jan 28 2024 11:19:37 for AGX Dynamics by
1.8.13