Error when running kilobot_trajectory.argos

Requests regarding how to set up experiments in ARGoS.
noran
Posts: 2
Joined: Mon Jun 07, 2021 3:20 am

Error when running kilobot_trajectory.argos

Postby noran » Mon Jun 07, 2021 11:34 am

Hello,

Trying to run kilobot_trajectory.argos results in this error:

Code: Select all

[FATAL] Error initializing loop functions [FATAL] Can't load library "build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions" after trying the following: ./build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions: ./build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions: cannot open shared object file: No such file or directory ./build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions.so: ./build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions.so: cannot open shared object file: No such file or directory ./build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions.so: ./build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions.so: cannot open shared object file: No such file or directory /usr/local/lib/argos3/build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions: /usr/local/lib/argos3/build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions: cannot open shared object file: No such file or directory /usr/local/lib/argos3/build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions.so: /usr/local/lib/argos3/build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions.so: cannot open shared object file: No such file or directory /usr/local/lib/argos3/build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions.so: /usr/local/lib/argos3/build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions.so: cannot open shared object file: No such file or directory
My OS: Ubuntu 20.04

pincy
Site Admin
Posts: 610
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Error when running kilobot_trajectory.argos

Postby pincy » Mon Jun 07, 2021 12:20 pm

I don't think it's a bug, but I need more information to understand what is going on.
  1. Does the file build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions.so exist?
  2. Do the other examples work?
I made ARGoS.

noran
Posts: 2
Joined: Mon Jun 07, 2021 3:20 am

Re: Error when running kilobot_trajectory.argos

Postby noran » Tue Jun 08, 2021 6:53 pm

1.The folders trajectory_loop_functions and debug_loop_functions that should be in argos3-kilobot/build/examples/loop_functions don't exist.

2. Examples that don't use loop functions works fine.

pincy
Site Admin
Posts: 610
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Error when running kilobot_trajectory.argos

Postby pincy » Tue Jun 08, 2021 7:26 pm

So there's an issue with compilation. What's the output of the compilation process?
I made ARGoS.

valarie
Posts: 3
Joined: Thu Nov 25, 2021 3:46 am

Re: Error when running kilobot_trajectory.argos

Postby valarie » Thu Nov 25, 2021 4:03 am

Hi, I've met the similar error.

Code: Select all

$ argos3 -c experiments/diffusion_1.argos [INFO] Loaded library "/usr/lib/argos3/libargos3core_simulator.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_dynamics2d.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_dynamics3d.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_entities.so" [FATAL] Can't load library "/usr/lib/argos3/libargos3plugin_simulator_epuck.so" after trying the following: /usr/lib/argos3/libargos3plugin_simulator_epuck.so: libQt5Core.so.5: cannot open shared object file: No such file or directory /usr/lib/argos3/libargos3plugin_simulator_epuck.so.so: /usr/lib/argos3/libargos3plugin_simulator_epuck.so.so: cannot open shared object file: No such file or directory /usr/lib/argos3/libargos3plugin_simulator_epuck.so.so: /usr/lib/argos3/libargos3plugin_simulator_epuck.so.so: cannot open shared object file: No such file or directory
Have you met this before?

pincy
Site Admin
Posts: 610
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Error when running kilobot_trajectory.argos

Postby pincy » Thu Nov 25, 2021 4:13 am

This error is different, it refers a configuration error on your machine:

/usr/lib/argos3/libargos3plugin_simulator_epuck.so: libQt5Core.so.5: cannot open shared object file: No such file or directory

The original error was a compilation issue.

The problem with your machine is that libQt5Core.so.5 cannot be found. It is usually due to Conda or Anaconda messing up the compilation environment, if you have that installed.
I made ARGoS.

valarie
Posts: 3
Joined: Thu Nov 25, 2021 3:46 am

Re: Error when running kilobot_trajectory.argos

Postby valarie » Mon Nov 29, 2021 4:47 am

Thanks, I do have installed Anaconda. So how do I handle this situation, remove Anaconda?
I'm just a rookie :|

pincy
Site Admin
Posts: 610
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Error when running kilobot_trajectory.argos

Postby pincy » Mon Nov 29, 2021 5:49 am

