Skip to content

Commit

Permalink
Merge pull request #41 from ami-iit/fix_ci
Browse files Browse the repository at this point in the history
Fix project for Python < 3.12
  • Loading branch information
diegoferigo authored Sep 12, 2024
2 parents 78a1da3 + c649701 commit 0985ca9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/rod/sdf/geometry.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from __future__ import annotations

import dataclasses
from typing import ClassVar
import types
from typing import ClassVar, Union

import mashumaro

Expand Down Expand Up @@ -116,7 +117,7 @@ class Sphere(Element):
@dataclasses.dataclass
class Geometry(Element):

GeometryType: ClassVar = (
GeometryType: ClassVar[types.UnionType] = (
Box | Capsule | Cylinder | Ellipsoid | Heightmap | Mesh | Plane | Sphere
)

Expand Down
2 changes: 1 addition & 1 deletion src/rod/tree/tree_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __str__(self) -> str:
content_string = (
f"name={self.name()}, "
f"index={self.index}, "
f"parent={self.parent.name() if self.parent else "None"}, "
f"parent={self.parent.name() if self.parent else str(None)}, "
f"children=[{[c.name() for c in self.children]}]"
)

Expand Down
2 changes: 1 addition & 1 deletion src/rod/urdf/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def _rod_material_to_xmltodict(material: rod.Material) -> dict[str, Any]:
return UrdfExporter.DefaultMaterial

return {
"@name": f"color_{hash(" ".join(map(str, material.diffuse)))}",
"@name": f"color_{hash(' '.join(map(str, material.diffuse)))}",
"color": {
"@rgba": " ".join(map(str, material.diffuse)),
},
Expand Down

0 comments on commit 0985ca9

Please sign in to comment.