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

Draft: v2.1.0 #364

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b562322
Update defaults.json
hwiedPro Oct 26, 2023
ea4b644
Fix #339
hwied Oct 26, 2023
c9f5bec
Fix #331
hwied Oct 26, 2023
ccae427
Merge branch 'master' into develop
hwiedPro Feb 13, 2024
f93c1ad
Fix install_requirements.py
hwiedPro Feb 13, 2024
1e7a797
Add frame handling
hwiedPro Feb 13, 2024
1a7a6bb
Fix to_hey_color()
hwiedPro Feb 13, 2024
a62fe45
Catch git_error when getting maintainer, author, url
hwiedPro Feb 13, 2024
078fe49
Get log level from env
hwiedPro Feb 13, 2024
53209f9
Add -m option to run pipeline for specific definition file
hwiedPro Feb 13, 2024
872eb0e
Add possibility to define default_export_config in pipeline.yml
hwiedPro Feb 13, 2024
9db3b92
Add verbose option to execute_shell_command
hwiedPro Feb 13, 2024
b3b1ed1
Make to_pretty_xml_string more robust
hwiedPro Feb 13, 2024
3a9e85f
Adapt append_string to logger usage
hwiedPro Feb 13, 2024
701fb4a
Fix setup_git script
hwiedPro Feb 13, 2024
6492934
Fix Git-LFS Readme integration
hwiedPro Feb 13, 2024
866d796
Fix several path/file handling issues
hwiedPro Feb 13, 2024
b8ea40f
Fix model_testing
hwiedPro Feb 13, 2024
fac9da6
Ensure nothing is changed on export()
hwiedPro Feb 13, 2024
0d94abd
Refactored version of Mathias commit: https://github.com/dfki-ric/pho…
hwiedPro Feb 13, 2024
94bdfa9
Merge remote-tracking branch 'origin/master' into develop
Jun 13, 2024
dd48b5d
[BREAKING CHANGES] Squashed refactoring of python module
Jun 13, 2024
bb154d9
Merge remote-tracking branch 'origin/master' into pre_v2.1.0
Jun 13, 2024
646ceaf
Fix #363
hwiedPro Jun 14, 2024
271f34c
Bugfix for 646ceaf
hwiedPro Jun 14, 2024
1e4cc8e
Fix execute_shell_command for Windows
hwiedPro Jul 3, 2024
c950925
Fix faulty indentation
hwiedPro Jul 3, 2024
5928c9b
Bump version to 2.1.0
hwiedPro Jul 3, 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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ Please contact [Henning Wiedemann](https://robotik.dfki-bremen.de/de/ueber-uns/m
for any inquiries, or any questions and feedback not suited for the issues
page.

## Version 2.1.0
Version 2.1.0 refactors especially the phobos-ci usage and improves the configurability by config inheritance. However these are breaking changes to the pipeline configuration. See PR #364 for more details on the changes.


## Version 2.0.0
With version 2.0.0 we did a refactoring of Phobos and its now possible to use phobos as a normal python package and command line tool (see below).

Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"identifier": "",
"codeRepository": "https://github.com/dfki-ric/phobos",
"datePublished": "2019-02-01",
"dateModified": "2022-08-30",
"dateModified": "2024-07-03",
"dateCreated": "2019-02-01",
"description": "Phobos is a python tool for processing simulation models. It comes with a Blender addon to create, edit and annotate robot models in a WYSIWYG environment and a python package/CLI tool to do this automated.",
"keywords": "robotics, Blender, Python, URDF, SDF, model, MARS, SMURF, CLI",
"license": "BSD-3-Clause",
"title": "Phobos",
"version": "2.0.0",
"version": "2.1.0",
"citation": "https://doi.org/10.21105/joss.01326"
}
14 changes: 11 additions & 3 deletions install_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

extra_requirements = {
"pybullet": "pybullet", # optional for blender
"open3d": "open3d", # optional for blender
"open3d": "open3d", # optional for blender, used for mesh adaption by trimesh
"python-fcl": "python-fcl", # optional for blender
}

