BerkeleyAutomation / dex-net

Repository for reading the Dex-Net 2.0 HDF5 database of 3D objects, parallel-jaw grasps, and robust grasp metrics
https://berkeleyautomation.github.io/dex-net/code.html
Other
296 stars 97 forks source link

Installation test failed "ValueError: invalid literal for float():" #31

Open DYT-code opened 5 years ago

DYT-code commented 5 years ago

Hello Community,

I have followed the instruction and installed the dex-net. However when I tried to run "python setup.py test" I encountered this error:

ERROR: test_new_database_and_graspable (test.database_test.Hdf5DatabaseTest)

Traceback (most recent call last): File "/home/yeting/ros_ws/src/dex-net/test/database_test.py", line 91, in test_new_database_and_graspable mesh_processor.generate_graspable(CONFIG) File "/home/yeting/ros_ws/src/dex-net/src/dexnet/database/mesh_processor.py", line 157, in generate_graspable self._load_mesh(preproc_script) File "/home/yeting/ros_ws/src/dex-net/src/dexnet/database/mesh_processor.py", line 179, in _loadmesh self.mesh = of.read() File "/home/yeting/ros_ws/src/meshpy/meshpy/obj_file.py", line 70, in read v = map(float, vals[1:4]) ValueError: invalid literal for float(): 0,000000

And following is the whole result of the test: running test running egg_info writing requirements to src/dex_net.egg-info/requires.txt writing src/dex_net.egg-info/PKG-INFO writing top-level names to src/dex_net.egg-info/top_level.txt writing dependency_links to src/dex_net.egg-info/dependency_links.txt reading manifest file 'src/dex_net.egg-info/SOURCES.txt' writing manifest file 'src/dex_net.egg-info/SOURCES.txt' running build_ext WARNING:root:Failed to import geometry msgs in rigid_transformations.py. WARNING:root:Failed to import ros dependencies in rigid_transforms.py WARNING:root:autolab_core not installed as catkin package, RigidTransform ros methods will be unavailable WARNING:trimesh:No FCL -- collision checking will not work WARNING:root:autolab_perception is not installed as a catkin package - ROS msg conversions will not be available for image wrappers WARNING:root:autolab_perception is not installed as a catkin package - ROS msg conversions will not be available for image wrappers WARNING:root:Unable to import pylibfreenect2. Python-only Kinect driver may not work properly. WARNING:root:Unable to import openni2 driver. Python-only Primesense driver may not work properly WARNING:root:Failed to import ROS in primesense_sensor.py. ROS functionality not available WARNING:root:primesense_sensor.py not installed as catkin package. ROS functionality not available. WARNING:root:Failed to import ROS in ensenso_sensor.py. ROS functionality not available WARNING:root:Failed to import gqcnn! Grasp2D functions will not be available.


WARNING: Imported VTK version (6.2) does not match the one used to build the TVTK classes (5.1). This may cause problems. Please rebuild TVTK.


WARNING:root:Failed to import mayavi WARNING:root:Failed to import mayavi WARNING:root:Failed to import mayavi WARNING:root:Failed to import mayavi WARNING:root:Failed to import mayavi WARNING:root:Failed to import mayavi WARNING:dexnet.api:Failed to import DexNetVisualizer3D, visualization methods will be unavailable test_gaussian_uniform_alloc (test.learning_test.LearningTest) ... ok test_thompson_sampling (test.learning_test.LearningTest) ... ok test_uniform_alloc (test.learning_test.LearningTest) ... ok test_antipodal_grasp_sampler (test.grasping_test.GraspTest) ... ok test_contacts (test.grasping_test.GraspTest) ... ok test_find_contacts (test.grasping_test.GraspTest) ... ok test_force_closure (test.grasping_test.GraspTest) ... ok test_grasp_quality_functions (test.grasping_test.GraspTest) ... ok test_init_grasp (test.grasping_test.GraspTest) ... ok test_init_graspable (test.grasping_test.GraspTest) ... ok test_init_gripper (test.grasping_test.GraspTest) ... ok test_min_norm_vector_in_facet (test.grasping_test.GraspTest) ... ok test_wrench_in_positive_span (test.grasping_test.GraspTest) ... ok test_illegal_create (test.database_test.Hdf5DatabaseTest) ... ok test_new_database_and_graspable (test.database_test.Hdf5DatabaseTest) ... Input mesh /home/yeting/ros_ws/src/dex-net/data/test/models/bar_clamp.obj output mesh /home/yeting/ros_ws/src/dex-net/.dexnet/bar_clamp_proc.obj Loading Plugins: Current Plugins Dir is: /usr/lib/meshlab/plugins Error in XMLFile: filter_measure.xml - line: -1, column: -1 - Error in XMLFile: filter_mutualinfo.xml - line: -1, column: -1 - Total 227 filtering actions Total 13 io plugins Opening a file with extention obj Mesh bar_clamp.obj loaded has 1428 vn 476 fn No Script to apply. Mesh /home/yeting/ros_ws/src/dex-net/data/test/models/bar_clamp.obj saved as /home/yeting/ros_ws/src/dex-net/.dexnet/bar_clamp_proc.obj (1428 vn 476 fn) ERROR

====================================================================== ERROR: test_new_database_and_graspable (test.database_test.Hdf5DatabaseTest)

Traceback (most recent call last): File "/home/yeting/ros_ws/src/dex-net/test/database_test.py", line 91, in test_new_database_and_graspable mesh_processor.generate_graspable(CONFIG) File "/home/yeting/ros_ws/src/dex-net/src/dexnet/database/mesh_processor.py", line 157, in generate_graspable self._load_mesh(preproc_script) File "/home/yeting/ros_ws/src/dex-net/src/dexnet/database/mesh_processor.py", line 179, in _loadmesh self.mesh = of.read() File "/home/yeting/ros_ws/src/meshpy/meshpy/obj_file.py", line 70, in read v = map(float, vals[1:4]) ValueError: invalid literal for float(): 0,000000


Ran 15 tests in 392.800s

FAILED (errors=1) Test failed: error: Test failed: Floating point exception. (Core Dumped)

Could any one help? Thank you very much!

amritkochar commented 5 years ago

I am facing the exact same error. If anyone could help out with this, it would be great.

@Bingobingo123 did you find a solution already?

lwohlhart commented 5 years ago

Hi everyone, I also just came across the same problem

TLDR

echo 'export LC_NUMERIC="en_US.UTF-8"' >> ~/.bashrc
source ~/.bashrc

explanation most probably you have a different number format configured (as was the case for me), which you can check with

env | grep LC

the test script uses meshlabserver to convert the test object _data/test/models/barclamp.obj to _.dexnet/bar_clampproc.obj which sadly uses the system configured number format (in the case of us unlucky bastards, this means separating the decimal with comma instead of a dot)