Browse files

Added some documentation for using tgSpheres within the YAML builder.

  • Loading branch information...
apsabelhaus committed Nov 4, 2017
1 parent 1b4dbe7 commit 908010521b21ee16187e552a51a309f0ec5fca5c
Showing with 50 additions and 0 deletions.
  1. +50 −0 doc/source/yaml-model-builder.rst
@@ -56,6 +56,7 @@ Tensegrity structures are made up of rods and strings. The vertices of the rods
bottom1: [-5, 0, 0]
Adding Pairs
@@ -66,6 +67,7 @@ Rods and strings are defined using the “pair_groups” keyword and are grouped
- [bottom1, top2]
Adding Builders
@@ -89,6 +91,54 @@ The “builders” keyword is used to define one or more builders. Builders work
Each builder tag needs to be given a class using the “class” keyword. The class determines the properties of the rod or string. The basic rod and string classes are tgRodInfo and tgBasicActuatorInfo. More information about different string/cable classes can be found in the `motors and cables`_ section. Each builder takes a number of parameters which are specified using the “parameters” keyword. All parameters are optional (if they are not specified they will take on default values). Some of the most common parameters for tgRodInfo and tgBasicActuatorInfo are shown in the example above. More information about the parameters used by tgRodInfo_ or tgBasicActuatorInfo_ can be found in their respective classes.
Adding Single-Node Structures versus Multiple-Element Structures (Spheres vs. Rods/Boxes)
Most stuctures are built out of more than one node. For example, rods are made from two nodes: one for each endpoint of the rod. Consequently, to make a rod, you'd need to specify two nodes (with whatever tag you'd like), then make a pair with a *specific* tag which then must correlate with a builder. For example, let's emphasize using a full example of making one rod:
rodEndA: [-5, 0, 0]
rodEndB: [5, 0, 0]
- [rodEndA, rodEndB]
class: tgRodInfo
density: 0.688
radius: 0.31
Here, you can see that "rodEndA" and "rodEndB" are arbitrary names. You could have chosen whatever you'd like, as long as the same node names (tags) are used for the line in pair_groups.
Instead, the tag "rod" is the important one! That's what correlates the nodes to a specific type of builder.
This is NOT the case when creating single-element rigid bodies. For example, consider a sphere. Spheres only have one node associated with them: their centerpoint. Since it doesn't make sense to have spheres be a "pair," NTRTsim implements the following.
Single-element rigid bodies must correlate the *node tag* to a builder, not the *pair tag* to a builder.
Here's an example of creating a sphere.
examplesphere: [0, 5, 0]
class: tgSphereInfo
density: 0.5
radius: 2
If you create a pair_group with the same tag as used for a builder, nothing will happen. (To-do: check and confirm nothing is accidentally created, handle these edge cases.)
Point is - use the above example for making spheres.
Combining Structures

0 comments on commit 9080105

Please sign in to comment.