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

Refactoring of compas_robots to COMPAS 2.0 and various updates to prepare for release #1

Merged
merged 34 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
64fc657
Fix various project settings
gonzalocasas Dec 20, 2023
75c5738
Update requirements
gonzalocasas Dec 20, 2023
25fad70
Remove ghuser build tasks
gonzalocasas Dec 20, 2023
905557f
Remove placeholder
gonzalocasas Dec 20, 2023
18c3233
Update documentation to 2.0
gonzalocasas Dec 20, 2023
fcb1541
Initial refactor bringing URDF parsing from core and updates to match…
gonzalocasas Dec 20, 2023
662126e
Add UR5 urdf / mesh data
gonzalocasas Dec 20, 2023
edecbbc
Bring back tests
gonzalocasas Dec 20, 2023
b80cea4
Fix robot model objects
gonzalocasas Dec 21, 2023
1b013e3
fix some tests
gonzalocasas Dec 21, 2023
a514fc7
remove deprecated aliases
gonzalocasas Dec 21, 2023
8a7e01a
linting
gonzalocasas Dec 21, 2023
905d66b
Update changelog
gonzalocasas Dec 21, 2023
9e0cecf
Docs
gonzalocasas Dec 21, 2023
ceb105b
Get rid of a robot's specific color class and use compas.colors.Color
gonzalocasas Jan 3, 2024
1d6dc89
Fixed data serialization
gonzalocasas Jan 3, 2024
8fe6ad4
fix old ref
gonzalocasas Jan 3, 2024
04486e9
Update data serialization to compas 2.0 style
gonzalocasas Jan 3, 2024
5b43c96
Update copyright
gonzalocasas Jan 3, 2024
c6f57fc
update dev req
gonzalocasas Jan 3, 2024
c8cc098
what?
gonzalocasas Jan 3, 2024
496aaee
pre-release joy
gonzalocasas Jan 3, 2024
5e1fa00
ffs
gonzalocasas Jan 3, 2024
3625c8f
add install docs
gonzalocasas Jan 4, 2024
b1956af
doc fixes
gonzalocasas Jan 4, 2024
21634f2
fix color instantiation
gonzalocasas Jan 4, 2024
ac6b47f
Add precision to load_geometry
gonzalocasas Jan 4, 2024
351c7ff
update tutorial
gonzalocasas Jan 4, 2024
1ab7a15
Use `compas.tolerance` to format `Configuration` values
gonzalocasas Jan 7, 2024
2002a16
fix str output
gonzalocasas Jan 7, 2024
e6bc719
remove deprecated `values`/`types` in config serialization
gonzalocasas Jan 7, 2024
177312b
Rename Geometry to LinkGeometry
gonzalocasas Jan 7, 2024
db0b3d3
remove redundant definitions of from_data
gonzalocasas Jan 7, 2024
6976e33
removed redundant from_data
gonzalocasas Jan 10, 2024
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
11 changes: 6 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# EditorConfig is awesome: http://EditorConfig.org

root = true

