Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
drake-jenkins-bot committed Jan 29, 2025
1 parent 8adfcf9 commit c858c93
Show file tree
Hide file tree
Showing 196 changed files with 11,989 additions and 11,305 deletions.
30 changes: 10 additions & 20 deletions clion.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,24 +174,16 @@ <h2 id="installing-clion">Installing CLion</h2>
<p>The most recent versions that we have tested for compatibility are:</p>
<ul>
<li>Ubuntu 22.04 (Jammy)</li>
<li>Bazel 6.4.0</li>
<li>CLion 2023.3.2
<li>Bazel 8.0.0</li>
<li>CLion 2024.3.2
<ul>
<li>Bazel plugin 2023.11.23.0.1-api-version-233</li>
<li>Bazel plugin 2025.01.07.0.1-api-version-243</li>
</ul>
</li>
</ul>

<p>Different CLion versions will normally choose a compatible Bazel plugin.</p>

<h2 id="current-clionbazel-problem">Current CLion/Bazel problem</h2>

<p>We are seeing CLion confused about Drake header files, possibly due to
Bazel’s “sandboxing” which uses symbolic links to construct a source tree
containing only files that appear in the current workspace. We do not
yet have a diagnosis or workaround. CLion is still usable but symbols within
header files are not properly recognized, .cc files work fine.</p>

<h2 id="upgrading-clion">Upgrading CLion</h2>

<p>Users upgrading from a previous version of CLion should do the following:</p>
Expand Down Expand Up @@ -225,8 +217,9 @@ <h2 id="installing-the-bazel-plugin">Installing the Bazel Plugin</h2>
prompted to restart CLion.</p>

<p>To use Drake in CLion you <strong>must</strong> use Drake’s bazel wrapper.
Open <code class="language-plaintext highlighter-rouge">Settings &gt; Bazel Settings</code>. For <code class="language-plaintext highlighter-rouge">Bazel binary location</code> select the
path to <code class="language-plaintext highlighter-rouge">drake/tools/clion/bazel_wrapper</code> from any recent Drake source tree
Open <code class="language-plaintext highlighter-rouge">Settings &gt; Other Settings &gt; Bazel Settings</code>.
For <code class="language-plaintext highlighter-rouge">Bazel binary location</code> select the path to
<code class="language-plaintext highlighter-rouge">drake/tools/clion/bazel_wrapper</code> from any recent Drake source tree
(it doesn’t have to match the current project open in CLion).</p>

<h2 id="setting-up-drake-in-clion">Setting up Drake in CLion</h2>
Expand Down Expand Up @@ -327,9 +320,6 @@ <h2 id="formatting-files">Formatting files</h2>
select away from the target file and back; this will cause the file to refresh
and you can confirm that the file has been modified as expected.</p>

<p>First, make sure you have installed <code class="language-plaintext highlighter-rouge">clang-format-15</code>
(see <a href="/code_style_tools.html">Tools for Code Style Compliance</a>).</p>

<h3 id="clang-format-selected-file">Clang format selected file</h3>

<p>Open the <code class="language-plaintext highlighter-rouge">Edit Tool</code> for external tools as outlined above and enter the
Expand All @@ -338,8 +328,8 @@ <h3 id="clang-format-selected-file">Clang format selected file</h3>
<ul>
<li><strong>Name:</strong> <code class="language-plaintext highlighter-rouge">Clang Format Full File</code></li>
<li><strong>Description:</strong> <code class="language-plaintext highlighter-rouge">Apply clang-format to the active file</code></li>
<li><strong>Program:</strong> <code class="language-plaintext highlighter-rouge">clang-format-15</code></li>
<li><strong>Arguments:</strong> <code class="language-plaintext highlighter-rouge">-i $FileName$</code></li>
<li><strong>Program:</strong> <code class="language-plaintext highlighter-rouge">bazel</code></li>
<li><strong>Arguments:</strong> <code class="language-plaintext highlighter-rouge">run //tools/lint:clang-format -- -i $FileName$</code></li>
<li><strong>Working directory:</strong> <code class="language-plaintext highlighter-rouge">$FileDir$</code></li>
<li><strong>Advanced Options:</strong> Uncheck <code class="language-plaintext highlighter-rouge">Open console for tool output</code></li>
</ul>
Expand All @@ -354,8 +344,8 @@ <h3 id="clang-format-selected-lines">Clang format selected lines</h3>
<ul>
<li><strong>Name:</strong> <code class="language-plaintext highlighter-rouge">Clang Format Selected Lines</code></li>
<li><strong>Description:</strong> <code class="language-plaintext highlighter-rouge">Apply clang-format to the selected lines</code></li>
<li><strong>Program:</strong> <code class="language-plaintext highlighter-rouge">clang-format-15</code></li>
<li><strong>Arguments:</strong> <code class="language-plaintext highlighter-rouge">-lines $SelectionStartLine$:$SelectionEndLine$ -i $FileName$</code></li>
<li><strong>Program:</strong> <code class="language-plaintext highlighter-rouge">bazel</code></li>
<li><strong>Arguments:</strong> <code class="language-plaintext highlighter-rouge">run //tools/lint:clang-format -- -lines $SelectionStartLine$:$SelectionEndLine$ -i $FileName$</code></li>
<li><strong>Working directory:</strong> <code class="language-plaintext highlighter-rouge">$FileDir$</code></li>
<li><strong>Advanced Options:</strong> Uncheck <code class="language-plaintext highlighter-rouge">Open console for tool output</code></li>
</ul>
Expand Down
21 changes: 8 additions & 13 deletions code_style_tools.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,31 +183,26 @@ <h1 id="manual-style-fixups">Manual style fixups</h1>

