Skip to content

Commit 705917e

Browse files
committed
Merge branch 'master' of github.com:rhoban/placo
2 parents 99f6372 + dc87baa commit 705917e

16 files changed

Lines changed: 73 additions & 74 deletions

docs/dynamics/contacts.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ To do so, the solver will add **extra forces** as decision variables.
1414

1515
However, physical constraints sometime don't handle all the aspects of a task.
1616
Even if a foot can't penetrate the ground, it can still lift up, no force will prevent it
17-
(this is an unilateral contact).
17+
(this is a unilateral contact).
1818
Also, because of the friction coefficient, the ground can't prevent the foot from sliding, this
19-
depends on the relation between the normal force and thet tangential force.
19+
depends on the relation between the normal force and the tangential force.
2020
For those reasons, some specific contacts are implemented in PlaCo.
2121

22-

docs/dynamics/external_wrench_contact.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ An external wrench contact can be used to apply an external force and/or moments
1010
# Adding an external wrench, which will be expressed in the world
1111
# and applied on the right foot
1212
external_wrench = solver.add_external_wrench_contact("right_foot", "world")
13-
13+
1414
# Setting the wrench (force, moments)
15-
exexternal_wrench.w_ext = np.array([10, 0, 0, 0, 0, 0])
15+
external_wrench.w_ext = np.array([10, 0, 0, 0, 0, 0])
1616
1717
.. admonition:: Humanoid with external force applied
1818

docs/dynamics/introduction.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ This is the default in the solver, allowing to reduce the number of parameters t
3737
The good news in the dynamics solver, is that the equation of motion is enforced!
3838

3939
It allows to express the torque :math:`\tau` as a function of the acceleration and robot state (see below for
40-
details if you are interrested).
41-
In practice, this allows to use torque in constraint and tasks.
40+
details if you are interested).
41+
In practice, this allows to use torque in constraints and tasks.
4242
The very first natural constraints are torque limits, accounting better for the robot abilities.
4343

4444

@@ -53,15 +53,15 @@ while in the dynamics solver, the contacts **must** be properly specified in ord
5353

5454
To that end, the dynamics solver allow you to specify active contacts, that are used in the computation.
5555

56-
.. warning::
56+
.. warning::
5757

5858
Keep in mind that the dynamics solver is **not** a trajectory planner.
5959
It is trying to solve for the joints acceleration (and, by extension, the torque) in order to be as close as
6060
possible to the task's desired accelerations, while respecting the constraints.
6161
However, it is near-sighted, and will not plan for the future.
6262

6363
For example, it is not able to start decelerating before reaching a target, or to anticipate a contact.
64-
64+
6565

6666
.. admonition:: Math details
6767

@@ -73,4 +73,4 @@ To that end, the dynamics solver allow you to specify active contacts, that are
7373
:math:`F_i` is the external force for the :math:`i`-th contact, :math:`M(q)` is the mass matrix,
7474
and :math:`h(q, \dot q)` is the bias term (lumping gravity, centrifugal and coriolis).
7575

76-
The decision variables are :math:`\ddot q` and the contact forces :math:`F_i`.
76+
The decision variables are :math:`\ddot q` and the contact forces :math:`F_i`.

docs/dynamics/joints_task.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ A :func:`JointsTask <placo.DynamicsJointsTask>` is a task that can be used to de
55

66
.. warning::
77

8-
While it is possible to explicitely set a joint value by using :func:`set_joint() <placo.RobotWrapper.set_joint>`
8+
While it is possible to explicitly set a joint value by using :func:`set_joint() <placo.RobotWrapper.set_joint>`
99
on the robot wrapper (see :doc:`joints configurations </basics/configurations>`),
1010
it is **not** equivalent to using a joint task.
11-
11+
1212
Using the joints task will allow to account for everything
1313
that the solver is enforcing (torque limits, joint limits, joint velocity limits, other tasks such as loops
1414
closing constraints etc...), while :func:`set_joint() <placo.RobotWrapper.set_joint>` will immediately update
@@ -40,7 +40,7 @@ You can configure the task by passing a ``dict`` to :func:`set_joints() <placo.D
4040
4141
.. note::
4242

43-
Unit values will depend on the joint types, it will be *radians* for revolute joints and *meters* for prismatic
43+
Unit values will depend on the joint types, it will be *radians* for revolute joints and *meters* for prismatic joints.
4444

4545
To specify the target velocity and acceleration, you can call :func:`set_joints() <placo.DynamicsJointsTask.set_joint>`
4646
on individual joints:
@@ -57,7 +57,7 @@ Here is a complete example using a UR5 robot tracking a target frame.
5757
Its target velocity is also set for better tracking.
5858

5959
.. admonition:: UR5 controlled with joints
60-
60+
6161
.. video:: https://github.com/Rhoban/placo-examples/raw/master/dynamics/videos/ur5_joints.mp4
6262
:autoplay:
6363
:muted:
@@ -66,4 +66,4 @@ Its target velocity is also set for better tracking.
6666
In this example, a fixed contact is used on the base of the UR5 robot, which is following a sinusoidal
6767
joint-space trajectory.
6868

69-
:example:`dynamics/ur5_joints.py`
69+
:example:`dynamics/ur5_joints.py`

docs/dynamics/limits.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Torque limits
55
-------------
66

77
Torque limits are **disabled by default**. They enforce the robot torque limits
8-
presents in the URDF or :ref:`overriden by the user <joint_limits>`.
8+
present in the URDF or :ref:`overriden by the user <joint_limits>`.
99

1010
You can enable/disable those limits with:
1111

@@ -34,7 +34,7 @@ Velocity limits
3434
---------------
3535

3636
You can enable the velocity limits (**disabled by default**). They enfore the robot velocity limits
37-
presents in the URDF or :ref:`overriden by the user <joint_limits>`.
37+
present in the URDF or :ref:`overriden by the user <joint_limits>`.
3838

3939
.. code-block:: python
4040
@@ -114,7 +114,7 @@ Joint limits
114114
------------
115115

116116
You can enable joint limits, that are **disabled by default**. They enfore the robot joint limits
117-
presents in the URDF or :ref:`overriden by the user <joint_limits>`.
117+
present in the URDF or :ref:`overriden by the user <joint_limits>`.
118118

119119
.. code-block:: python
120120
@@ -137,7 +137,7 @@ and can be set by the user with:
137137

138138
Denoting the safe acceleration :math:`\ddot q_{safe}`, the solver will enforce the following.
139139

140-
If the joint is not currently excedding its limit :math:`q_{max}` (or :math:`q_{min}`), the acceleration is
140+
If the joint is not currently exceeding its limit :math:`q_{max}` (or :math:`q_{min}`), the acceleration is
141141
constrained by:
142142

143143
.. math::
@@ -147,12 +147,12 @@ and can be set by the user with:
147147
This ensures that the velocity towards the joint limit can't exceed a value such that the safe acceleration
148148
won't be able to take the joint to a stop before hitting it.
149149

150-
If the joint is currently excedding its limit :math:`q_{max}` (or :math:`q_{min}`), the solver will enforce
150+
If the joint is currently exceeding its limit :math:`q_{max}` (or :math:`q_{min}`), the solver will enforce
151151
at least the safe acceleration outwards the constraint. For example, if :math:`q > q_{max}`, the following
152152
inequality will be added:
153153

154154
.. math::
155155
156156
\ddot q \le -\ddot q_{safe}
157157
158-
This situation can happen during initialization, or because of numerical inaccuracies.
158+
This situation can happen during initialization, or because of numerical inaccuracies.

docs/dynamics/loop_closures.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Here is the checklist to handle loop closures within a dynamics solver:
1616
1. Add tasks to ensure loop closures, just like you would `do for kinematics <../kinematics/loop_closures>`_.
1717
Those tasks are typically :doc:`relative position tasks <position_orientation_frame_task>`
1818
2. Create a :doc:`task contact <task_contact>` associated with the loop closure task.
19-
This will adds internal forces to the system to enforce the loop closure.
19+
This will add internal forces to the system to enforce the loop closure.
2020
3. Make sure all passive degrees of freedom have zero-torque constraint, thanks to the
2121
`torque task <torque_task>`_.
2222

@@ -61,7 +61,7 @@ The following line:
6161
Creates a :doc:`task contact <task_contact>` associated with the loop closure task. Thanks to this, forces can be added by the solver to
6262
enforce the task.
6363

64-
Finally, the following line:
64+
Finally, the following lines:
6565

6666
.. code-block:: python
6767
@@ -94,7 +94,7 @@ With a similar pattern, many loop closures are used un Megabot:
9494
In this other example, gear tasks are used with task contact to simulate a differential gear system:
9595

9696
.. admonition:: Differential
97-
97+
9898
.. video:: https://github.com/Rhoban/placo-examples/raw/master/dynamics/videos/differential.mp4
9999
:autoplay:
100100
:muted:
@@ -104,4 +104,4 @@ In this other example, gear tasks are used with task contact to simulate a diffe
104104
At the end of the video, the torque is forced to zero to show the system's behaviour when only subject
105105
to gravity.
106106

107-
:example:`dynamics/differential.py`
107+
:example:`dynamics/differential.py`

docs/dynamics/point_contacts.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This type of contact can be used for points that are attached to the world.
2424
:loop:
2525

2626
In this example, a quadruped robot is attached with four points (which are not unilateral).
27-
All motors expect one are unactuated (torque is set to zero).
27+
All motors except one are unactuated (torque is set to zero).
2828
This results in a "hanging" robot.
2929

3030
:example:`dynamics/quadruped_hanging.py`

docs/dynamics/position_orientation_frame_task.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Position, orientation and frame tasks
22
=====================================
33

44
:func:`PositionTask <placo.DynamicsPositionTask>` and :func:`OrientationTask <placo.DynamicsOrientationTask>`
5-
can be respectively use to control the position and orientation of a particular frame on the robot.
5+
can be respectively used to control the position and orientation of a particular frame on the robot.
66
The :func:`FrameTask <placo.DynamicsFrameTask>` is a combination of both, wrapping the two tasks in a single one.
77

88

@@ -69,7 +69,7 @@ those methods on the position and orientation tasks directly.
6969
Relative position and orientation tasks
7070
---------------------------------------
7171

72-
The above mentionned tasks also exists in a *relative* version, where two frames have to be specified.
72+
The above mentionned tasks also exist in a *relative* version, where two frames have to be specified.
7373

7474
.. code-block:: python
7575
@@ -108,7 +108,7 @@ In some case, you only want to assign a task for one or two axises. To that end,
108108
effector_position.mask.set_axises("z")
109109
110110
By default, this masking will occur in the "task" frame (the world frame for absolute tasks, and the first frame for
111-
relative tasks). Youc can set the second argument of :func:`set_axises() <placo.AxisesMask.set_axises>` to
111+
relative tasks). You can set the second argument of :func:`set_axises() <placo.AxisesMask.set_axises>` to
112112
``"local"`` to enforce the masking to happen in the local frame.
113113

114114
Alternatively, you can also specify ``"custom"`` as the second argument, and provide a custom rotation matrix to
@@ -122,7 +122,7 @@ Here is a complete example using a UR5 robot tracking a target frame.
122122
Its target velocity is also set for better tracking.
123123

124124
.. admonition:: UR5 with fixed contact
125-
125+
126126
.. video:: https://github.com/Rhoban/placo-examples/raw/master/dynamics/videos/ur5_fixed_contact.mp4
127127
:autoplay:
128128
:muted:
@@ -131,4 +131,4 @@ Its target velocity is also set for better tracking.
131131
In this example, a fixed contact is used on the base of the UR5 robot.
132132
The :func:`contacts_viz <placo_utils.visualization.contacts_viz>` helper is used to visualize the contacts.
133133

134-
:example:`dynamics/ur5_fixed_contact.py`
134+
:example:`dynamics/ur5_fixed_contact.py`

docs/dynamics/puppet_contact.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Puppet contact
33

44
*To be used with:* no task required
55

6-
The puppet contact is an "universal contact", allowing the solver to add arbitrary forces anywhere
6+
The puppet contact is a "universal contact", allowing the solver to add arbitrary forces anywhere
77
on the robot. By essence, it makes all the tasks feasible force-wise.
88

99
This contact is helpful for debugging purpose, and can be used in the initialization phase to
@@ -17,7 +17,7 @@ set the robot in a specific state.
1717
For example, you can consider such a loop at the begining to initialize the robot:
1818

1919
.. code-block:: python
20-
20+
2121
# Initializing the robot using a puppet contact
2222
puppet_contact = solver.add_puppet_contact()
2323
for k in range(1000):

docs/dynamics/weighting_deactivating_contacts.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Weighting, activation/deactivating contacts
44
Weighting contact
55
-----------------
66

7-
By default, forces and moments generated by the solver has no cost (they are however internally weighted by
7+
By default, forces and moments generated by the solver have no cost (they are however internally weighted by
88
the problem solver to make the problem feasible).
99

1010
If you want to mitigate the forces produced by a specific contact, you can use the :func:`weight_forces <placo.Contact.weight_forces>` attribute.
@@ -83,4 +83,4 @@ You can also remove a contact by using :func:`remove_contact <placo.DynamicsSolv
8383
.. code-block:: python
8484
8585
# Remove the right foot contact
86-
solver.remove_contact(right_contact)
86+
solver.remove_contact(right_contact)

0 commit comments

Comments
 (0)