Skip to content

Commit 47b802f

Browse files
1 parent 1ab3b32 commit 47b802f

File tree

118 files changed

+57863
-57781
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+57863
-57781
lines changed

doxygen_cxx/add__fixed__objects__to__plant_8h__incl.svg

Lines changed: 1443 additions & 1437 deletions
Loading

doxygen_cxx/add__fixed__objects__to__plant_8h__incl_org.svg

Lines changed: 1443 additions & 1437 deletions
Loading

doxygen_cxx/apply__driver__configs_8h__incl.svg

Lines changed: 1752 additions & 1746 deletions
Loading

doxygen_cxx/apply__driver__configs_8h__incl_org.svg

Lines changed: 1753 additions & 1747 deletions
Loading

doxygen_cxx/classdrake_1_1multibody_1_1_joint_actuator.html

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ <h4>Actuated prismatic joints</h4>
276276
<tr class="memdesc:a0d23c206d13900df47e009ce56fddfeb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set controller gains for this joint actuator. <a href="#a0d23c206d13900df47e009ce56fddfeb">More...</a><br /></td></tr>
277277
<tr class="separator:a0d23c206d13900df47e009ce56fddfeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
278278
<tr class="memitem:a2ae9bfe9ff9fa92e86c62acc0179d459"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a2ae9bfe9ff9fa92e86c62acc0179d459">has_controller</a> () const</td></tr>
279-
<tr class="memdesc:a2ae9bfe9ff9fa92e86c62acc0179d459"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <code>true</code> if controller gains have been specified with a call to <a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a0d23c206d13900df47e009ce56fddfeb" title="Set controller gains for this joint actuator.">set_controller_gains()</a>. <a href="#a2ae9bfe9ff9fa92e86c62acc0179d459">More...</a><br /></td></tr>
279+
<tr class="memdesc:a2ae9bfe9ff9fa92e86c62acc0179d459"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <code>true</code> if any non-zero controller gains have been specified with a call to <a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a0d23c206d13900df47e009ce56fddfeb" title="Set controller gains for this joint actuator.">set_controller_gains()</a>. <a href="#a2ae9bfe9ff9fa92e86c62acc0179d459">More...</a><br /></td></tr>
280280
<tr class="separator:a2ae9bfe9ff9fa92e86c62acc0179d459"><td class="memSeparator" colspan="2">&#160;</td></tr>
281281
<tr class="memitem:a70bb0382f762152bb446666338300b6e"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structdrake_1_1multibody_1_1_pd_controller_gains.html">PdControllerGains</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a70bb0382f762152bb446666338300b6e">get_controller_gains</a> () const</td></tr>
282282
<tr class="memdesc:a70bb0382f762152bb446666338300b6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a reference to the controller gains for this actuator. <a href="#a70bb0382f762152bb446666338300b6e">More...</a><br /></td></tr>
@@ -686,7 +686,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a70bb0382f762152bb4466663
686686
</div><div class="memdoc">
687687

688688
<p>Returns a reference to the controller gains for this actuator. </p>
689-
<dl class="section pre"><dt>Precondition</dt><dd><a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a2ae9bfe9ff9fa92e86c62acc0179d459" title="Returns true if controller gains have been specified with a call to set_controller_gains().">has_controller()</a> is <code>true</code>. </dd></dl>
689+
<dl class="section pre"><dt>Precondition</dt><dd><a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a2ae9bfe9ff9fa92e86c62acc0179d459" title="Returns true if any non-zero controller gains have been specified with a call to set_controller_gains...">has_controller()</a> is <code>true</code>. </dd></dl>
690690

691691
</div>
692692
</div>
@@ -705,8 +705,8 @@ <h2 class="memtitle"><span class="permalink"><a href="#a2ae9bfe9ff9fa92e86c62acc
705705
</table>
706706
</div><div class="memdoc">
707707

