Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation stylesheet #114

Merged
merged 7 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ All notable changes to this project will be documented in this file.
### Added

- **Breaking:** Updated the logic for handling the joint limits:
- Add a ``limits`` argument to ``build_ik`` and ``solve_ik``
- Add a `limits` argument to `build_ik` and `solve_ik`
- The `check_limits` method now includes an optional `safety_break` argument to control whether execution should stop on exception.
- The ``solve_ik`` function now includes the `safety_break` that is forwarded to `check_limits`.
- The `solve_ik` function now includes the `safety_break` that is forwarded to `check_limits`.
- Control Barrier Functions, namely: (thanks to @domrachev03 and @simeon-ned)
- Abstract Barrier ``Barrier``
- Frame Position Barrier ``PositionBarrier``
- Body Spherical Barrier ``BodySphericalBarrier``
- Whole-body Self-Collision Avoidance Barrier ``SelfCollisionBarrier``
- Abstract Barrier `Barrier`
- Frame Position Barrier `PositionBarrier`
- Body Spherical Barrier `BodySphericalBarrier`
- Whole-body Self-Collision Avoidance Barrier `SelfCollisionBarrier`
- Example: UR5 manipulator and GO2 quadruped robot with `PositionBarrier`
- Example: YUMI two-armed manipulator with `BodySphericalBarrier`
- Example: G1 humanoid squatting through regulating CoM.
Expand All @@ -26,7 +26,7 @@ All notable changes to this project will be documented in this file.

### Changed

- **Breaking:** remove ``lm_damping`` parameter from DampingTask where it wasn't used
- **Breaking:** remove `lm_damping` parameter from DampingTask where it wasn't used
- CICD: Update ruff to 0.4.3
- Configuration accepts list of Control Barrier Functions
- DampingTask: Simplify implementation
Expand All @@ -45,7 +45,7 @@ All notable changes to this project will be documented in this file.

### Added

- Function ``get_transform`` in the Configuration class
- Function `get_transform` in the Configuration class
- Task: relative frame task, where target is w.r.t another robot frame

### Changed
Expand All @@ -57,7 +57,7 @@ All notable changes to this project will be documented in this file.

### Added

- Add ``gain`` keyword argument to all task constructors where is makes sense
- Add `gain` keyword argument to all task constructors where is makes sense
- Damping task that minimizes joint velocities
- Distribute package on conda-forge
- Example on how differential IK may converge to a local constrained optimum
Expand All @@ -68,8 +68,8 @@ All notable changes to this project will be documented in this file.
### Changed

- **Breaking:** Define task Jacobian as derivative of the task error
- **Breaking:** Rename ``BodyNotFound`` exception to ``FrameNotFound``
- **Breaking:** Rename ``FrameTask.body`` to ``FrameTask.frame``
- **Breaking:** Rename `BodyNotFound` exception to `FrameNotFound`
- **Breaking:** Rename `FrameTask.body` to `FrameTask.frame`

### Removed

Expand Down Expand Up @@ -114,23 +114,23 @@ All notable changes to this project will be documented in this file.
### Changed

- Handle all frames, including non-body frames (thanks to @proyan)
- Rename ``BodyTask`` to ``FrameTask``
- Rename `BodyTask` to `FrameTask`

## [0.10.0] - 2023-03-30

### Added

- Base class ``Limit`` for configuration and velocity limits
- Base class `Limit` for configuration and velocity limits
- In-place integration of a velocity from a configuration
- Unit tests for configuration limits
- Unit tests for velocity limits

### Changed

- Add ``pink.limits`` submodule
- Add `pink.limits` submodule
- Configuration and velocity limits are now stacked rather than pre-reduced
- Move configuration limit to ``ConfigurationLimit`` class
- Move velocity limit to ``VelocityLimit`` class
- Move configuration limit to `ConfigurationLimit` class
- Move velocity limit to `VelocityLimit` class

## [0.9.0] - 2023-03-15

Expand All @@ -143,9 +143,9 @@ All notable changes to this project will be documented in this file.

### Changed

- Refactor ``apply_configuration`` into ``Configuration`` constructor
- Refactor ``assume_configuration`` into ``Configuration`` constructor
- Refactor task dynamics into ``compute_error`` and ``compute_jacobian``
- Refactor `apply_configuration` into `Configuration` constructor
- Refactor `assume_configuration` into `Configuration` constructor
- Refactor task dynamics into `compute_error` and `compute_jacobian`

## [0.8.0] - 2023-02-09

Expand All @@ -154,11 +154,11 @@ All notable changes to this project will be documented in this file.
- BodyNotFound exception
- Document spatial and body minus between transforms
- Example: SigmaBan humanoid
- Forward keyword arguments of ``solve_ik`` to the backend QP solver
- Forward keyword arguments of `solve_ik` to the backend QP solver

