Skip to content

Commit 1563b18

Browse files
authored
Merge pull request #188 from compas-dev/pybullet_fk
PyBullet forward and inverse kinematics
2 parents f90d274 + ddfd593 commit 1563b18

File tree

77 files changed

+2089
-24277
lines changed

Some content is hidden

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

77 files changed

+2089
-24277
lines changed

CHANGELOG.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,32 @@ Unreleased
1313

1414
**Added**
1515

16+
* **PyBullet integration**: added support for PyBullet client and forward/inverse kinematic solver
1617
* Added ``ClientInterface``, ``PlannerInterface`` and various backend feature interfaces
1718
* Added implementations of these interfaces for ROS and V-REP
18-
* Added client for PyBullet
19+
* Added ``attributes`` dictionary to ``Robot`` class
1920

2021
**Changed**
2122

2223
* Updated to ``COMPAS 0.16.1``
2324
* Renamed ``compas_fab.robots.Robot.to_local_coords`` to ``compas_fab.robots.Robot.to_local_coordinates``
2425
* Renamed ``compas_fab.robots.Robot.to_world_coords`` to ``compas_fab.robots.Robot.to_world_coordinates``
2526
* Backend clients have been restructured according to the new interfaces
27+
* Parameter ``backend`` of forward kinematics has been renamed to ``solver``
2628
* The signatures of all kinematics, motion planning and planning scene management methods have been homogenized across backend clients and within ``Robot``
2729
* All examples have been updated to reflect these changes
2830

31+
2932
**Fixed**
3033

3134
* Attached collision meshes are included in inverse kinematics calculations in ROS
3235

3336
**Deprecated**
3437

38+
* The methods ``forward_kinematics``, ``inverse_kinematics``, ``plan_cartesian_motion`` and ``plan_motion``
39+
of ``Robot`` class have been refactored, but a backwards-compatible deprecated version with the old
40+
signatures still exists suffixed by ``_deprecated``, e.g. ``forward_kinematics_deprecated``.
41+
3542
**Removed**
3643

3744
0.11.0

CONTRIBUTING.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _contributors_guide:
2+
13
Contributor's Guide
24
===================
35

@@ -93,3 +95,11 @@ A Note on Architecture for Backend Clients
9395
To maintain consistency from one backend client to another and to promote modularity,
9496
we make use of several interfaces. Please reference :ref:`Note on Architecture <architecture>`
9597
for more details on how to add or amend a backend client.
98+
99+
Design documents
100+
----------------
101+
102+
.. toctree::
103+
:maxdepth: 1
104+
105+
architecture

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ COMPAS FAB: Robotic Fabrication for COMPAS
3636
planning and execution of robotic fabrication processes. It provides interfaces
3737
to existing software libraries and tools available in the field of robotics
3838
(e.g. OMPL, ROS) and makes them accessible from within the parametric design
39-
environment. The package builds upon `COMPAS <https://compas-dev.github.io/>`_,
39+
environment. The package builds upon `COMPAS <https://compas.dev/>`_,
4040
an open-source Python-based framework for collaboration and research in
4141
architecture, engineering and digital fabrication.
4242

@@ -48,7 +48,7 @@ Main features
4848
* Planning tools: kinematic solvers, path planning, etc.
4949
* Execution tools: feedback loops, robot control, etc.
5050

51-
**COMPAS FAB** runs on Python 2.x, 3.x and IronPython 2.7.
51+
**COMPAS FAB** runs on Python 3.x and IronPython 2.7.
5252

5353

5454
Getting Started
@@ -87,8 +87,8 @@ First Steps
8787
* `Documentation <https://gramaziokohler.github.io/compas_fab/>`_
8888
* `COMPAS FAB Examples <https://gramaziokohler.github.io/compas_fab/latest/examples.html>`_
8989
* `COMPAS FAB API Reference <https://gramaziokohler.github.io/compas_fab/latest/reference.html>`_
90-
* `COMPAS Examples <https://compas-dev.github.io/main/examples.html>`_
91-
* `COMPAS API Reference <https://compas-dev.github.io/main/api.html>`_
90+
* `COMPAS Tutorials <https://compas.dev/compas/tutorial.html>`_
91+
* `COMPAS API Reference <https://compas.dev/compas/api.html>`_
9292

9393

9494
Questions and feedback

docs/architecture.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _architecture:
22

33
*******************************************************************************
4-
A Note on Backend Client Architecture
4+
Backend Client Architecture
55
*******************************************************************************
66