708-
<p>Returns <code>true</code> if controller gains have been specified with a call to <a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a0d23c206d13900df47e009ce56fddfeb" title="Set controller gains for this joint actuator.">set_controller_gains()</a>. </p>
709-
<dl class="section note"><dt>Note</dt><dd>A controller for a given model instance can be <em>disarmed</em> if the desired state input port for its model instance is not connected. When a PD controller is disarmed, it has no effect on the <a class="el" href="classdrake_1_1multibody_1_1_multibody_plant.html" title="MultibodyPlant is a Drake system framework representation (see systems::System) for the model of a ph...">MultibodyPlant</a>'s dynamics, as if there was no PD controller (still, this method returns <code>true</code> whenever controller gains were set with <a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a0d23c206d13900df47e009ce56fddfeb" title="Set controller gains for this joint actuator.">set_controller_gains()</a>.) See <a class="el" href="classdrake_1_1multibody_1_1_multibody_plant.html#pd_controllers_and_ports">pd_controllers_and_ports</a> for further details. </dd></dl>
708+
<p>Returns <code>true</code> if any non-zero controller gains have been specified with a call to <a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a0d23c206d13900df47e009ce56fddfeb" title="Set controller gains for this joint actuator.">set_controller_gains()</a>. </p>
709+
<dl class="section note"><dt>Note</dt><dd>A controller for a given model instance can be <em>disarmed</em> if the desired state input port for its model instance is not connected. When a PD controller is disarmed, it has no effect on the <a class="el" href="classdrake_1_1multibody_1_1_multibody_plant.html" title="MultibodyPlant is a Drake system framework representation (see systems::System) for the model of a ph...">MultibodyPlant</a>'s dynamics, as if there was no PD controller (still, this method returns <code>true</code> whenever non-zero gains were set with <a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a0d23c206d13900df47e009ce56fddfeb" title="Set controller gains for this joint actuator.">set_controller_gains()</a>.) See <a class="el" href="classdrake_1_1multibody_1_1_multibody_plant.html#pd_controllers_and_ports">pd_controllers_and_ports</a> for further details. </dd></dl>
710710

711711
</div>
712712
</div>
@@ -953,15 +953,9 @@ <h2 class="memtitle"><span class="permalink"><a href="#a0d23c206d13900df47e009ce
953953

