Skip to content

Latest commit

 

History

History
53 lines (47 loc) · 7.25 KB

README.md

File metadata and controls

53 lines (47 loc) · 7.25 KB

System Modeling

A popular approach to modeling rigid-body systems is to describe the system in terms of its component parts via a system model. See Chapter 4 of Rigid Body Dynamics Algorithms for more details on modeling rigid-body systems. This project supports three types of system models:

  • RigidBodyTreeModel: The classic system model using in Rigid Body Dynamics Algorithms wherein the nodes of the connectivity graph representing the system model are the individual rigid-bodies in the system and the arcs of the graph represent the joints connecting the bodies. The model is capable of representing arbitrary rigid-body systems, including systems with loop constraints such as those induced by actuation sub-mechanisms. However, recursive algorithms can only be applied to this model if it is a kinematic tree (i.e., no loops).
  • ReflectedInertiaTreeModel: A system model that is similar to the RigidBodyTreeModel in that the nodes of the connectivity graph representing the system model are the individual rigid-bodies in the system and the arcs of the graph represent the joints connecting the bodies. However, the model is only capable of representing kinematic trees (i.e., no loops). The dynamic effects of any loop constraints must be approximated via reflected inertia. This model works reasonably well for systems with geared transmissions, but typically has poor accuracy otherwise.
  • ClusterTreeModel: This system model is based on the concept of Local Constraint Embedding. The nodes of this connectivity graph represent collections of rigid-bodies related to one another by a loop constraint. These collections are referred to as clusters. The arcs of the graph represent the joints connecting the clusters, referred to as cluster joints. This model is capable of representing arbitrary rigid-body systems, including systems with loop constraints. Because all cluster connectivity graphs are kinematic trees (no loops in the graph), recursive algorithms can always be applied to this model.

All three system models have connectivity tree structures and thus derive from a common base class, TreeModel. The first two models are included for benchmarking purposes and are not recommended for general use.

Constructing a Model

Procedure

This project does not currently offer support for URDF parsing, so the model has to be constructed manually. The process for constructing a ClusterTreeModel proceeds as follows:

  • Register all of the bodies contained in a cluster using the ClusterTreeModel::registerBody function for each of the bodies.
    • Function parameters:
      • name: A unique name for the body.
      • inertia: Spatial inertia of the body.
      • parent_name: The name of the parent body.
      • Xtree: The tree transforms between the body and its parent. See Chapter 4.2 of Rigid Body Dynamics Algorithms for more details.
  • Append those bodies to the model using the ClusterTreeModel::appendRegisteredBodiesAsCluster function.
    • Function templates:
      • ClusterJointType: The type of generalized joint connecting the bodies in the cluster. See Cluster Joints for more details.
      • ... Args: Variadic template for the arguments to the constructor of the ClusterJointType.
    • Function parameters:
      • name: A unique name for the cluster.
      • ... args: Arguments to the constructor of the ClusterJointType.
  • NOTE: In cases where the cluster contains a single body, the two steps above can be combined using the ClusterTreeModel::appendBody function.
    • Function templates:
      • ClusterJointType: The type of generalized joint connecting the bodies in the cluster.
      • ... Args: Variadic template for the arguments to the constructor of the ClusterJointType.
    • Function parameters:
      • name: A unique name for the cluster.
      • inertia: Spatial inertia of the body.
      • parent_name: The name of the parent body.
      • Xtree: The tree transforms between the body and its parent.
      • ... args: Arguments to the constructor of the ClusterJointType.

RigidBodyTree and ReflectedInertiaTree models are constructed automatically from ClusterTreeModels.

Example

For example, consider the following system model:

drawing

Constructing this model would involve the following steps:

  1. Append Body $B_1$ by calling ClusterTreeModel::appendBody using GeneralizedJoint::Revolute as the GenJointType template
  2. Append Body $B_2$ by calling ClusterTreeModel::appendBody using GeneralizedJoint::Revolute as the GenJointType template
  3. Register bodies $B_3$, $B_4$, and $B_5$ using ClusterTreeModel::registerBody. Append them as a cluster using ClusterTreeModel::appendRegisteredBodiesAsCluster with GeneralizedJoint::Generic as the GenJointType template. (Note that the generic joint must be used in this case because we have not yet implemented a specialized class for dealing with four bar linkages.)
  4. Append Body $B_6$ by calling ClusterTreeModel::appendBody using GeneralizedJoint::Revolute as the GenJointType template