Commit 3a75e946 authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

[instructions] graph.setConstraints -> addConstraints

parent 0588234a
Pipeline #16254 passed with stage
in 1 minute and 2 seconds
......@@ -164,6 +164,7 @@ Some useful methods
# joint2 : name of the second joint,
# relativeTransform : relative transformation of joint2 frame in joint1 frame,
# mask : list of 6 Boolean to select active coordinates of the constraint.
# note if joint1 == "", joint1 is the world frame.
ps.createTransformationConstraint (name, joint1, joint2, relativeTransform, mask)
# Set whether right hand side of constraint is constant
......@@ -196,11 +197,12 @@ graph.createEdge (node1, node2, edgeName, weight, belongsTo)
#
# nodeName : name of the node
# edgeName : name of the edge
# constraints: list of names of constraints to be passed to the node or edge
# c1, c2 : names of constraints to be passed to the node or edge
#
# note: one and only one argument between node and edge should be
# provided.
graph.setConstraints (node = nodeName, edge = edgeName, numConstraints = constraints)
graph.addConstraints (node = nodeName, edge = edgeName, constraints = \
Constraints (numConstraints = ['c1', 'c2']))
# Project a configuration on the supspace defined by a node
#
......@@ -218,6 +220,11 @@ graph.applyNodeConstraints (nodeName, q)
# edgeName: name of the edge,
# q1: configuration defining the leaf (right hand side of constraint),
# q2: configuration to project on the leaf.
#
# return:
# whether projection succeeded (Boolean),
# projected configuration,
# numerical error
graph.generateTargetConfig (edgeName, q1, q2)
----
......@@ -943,6 +943,7 @@ http://www.gnu.org/software/src-highlite -->
<span style="font-style: italic"><span style="color: #9A1900"># joint2 : name of the second joint,</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># relativeTransform : relative transformation of joint2 frame in joint1 frame,</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># mask : list of 6 Boolean to select active coordinates of the constraint.</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># note if joint1 == "", joint1 is the world frame.</span></span>
ps<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">createTransformationConstraint</span></span> <span style="color: #990000">(</span>name<span style="color: #990000">,</span> joint1<span style="color: #990000">,</span> joint2<span style="color: #990000">,</span> relativeTransform<span style="color: #990000">,</span> mask<span style="color: #990000">)</span>
<span style="font-style: italic"><span style="color: #9A1900"># Set whether right hand side of constraint is constant</span></span>
......@@ -975,11 +976,12 @@ graph<span style="color: #990000">.</span><span style="font-weight: bold"><span
<span style="font-style: italic"><span style="color: #9A1900">#</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># nodeName : name of the node</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># edgeName : name of the edge</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># constraints: list of names of constraints to be passed to the node or edge</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># c1, c2 : names of constraints to be passed to the node or edge</span></span>
<span style="font-style: italic"><span style="color: #9A1900">#</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># note: one and only one argument between node and edge should be</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># provided.</span></span>
graph<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">setConstraints</span></span> <span style="color: #990000">(</span>node <span style="color: #990000">=</span> nodeName<span style="color: #990000">,</span> edge <span style="color: #990000">=</span> edgeName<span style="color: #990000">,</span> numConstraints <span style="color: #990000">=</span> constraints<span style="color: #990000">)</span>
graph<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">addConstraints</span></span> <span style="color: #990000">(</span>node <span style="color: #990000">=</span> nodeName<span style="color: #990000">,</span> edge <span style="color: #990000">=</span> edgeName<span style="color: #990000">,</span> constraints <span style="color: #990000">=</span> <span style="color: #990000">\</span>
<span style="font-weight: bold"><span style="color: #000000">Constraints</span></span> <span style="color: #990000">(</span>numConstraints <span style="color: #990000">=</span> <span style="color: #990000">[</span><span style="color: #FF0000">'c1'</span><span style="color: #990000">,</span> <span style="color: #FF0000">'c2'</span><span style="color: #990000">]))</span>
<span style="font-style: italic"><span style="color: #9A1900"># Project a configuration on the supspace defined by a node</span></span>
<span style="font-style: italic"><span style="color: #9A1900">#</span></span>
......@@ -997,6 +999,11 @@ graph<span style="color: #990000">.</span><span style="font-weight: bold"><span
<span style="font-style: italic"><span style="color: #9A1900"># edgeName: name of the edge,</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># q1: configuration defining the leaf (right hand side of constraint),</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># q2: configuration to project on the leaf.</span></span>
<span style="font-style: italic"><span style="color: #9A1900">#</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># return:</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># whether projection succeeded (Boolean),</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># projected configuration,</span></span>
<span style="font-style: italic"><span style="color: #9A1900"># numerical error</span></span>
graph<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">generateTargetConfig</span></span> <span style="color: #990000">(</span>edgeName<span style="color: #990000">,</span> q1<span style="color: #990000">,</span> q2<span style="color: #990000">)</span>
</tt></pre></div></div>
</div>
......@@ -1007,7 +1014,7 @@ graph<span style="color: #990000">.</span><span style="font-weight: bold"><span
<div id="footer">
<div id="footer-text">
Last updated
2021-10-01 14:21:10 CEST
2021-10-01 15:31:46 CEST
</div>
</div>
</body>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment