Skip to content

Commit 6dbaa09

Browse files
authored
Merge pull request #106 from gtbook/frank_feb9
Chapter 5 edits
2 parents 391c15d + 1ec3550 commit 6dbaa09

32 files changed

+582
-440
lines changed

S10_introduction.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"id": "01db0ccf",
8181
"metadata": {},
8282
"source": [
83-
"```{index} differential drive robot, DDR\n",
83+
"```{index} differential-drive robot, DDR\n",
8484
"```\n",
8585
"\n",
8686
"The chapters of the book proceed through a sequence of increasingly complex robotic systems.\n",

S11_models.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
"```{index} configuration, configuration space\n",
120120
"```\n",
121121
"\n",
122-
"The most basic information about a robot’s state is merely a description of the robot’s location (and orientation) in its environment, which we will define as the robot’s *configuration*. The set of all possible configurations will be called the *configuration space*. This information could be a qualitative, high-level description (e.g., the room in which the vacuum cleaning robot of Chapter 3 is located), coordinates for the robot’s position in a grid or continuous position coordinates in the plane (as for the logistics robot of Chapter 4), continuous coordinates for a position and orientation in the plane (as for the differential drive robot, or DDR, of Chapter 5 and the autonomous car of Chapter 6), or continuous coordinates for three-dimensional position and orientation (as for the drone in Chapter 7)."
122+
"The most basic information about a robot’s state is merely a description of the robot’s location (and orientation) in its environment, which we will define as the robot’s *configuration*. The set of all possible configurations will be called the *configuration space*. This information could be a qualitative, high-level description (e.g., the room in which the vacuum cleaning robot of Chapter 3 is located), coordinates for the robot’s position in a grid or continuous position coordinates in the plane (as for the logistics robot of Chapter 4), continuous coordinates for a position and orientation in the plane (as for the differential-drive robot, or DDR, of Chapter 5 and the autonomous car of Chapter 6), or continuous coordinates for three-dimensional position and orientation (as for the drone in Chapter 7)."
123123
]
124124
},
125125
{

S13_math.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
"```{index} Jacobian matrix\n",
180180
"```\n",
181181
"\n",
182-
"Perhaps most surprisingly, the relationship between velocities can always be encoded as a linear mapping from one vector space to another. Consider a differential drive robot with two wheels that rotate independently. As these wheels rotate, the robot will move in the world, changing its position and orientation. The *instantaneous* relationship between the angular velocities of the two wheels and the linear and angular velocities of the robot is linear! The matrix that encodes this relationship is called a *Jacobian* matrix (which may include time-varying entries that are nonlinear functions of configuration variables). You may remember Jacobian matrices from an advanced calculus class. If so, you may recall that the Jacobian of a function relates the derivatives of the function’s input to the derivatives of its output. Even for highly nonlinear functions, the instantaneous relationship between these derivatives is linear, and expressed by the Jacobian matrix. We will see Jacobian matrices for omnidirectional robots in Chapter 4, DDRs in Chapter 5, and for drone dynamics in Chapter 7."
182+
"Perhaps most surprisingly, the relationship between velocities can always be encoded as a linear mapping from one vector space to another. Consider a differential-drive robot with two wheels that rotate independently. As these wheels rotate, the robot will move in the world, changing its position and orientation. The *instantaneous* relationship between the angular velocities of the two wheels and the linear and angular velocities of the robot is linear! The matrix that encodes this relationship is called a *Jacobian* matrix (which may include time-varying entries that are nonlinear functions of configuration variables). You may remember Jacobian matrices from an advanced calculus class. If so, you may recall that the Jacobian of a function relates the derivatives of the function’s input to the derivatives of its output. Even for highly nonlinear functions, the instantaneous relationship between these derivatives is linear, and expressed by the Jacobian matrix. We will see Jacobian matrices for omnidirectional robots in Chapter 4, DDRs in Chapter 5, and for drone dynamics in Chapter 7."
183183
]
184184
},
185185
{

S21_sorter_state.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@
914914
"id": "IKt2DaIm1Brr",
915915
"metadata": {},
916916
"source": [
917-
"Above we created an instance of the `gtsam.DiscreteDistribution` class. As with any GTSAM class, you can type\n",
917+
"Above we created an instance of the `DiscreteDistribution` class. As with any GTSAM class, you can type\n",
918918
"```python\n",
919919
"help(gtsam.DiscreteDistribution)\n",
920920
"```\n",

S23_sorter_sensing.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@
712712
"id": "tHvu2cyxbopL",
713713
"metadata": {},
714714
"source": [
715-
"Above we created an instance of the `gtsam.DiscreteConditional` class. As with any GTSAM class, you can type\n",
715+
"Above we created an instance of the `DiscreteConditional` class. As with any GTSAM class, you can type\n",
716716
"\n",
717717
"```python\n",
718718
"help(gtsam.DiscreteConditional)\n",

S24_sorter_perception.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,7 @@
15361536
"source": [
15371537
"### Factors\n",
15381538
"\n",
1539-
"Above we created an instance of the `gtsam.DecisionTreeFactor` class. As with any GTSAM class, you can type\n",
1539+
"Above we created an instance of the `DecisionTreeFactor` class. As with any GTSAM class, you can type\n",
15401540
"\n",
15411541
"```python\n",
15421542
"help(gtsam.DecisionTreeFactor)\n",
@@ -1575,7 +1575,7 @@
15751575
"id": "3mAh1FdQ0xrA",
15761576
"metadata": {},
15771577
"source": [
1578-
"The factors we created above are of type `gtsam.DecisionTreeFactor`, which are stored as decision trees:"
1578+
"The factors we created above are of type `DecisionTreeFactor`, which are stored as decision trees:"
15791579
]
15801580
},
15811581
{
@@ -1677,7 +1677,7 @@
16771677
}
16781678
],
16791679
"source": [
1680-
"#| caption: Decision tree in a `gtsam.DecisionTreeFactor`.\n",
1680+
"#| caption: Decision tree in a `DecisionTreeFactor`.\n",
16811681
"#| label: fig:decision_tree_factor\n",
16821682
"show(conductivity_false_factor)"
16831683
]

S26_sorter_learning.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@
573573
}
574574
},
575575
"source": [
576-
"A `gtsam.DiscreteConditional` determines the counts, grouped by the conditioning variable. In our case, `Category` can take on 5 separate values, and hence we have five groups. For example, for a binary sensor:\n"
576+
"A `DiscreteConditional` determines the counts, grouped by the conditioning variable. In our case, `Category` can take on 5 separate values, and hence we have five groups. For example, for a binary sensor:\n"
577577
]
578578
},
579579
{

S31_vacuum_state.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@
369369
"id": "2OOSTBL1a4sV",
370370
"metadata": {},
371371
"source": [
372-
"When we print the results, we see that we now get a dictionary of `DiscreteKeys`, i.e., integer tuples of the form *(`Key`, cardinality)*. However, the \"keys\" now seem to be very large integers. This is because for series of variables we use the `gtsam.Symbol` type, composed of a single character and an integer index:"
372+
"When we print the results, we see that we now get a dictionary of `DiscreteKeys`, i.e., integer tuples of the form *(`Key`, cardinality)*. However, the \"keys\" now seem to be very large integers. This is because for series of variables we use the `Symbol` type, composed of a single character and an integer index:"
373373
]
374374
},
375375
{

S32_vacuum_actions.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,17 +1419,17 @@
14191419
"\n",
14201420
"> The GTSAM concepts used in this section, explained.\n",
14211421
"\n",
1422-
"As in Chapter 2, we once again used a `gtsam.DiscreteConditional`, this time to specify a motion model for the controlled Markov chain above, as shown in Figure [4](#vacuum-motion-model)."
1422+
"As in Chapter 2, we once again used a `DiscreteConditional`, this time to specify a motion model for the controlled Markov chain above, as shown in Figure [4](#vacuum-motion-model)."
14231423
]
14241424
},
14251425
{
14261426
"cell_type": "markdown",
14271427
"id": "1GGXFMgV1VUb",
14281428
"metadata": {},
14291429
"source": [
1430-
"To specify the motion model, we used the `gtsam.DiscreteBayesNet` class, and in particular these methods:\n",
1430+
"To specify the motion model, we used the `DiscreteBayesNet` class, and in particular these methods:\n",
14311431
"\n",
1432-
"- `add(self:, key: Tuple[int, int], parents: List[Tuple[int, int]], spec: str) -> None`: adds a conditional with the same arguments as the `gtsam.DiscreteConditional` constructor.\n",
1432+
"- `add(self:, key: Tuple[int, int], parents: List[Tuple[int, int]], spec: str) -> None`: adds a conditional with the same arguments as the `DiscreteConditional` constructor.\n",
14331433
"- `at(self, i: int) -> gtsam.DiscreteConditional`: retrieves the $i^{th}$ conditional added."
14341434
]
14351435
},
@@ -1522,7 +1522,7 @@
15221522
"id": "22gJu5XkegOn",
15231523
"metadata": {},
15241524
"source": [
1525-
"Finally, a word about the graphs above. You might wonder, why these graphs come out so beautifully positioned, e.g., to indicate time from left to right. This was accomplished with the `hints` argument, which positions variables series at an appropriate height. Similarly, the `boxes` argument (which takes `gtsam.Keys`, not tuples) indicates which variables should considered as given.\n",
1525+
"Finally, a word about the graphs above. You might wonder, why these graphs come out so beautifully positioned, e.g., to indicate time from left to right. This was accomplished with the `hints` argument, which positions variables series at an appropriate height. Similarly, the `boxes` argument (which takes `Keys`, not tuples) indicates which variables should considered as given.\n",
15261526
"\n",
15271527
"These arguments are handled in the `gtbook` library {cite:p}`gtbook`, and are passed on in the appropriate format to the underlying GTSAM `dot` methods, which generate graphviz-style graphs{cite:p}`graphviz`."
15281528
]

S33_vacuum_sensing.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@
647647
"id": "HlzAWlJNSilC",
648648
"metadata": {},
649649
"source": [
650-
"We use the `gtsam.DiscreteBayesNet` method `sample`, with signature\n",
650+
"We use the `DiscreteBayesNet` method `sample`, with signature\n",
651651
"\n",
652652
"```python\n",
653653
" sample(self, given: gtsam::DiscreteValues) -> gtsam::DiscreteValues\n",
@@ -660,7 +660,7 @@
660660
"metadata": {},
661661
"source": [
662662
"It implements ancestral sampling, but does assume that the Bayes net is reverse topologically sorted, i.e. last\n",
663-
"conditional will be sampled first. In addition, it can optionally take an assignment for certain *given* variables, as a `gtsam.DiscreteValues` instance.\n",
663+
"conditional will be sampled first. In addition, it can optionally take an assignment for certain *given* variables, as a `DiscreteValues` instance.\n",
664664
"In that case, it is also assumed that the Bayes net does not contain any conditionals for the given values.\n",
665665
"We used this functionality to pass the given action sequence above."
666666
]

0 commit comments

Comments
 (0)