-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from agimus-project/132-example-data-and-scri…
…pts-not-unified 132 example data and scripts not unified
- Loading branch information
Showing
11 changed files
with
249 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 16 additions & 5 deletions
21
happypose/pose_estimators/cosypose/cosypose/datasets/urdf_dataset.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 38 additions & 9 deletions
47
happypose/pose_estimators/cosypose/cosypose/libmesh/urdf_utils.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
happypose/pose_estimators/cosypose/cosypose/scripts/convert_bop_ds_to_urdf.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import argparse | ||
from pathlib import Path | ||
|
||
from happypose.pose_estimators.cosypose.cosypose.libmesh.urdf_utils import ( | ||
convert_rigid_body_dataset_to_urdfs, | ||
) | ||
from happypose.toolbox.datasets.datasets_cfg import make_object_dataset | ||
|
||
|
||
def convert_bop_dataset_to_urdfs( | ||
obj_ds_name: str, urdf_dir: Path, texture_size=(1024, 1024), override=True | ||
): | ||
obj_dataset = make_object_dataset(obj_ds_name) | ||
urdf_ds_dir = urdf_dir / obj_ds_name | ||
convert_rigid_body_dataset_to_urdfs( | ||
obj_dataset, urdf_ds_dir, texture_size, override | ||
) | ||
|
||
|
||
def main(): | ||
parser = argparse.ArgumentParser("3D ply object ds_name -> pybullet URDF converter") | ||
parser.add_argument( | ||
"--ds_name", | ||
default="", | ||
type=str, | ||
help="Bop dataset model name: ycbv, tless.cad, etc.", | ||
) | ||
parser.add_argument( | ||
"--override", | ||
default=True, | ||
type=bool, | ||
help="If true, erases previous content of urdf/<ds_name>.", | ||
) | ||
args = parser.parse_args() | ||
|
||
from happypose.pose_estimators.cosypose.cosypose.config import LOCAL_DATA_DIR | ||
|
||
urdf_dir = LOCAL_DATA_DIR / "urdfs" | ||
convert_bop_dataset_to_urdfs(args.ds_name, urdf_dir, args.override) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
53 changes: 0 additions & 53 deletions
53
happypose/pose_estimators/cosypose/cosypose/scripts/convert_models_to_urdf.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.