Expand All @@ -41,7 +41,11 @@ def install_requirement(package_name, upgrade_pip=False, lib=None, ensure_pip=Tr
lib = bpy.utils.user_resource("SCRIPTS", path="modules")
if ensure_pip:
# Ensure pip is installed
subprocess.check_call([sys.executable, "-m", "ensurepip", "--user"])
try:
subprocess.check_call([sys.executable, "-m", "ensurepip", "--user"])
except subprocess.CalledProcessError:
print("WARNING: We couldn't do ensurepip, we try to continue anyways")
pass
# Update pip (not mandatory)
if upgrade_pip:
print(" Upgrading pip...")
Expand All @@ -60,7 +64,11 @@ def check_requirements(optional=False, extra=False, force=False, upgrade_pip=Fal
return
print("Checking requirements:")
# Ensure pip is installed
subprocess.check_call([sys.executable, "-m", "ensurepip", "--user"])
try:
subprocess.check_call([sys.executable, "-m", "ensurepip", "--user"])
except subprocess.CalledProcessError:
print("WARNING: We couldn't do ensurepip, we try to continue anyways")
pass
reqs = [requirements]
if optional:
reqs += [optional_requirements]
Expand Down
2 changes: 1 addition & 1 deletion manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<depend package="pyyaml"/><!-- optional="1"/>-->
<!-- Only used for kccd collision export -->
<depend package="control/kccdtools" optional="1"/>
<!-- Only necessary when using the blender add-on-->
<!-- Only necessary when using the blender add-on or for collision mesh processing-->
<depend package="blender" optional="1"/>
<!-- Only used for certain tests-->
<depend package="control/hyrodyn" optional="1" />
Expand Down
2 changes: 1 addition & 1 deletion phobos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
pass

# Phobos information
version = '2.0.0 "Perilled Pangolin"'
version = '2.1.0 "Perilled Pangolin"'
repository = 'https://github.com/dfki-ric/phobos'

bl_info = {
Expand Down
12 changes: 11 additions & 1 deletion phobos/blender/io/phobos2blender.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,14 @@ def createGeometry(viscol, geomsrc, linkobj=None):
newgeom = bUtils.createPrimitive(viscol.name, geometry_type, dimensions, phobostype=geomsrc, pmaterial="phobos_collision")
newgeom.select_set(True)
else:
# [TODO] we need to handle here the primitive alternatives that are available when loading from smurf
# They can be returned as second return value to make clear that they are different
# Also they should get another colored material
# When we do this we should add support to edit and create such primitive alternatives
# Also they will currently not be exported.
log(
"Unknown geometry type of "
+ type(geometry)
+ str(type(geometry))
+ viscol.name
+ '. Placing empty coordinate system.',
"ERROR",
Expand Down Expand Up @@ -216,6 +221,11 @@ def createLink(link):
geometries.append((geom, viscol))
for viscol in link.collisions:
geom = createGeometry(viscol, "collision")
if geom is None:
# [TODO] this happens when we load from SMURF if this collision has primitives defined but no mesh
# we need to display those primitive alternatives in Blender, too.
# Yet, we are completely ignoring them
continue
bound_box = (
max(bound_box[0], max([c[0] for c in geom.bound_box])),
max(bound_box[1], max([c[1] for c in geom.bound_box])),
Expand Down
16 changes: 8 additions & 8 deletions phobos/blender/operators/editing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2337,7 +2337,7 @@ def execute(self, context):
return {'FINISHED'}

#
# # [TODO v2.0.0] REVIEW this
# # [TODO v2.2.0] REVIEW this
# def addControllerFromYaml(controller_dict, annotations, selected_objs, active_obj, *args):
# """Execution function for the temporary operator to add controllers from yaml files.
#
Expand Down Expand Up @@ -2382,7 +2382,7 @@ def execute(self, context):
# return controller_objs, annotation_objs, []
#
#
# # [TODO v2.0.0] REVIEW this
# # [TODO v2.2.0] REVIEW this
# class AddControllerOperator(Operator):
# """Add a controller at the position of the selected object."""
#
Expand Down Expand Up @@ -2535,7 +2535,7 @@ def execute(self, context):
# return {'FINISHED'}
#
#
# # [TODO v2.0.0] REVIEW this
# # [TODO v2.2.0] REVIEW this
# def getControllerParameters(name):
# """Returns the controller parameters for the controller type with the provided
# name.
Expand All @@ -2552,7 +2552,7 @@ def execute(self, context):
# return []
#
#
# # [TODO v2.0.0] REVIEW this
# # [TODO v2.2.0] REVIEW this
# def getDefaultControllerParameters(scene, context):
# """Returns the default controller parameters for the controller of the active
# object.
Expand All @@ -2571,7 +2571,7 @@ def execute(self, context):
# return None
#

# [TODO v2.0.0] REVIEW this
# [TODO v2.2.0] REVIEW this
class CreateMimicJointOperator(Operator):
"""Make a number of joints follow a specified joint"""

Expand Down Expand Up @@ -2768,7 +2768,7 @@ def invoke(self, context, event):
return {'RUNNING_MODAL'}


# [TODO v2.0.0] REVIEW this
# [TODO v2.2.0] REVIEW this
class AddSubmodel(Operator):
"""Add a submodel instance to the scene"""

Expand Down Expand Up @@ -2897,7 +2897,7 @@ def execute(self, context):
return {'FINISHED'}


# [TODO v2.0.0] REVIEW this
# [TODO v2.2.0] REVIEW this
class DefineSubmodel(Operator):
"""Define a new submodel from objects"""

Expand Down Expand Up @@ -3273,7 +3273,7 @@ def execute(self, context):



# [TODO v2.0.0] REVIEW this
# [TODO v2.2.0] REVIEW this
class MergeLinks(Operator):
"""Merge links"""

Expand Down
2 changes: 1 addition & 1 deletion phobos/blender/phobosgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ def draw(self, context):
)


# [TODO v2.0.0] Improve e.g. add edit tools
# [TODO v2.2.0] Improve e.g. add edit tools
class PhobosPropertyInformationPanel(bpy.types.Panel):
"""Contains all properties sorted in different categories"""

Expand Down
Loading