NVlabs / motion-policy-networks

This repo has the expert data generation infrastructure and Pytorch implementation of MPiNets.
MIT License
119 stars 19 forks source link

AttributeError: 'Cuboid' object has no attribute 'dims'. Did you mean: '_dims'? #20

Closed rangfeng1 closed 1 year ago

rangfeng1 commented 1 year ago

When I run run_inference ,I find this problems

rangfeng1 commented 1 year ago

Traceback (most recent call last):
File "/home/wxj/mpinets/run_inference.py", line 482, in visualize_results(args.mdl_path, problems) File "/home/wxj/anaconda3/envs/pytorch/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "/home/wxj/mpinets/run_inference.py", line 353, in visualize_results point_cloud = make_point_cloud_from_primitives( File "/home/wxj/mpinets/run_inference.py", line 118, in make_point_cloud_from_primitives obstacle_points = construct_mixed_point_cloud(obstacles, NUM_OBSTACLE_POINTS) File "/home/wxj/mpinets/mpinets/geometry.py", line 590, in construct_mixed_point_cloud surface_areas = np.array([o.surface_area for o in obstacles]) File "/home/wxj/mpinets/mpinets/geometry.py", line 590, in surface_areas = np.array([o.surface_area for o in obstacles]) File "/home/wxj/anaconda3/envs/pytorch/lib/python3.10/site-packages/geometrout/primitive.py", line 276, in surface_area return _cuboid_surface_area(self.dims) AttributeError: 'Cuboid' object has no attribute 'dims'. Did you mean: '_dims'?

rangfeng1 commented 1 year ago

I feel that there may be an issue with this geometrout version,but when I use geometrout=0.0.3.4,it will ImportError: cannot import name 'SE3' from 'geometrout' (/home/wxj/anaconda3/envs/pytorch/lib/python3.10/site-packages/geometrout/init.py)

fishbotics commented 1 year ago

I think you're using the newest version of Geometrout. I did a major refactor at version 0.1.0.0 to make it much, much faster, but I also changed the API quite a bit. If you want to use that version, you'll probably have to change quite a few things around this repo. For now, I want to keep this repo as a reproducible version of the Motion Policy Networks paper, so I probably will not update the API calls here (or at least not now).

Can you please share your stack trace when you use 0.0.3.4? I can help debug the issue.

rangfeng1 commented 1 year ago

my python version is python3.10,when I use geometrout=0.1.0.2, Traceback (most recent call last):
File "/home/wxj/mpinets/run_inference.py", line 482, in visualize_results(args.mdl_path, problems) File "/home/wxj/anaconda3/envs/pytorch/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, *kwargs) File "/home/wxj/mpinets/run_inference.py", line 353, in visualize_results point_cloud = make_point_cloud_from_primitives( File "/home/wxj/mpinets/run_inference.py", line 118, in make_point_cloud_from_primitives obstacle_points = construct_mixed_point_cloud(obstacles, NUM_OBSTACLE_POINTS) File "/home/wxj/mpinets/mpinets/geometry.py", line 590, in construct_mixed_point_cloud surface_areas = np.array([o.surface_area for o in obstacles]) File "/home/wxj/mpinets/mpinets/geometry.py", line 590, in surface_areas = np.array([o.surface_area for o in obstacles]) File "/home/wxj/anaconda3/envs/pytorch/lib/python3.10/site-packages/geometrout/primitive.py", line 247, in surface_area self.dims[0] self.dims[1] AttributeError: 'Cuboid' object has no attribute 'dims'. Did you mean: '_dims'?

rangfeng1 commented 1 year ago

when I use geometrout =0.0.3.4 Traceback (most recent call last): File "/home/wxj/mpinets/run_inference.py", line 27, in from robofin.robots import FrankaRobot, FrankaGripper File "/home/wxj/mpinets/robofin/robots.py", line 3, in from geometrout import SE3, SO3 ImportError: cannot import name 'SE3' from 'geometrout' (/home/wxj/anaconda3/envs/pytorch/lib/python3.10/site-packages/geometrout/init.py)

fishbotics commented 1 year ago

Oh, I think you're installing using the wrong version of robofin. Be sure to install the version at the tag v0.0.1.

rangfeng1 commented 1 year ago

The problem is solved, thank you.