AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
WheelJoint.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
19#include <agxVehicle/export.h>
20#include <agx/Constraint.h>
21
22
23namespace agxVehicle
24{
25
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
74 public:
75
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
116
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
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
158
163
168
172 agx::Real getAngle( SecondaryConstraint sc = STEERING ) const;
173
178
183
188
193
197 void render(class agxRender::RenderManager* mgr, float scale) const override;
198
200
202
203 protected:
204 virtual ~WheelJoint();
205
206 private:
207 class WheelJointImplementation* m_implementation;
208 };
209
210} //namespace agx
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#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
#define AGXVEHICLE_EXPORT
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
Helper class to define reference frames for WheelJoint.
Definition: WheelJoint.h:33
WheelJointFrame(agx::Vec3 point, agx::Vec3 wheelAxle, agx::Vec3 steeringAxle)
The WheelJoint has a direction for the wheel axle, a direction for the steering axle which must be or...
The wheel constraint is designed to attach two bodies such that one of them is free to rotate about a...
Definition: WheelJoint.h:73
agx::Range1D * getRange1D(SecondaryConstraint sc)
agx::RigidBody * getChassisRigidBody()
Get the rigid body of the chassis.
WheelJoint(agx::RigidBody *rb1, agx::Frame *rb1AttachmentFrame, agx::RigidBody *rb2=nullptr, agx::Frame *rb2AttachmentFrame=nullptr)
Create wheel given body attachment frames and one or two rigid bodies.
agx::Motor1D * getMotor1D(SecondaryConstraint sc)
int getNumDOF() const override
agx::Vec3 getWheelAxis() const
agx::Real getAngle(SecondaryConstraint sc=STEERING) const
void render(class agxRender::RenderManager *mgr, float scale) const override
Perform debug rendering of this constraint via agxRender::RenderManager.
agx::Vec3 getCenter() const
agx::Real getCurrentSpeed(SecondaryConstraint sc=STEERING) const
WheelJoint(const WheelJointFrame &wjf, agx::RigidBody *rb1, agx::RigidBody *rb2)
Construct a WheelJoint from a WheelJointFrame and bodies.
agx::Lock1D * getLock1D(SecondaryConstraint sc)
agx::Vec3 getSteeringAxis() const
agx::RigidBody * getWheelRigidBody()
Get the rigid body of the wheel.
WheelJoint(agx::RigidBody *rb1, agx::RigidBody *rb2, const agx::Vec3 &center, const agx::Vec3 &axis)
Constructor to create a wheel from two rigid bodies, a center point and a steering/suspension axis.
DOF
Enum used for specifying which Degree of Freedom (DOF) that should be accessed in calls to for exampl...
Definition: WheelJoint.h:127
SecondaryConstraint
Enum for specifying which secondary constraint to access.
Definition: WheelJoint.h:138
The base class for a constraint.
Definition: Constraint.h:89
The object defining a frame of reference and providing transformations operations.
Definition: agx/Frame.h:68
Elementary secondary constraint to keep constraint angle at a given target position.
Elementary secondary constraint to keep constraint angle within two given values.
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:49
Elementary secondary constraint to drive something given target speed (translational or rotational).
#define CALLABLE
Definition: macros.h:72
This namespace contains classes related to vehicles dynamics.
double Real
Definition: Real.h:41