You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doxygen_cxx/classdrake_1_1_identifier.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -174,7 +174,7 @@
174
174
class drake::Identifier< Tag ></h3>
175
175
176
176
<p>A simple identifier class. </p>
177
-
<dlclass="section note"><dt>Note</dt><dd>This is <em>purposely</em> a separate class from <aclass="el" href="classdrake_1_1_type_safe_index.html">TypeSafeIndex</a>. For more explanatation, see <aclass="el" href="classdrake_1_1_identifier.html#TypeSafeIndexVsIndentifier">this section</a>.</dd></dl>
177
+
<dlclass="section note"><dt>Note</dt><dd>This is <em>purposely</em> a separate class from <aclass="el" href="classdrake_1_1_type_safe_index.html">TypeSafeIndex</a>. For more explanation, see <aclass="el" href="classdrake_1_1_identifier.html#TypeSafeIndexVsIdentifier">this section</a>.</dd></dl>
178
178
<p>This class serves as an upgrade to the standard practice of passing <code>int</code>s around as unique identifiers (or, as in this case, <code>int64_t</code>s). In the common practice, a method that takes identifiers to different types of objects would have an interface like:</p>
179
179
<divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> foo(<aclass="code" href="classint64__t.html">int64_t</a> bar_id, <aclass="code" href="classint64__t.html">int64_t</a> thing_id);</div></div><!-- fragment --><p>It is possible for a programmer to accidentally switch the two ids in an invocation. This mistake would still be <em>syntactically</em> correct; it will successfully compile but lead to inscrutable run-time errors. This identifier class provides the same speed and efficiency of passing <code>int64_t</code>s, but enforces unique types and limits the valid operations, providing compile-time checking. The function would now look like:</p>
180
180
<divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> foo(BarId bar_id, ThingId thing_id)</div></div><!-- fragment --><p>and the compiler will catch instances where the order is reversed.</p>
@@ -195,7 +195,7 @@
195
195
<p>It is the designed intent of this class, that ids derived from this class can be passed and returned by value. (Drake's typical calling convention requires passing input arguments by const reference, or by value when moved from. That convention does not apply to this class.)</p>
196
196
<p>The following alias will create a unique identifier type for class <code>Foo</code>: </p><divclass="fragment"><divclass="line"><spanclass="keyword">using</span> FooId = Identifier<class FooTag>;</div></div><!-- fragment --><p><b>Examples of valid and invalid operations</b></p>
197
197
<p>The Identifier guarantees that id instances of different types can't be compared or combined. Efforts to do so will cause a compile-time failure. For example:</p>
<p>In principle, the <em>identifier</em> is related to the <aclass="el" href="classdrake_1_1_type_safe_index.html">TypeSafeIndex</a>. In some sense, both are "type-safe" <code>int</code>s. They differ in their semantics. We can consider <code>ints</code>, indices, and identifiers as a list of <code>int</code> types with <em>decreasing</em> functionality.</p>
200
200
<ul>
201
201
<li>The int, obviously, has the full range of C++ ints.</li>
Copy file name to clipboardExpand all lines: doxygen_cxx/classdrake_1_1_type_safe_index.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -170,7 +170,7 @@
170
170
class drake::TypeSafeIndex< Tag ></h3>
171
171
172
172
<p>A type-safe non-negative index class. </p>
173
-
<dlclass="section note"><dt>Note</dt><dd>This is <em>purposely</em> a separate class from <aclass="el" href="classdrake_1_1_identifier.html" title="A simple identifier class.">Identifier</a>. For more information, see <aclass="el" href="classdrake_1_1_identifier.html#TypeSafeIndexVsIndentifier">this section</a>.</dd></dl>
173
+
<dlclass="section note"><dt>Note</dt><dd>This is <em>purposely</em> a separate class from <aclass="el" href="classdrake_1_1_identifier.html" title="A simple identifier class.">Identifier</a>. For more information, see <aclass="el" href="classdrake_1_1_identifier.html#TypeSafeIndexVsIdentifier">this section</a>.</dd></dl>
174
174
<p>This class serves as an upgrade to the standard practice of passing <code>int</code>s around as indices. In the common practice, a method that takes indices into multiple collections would have an interface like:</p>
175
175
<divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> foo(<spanclass="keywordtype">int</span> bar_index, <spanclass="keywordtype">int</span> thing_index);</div></div><!-- fragment --><p>It is possible for a programmer to accidentally switch the two index values in an invocation. This mistake would still be <em>syntactically</em> correct; it will successfully compile but lead to inscrutable run-time errors. The type-safe index provides the same speed and efficiency of passing <code>int</code>s, but provides compile-time checking. The function would now look like:</p>
176
176
<divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> foo(BarIndex bar_index, ThingIndex thing_index);</div></div><!-- fragment --><p>and the compiler will catch instances where the order is reversed.</p>
Copy file name to clipboardExpand all lines: doxygen_cxx/classdrake_1_1geometry_1_1_scene_graph.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,7 @@
201
201
</ul>
202
202
<h1><a class="anchor" id="geom_sys_inputs"></a>
203
203
Inputs</h1>
204
-
<p>of kinematics values (e.g., pose, velocity, acceleration, and configuration). If a source registers a frame or a deformable geometry, it must connect to the corresponding ports. Failure to connect to the ports (or to provide valid kinematics values) will lead to runtime exceptions.</p>
204
+
<p>For each registered geometry source, there is one input port for each order of kinematics values (i.e., pose and configuration). If a source registers a frame or a deformable geometry, it must connect to the corresponding ports. Failure to connect to the ports (or to provide valid kinematics values) will lead to runtime exceptions.</p>
205
205
<p><b>pose port</b>: An abstract-valued port providing an instance of FramePoseVector. For each registered frame, this "pose vector" maps the registered FrameId to a pose value. All registered frames must be accounted for and only frames registered by a source can be included in its output port. See the details in <a class="el" href="classdrake_1_1geometry_1_1_kinematics_vector.html" title="A KinematicsVector is a container class used to report kinematics data for registered frames and geom...">KinematicsVector</a> for details on how to provide values for this port.</p>
206
206
<p><b>configuration port</b>: An abstract-valued port providing an instance of GeometryConfigurationVector. For each registered deformable geometry, this "configuration vector" maps the registered <a class="el" href="classdrake_1_1geometry_1_1_geometry_id.html" title="Type used to identify geometry instances in SceneGraph.">GeometryId</a> to its world space configuration (i.e. the vertex positions of its mesh representation in the world frame). All registered deformable geometries must be accounted for and only geometries registered by a source can be included in its output port.</p>
0 commit comments