DenavitHartenbergNode Class |
Namespace: Accord.Math.Kinematics
The DenavitHartenbergNode type exposes the following members.
Name | Description | |
---|---|---|
DenavitHartenbergNode |
Initializes a new instance of the DenavitHartenbergNode class.
|
Name | Description | |
---|---|---|
Children |
Gets the collection of models attached to this node.
| |
Model |
Gets the model contained at this node.
| |
Parent |
Gets the parent of this node.
|
Name | Description | |
---|---|---|
Compute |
Calculates the whole combined model (this model plus all its
children plus all the children of the children and so on)
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
HasMethod |
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) | |
IsEqual |
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.) | |
To(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.) | |
ToT | 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.) |
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();