954954
<p>Set controller gains for this joint actuator. </p>
955955
<p>This enables the modeling of a simple PD controller of the form: ũ = -Kp⋅(q − qd) - Kd⋅(v − vd) + u_ff u = max(−e, min(e, ũ)) where qd and vd are the desired configuration and velocity for <a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a54bc3724965cc59e714c64cbeb147b86" title="Returns a reference to the joint actuated by this JointActuator.">joint()</a>, Kp and Kd are the proportional and derivative gains specified in <code>gains</code>, u_ff is the feedforward actuation and <code>e</code> corresponds to <a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a5e00d5f4ea204b3bab3d733b8a64b9eb" title="Returns the actuator effort limit.">effort_limit()</a>.</p>
956+
<p>The gains must be finite and non-negative. Setting both gains to zero will remove the controller (<a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a2ae9bfe9ff9fa92e86c62acc0179d459" title="Returns true if any non-zero controller gains have been specified with a call to set_controller_gains...">has_controller()</a> will return false).</p>
956957
<p>For simulation, feedforward actuation can be provided through <a class="el" href="classdrake_1_1multibody_1_1_multibody_plant.html#a1cc1d71e6c2e91fcd215105ae4ed01e4" title="Returns a constant reference to the input port for external actuation for all actuated dofs.">MultibodyPlant::get_actuation_input_port()</a>. Desired configuration and velocity are specified through <a class="el" href="classdrake_1_1multibody_1_1_multibody_plant.html#a10da7d22fff4db1da5c396eef5780ae2" title="For models with PD controlled joint actuators, returns the port to provide the desired state for the ...">MultibodyPlant::get_desired_state_input_port()</a>.</p>
957-
<dl class="section pre"><dt>Precondition</dt><dd>The <a class="el" href="classdrake_1_1multibody_1_1_multibody_plant.html" title="MultibodyPlant is a Drake system framework representation (see systems::System) for the model of a ph...">MultibodyPlant</a> associated with this actuator has not yet allocated a Context. In other words, although gains can be changed post-Finalize, they cannot be changed during simulation.</dd></dl>
958-
<dl class="exception"><dt>Exceptions</dt><dd>
959-
<table class="exception">
960-
<tr><td class="paramname">iff</td><td>the proportional gain is not strictly positive or if the derivative gain is negative. </td></tr>
961-
<tr><td class="paramname">iff</td><td>the owning <a class="el" href="classdrake_1_1multibody_1_1_multibody_plant.html" title="MultibodyPlant is a Drake system framework representation (see systems::System) for the model of a ph...">MultibodyPlant</a> is finalized and no gains were set pre-finalize. In other words, <em>editing</em> gains post-finalize is fine, but <em>adding</em> gains post-finalize is an error. See <a class="el" href="classdrake_1_1multibody_1_1_multibody_plant.html#a8fee61d7a783cade1a3d07fe86284d27" title="This method must be called after all elements in the model (joints, bodies, force elements,...">MultibodyPlant::Finalize()</a>. </td></tr>
962-
</table>
963-
</dd>
964-
</dl>
958+
<p>PD control is currently only supported for a discrete time plant. Attempting to use non-zero gains on a continuous time plant will result in an exception. See <a class="el" href="classdrake_1_1multibody_1_1_multibody_plant.html#pd_controllers_and_ports">pd_controllers_and_ports</a> for further details. </p>
965959

966960
</div>
967961
</div>

doxygen_cxx/classdrake_1_1multibody_1_1_multibody_plant.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@
296296
<p><a class="anchor" id="pd_controllers"></a></p><h4>Using PD controlled actuators</h4>
297297
<p>While PD controllers can be modeled externally and be connected to the MultibodyPlant model via the <a class="el" href="classdrake_1_1multibody_1_1_multibody_plant.html#a1cc1d71e6c2e91fcd215105ae4ed01e4" title="Returns a constant reference to the input port for external actuation for all actuated dofs.">get_actuation_input_port()</a>, simulation stability at discrete-time steps can be compromised for high controller gains. For such cases, simulation stability and robustness can be improved significantly by moving your PD controller into the plant where the discrete solver can strongly couple controller and model dynamics.</p>
298298
<dl class="section warning"><dt>Warning</dt><dd>Currently, this feature is only supported for discrete models (is_discrete() is true) using the SAP solver (<a class="el" href="classdrake_1_1multibody_1_1_multibody_plant.html#ad7698366750a09e383106a17bf9009a2" title="Returns the contact solver type used for discrete MultibodyPlant models.">get_discrete_contact_solver()</a> returns <a class="el" href="namespacedrake_1_1multibody.html#a902306c5e0120a67c07f80e9219a3e8dad48dc7e3221aee2d9e1af665ebfbeeec" title="SAP solver, see [Castro et al., 2022].">DiscreteContactSolver::kSap</a>.)</dd></dl>
299-
<p>PD controlled joint actuators can be defined by setting PD gains for each joint actuator, see <a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a0d23c206d13900df47e009ce56fddfeb" title="Set controller gains for this joint actuator.">JointActuator::set_controller_gains()</a>. Unless these gains are specified, joint actuators will not be PD controlled and <a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a2ae9bfe9ff9fa92e86c62acc0179d459" title="Returns true if controller gains have been specified with a call to set_controller_gains().">JointActuator::has_controller()</a> will return <code>false</code>.</p>
299+
<p>PD controlled joint actuators can be defined by setting PD gains for each joint actuator, see <a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a0d23c206d13900df47e009ce56fddfeb" title="Set controller gains for this joint actuator.">JointActuator::set_controller_gains()</a>. Unless these gains are specified, joint actuators will not be PD controlled and <a class="el" href="classdrake_1_1multibody_1_1_joint_actuator.html#a2ae9bfe9ff9fa92e86c62acc0179d459" title="Returns true if any non-zero controller gains have been specified with a call to set_controller_gains...">JointActuator::has_controller()</a> will return <code>false</code>.</p>
300300
<p>For models with PD controllers, the actuation torque per actuator is computed according to: </p><pre>
301301
ũ = -Kp⋅(q − qd) - Kd⋅(v − vd) + u_ff
302302
u = max(−e, min(e, ũ))

doxygen_cxx/classdrake_1_1multibody_1_1_package_map-members.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,13 @@
165165

166166
<p>This is the complete list of members for <a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a>, including all inherited members.</p>
167167
<table class="directory">
168-
<tr class="even"><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#ac51ed3119aaced1a4d66bc104c7a8241">Add</a>(const std::string &amp;package_name, const std::string &amp;package_path)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
168+
<tr class="even"><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#acc6da6abf9ea1b547b967f4e4d4a87de">Add</a>(const std::string &amp;package_name, const std::filesystem::path &amp;package_path)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
169+
<tr><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#ac51ed3119aaced1a4d66bc104c7a8241">Add</a>(const std::string &amp;package_name, const std::string &amp;package_path)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
170+
<tr class="even"><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#ae80459d96f2cad3104d7b46dde2fb3a3">Add</a>(const std::string &amp;package_name, const char *package_path)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
169171
<tr><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#a1b6898c14b340f42747bdef9a77abfe3">AddMap</a>(const PackageMap &amp;other_map)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
170-
<tr class="even"><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#ab5db13a6fe84a643a043c9347e1bc8d2">AddPackageXml</a>(const std::string &amp;filename)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
172+
<tr class="even"><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#a69efd0ba5986fafa25cd6a40d94150e6">AddPackageXml</a>(const std::filesystem::path &amp;filename)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
173+
<tr><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#ab5db13a6fe84a643a043c9347e1bc8d2">AddPackageXml</a>(const std::string &amp;filename)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
174+
<tr class="even"><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#a600955ff01f0506184b9122a93845cae">AddPackageXml</a>(const char *filename)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
171175
<tr><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#a315d439afb48490c763ff66f4fc24b86">AddRemote</a>(std::string package_name, RemoteParams params)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
172176
<tr class="even"><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#aeba4aacea21458551c23a35911ae42bb">Contains</a>(const std::string &amp;package_name) const</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
173177
<tr><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#a1a614155f6670766fcb9c11088583ce8">GetDeprecated</a>(const std::string &amp;package_name) const</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
@@ -181,7 +185,9 @@
181185
<tr><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#aab33cc3508417f648f27a8046abbebb8">PackageMap</a>(PackageMap &amp;&amp;)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
182186
<tr class="even"><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#a26f6421b2b1971f71b16c808851bf044">PackageMap</a>()</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
183187
<tr><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#ab17a29ee7c846aaca8f0d50248a42068">PopulateFromEnvironment</a>(const std::string &amp;environment_variable)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
184-
<tr class="even"><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#a510d35f38c93d44fa6a70d727f55cb8c">PopulateFromFolder</a>(const std::string &amp;path)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
188+
<tr class="even"><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#a127d6123d640835830e620e259172c19">PopulateFromFolder</a>(const std::filesystem::path &amp;path)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
189+
<tr><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#a510d35f38c93d44fa6a70d727f55cb8c">PopulateFromFolder</a>(const std::string &amp;path)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
190+
<tr class="even"><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#ae8823e46827a09b70795716ce7824fcb">PopulateFromFolder</a>(const char *path)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
185191
<tr><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#a82b086143ce943e2318a7b2added1313">PopulateFromRosPackagePath</a>()</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
186192
<tr class="even"><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#ae80251a33cd5622dc2a12b8193ea79e1">Remove</a>(const std::string &amp;package_name)</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>
187193
<tr><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html#a857039e3b686ddb6baaef2bfc381800b">ResolveUrl</a>(const std::string &amp;url) const</td><td class="entry"><a class="el" href="classdrake_1_1multibody_1_1_package_map.html">PackageMap</a></td><td class="entry"></td></tr>

0 commit comments

Comments
 (0)