### Changed

- Return type of ``compute_velocity_limits`` now includes optionals
- Return type of `compute_velocity_limits` now includes optionals
- VectorSpace type is now immutable

### Fixed
Expand All @@ -176,7 +176,7 @@ All notable changes to this project will be documented in this file.
### Changed

- Example: UR3 arm
- Expose ``pink.Task`` from top-level module
- Expose `pink.Task` from top-level module
- Improve joint limit computations

### Fixed
Expand Down Expand Up @@ -210,12 +210,12 @@ All notable changes to this project will be documented in this file.
- Handle general root joint in posture task
- Handle unbounded velocity limits in QP formulation
- Posture task targets can be read directly from a configuration
- Simple rate limiter in ``pink.utils``
- Simple rate limiter in `pink.utils`

### Changed

- Raise an error when querying a body that doesn't exist
- Transition from ``pink.models`` to ``robot_descriptions``
- Transition from `pink.models` to `robot_descriptions`
- Update reference posture in Upkie wheeled biped example
- Warn when the backend QP solver is not explicitly selected

Expand All @@ -233,9 +233,9 @@ All notable changes to this project will be documented in this file.

### Changed

- Argument to ``build_from_urdf`` functions is now the path to the URDF file
- Argument to `build_from_urdf` functions is now the path to the URDF file
- Bumped status to beta
- Examples use the ``jvrc_description`` and ``upkie_description`` packages
- Examples use the `jvrc_description` and `upkie_description` packages
- Use jvrc\_description and upkie\_description packages from PyPI
- Task is now an abstract base class

Expand Down Expand Up @@ -268,7 +268,7 @@ All notable changes to this project will be documented in this file.

- Specify path when loading a model description
- Switch to the Apache 2.0 license
- ``build_jvrc_model`` is now ``build_from_urdf``
- `build_jvrc_model` is now `build_from_urdf`

