AVSLab / basilisk

Astrodynamics simulation framework
https://hanspeterschaub.info/basilisk
ISC License
135 stars 60 forks source link

"Could not find vizInterface when import attempted." Error with default settings on Linux. #732

Open patrickwalton opened 3 months ago

patrickwalton commented 3 months ago

Describe the bug The build appears successful, but when I run python3 examples/scenarioBasicOrbit.py, I get the following warning:

Could not find vizInterface when import attempted. Be sure to build BSK with vizInterface support.

And with that no Vizard simulation is streamed or file created.

To reproduce

Expected behavior With vizInterface as the default, it should have been installed automatically.

Desktop (please complete the following information):

Additional context The documentation said building with vizInterface support is the default and I see that in the beginning of the build output:

python -m conans.conan install . --build=missing -s build_type=Release -if dist3/conan -o opNav=False -o vizInterface=True -o buildProject=True

And vizInterface build appears to have been successful in the build output:

/home/patrick/basilisk/src/simulation/vizard/vizInterface/vizInterface.cpp: In member function ‘void VizInterface::ReadBSKMessages()’:
/home/patrick/basilisk/src/simulation/vizard/vizInterface/vizInterface.cpp:376:53: warning: comparison of integer expressions of different signedness: ‘Eigen::EigenBase<Eigen::Matrix<double, -1, 1> >::Index’ {aka ‘long int’} and ‘std::vector<MultiSphere*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  376 |                     if (msmChargeMsgBuffer.q.size() == scIt->msmInfo.msmList.size()) {
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/patrick/basilisk/src/simulation/vizard/vizInterface/vizInterface.cpp: In member function ‘void VizInterface::WriteProtobuffer(uint64_t)’:
/home/patrick/basilisk/src/simulation/vizard/vizInterface/vizInterface.cpp:932:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  932 |             for (int i=0; i<scIt->oscOrbitLineColor.size(); i++){
      |                           ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/patrick/basilisk/src/simulation/vizard/vizInterface/vizInterface.cpp:937:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  937 |             for (int i=0; i<scIt->trueTrajectoryLineColor.size(); i++){
      |                           ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.
.
.
[100%] Linking CXX shared module Basilisk/simulation/_vizInterface.so
[100%] Built target vizInterface
sassy-asjp commented 3 months ago

You might be running into #525 #523 since you're removing $HOME/.conan every time.

patrickwalton commented 3 months ago

As a workaround, I found that building with python3 conanfile.py --vizInterface=True fixed the problem. I believe this was a clean install (no prior .conan config).

This is undesirable behavior, since this flag should be running with the defaults for python3 conanfile.py and the script even confirms that this flag is set to true.

patrickwalton commented 3 months ago

You might be running into #525 #523 since you're removing $HOME/.conan every time.

It's possible, but I only started deleting $HOME/.conan everytime after I started running into the issue.

schaubh commented 2 months ago

That is curious @patrickwalton . I agree that python3 conanfile.py --vizInterface True should be the same as python conanfile.py. I don't have access to a Linux system at the moment. On macOS the vizInterface default is working as expected. I'm working on other build related changes right now, but will need to revisit this later on. Glad you found a work-around for now.