Error running the trajectory experiment - Error initializing loop functions

Requests regarding how to set up experiments in ARGoS.
andraspatka
Posts: 7
Joined: Wed Jul 10, 2019 6:15 pm

Error running the trajectory experiment - Error initializing loop functions

Postby andraspatka » Sat Jul 13, 2019 7:26 am

Summary: After downloading the examples and compiling them I was only able to run the ones which don't require loop functions.
Trying to run the trajectory and foraging experiments results in the following error:

Code: Select all

[FATAL] Error initializing loop functions [FATAL] Symbol "trajectory_loop_functions" not found
and

Code: Select all

[FATAL] Error initializing loop functions [FATAL] Symbol "foraging_loop_functions" not found
Detailed description of the error and the system environment:

OS: Ubuntu 16.04 LTS

When I run 'cmake ..' in the build directory, this is the output:

Code: Select all

-- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") -- Checking for module 'argos3_simulator' -- Found argos3_simulator, version 3.0.0-beta53 -- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so -- Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so -- Could NOT find GALIB (missing: GALIB_LIBRARY GALIB_INCLUDE_DIR) -- Found Lua52: /usr/lib/x86_64-linux-gnu/liblua5.2.so;/usr/lib/x86_64-linux-gnu/libm.so -- Configuring done -- Generating done
Running 'make' yields the following result for the trajectory experiment:

Code: Select all

Scanning dependencies of target trajectory_loop_functions_automoc [ 79%] Automatic moc for target trajectory_loop_functions [ 79%] Built target trajectory_loop_functions_automoc Scanning dependencies of target trajectory_loop_functions [ 81%] Building CXX object loop_functions/trajectory_loop_functions/CMakeFiles/trajectory_loop_functions.dir/trajectory_loop_functions.cpp.o [ 82%] Building CXX object loop_functions/trajectory_loop_functions/CMakeFiles/trajectory_loop_functions.dir/trajectory_qtuser_functions.cpp.o [ 83%] Building CXX object loop_functions/trajectory_loop_functions/CMakeFiles/trajectory_loop_functions.dir/trajectory_loop_functions_automoc.cpp.o [ 84%] Linking CXX shared module libtrajectory_loop_functions.so [ 84%] Built target trajectory_loop_functions
argos3 -c experiments/trajectory.argos

Code: Select all

[INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_footbot.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_dynamics2d.so" [INFO] Loaded library "/usr/lib/argos3/libargos3core_simulator.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_pointmass3d.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_epuck.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_qtopengl.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_prototype.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_dynamics3d.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_genericrobot.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_entities.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_eyebot.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_media.so" [INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_spiri.so" [INFO] Not using threads [INFO] Using random seed = 124 [INFO] Using simulation clock tick = 0.1 [INFO] Total experiment length in clock ticks = unlimited [INFO] Loaded library "./build/controllers/footbot_diffusion/libfootbot_diffusion.so" [INFO] Loaded library "./build/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions.so" [FATAL] Error initializing loop functions [FATAL] Symbol "trajectory_loop_functions" not found
Odd, since the required files are present, but for some reason ARGoS can't seem to locate them.

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

Re: Error running the trajectory experiment - Error initializing loop functions

Postby pincy » Sat Jul 13, 2019 3:43 pm

That's weird, can you share the list of files in the trajectory folder? Also, how did you install ARGoS?
I made ARGoS.

andraspatka
Posts: 7
Joined: Wed Jul 10, 2019 6:15 pm

Re: Error running the trajectory experiment - Error initializing loop functions

Postby andraspatka » Sat Jul 13, 2019 9:23 pm

Gladly: `ls` in argos3-examples/loop_functions/trajectory_loop_functions yields:

CMakeLists.txt
trajectory_loop_functions.h
trajectory_qtuser_functions.h
trajectory_loop_functions.cpp
trajectory_qtuser_functions.cpp

trajectory.argos same as in the example:

Code: Select all

<?xml version="1.0" ?> <!-- *************************************************** --> <!-- * A fully commented XML is diffusion_1.xml. Refer * --> <!-- * to it to have full information about what * --> <!-- * these options mean. * --> <!-- *************************************************** --> <argos-configuration> <!-- ************************* --> <!-- * General configuration * --> <!-- ************************* --> <framework> <system threads="0" /> <experiment length="0" ticks_per_second="10" random_seed="124" /> </framework> <!-- *************** --> <!-- * Controllers * --> <!-- *************** --> <controllers> <footbot_diffusion_controller id="fdc" library="build/controllers/footbot_diffusion/libfootbot_diffusion"> <actuators> <differential_steering implementation="default" /> </actuators> <sensors> <footbot_proximity implementation="default" show_rays="true" /> </sensors> <params alpha="7.5" delta="0.1" velocity="5" /> </footbot_diffusion_controller> </controllers> <!-- ****************** --> <!-- * Loop functions * --> <!-- ****************** --> <loop_functions library="build/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions" label="trajectory_loop_functions" /> <!-- *********************** --> <!-- * Arena configuration * --> <!-- *********************** --> <arena size="5, 5, 1" center="0,0,0.5"> <box id="wall_north" size="4,0.1,0.5" movable="false"> <body position="0,2,0" orientation="0,0,0" /> </box> <box id="wall_south" size="4,0.1,0.5" movable="false"> <body position="0,-2,0" orientation="0,0,0" /> </box> <box id="wall_east" size="0.1,4,0.5" movable="false"> <body position="2,0,0" orientation="0,0,0" /> </box> <box id="wall_west" size="0.1,4,0.5" movable="false"> <body position="-2,0,0" orientation="0,0,0" /> </box> <distribute> <position method="uniform" min="-2,-2,0" max="2,2,0" /> <orientation method="gaussian" mean="0,0,0" std_dev="360,0,0" /> <entity quantity="10" max_trials="100"> <foot-bot id="fb"> <controller config="fdc" /> </foot-bot> </entity> </distribute> <distribute> <position method="uniform" min="-2,-2,0" max="2,2,0" /> <orientation method="uniform" min="0,0,0" max="360,0,0" /> <entity quantity="5" max_trials="100"> <box id="b" size="0.3,0.3,0.5" movable="false" /> </entity> </distribute> <distribute> <position method="uniform" min="-2,-2,0" max="2,2,0" /> <orientation method="constant" values="0,0,0" /> <entity quantity="5" max_trials="100"> <cylinder id="c" height="0.5" radius="0.15" movable="false" /> </entity> </distribute> </arena> <!-- ******************* --> <!-- * Physics engines * --> <!-- ******************* --> <physics_engines> <dynamics2d id="dyn2d" /> </physics_engines> <!-- ********* --> <!-- * Media * --> <!-- ********* --> <media /> <!-- ****************** --> <!-- * Visualization * --> <!-- ****************** --> <visualization> <!-- This shows how to add customized drawing in the world using the qt user functions. Check 'argos3 -q qt-opengl' for more help. --> <qt-opengl> <user_functions library="build/loop_functions/trajectory_loop_functions/libtrajectory_loop_functions" label="trajectory_qtuser_functions" /> </qt-opengl> </visualization> </argos-configuration>
Installing ARGoS: I downloaded the binaries for Ubuntu 16.04 from https://www.argos-sim.info/core.php
Downloaded file was: argos3_simulator-3.0.0-x86_64-beta53.deb
Then I installed it with: sudo dpkg -i argos3_simulator-3.0.0-x86_64-beta53.deb

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

Re: Error running the trajectory experiment - Error initializing loop functions

Postby pincy » Sat Jul 13, 2019 9:40 pm

You're showing me the source code, but the error message is complaining about missing the built binaries. What is the output of

Code: Select all

$ ls build/loop_functions/trajectory_loop_functions/
It should be something like this:

Code: Select all

CMakeFiles/ Makefile cmake_install.cmake libtrajectory_loop_functions.so trajectory_loop_functions_autogen/
in particular, it should contain 'libtrajectory_loop_functions.so', which is the library referenced by the .argos file.
I made ARGoS.

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

Re: Error running the trajectory experiment - Error initializing loop functions

Postby pincy » Sat Jul 13, 2019 9:46 pm

I have seen this kind of weird linking issues arise when the binary of ARGoS is compiled with a version of GCC different from that used to compile the examples.

A simple cause of errors of this kind is that you installed the package for Ubuntu 18 on your system, instead of the package for Ubuntu 16.

Another possibility is that there was an update of GCC in Ubuntu 16 that requires me to recompile the binary package for Ubuntu 16.
I made ARGoS.

andraspatka
Posts: 7
Joined: Wed Jul 10, 2019 6:15 pm

Re: Error running the trajectory experiment - Error initializing loop functions

Postby andraspatka » Sat Jul 13, 2019 10:09 pm

That was the problem. I must have accidentally installed the package for Ubuntu 18 instead of 16. Tried it now with the correct package and it works!

Thanks for the help!


Return to “How to... ?”