botslab / argos_bridge Goto Github PK
View Code? Open in Web Editor NEWA ROS plugin for the ARGoS robot simulator, enabling large-scale swarm robotic simulations using ROS.
A ROS plugin for the ARGoS robot simulator, enabling large-scale swarm robotic simulations using ROS.
Hi:
I am using
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
And I got this error when catkin_make
In file included from /home/shen/cmu/argos/my-workspace/src/argos_ros_bridge/plugin/argos_ros_bot/argos_ros_bot.cpp:8:0: /home/shen/cmu/argos/my-workspace/src/argos_ros_bridge/plugin/argos_ros_bot/argos_ros_bot.h:82:37: error: ‘constexpr’ needed for in-class initialization of static data member ‘const Real CArgosRosBot::HALF_BASELINE’ of non-integral type [-fpermissive] static const Real HALF_BASELINE = 0.07f; // Half the distance between wheels
/home/shen/cmu/argos/my-workspace/src/argos_ros_bridge/plugin/argos_ros_bot/argos_ros_bot.h:83:36: error: ‘constexpr’ needed for in-class initialization of static data member ‘const Real CArgosRosBot::WHEEL_RADIUS’ of non-integral type [-fpermissive] static const Real WHEEL_RADIUS = 0.029112741f;
Then I change
static const Real HALF_BASELINE = 0.07f; // Half the distance between wheels
static const Real WHEEL_RADIUS = 0.029112741f;
to
static constexpr Real HALF_BASELINE = 0.07f; // Half the distance between wheels
static constexpr Real WHEEL_RADIUS = 0.029112741f;
And it builds successfully.
I am currently trying to implement some loop functions in my project, specifically the foraging_loop_functions.cpp given in the argos-examples.
I have added the file which contains it (loop_functions/foraging_loop_functions) to the plugin folder of the argos_bridge in my project and there is no problem when building the project. When launching the argos world, it sets up what is coded in the loop function indeed.
However, when I push the Play button on ARGoS, the simulation breaks down. I guess it has something to do with folders disposition in the project.
Does anyone know how to properly add and implement a loop function in argos_bridge?
I'm working in a swarm-robotic project in which footbots from ARGoS are used. My intention is to implement the range_and_bearing communication system which is already defined by ARGoS. In order to do so, I've already included the headers file:
#include <argos3/plugins/robots/generic/control_interface/ci_range_and_bearing_sensor.h>
I've already created the topics to subscribe from ROS to the range_and_bearing sensor and the whole code necessary to make it work. Regarding the .argos file, I've tried to emulate the one in the foraging.argos example this way:
<controllers>
<argos_ros_bot_controller id="argos_ros_bot" library="libargos_ros_bot.so">
<actuators>
<range_and_bearing implementation="default" />
</actuators>
<sensors>
<range_and_bearing implementation="medium" medium="rab" />
</sensors>
<params stopWithoutSubscriberCount="10" />
</argos_ros_bot_controller>
</controllers>
When I run the code, I receive this error message:
[FATAL] Failed to initialize the space. [FATAL] Error while trying to distribute entities [FATAL] Failed to initialize entity "bot0". [FATAL] Failed to initialize controllable entity "controller_0". [FATAL] Can't set controller for controllable entity "controller_0" [FATAL] Error initializing the range and bearing medium sensor [FATAL] Medium "rab" not found.
The range_and_bearing line in <sensors>
section is the one I'm getting troubles with.
I've already tried to include the build/controllers/footbot_foraging/libfootbot_foraging
controller in the foraging example to my own code as an independent section, as a nested controller below the libargos_ros_bot.so
controller, I've tried to substitute the libargos_ros_bot.so
with build/controllers/footbot_foraging/libfootbot_foraging
... and still incapable of managing the sensor.
I would appreciate any kind of help with implementing this sensor in my footbots swarm
I am currently working with argos_bridge and ROS Kinetic. The IDE which I am using is QtCreator Plugin for ROS.
I included the following headers in my class.h file so that I could use the controllers and sensors libraries provided by Argos:
#include <argos3/core/control_interface/ci_controller.h>
#include <argos3/plugins/robots/generic/control_interface/ci_differential_steering_actuator.h>
#include <argos3/plugins/robots/generic/control_interface/ci_leds_actuator.h>
#include <argos3/plugins/robots/generic/control_interface/ci_range_and_bearing_actuator.h>
#include <argos3/plugins/robots/generic/control_interface/ci_range_and_bearing_sensor.h>
#include <argos3/plugins/robots/foot-bot/control_interface/ci_footbot_proximity_sensor.h>
#include <argos3/plugins/robots/foot-bot/control_interface/ci_footbot_light_sensor.h>
#include <argos3/plugins/robots/foot-bot/control_interface/ci_footbot_motor_ground_sensor.h>
#include <argos3/core/utility/math/rng.h>
When trying to build the project, I received an error message:
Lua.h no such file or directory
After that, I added to my CMakeLists.txt the following commands:
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
${CMAKE_CURRENT_SOURCE_DIR}/usr/share/argos3/cmake
)
# Find Lua
find_package(Lua52 REQUIRED)
# Set ARGoS include dir
include_directories(${CMAKE_SOURCE_DIR} ${ARGOS_INCLUDE_DIRS} ${LUA_INCLUDE_DIR})
# Set ARGoS link dir
link_directories(${ARGOS_LIBRARY_DIRS})
# Descend into the controllers directory
add_subdirectory(controllers)
# Descend into the loop_functions directory
add_subdirectory(loop_functions)
# Descend into the embedding directory
add_subdirectory(embedding)
After that, when trying to build the project again, the error message below appeard:
CMake Error at CMakeLists.txt:29 (find_package):
By not providing "FindLua52.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Lua52", but
CMake did not find one.
Could not find a package configuration file provided by "Lua52" with any of
the following names:
Lua52Config.cmake
lua52-config.cmake
Add the installation prefix of "Lua52" to CMAKE_PREFIX_PATH or set
"Lua52_DIR" to a directory containing one of the above files. If "Lua52"
provides a separate development package or SDK, be sure it has been
installed.
So I decided to include this line at the bottom of my .bashrc file:
export CMAKE_PREFIX_PATH=/usr/share/argos3/cmake
That is the path where FindLua52.cmake is stored.
Doing so made this error message to pop up in the Compile Output of QtCreator:
17:40:59: Could not start process "catkin_make" --cmake-args -G 'CodeBlocks - Unix Makefiles' -DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_TYPE=Debug -DCATKIN_DEVEL_PREFIX=../devel -DCMAKE_INSTALL_PREFIX=../install
Error while building/deploying project primero (kit: Desktop)
When executing step "CatkinMake Step"
Now, not even ROS, Argos or Catkin run in my computer, whatever command I try to run. I've already checked they're all properly installed and erasing the former command from the .bashrc file seems to have no effect.
Any idea about how could I fix it?
After correctly launching launch_demo.sh, I have tried:
argos3 -c argos_worlds/construct.argos
With the following result:
[WARNING] Error opening directory "/home/pablo/catkin_ws/src/argos_bridge/ros_lib_links/": No such file or directory
[INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_dynamics2d.so"
[INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_spiri.so"
[INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_footbot.so"
[INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_media.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_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/libargos3core_simulator.so"
[INFO] Loaded library "/usr/lib/argos3/libargos3plugin_simulator_qtopengl.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
[FATAL] Error initializing controllers
[FATAL] Can't load library "libargos_ros_bot.so" even after trying to add extensions for shared library (so) and module library (so):
/usr/lib/argos3/libargos_ros_bot.so: /usr/lib/argos3/libargos_ros_bot.so: cannot open shared object file: No such file or directory
/usr/lib/argos3/libargos_ros_bot.so.so: /usr/lib/argos3/libargos_ros_bot.so.so: cannot open shared object file: No such file or directory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.