Click or drag to resize
Accord.NET (logo)

DenavitHartenbergNode Class

Denavit Hartenberg Model Combinator class to make combination of models to create a complex model composed of multiple chains.
Inheritance Hierarchy
SystemObject
  Accord.Math.KinematicsDenavitHartenbergNode

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

The DenavitHartenbergNode type exposes the following members.

Constructors
  NameDescription
Public methodDenavitHartenbergNode
Initializes a new instance of the DenavitHartenbergNode class.
Top
Properties
  NameDescription
Public propertyChildren
Gets the collection of models attached to this node.
Public propertyModel
Gets the model contained at this node.
Public propertyParent
Gets the parent of this node.
Top
Methods
  NameDescription
Public methodCompute
Calculates the whole combined model (this model plus all its children plus all the children of the children and so on)
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 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 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
Examples

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

// Create the DH-model at (0, 0, 0) location
   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);

   // Create the top finger
   DenavitHartenbergModel model_tgripper = new DenavitHartenbergModel();
   model_tgripper.Joints.Add(alpha: 0, theta:  Math.PI / 4, radius: 20, offset: 0);
   model_tgripper.Joints.Add(alpha: 0, theta: -Math.PI / 3, radius: 20, offset: 0);

   // Create the bottom finger
   DenavitHartenbergModel model_bgripper = new DenavitHartenbergModel();
   model_bgripper.Joints.Add(0, -Math.PI / 4, 20, 0);
   model_bgripper.Joints.Add(0,  Math.PI / 3, 20, 0);

   // Create the model combinator from the parent model
   DenavitHartenbergModelCombinator arm = new DenavitHartenbergModelCombinator(model);

   // Add the top finger
   arm.Children.Add(model_tgripper);

   // Add the bottom finger
   arm.Children.Add(model_bgripper);

   // Calculate the whole model (parent model + children models)
   arm.Compute();
See Also