77
To maintain consistency from one backend client to another and to promote
@@ -30,7 +30,8 @@ method. For example:
3030
from compas_fab.backends.interfaces import InverseKinematics
3131
3232
class ExampleInverseKinematics(InverseKinematics):
33-
def inverse_kinematics(self, frame_WCF,
33+
def inverse_kinematics(self, robot,
34+
frame_WCF,
3435
start_configuration=None,
3536
group=None,
3637
options=None):
@@ -43,9 +44,9 @@ can be instantiated and called in the following manner:
4344
4445
calculate_example_ik = ExampleInverseKinematics()
4546
frame = Frame([0, 0, 0], [1, 0, 0], [0, 1, 0])
46-
ik_result = calculate_example_ik(frame)
47+
ik_result = calculate_example_ik(robot, frame)
4748
# or equivalently:
48-
ik_result = calculate_example_ik.inverse_kinematics(frame)
49+
ik_result = calculate_example_ik.inverse_kinematics(robot, frame)
4950
5051
5152
These backend feature interfaces exist in part to enforce a common
@@ -78,6 +79,6 @@ Interfaces
7879
==========
7980

8081
.. toctree::
81-
:maxdepth: 2
82+
:maxdepth: 3
8283

8384
interfaces

docs/backends.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ running containers:
6363
* `Kitematic for Windows`_
6464
* `Kitematic for Mac`_
6565

66+
Developing new backends
67+
=======================
68+
69+
If you are interested in developing/integrating backends to the framework, check
70+
the :ref:`backend architecture document <architecture>` and the
71+
:ref:`contributors_guide`.
72+
6673
Next steps
6774
==========
6875

docs/backends/pybullet.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,13 @@ is based on a client-server architecture, there is no need to spin up any Docker
1515
containers to run the server. This, along with its speed, may make PyBullet a
1616
preferable backend for COMPAS_FAB. However, it, alone, does not provide motion
1717
planning functionality. PyBullet is also not compatible with IronPython. Hence to use
18-
it with Rhinoceros and Grasshopper it must be invoked through :ref:``compas.rpc``
19-
(see `COMPAS RPC <https://compas-dev.github.io/main/api/compas.rpc.html>`_).
18+
it with Rhinoceros and Grasshopper it must be invoked through the
19+
:mod:`compas.rpc` module.
20+
21+
Next Steps
22+
==========
23+
24+
* :ref:`Tutorial: COMPAS Robots <compas:robots>`
25+
* :ref:`Examples: Description models <examples_description_models>`
26+
* :ref:`Examples: PyBullet Backend <examples_pybullet>`
27+
* :ref:`COMPAS FAB API Reference <reference>`

docs/backends/ros.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ Check :ref:`the following page <backends_gui>` for more details.
265265
Next Steps
266266
==========
267267

268+
* :ref:`Tutorial: COMPAS Robots <compas:robots>`
268269
* :ref:`Examples: Description models <examples_description_models>`
269270
* :ref:`Examples: ROS Backend <examples_ros>`
270271
* :ref:`COMPAS FAB API Reference <reference>`

docs/backends/vrep.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ container with the following commands on the command prompt::
3737
Next Steps
3838
==========
3939

40+
* :ref:`Tutorial: COMPAS Robots <compas:robots>`
4041
* :ref:`Examples: V-REP Backend <examples_vrep>`
4142
* :ref:`COMPAS FAB API Reference <reference>`
Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _backends_gui:
22

33
********************************************************************************
4-
Backends with graphical user interface
4+
Access backend GUI
55
********************************************************************************
66

77
.. highlight:: bash
@@ -32,6 +32,15 @@ This feature is possible thanks to `NoVNC <https://novnc.com/>`_.
3232
Visualization forwarding display
3333
================================
3434

35+
.. note::
36+
37+
🐉 HERE BE DRAGONS!
38+
39+
Be aware that the following can be time-consuming and frustrating to configure.
40+
We recommend using the web browser visualization in the general case, and only
41+
use X11 forwarding if you know what you are getting yourself into.
42+
43+
3544
This option allows to forward a display directly to your operating system. It is
3645
especially useful when used in combination with WSL.
3746

@@ -56,15 +65,3 @@ replacing ``YOUR_IP_ADDRESS`` with your current IP:
5665
::
5766

5867
export DISPLAY=YOUR_IP_ADDRESS:0.0
59-
60-
Next steps
61-
==========
62-
63-
Check documentation for your backend of choice:
64-
65-
.. toctree::
66-
:maxdepth: 2
67-
:titlesonly:
68-
:glob:
69-
70-
backends/*

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242

4343
# intersphinx options
4444
intersphinx_mapping = {'python': ('https://docs.python.org/', None),
45-
'compas': ('http://compas-dev.github.io/main/', None),
46-
'roslibpy': ('http://roslibpy.readthedocs.org/en/latest/', None)}
45+
'compas': ('https://compas.dev/compas/', None),
46+
'roslibpy': ('https://roslibpy.readthedocs.io/en/latest/', None)}
4747

4848
# autodoc options
4949
autodoc_default_options = {

0 commit comments

Comments
 (0)