AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
Odometer.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#pragma once
21
23#include <agx/Hinge.h>
24#include <agx/SplineJoint.h>
26#include <agx/SlackHingeJoint.h>
27
29
30#include <agxSDK/Simulation.h>
31
32namespace agxSensor
33{
36
43 {
44 public:
51 static Odometer* find( const agxSDK::Simulation* simulation, const agx::Name& name );
52
59 static Odometer* find( const Environment* environment, const agx::Name& name );
60
67 static OdometerPtrVector findAll( const agxSDK::Simulation* simulation,
68 const agx::Name& name );
69
76 static OdometerPtrVector findAll( const Environment* environment, const agx::Name& name );
77
83 static OdometerPtrVector findAll( const agxSDK::Simulation* simulation );
84
90 static OdometerPtrVector findAll( const Environment* environment );
91
92 public:
102
110
119
129
138
148
156
162 void setConstraint( agx::Hinge* hinge );
163
171
179
186
194
198 virtual agx::Constraint* getConstraint() const override;
199
204
209
214
216
217 public:
218 virtual void synchronizeGraphics(const agxRender::RenderManager& renderManager) override;
219 virtual void cleanup() override;
220
222
223 protected:
224 friend class OdometerOutputHandler;
225
226 Odometer( agx::Constraint* constraint, OdometerModel* model, agx::UInt sampleDof );
227 Odometer();
228
229 virtual void setConstraint( agx::Constraint* constraint ) override;
230 agx::UInt getConstraintSampleDof() const;
231
233
234 private:
235 agx::ConstraintRef m_constraint;
236 agx::UInt m_constraintSampleDof;
237 OdometerModelRef m_model;
238 };
239}
#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 AGXSENSOR_EXPORT
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition: agx/Vector.h:34
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:131
Common base type for all sensors attached to a constraint between two bodies.
Sensor environment implementation where different sensors collects data given a set of added objects,...
Common interface for sensor output handlers.
Base odometer model describing the fundamental parameters, such as wheel radius, of wheel encoder bas...
Definition: OdometerModel.h:35
Handler responsible for how the odometer readings are assembled and provided to the user.
Odometer instance class defined by an attachment constraint and a model.
Definition: Odometer.h:43
Odometer(agx::SlackHingeJoint *hinge, OdometerModel *model)
Construct this odometer with the given model and attached to the given slack hinge constraint.
Odometer(agxVehicle::WheelJoint *wheel, OdometerModel *model)
Construct this odometer with the given model and attached to the given wheel joint constraint.
Odometer(agx::SlackCylindricalJoint *cylindrical, OdometerModel *model)
Construct this odometer with the given model and attached to the given slack cylindrical joint constr...
void setConstraint(agx::SlackHingeJoint *hinge)
Assign a new parent slack hinge joint to attach this odometer to.
OdometerOutputHandler * getOutputHandler() const
Odometer(agx::CylindricalJoint *cylindrical, OdometerModel *model)
Construct this odometer with the given model and attached to the given cylindrical joint constraint.
virtual agx::Constraint * getConstraint() const override
static OdometerPtrVector findAll(const Environment *environment)
Find all odometers.
Odometer(agx::SplineJoint *spline, OdometerModel *model)
Construct this odometer with the given model and attached to the given spline constraint.
void setConstraint(agx::SlackCylindricalJoint *cylindrical)
Assign a new parent slack cylindrical joint to attach this odometer to.
OdometerModel * getModel() const
static OdometerPtrVector findAll(const Environment *environment, const agx::Name &name)
Find all odometers, given name.
void setConstraint(agxVehicle::WheelJoint *wheel)
Assign a new parent wheel joint to attach this odometer to.
void setConstraint(agx::SplineJoint *spline)
Assign a new parent spline joint to attach this odometer to.
static Odometer * find(const Environment *environment, const agx::Name &name)
Find odometer given name.
void setConstraint(agx::CylindricalJoint *cylindrical)
Assign a new parent cylindrical joint to attach this odometer to.
static OdometerPtrVector findAll(const agxSDK::Simulation *simulation)
Find all odometers.
virtual ISensorOutputHandler * getOutputHandlerBase() const override
Odometer(agx::Hinge *hinge, OdometerModel *model)
Construct this odometer with the given model and attached to the given hinge constraint.
static OdometerPtrVector findAll(const agxSDK::Simulation *simulation, const agx::Name &name)
Find all odometers, given name.
void setConstraint(agx::Hinge *hinge)
Assign a new parent hinge joint to attach this odometer to.
static Odometer * find(const agxSDK::Simulation *simulation, const agx::Name &name)
Find odometer given name.
The wheel constraint is designed to attach two bodies such that one of them is free to rotate about a...
Definition: WheelJoint.h:73
The base class for a constraint.
Definition: Constraint.h:89
A cylindrical joint is similar to a prismatic joint but with an extra degree of freedom free (rotatio...
The hinge constraint between two rigid bodies or one rigid body and the world.
Definition: Hinge.h:104
Representation of a name string.
Definition: Name.h:33
A constraint that is equal to the.
A constraint that is equal to the.
A SplineJoint is a constraint with a motor/range/lock for translation/rotation that will restrict a b...
Definition: SplineJoint.h:35
Vector containing 'raw' data.
Definition: agx/Vector.h:246
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
Namespace containing classes for handling debug rendering of collision geometries,...
Definition: Constraint.h:36
The agxSensor namespace contains components to model real-time sensors connected to the physics of AG...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.