Removing Anaconda would solve the problem if you don't need Anaconda. Otherwise, you'll need to tweak environment variables such as LD_LIBRARY_PATH and PATH. Anaconda messes up these variables and forces your system to use Anaconda's version of Qt instead of the system version.
I made ARGoS.

luigifeola
Posts: 2
Joined: Wed May 19, 2021 8:36 am

Re: Error when running kilobot_trajectory.argos

Postby luigifeola » Wed Jan 19, 2022 1:25 pm

I don't think it's a bug, but I need more information to understand what is going on.
  1. Does the file build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions.so exist?
  2. Do the other examples work?

Hi pincy,

same problem here:

Code: Select all

Can't load library "build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions"

  1. Does the file build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions.so exist?
  2. Do the other examples work?
  1. No, the file build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions.so does not exist.
  2. Simple examples, the ones without using loop functions, work.
As you said in a later reply there's an issue with compilation. Namely the if(ARGOS_COMPILE_QTOPENGL) in argos3-kilobot/src/examples/loop_functions/CMakeLists.txt is not verified so the subdirectories "debug_loop_functions" and "trajectory_loop_functions" are not built. I have tried to modify that CMakeLists.txt replacing "ARGOS_COMPILE_QTOPENGL" with "ARGOS_QTOPENGL_FOUND", and at this point everithing is built.

Now, when I run kilobot_trajectory.argos I got this other error:

Code: Select all

argos@argos-VirtualBox:~/Documents/argos3-kilobot$ argos3 -c src/examples/experiments/kilobot_trajectory.argos [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_eyebot.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_dynamics2d.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_footbot.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_entities.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_epuck.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_spiri.so" [INFO] Loaded library "/usr/lib/argos3/libargos3core_simulator.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_prototype.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_media.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_dynamics3d.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_qtopengl.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_genericrobot.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_pointmass3d.so" [INFO] Not using threads [INFO] Using random seed = 124 [INFO] Using simulation clock tick = 0.0322581 [INFO] Total experiment length in clock ticks = unlimited [INFO] Loaded library "./build/examples/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions.so" [INFO] The physics engine "dyn2d" will perform 10 iterations per tick (dt = 0.00322581 sec) [FATAL] Failed to initialize the space. [FATAL] Error while trying to distribute entities [FATAL] Symbol "kilobot" not found
So, I verified that the kilobot is installed running argos3 -q kilobot and everything seems to be okay:

Code: Select all

argos@argos-VirtualBox:~/Documents/argos3-kilobot$ argos3 -q kilobot [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_eyebot.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_dynamics2d.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_footbot.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_entities.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_epuck.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_spiri.so" [INFO] Loaded library "/usr/lib/argos3/libargos3core_simulator.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_prototype.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_media.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_dynamics3d.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_qtopengl.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_genericrobot.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_pointmass3d.so" Plugins matching "kilobot": None found.



The only thing I installed on a new virtual machine running Ubuntu 18.04 (using VirtualBox) is ARGoS. My Qt version is the following:

Code: Select all

argos@argos-VirtualBox:~/Documents/argos3-kilobot$ qmake --version QMake version 3.1 Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu

Am I missing something?
Could you help me to solve this problem in order to use the kilobot plugin and the loop function? Thanks.

pincy
Site Admin
Posts: 610
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Error when running kilobot_trajectory.argos

Postby pincy » Wed Jan 19, 2022 4:57 pm

I have tried to modify that CMakeLists.txt replacing "ARGOS_COMPILE_QTOPENGL" with "ARGOS_QTOPENGL_FOUND", and at this point everithing is built.
Yes, this is the correct fix. I am working on it now and will commit it soon.
Plugins matching "kilobot":

None found.
This output you’re getting means that the kilobot plugin is not installed in a place ARGoS recognizes. Make sure that you follow this procedure when you compile the plugin:

Code: Select all

cd argos3-kilobot rm -rf build mkdir build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ../src make sudo make install
I suspect you installed the Kilobot plugin in /usr/local for some reason. You can verify this by writing

Code: Select all

ls /usr/local/lib/argos3 ls /usr/local/include/argos3
I made ARGoS.


Return to “How to... ?”



cron