### Fixed

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ This project's goal is to make it easy to do inverse kinematics on all kinds of
- Pick something you want to do with one of the many [robot descriptions](https://github.com/robot-descriptions/robot_descriptions.py) and write a new example
- Find a use case that is not covered and write a unit test for it
- Benchmark the performance of the following design choice depending on the number and types of tasks:
- The current ``Configuration`` interface, which does ``pin.computeJointJacobians`` + ``pin.getFrameJacobian``
- The alternative using only ``pin.computeFrameJacobian``
- The current `Configuration` interface, which does `pin.computeJointJacobians` + `pin.getFrameJacobian`
- The alternative using only `pin.computeFrameJacobian`

There are also a number of tasks from Pymanoid that are not in Pink yet. If you happen to need one of them for your application, check out the reference implementation and add it to Pink:

Expand Down
18 changes: 18 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Makefile for Sphinx documentation
#
# Copyright 2022 Stéphane Caron

# You can also set these variables from the command line.
OUTPUTDIR = $(abspath ../_build)

.PHONY: build
build: ## build the documentation
(cd .. && sphinx-build $(CURDIR) $(OUTPUTDIR) -W)

.PHONY: clean
clean: ## remove all output files
rm -rf $(OUTPUTDIR)

.PHONY: open
open: ## open the locally built documentation in Firefox
firefox $(OUTPUTDIR)/index.html
39 changes: 31 additions & 8 deletions doc/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
a, a:visited, a:focus {
color: rgb(176, 46, 118);
color: rgb(240, 110, 163);
text-decoration: none;
}

a:hover, a:active {
color: rgb(72, 0, 32);
color: rgb(204, 94, 139);
text-decoration: none;
}

Expand All @@ -18,7 +18,7 @@ a:hover, a:active {
}

.wy-menu-vertical a:hover {
background: rgb(176, 46, 118);
background: rgb(240, 110, 163);
color: white;
}

Expand All @@ -35,7 +35,7 @@ a:hover, a:active {
}

.wy-nav-side {
background: rgb(250, 231, 242);
background: rgb(255, 200, 225);
}

.wy-nav-top {
Expand All @@ -51,13 +51,36 @@ a:hover, a:active {
}

.wy-side-nav-search {
background: rgb(255, 183, 255);
background: rgb(240, 110, 163);
}

.wy-side-nav-search > div.version {
color: black;
color: white;
}

.wy-side-nav-search > a{
color: black;
.wy-side-nav-search > a {
color: white;
}

pre {
background: rgb(255, 230, 240);
}

html.writer-html4 .rst-content dl:not(.docutils) > dt,
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) > dt {
background: rgb(255, 230, 240);
border-top: 3px solid #de6a98;
color: rgb(240, 110, 163);
}

.rst-content .note {
background: rgb(255, 230, 240);
}

.rst-content .note .admonition-title {
background: rgb(240, 110, 163);
}

.rst-content code.literal {
color: rgb(220, 40, 115);
}
4 changes: 2 additions & 2 deletions doc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: pink
channels:
- conda-forge
dependencies:
- pinocchio >=3.0.0
- pinocchio >= 3.0.0
- pink
- pip >=21.3.1
- pip >= 21.3.1
- pip:
- sphinx >= 7.2.2
- sphinx-autodoc-typehints
Expand Down
2 changes: 1 addition & 1 deletion examples/arm_kinova_gen2.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
except ModuleNotFoundError:
raise ModuleNotFoundError(
"Examples need robot_descriptions, "
"try ``pip install robot_descriptions``"
"try `[conda|pip] install robot_descriptions`"
)


Expand Down
2 changes: 1 addition & 1 deletion examples/arm_ur3.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
except ModuleNotFoundError:
raise ModuleNotFoundError(
"Examples need robot_descriptions, "
"try ``pip install robot_descriptions``"
"try `[conda|pip] install robot_descriptions`"
)


Expand Down
2 changes: 1 addition & 1 deletion examples/arm_ur5.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
except ModuleNotFoundError as exc:
raise ModuleNotFoundError(
"Examples need robot_descriptions, "
"try ``pip install robot_descriptions``"
"try `[conda|pip] install robot_descriptions`"
) from exc


Expand Down
2 changes: 1 addition & 1 deletion examples/barriers/arm_ur5.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
except ModuleNotFoundError as exc:
raise ModuleNotFoundError(
"Examples need robot_descriptions, "
"try ``pip install robot_descriptions``"
"try `[conda|pip] install robot_descriptions`"
) from exc # noqa: E501


Expand Down
2 changes: 1 addition & 1 deletion examples/barriers/go2_squat.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
except ModuleNotFoundError as exc:
raise ModuleNotFoundError(
"Examples need robot_descriptions, "
"try ``pip install robot_descriptions``"
"try `[conda|pip] install robot_descriptions`"
) from exc # noqa: E501


Expand Down
2 changes: 1 addition & 1 deletion examples/barriers/yumi_self_collision.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
except ModuleNotFoundError as exc:
raise ModuleNotFoundError(
"Examples need robot_descriptions, "
"try ``pip install robot_descriptions``"
"try `[conda|pip] install robot_descriptions`"
) from exc # noqa: E501


Expand Down
2 changes: 1 addition & 1 deletion examples/flying_dual_arm_ur3.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
except ModuleNotFoundError as exc:
raise ModuleNotFoundError(
"Examples need robot_descriptions, "
"try ``pip install robot_descriptions``"
"try `[conda|pip] install robot_descriptions`"
) from exc


Expand Down
7 changes: 3 additions & 4 deletions examples/humanoid_g1_com.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,22 @@

"""G1 humanoid squat by regulating CoM"""

import meshcat_shapes
import numpy as np
import pinocchio as pin
import qpsolvers
from loop_rate_limiters import RateLimiter
import pinocchio as pin

import pink
from pink import solve_ik
from pink.tasks import FrameTask, PostureTask, ComTask
from pink.tasks import ComTask, FrameTask, PostureTask
from pink.visualization import start_meshcat_visualizer

try:
from robot_descriptions.loaders.pinocchio import load_robot_description
except ModuleNotFoundError as exc:
raise ModuleNotFoundError(
"Examples need robot_descriptions, "
"try ``pip install robot_descriptions``"
"try `[conda|pip] install robot_descriptions`"
) from exc # noqa: E501


Expand Down
2 changes: 1 addition & 1 deletion examples/mobile_stretch.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
except ModuleNotFoundError:
raise ModuleNotFoundError(
"Examples need robot_descriptions, "
"try ``pip install robot_descriptions``"
"try `[conda|pip] install robot_descriptions`"
)

# Trajectory parameters to play with ;)
Expand Down
2 changes: 1 addition & 1 deletion examples/stretch_relative_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
except ModuleNotFoundError:
raise ModuleNotFoundError(
"Examples need robot_descriptions, "
"try ``pip install robot_descriptions``"
"try `[conda|pip] install robot_descriptions`"
)

# Trajectory parameters to play with ;)
Expand Down
2 changes: 1 addition & 1 deletion examples/stretch_world_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
except ModuleNotFoundError:
raise ModuleNotFoundError(
"Examples need robot_descriptions, "
"try ``pip install robot_descriptions``"
"try `[conda|pip] install robot_descriptions`"
)

# Trajectory parameters to play with ;)
Expand Down
2 changes: 1 addition & 1 deletion examples/visualize_in_meshcat.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
except ModuleNotFoundError:
raise ModuleNotFoundError(
"Examples need robot_descriptions, "
"try ``pip install robot_descriptions``"
"try `[conda|pip] install robot_descriptions`"
)


Expand Down
Loading
Loading