Skip to content

Commit

Permalink
Migrate from urdfpy to urchin (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicogene authored Apr 20, 2023
2 parents 84d9edb + 8dbf118 commit 1179630
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This repo contains a `gazebo` model, starting from iCub3, and some scripts that
- [`gazebo`](http://gazebosim.org/)
- [`robotology-superbuild` v2022.02.0](https://github.com/robotology/robotology-superbuild/releases/tag/v2022.02.0) with [`dynamics profile`](https://github.com/robotology/robotology-superbuild/blob/master/doc/cmake-options.md#dynamics) enabled and `ROBOTOLOGY_USES_GAZEBO=ON`.
- For running the [walking and balancing experiment](https://github.com/icub-tech-iit/ergocub-gazebo-simulations/edit/feat_walking_balance/README.md#walking-and-balancing-experiment) the superbuild [dynamics-full-deps](https://github.com/robotology/robotology-superbuild/blob/master/doc/cmake-options.md#dynamics-full-deps) profile and the flag `ROBOTOLOGY_USES_MATLAB` have to be enabled, alongside a matlab installation.
- [`urdfpy`](https://github.com/mmatl/urdfpy)
- [`urchin`](https://github.com/fishbotics/urchin)
- [`dataclasses`](https://pypi.org/project/dataclasses/)


Expand Down
4 changes: 2 additions & 2 deletions scripts/fix_inertias.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

from urdfpy import URDF, xyz_rpy_to_matrix, matrix_to_xyz_rpy
from urchin import URDF, xyz_rpy_to_matrix, matrix_to_xyz_rpy
import numpy as np
from enum import Enum

Expand Down Expand Up @@ -72,4 +72,4 @@ def main():
robot.save('inertias_fixed.urdf')

if __name__ == "__main__":
main()
main()
4 changes: 2 additions & 2 deletions scripts/modifiers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from abc import ABCMeta, abstractmethod
from dataclasses import dataclass
from urdfpy import xyz_rpy_to_matrix, matrix_to_xyz_rpy
from urchin import xyz_rpy_to_matrix, matrix_to_xyz_rpy
from enums import *
import math
import numpy as np
Expand Down Expand Up @@ -361,4 +361,4 @@ def get_modifiers(robot, selector):
elif (selector == Limb.NONE):
return []
else:
return []
return []
4 changes: 2 additions & 2 deletions scripts/modify_robot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

from urdfpy import URDF
from urchin import URDF
from enums import Limb
from pathlib import Path
from modifiers import get_modifiers
Expand Down Expand Up @@ -112,4 +112,4 @@ def main(filename, dummy_file, config_file_path, should_reset):
parser.add_argument('-r', '--reset', help="Sets the robot back to latest version in Git", action="store_true")
args = parser.parse_args()
if args.filename is not None:
main(args.filename, dummy_file, args.config, args.reset)
main(args.filename, dummy_file, args.config, args.reset)

0 comments on commit 1179630

Please sign in to comment.