Click or drag to resize
Accord.NET (logo)

DenavitHartenbergModel Class

Denavit Hartenberg model for joints.
Inheritance Hierarchy
SystemObject
  Accord.Math.KinematicsDenavitHartenbergModel

Namespace:  Accord.Math.Kinematics
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
[SerializableAttribute]
public class DenavitHartenbergModel : IEnumerable
Request Example View Source

The DenavitHartenbergModel type exposes the following members.

Constructors
  NameDescription
Public methodDenavitHartenbergModel
Initializes a new instance of the DenavitHartenbergModel class at the origin of the space (0,0,0).
Public methodDenavitHartenbergModel(Vector3)
Initializes a new instance of the DenavitHartenbergModel class given a specified model position in 3D space.
Top
Properties
  NameDescription
Public propertyJoints
Gets the model kinematic chain.
Public propertyPosition
Gets or sets the model position.
Public propertyTransform
Gets the transformation matrix T for the full model, given as T = T_0 * T_1 * T_2 ...T_n in which T_i is the transform matrix for each joint in the model.
Top
Methods
  NameDescription
Public methodCompute
Computes the entire model, calculating the final position for each joint in the model.
Public methodCompute(DenavitHartenbergModel)
Calculates the entire model given it is attached to a parent model and computes each joint position.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through a collection.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodSetEqualsDenavitHartenbergJoint
Compares two enumerables for set equality. Two enumerables are set equal if they contain the same elements, but not necessarily in the same order.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks

This class represents either a model itself or a submodel when used with a DenavitHartenbergModelCombinator instance.

References:

  • Wikipedia contributors, "Denavit-Hartenberg parameters," Wikipedia, The Free Encyclopedia, available at: http://en.wikipedia.org/wiki/Denavit%E2%80%93Hartenberg_parameters

Examples

The following example shows the creation and animation of a 2-link planar manipulator.

// Create the DH-model at location (0, 0, 0) 
   DenavitHartenbergModel model = new DenavitHartenbergModel();

   // Add the first joint
   model.Joints.Add(alpha: 0, theta: Math.PI / 4, radius: 35, offset: 0);

// Add the second joint
   model.Joints.Add(alpha: 0, theta: -Math.PI / 3, radius: 35, offset: 0);

   // Now move the arm
   model.Joints[0].Parameters.Theta += Math.PI / 10;
   model.Joints[1].Parameters.Theta -= Math.PI / 10;

   // Calculate the model
   model.Compute();
See Also