Connecting Aseba to Argos

Requests regarding how to set up experiments in ARGoS.
fairread
Posts: 5
Joined: Wed Oct 02, 2013 3:20 pm

Connecting Aseba to Argos

Postby fairread » Wed Oct 09, 2013 11:08 pm

Hi Carlo,

I'm interested to connect Aseba to Argos for the purpose of monitoring the sensor reading and not for behaviour programming purpose. I found a document written by you and other 2 authors which provides a tutorial to connect both softwares at http://iridia.ulb.ac.be/~cpinciroli/ext ... manual.pdf. It is however for Aseba and Argos2. Thus could you suggest how to do so achieve the first step to launch Argos3. In the tutorial, for Argos2 the code is as below

Code: Select all

user@user:~$ launch_argos -nc your_file.xml
. Thanks.

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

Re: Connecting Aseba to Argos

Postby pincy » Thu Oct 10, 2013 3:03 pm

Hi Farid,

I can give you the code I made to interface ARGoS2 and Aseba, and you could adapt it for ARGoS3. It is actually pretty simple. If that suits you, I will give you the source code.

Cheers,
Carlo
I made ARGoS.

fairread
Posts: 5
Joined: Wed Oct 02, 2013 3:20 pm

Re: Connecting Aseba to Argos

Postby fairread » Thu Oct 10, 2013 3:38 pm

Thanks Carlo, I'm glad to welcome your codes! May I know what it is?

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

Re: Connecting Aseba to Argos

Postby pincy » Thu Oct 10, 2013 3:42 pm

Hi Farid,

here is the source code I was talking about. There is a script called 'make_distribution.sh' at the base directory of the archive that does the work of fetching the necessary dependencies and compile everything.

Let me know how it goes.

Cheers,
Carlo
Attachments
argos2-h414-extras.tar.bz2
(1.59 MiB) Downloaded 665 times
I made ARGoS.

fairread
Posts: 5
Joined: Wed Oct 02, 2013 3:20 pm

Re: Connecting Aseba to Argos

Postby fairread » Thu Oct 10, 2013 3:52 pm

Carlo, I tried to run the script using bash command, but I got this message afterwards:

Code: Select all

Usage: make_distribution.sh [slack|debian|plain]
If I use sh command, the error is

Code: Select all

make_distribution.sh: 9: make_distribution.sh: Syntax error: "(" unexpected [slack|debian|plain]
Any thought?

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

Re: Connecting Aseba to Argos

Postby pincy » Thu Oct 10, 2013 4:09 pm

Try and read the script, to see what it does :-)

In short, the script fetches all the dependencies, compiles the code, and creates an archive for public distribution.
The command line parameter that the output expects selects whether you want to create a slackware package, a debian package, or a tar.bz2 package. You must add it.

The code in the argos2/ directory contains the controller that embeds Aseba and the loop functions that realize the connection with Aseba studio.
This is the code you need to modify to get it working with ARGoS3.

Cheers,
Carlo
I made ARGoS.

fairread
Posts: 5
Joined: Wed Oct 02, 2013 3:20 pm

Re: Connecting Aseba to Argos

Postby fairread » Thu Oct 10, 2013 5:03 pm

Hi Carlo,

I managed to install dashel and aseba, but then when I tried to build Argos+Epuck code, I got this error:

Code: Select all

Building ARGoS+EPuck code... A fatal error occurred. Check the log file /home/mfma/Downloads/argos2-h414-extras/argos2-h414-extras.log.
in which I checked the log it contains:

Code: Select all

CMake Error at CMakeLists.txt:5 (find_package): By not providing "FindARGoS.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "ARGoS", but CMake did not find one. Could not find a package configuration file provided by "ARGoS" with any of the following names: ARGoSConfig.cmake argos-config.cmake Add the installation prefix of "ARGoS" to CMAKE_PREFIX_PATH or set "ARGoS_DIR" to a directory containing one of the above files. If "ARGoS" provides a separate development package or SDK, be sure it has been installed.
Hope you can help me again. Thanks.

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

Re: Connecting Aseba to Argos

Postby pincy » Thu Oct 10, 2013 5:13 pm

You need to install argos2 from the packages provided on the website.
I made ARGoS.

fairread
Posts: 5
Joined: Wed Oct 02, 2013 3:20 pm

Re: Connecting Aseba to Argos

Postby fairread » Fri Oct 11, 2013 10:58 pm

Hi Carlo, after doing

Code: Select all

bash make_distribution.sh debian
, I got a few errors which I managed to troubleshoot, but now I'm stuck with this fpic error as below

Code: Select all

/usr/bin/ld: /usr/local/lib/libasebavm.a(vm.c.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libasebavm.a: could not read symbols: Bad value collect2: error: ld returned 1 exit status make[2]: *** [libepuck_aseba_loop_functions.so] Error 1 make[1]: *** [CMakeFiles/epuck_aseba_loop_functions.dir/all] Error 2 make: *** [all] Error 2
Hope you can guide me again. Thanks.

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

Re: Connecting Aseba to Argos

Postby pincy » Sat Oct 12, 2013 12:05 am

Hi Farid,

Most likely you are compiling the code on a 64 bit system.

You need to add the switch -fPIC to be able to compile libraries on 64 bit systems.

Cheers,
Carlo
I made ARGoS.


Return to “How to... ?”