<h2 id="cc-clang-format">C/C++: Clang-Format</h2>

<p>The <a href="/from_source.html#mandatory-platform-specific-instructions">Mandatory platform-specific instructions</a>
install Drake’s required version of <code class="language-plaintext highlighter-rouge">clang-format</code>, depending on the platform
(macOS or Ubuntu).</p>

<p>To run <code class="language-plaintext highlighter-rouge">clang-format</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>clang-format-15 -i -style=file [file name]
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cd drake
bazel run //tools/lint:clang-format -- -i -style=file [file name]
</code></pre></div></div>

<p>Using <code class="language-plaintext highlighter-rouge">clang-format</code> will modify the entire file that is specified. As an
alternative, you can use <code class="language-plaintext highlighter-rouge">git clang-format</code> on Ubuntu to change only the
portions of a file that you have modified. To run <code class="language-plaintext highlighter-rouge">git clang-format</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># For development on Ubuntu: format a file that has been staged in git
git clang-format-15 --binary=/usr/bin/clang-format-15 -- [file name]
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># Make sure the clang-format program exists at the path we want to use.
bazel build //tools/lint/...

# For development on Ubuntu: format a file that has been staged in git
git clang-format --binary=/path/to/drake/bazel-bin/tools/lint/clang-format -- [file name]

# For development on Ubuntu: format a file that has been modified but not staged
git clang-format-15 --binary=/usr/bin/clang-format-15 -f -- [file name]
git clang-format --binary=/path/to/drake/bazel-bin/tools/lint/clang-format -f -- [file name]
</code></pre></div></div>

<p>On macOS, the command to use is
<code class="language-plaintext highlighter-rouge">/opt/homebrew/opt/llvm@15/bin/clang-format</code>.
Note in particular that <code class="language-plaintext highlighter-rouge">15</code> is part of the directory name, not a suffix on
the program name.</p>

<h3 id="ide-integration">IDE integration</h3>

<p>Most IDEs can run <code class="language-plaintext highlighter-rouge">clang-format</code> automatically.
Expand Down
2 changes: 1 addition & 1 deletion doxygen_cxx/annotated.html
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@
<p> where \(k\) is the order of the <code>piecewise_polynomial_part</code> and \(t_j\) is the start time of the \(j\)-th segment </td></tr>
<tr id="row_0_18_6_" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classdrake_1_1trajectories_1_1_function_handle_trajectory.html" target="_self">FunctionHandleTrajectory</a></td><td class="desc"><a class="el" href="classdrake_1_1trajectories_1_1_function_handle_trajectory.html" title="FunctionHandleTrajectory takes a function, value = f(t), and provides a Trajectory interface.">FunctionHandleTrajectory</a> takes a function, value = f(t), and provides a <a class="el" href="classdrake_1_1trajectories_1_1_trajectory.html" title="A Trajectory represents a time-varying matrix, indexed by a single scalar time.">Trajectory</a> interface </td></tr>
<tr id="row_0_18_7_" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classdrake_1_1trajectories_1_1_path_parameterized_trajectory.html" target="_self">PathParameterizedTrajectory</a></td><td class="desc">A trajectory defined by a path and timing trajectory </td></tr>
<tr id="row_0_18_8_" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classdrake_1_1trajectories_1_1_piecewise_constant_curvature_trajectory.html" target="_self">PiecewiseConstantCurvatureTrajectory</a></td><td class="desc">A piecewise constant curvature trajectory within an arbitrary three-dimensional plane </td></tr>
<tr id="row_0_18_8_" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classdrake_1_1trajectories_1_1_piecewise_constant_curvature_trajectory.html" target="_self">PiecewiseConstantCurvatureTrajectory</a></td><td class="desc">A piecewise constant curvature trajectory in a plane, where the plane is posed arbitrarily in three dimensions </td></tr>
<tr id="row_0_18_9_" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classdrake_1_1trajectories_1_1_piecewise_polynomial.html" target="_self">PiecewisePolynomial</a></td><td class="desc">A scalar multi-variate piecewise polynomial </td></tr>
<tr id="row_0_18_10_" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classdrake_1_1trajectories_1_1_piecewise_pose.html" target="_self">PiecewisePose</a></td><td class="desc">A wrapper class that represents a pose trajectory, whose rotation part is a <a class="el" href="classdrake_1_1trajectories_1_1_piecewise_quaternion_slerp.html" title="A class representing a trajectory for quaternions that are interpolated using piecewise slerp (spheri...">PiecewiseQuaternionSlerp</a> and the translation part is a <a class="el" href="classdrake_1_1trajectories_1_1_piecewise_polynomial.html" title="A scalar multi-variate piecewise polynomial.">PiecewisePolynomial</a> </td></tr>
<tr id="row_0_18_11_" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classdrake_1_1trajectories_1_1_piecewise_quaternion_slerp.html" target="_self">PiecewiseQuaternionSlerp</a></td><td class="desc">A class representing a trajectory for quaternions that are interpolated using piecewise slerp (spherical linear interpolation) </td></tr>
Expand Down
1 change: 1 addition & 0 deletions doxygen_cxx/bspline__basis_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
<code>#include &quot;<a class="el" href="drake__bool_8h.html">drake/common/drake_bool.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="drake__copyable_8h.html">drake/common/drake_copyable.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="drake__throw_8h.html">drake/common/drake_throw.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="eigen__types_8h.html">drake/common/eigen_types.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="name__value_8h.html">drake/common/name_value.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="knot__vector__type_8h.html">drake/math/knot_vector_type.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Expand Down
20 changes: 10 additions & 10 deletions doxygen_cxx/bspline__basis_8h__dep__incl.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c858c93

Please sign in to comment.