softsys4ai / Multi-Sense-Rescuer

Audio-Visual navigation to multiple sound-emitting destinations
MIT License
2 stars 1 forks source link

conversion from ‘rapidjson::GenericValue<rapidjson::UTF8<>>::Object' to ‘const JsonGenericValue is ambiguous. #2

Open a-k-tonmoy opened 1 year ago

a-k-tonmoy commented 1 year ago

While installing habitat sim, I got the following error. I am using Ubuntu 18.04 and GCC 7.5.0 as per documatation. Can you help me to identify the problem?

[ 82%] Building CXX object esp/physics/CMakeFiles/physics.dir/objectManagers/ArticulatedObjectManager.cpp.o In file included from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/metadata/managers/AttributesManagerBase.h:14:0, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/metadata/managers/AssetAttributesManager.h:14, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/metadata/MetadataMediator.h:14, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/assets/ResourceManager.h:50, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/geo/VoxelWrapper.h:5, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/physics/RigidBase.h:12, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/physics/ArticulatedObject.h:14, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/physics/PhysicsManager.h:20, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/physics/objectManagers/PhysicsObjectBaseManager.h:13, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/physics/objectManagers/ArticulatedObjectManager.h:8, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/physics/objectManagers/ArticulatedObjectManager.cpp:5: /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/core/managedContainers/ManagedFileBasedContainer.h: In instantiation of ‘esp::core::managedContainers::ManagedFileBasedContainer<T, Access>::ManagedFileIOPtr esp::core::managedContainers::ManagedFileBasedContainer<T, Access>::createObjectFromJSONFile(const string&, bool) [with T = esp::metadata::attributes::ObjectAttributes; esp::core::managedContainers::ManagedObjectAccess Access = (esp::core::managedContainers::ManagedObjectAccess)0; esp::core::managedContainers::ManagedFileBasedContainer<T, Access>::ManagedFileIOPtr = std::shared_ptr; std::cxx11::string = std::cxx11::basic_string]’: /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/metadata/managers/AttributesManagerBase.h:387:11: required from ‘esp::metadata::managers::AttributesManager<T, Access>::AttribsPtr esp::metadata::managers::AttributesManager<T, Access>::createFromJsonOrDefaultInternal(const string&, std::__cxx11::string&, bool) [with T = esp::metadata::attributes::ObjectAttributes; esp::core::managedContainers::ManagedObjectAccess Access = (esp::core::managedContainers::ManagedObjectAccess)0; esp::metadata::managers::AttributesManager<T, Access>::AttribsPtr = std::shared_ptr; std::cxx11::string = std::cxx11::basic_string]’ /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/metadata/managers/AbstractObjectAttributesManagerBase.h:179:11: required from ‘esp::metadata::managers::AbstractObjectAttributesManager<T, Access>::AbsObjAttrPtr esp::metadata::managers::AbstractObjectAttributesManager<T, Access>::createObject(const string&, bool) [with T = esp::metadata::attributes::ObjectAttributes; esp::core::managedContainers::ManagedObjectAccess Access = (esp::core::managedContainers::ManagedObjectAccess)0; esp::metadata::managers::AbstractObjectAttributesManager<T, Access>::AbsObjAttrPtr = std::shared_ptr; std::cxx11::string = std::cxx11::basicstring]’ /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/physics/objectManagers/ArticulatedObjectManager.cpp:70:1: required from here /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/core/managedContainers/ManagedFileBasedContainer.h:78:32: error: conversion from ‘rapidjson::GenericValue<rapidjson::UTF8<> >::Object {aka rapidjson::GenericObject<false, rapidjson::GenericValue<rapidjson::UTF8<> > >}’ to ‘const JsonGenericValue {aka const rapidjson::GenericValue<rapidjson::UTF8<> >}’ is ambiguous const io::JsonGenericValue config = docConfig->GetObject(); ^~ In file included from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/io/JsonBuiltinTypes.h:16:0, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/io/JsonAllTypes.h:26, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/io/Json.h:8, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/scene/SemanticScene.h:17, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/assets/GenericSemanticMeshData.h:19, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/physics/RigidBase.h:10, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/physics/ArticulatedObject.h:14, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/physics/PhysicsManager.h:20, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/physics/objectManagers/PhysicsObjectBaseManager.h:13, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/physics/objectManagers/ArticulatedObjectManager.h:8, from /home/cc/Multi-Sense-Rescuer/habitat-sim/src/esp/physics/objectManagers/ArticulatedObjectManager.cpp:5: /home/cc/Multi-Sense-Rescuer/habitat-sim/src/deps/rapidjson/include/rapidjson/document.h:2972:5: note: candidate: rapidjson::GenericObject<, >::operator rapidjson::GenericObject<, >::ValueType&() const [with bool Const = false; ValueT = rapidjson::GenericValue<rapidjson::UTF8<> >; rapidjson::GenericObject<, >::ValueType = rapidjson::GenericValue<rapidjson::UTF8<> >] operator ValueType&() const { return value; } ^~~~ /home/cc/Multi-Sense-Rescuer/habitat-sim/src/deps/rapidjson/include/rapidjson/document.h:872:5: note: candidate: rapidjson::GenericValue<Encoding, Allocator>::GenericValue(rapidjson::GenericValue<Encoding, Allocator>::Object) [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator; rapidjson::GenericValue<Encoding, Allocator>::Object = rapidjson::GenericObject<false, rapidjson::GenericValue<rapidjson::UTF8<> > >] GenericValue(Object o) RAPIDJSONNOEXCEPT : data(o.value.data) { ^~~~ esp/physics/CMakeFiles/physics.dir/build.make:75: recipe for target 'esp/physics/CMakeFiles/physics.dir/objectManagers/ArticulatedObjectManager.cpp.o' failed make[2]: [esp/physics/CMakeFiles/physics.dir/objectManagers/ArticulatedObjectManager.cpp.o] Error 1 CMakeFiles/Makefile2:5890: recipe for target 'esp/physics/CMakeFiles/physics.dir/all' failed make[1]: [esp/physics/CMakeFiles/physics.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: * [all] Error 2 Traceback (most recent call last): File "/home/cc/Multi-Sense-Rescuer/habitat-sim/setup.py", line 468, in setup( File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/init.py", line 107, in setup return distutils.core.setup(attrs) File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_command super().run_command(command) File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/command/install.py", line 80, in run self.do_egg_install() File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/command/install.py", line 129, in do_egg_install self.run_command('bdist_egg') File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_command super().run_command(command) File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/command/bdist_egg.py", line 164, in run cmd = self.call_command('install_lib', warn_dir=0) File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command self.run_command(cmdname) File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_command super().run_command(command) File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/command/install_lib.py", line 11, in run self.build() File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/_distutils/command/install_lib.py", line 111, in build self.run_command('build_ext') File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_command super().run_command(command) File "/home/cc/anaconda3/envs/ss/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/cc/Multi-Sense-Rescuer/habitat-sim/setup.py", line 271, in run self.build_extension(ext) File "/home/cc/Multi-Sense-Rescuer/habitat-sim/setup.py", line 383, in build_extension subprocess.check_call( File "/home/cc/anaconda3/envs/ss/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', 'build', '--config', 'RelWithDebInfo', '--', '-j1']' returned non-zero exit status 2.

kksinghal commented 11 months ago

Hi @a-k-tonmoy, I am not able to identify the issue with this stacktrace. Can you provide the steps you took? And, use --with-cuda --headless flags only if you have cuda on your system.

a-k-tonmoy commented 11 months ago

I followed the exact steps in your documentation. The machine has cuda on its system. I can install Habitat Sim from its source repo rather than this repo. Will it be okay if I run the codes for multiple sources using Habitat Sim installed from the source repo? or did you change some source code of Habitat Sim also to adapt the multiple sources?

kksinghal commented 11 months ago

I have made changes to all three repositories, habitat-sim, habitat-lab and soundspaces. So, for multiple sound sources, you have to use this repo only. Also, this is good installation pose, you can try these steps to debug your issue.