[*]
Expand All @@ -17,13 +16,15 @@ end_of_line = crlf
[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2

[*.rst]
indent_size = 4

[Makefile]
indent_style = tab
indent_size = 4

[*.yml]
indent_style = space
indent_size = 2

[LICENSE]
insert_final_newline = false
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ _Put an `x` in the boxes that apply. You can also fill these out after creating
- [ ] I added a line to the `CHANGELOG.md` file in the `Unreleased` section under the most fitting heading (e.g. `Added`, `Changed`, `Removed`).
- [ ] I ran all tests on my computer and it's all green (i.e. `invoke test`).
- [ ] I ran lint on my computer and there are no errors (i.e. `invoke lint`).
- [ ] I added new functions/classes and made them available on a second-level import, e.g. `compas.datastructures.Mesh`.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have added necessary documentation (if appropriate)
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

* Update all artists to the new `SceneObject` system.
* Added `precision` parameter to `load_geometry` method instead of relying exclusively on the global precision setting.

### Changed

* Changed minimum requirements to `COMPAS 2.x`.
* Moved `RobotModel`, `ToolModel` and `Configuration` to the top-level package of this library.
* Moved `URDF` parsing from core into this library.
* Changed urdf parsing to use `compas.colors.Color` instead of a robot-specific color class.
* Changed `ToolModel.link_name` to `ToolModel.connected_to`.
* Fixed data serialization for `RobotModel` and `ToolModel`.
* Update all data serialization to `COMPAS 2.0` convention

### Removed

* Removed deprecated aliases `Origin`, `Cylinder`, `Box`, `Sphere`, `Capsule`.
* Removed deprecated method `load_mesh` of resource loaders.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

compas-dev
Copyright (c) 2023-2024 COMPAS Association

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

Basic infrastructure for working with robots in COMPAS.


## Getting started with this project

### Setup code editor
Expand Down Expand Up @@ -70,19 +69,6 @@ Tests are written using the [pytest](https://docs.pytest.org/) framework
2. Or run them from VS Code from the `Testing` tab


### Developing Grasshopper components

We use [Grasshopper Componentizer](https://github.com/compas-dev/compas-actions.ghpython_components) to develop Python components that can be stored and edited on git.

1. Build components

invoke build-ghuser-components

2. Install components on Rhino

python -m compas_rhino.install


### Publish release

Releases follow the [semver](https://semver.org/spec/v2.0.0.html) versioning convention.
Expand Down
1 change: 0 additions & 1 deletion data/PLACEHOLDER

This file was deleted.

1 change: 0 additions & 1 deletion docs/_images/PLACEHOLDER

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/PLACEHOLDER

This file was deleted.

4 changes: 2 additions & 2 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ API Reference
********************************************************************************

.. toctree::
:maxdepth: 1
:maxdepth: 2

api/compas_robots
api/index
3 changes: 0 additions & 3 deletions docs/api/compas_robots.artists.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
********************************************************************************
compas_robots.robots
compas_robots.model
********************************************************************************

.. currentmodule:: compas_robots.robots

.. warning::

Note that this package will be removed from :mod:`compas` and moved to a separate core extension, ``compas_robots``.
.. currentmodule:: compas_robots.model

.. rst-class:: lead

Expand All @@ -16,19 +12,15 @@ This package provides classes for describing robots, their components, and their
Model
=====

The root of the model is the :class:`RobotModel` class, which
describes a robot consisting of a set of link elements, and a set of joint
A robot model consists of a set of link elements, and a set of joint
elements connecting the links together.

.. autosummary::
:toctree: generated/
:nosignatures:

RobotModel
Joint
Link
ToolModel
Configuration


Geometric description
Expand All @@ -45,7 +37,6 @@ using the following classes.
MeshDescriptor
Material
Texture
Color


Link
Expand Down Expand Up @@ -81,21 +72,3 @@ The joint describes the kinematics and dynamics of the robot's joint.
Axis
Mimic
SafetyController


Resources
=========

Model descriptions usually do not contain embedded geometry information but only
descriptions, filenames or URLs for externally hosted resources.
For that purpose, this package provides various loader classes that help automate
the processing of these resources.

.. autosummary::
:toctree: generated/
:nosignatures:

AbstractMeshLoader
DefaultMeshLoader
GithubPackageMeshLoader
LocalPackageMeshLoader
21 changes: 21 additions & 0 deletions docs/api/compas_robots.resources.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
********************************************************************************
compas_robots.resources
********************************************************************************

.. currentmodule:: compas_robots.resources

.. rst-class:: lead

Model descriptions usually do not contain embedded geometry information but only
descriptions, filenames or URLs for externally hosted resources.
For that purpose, this package provides various loader classes that help automate
the processing of these resources.

.. autosummary::
:toctree: generated/
:nosignatures:

AbstractMeshLoader
DefaultMeshLoader
GithubPackageMeshLoader
LocalPackageMeshLoader
19 changes: 12 additions & 7 deletions docs/api/compas_robots.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ compas_robots

.. rst-class:: lead

Modules
=======
This package provides classes for describing robots models.

.. toctree::
:maxdepth: 1
:titlesonly:
The root of a robot model is the :class:`RobotModel` class, which
describes a robot consisting of a set of link elements, and a set of joint
elements connecting the links together.

.. autosummary::
:toctree: generated/
:nosignatures:

Configuration
RobotModel
ToolModel

compas_robots.artists
compas_robots.robots
14 changes: 14 additions & 0 deletions docs/api/compas_robots.scene.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
********************************************************************************
compas_robots.scene
********************************************************************************

.. currentmodule:: compas_robots.scene

.. rst-class:: lead

.. autosummary::
:toctree: generated/
:nosignatures:

AbstractRobotModelObject
BaseRobotModelObject
58 changes: 58 additions & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

********************************************************************************
API Reference
********************************************************************************

compas_robots
-------------

This package defines the main functionality to work with robot models in the COMPAS framework.

.. toctree::
:maxdepth: 1
:titlesonly:
:caption: compas_robots

compas_robots
compas_robots.model
compas_robots.resources
compas_robots.scene


compas_robots.blender
---------------------

This package provides functionality for visualizing robot models in Blender.

.. toctree::
:maxdepth: 1
:titlesonly:
:caption: compas_robots.blender

compas_robots.blender.scene


compas_robots.ghpython
----------------------

This package provides functionality for visualizing robot models in Rhino, through GHPython.

.. toctree::
:maxdepth: 1
:titlesonly:
:caption: compas_robots.ghpython

compas_robots.ghpython.scene


compas_robots.rhino
-------------------

This package provides functionality for visualizing robot models in Rhino.

.. toctree::
:maxdepth: 1
:titlesonly:
:caption: compas_robots.rhino

compas_robots.rhino.scene
Loading
Loading