ilpincy / argos3-kilobot

Kilobot plugin for the multi-robot ARGoS3 simulator
15 stars 14 forks source link

Error during the build process #11

Closed iljaRa closed 5 years ago

iljaRa commented 5 years ago

I get "error: ‘class argos::CKilobotEntity’ has no member named ‘GetConfigurationNode’" after entering make.

Scanning dependencies of target argos3plugin_simulator_kilobot_automoc
[  1%] Automatic moc for target argos3plugin_simulator_kilobot
[  1%] Built target argos3plugin_simulator_kilobot_automoc
Scanning dependencies of target argos3plugin_simulator_kilobot
[  2%] Building CXX object plugins/robots/kilobot/CMakeFiles/argos3plugin_simulator_kilobot.dir/control_interface/ci_kilobot_communication_actuator.cpp.o
[  3%] Building CXX object plugins/robots/kilobot/CMakeFiles/argos3plugin_simulator_kilobot.dir/control_interface/ci_kilobot_communication_sensor.cpp.o
[  4%] Building CXX object plugins/robots/kilobot/CMakeFiles/argos3plugin_simulator_kilobot.dir/control_interface/ci_kilobot_controller.cpp.o
/users/irausch/argos3-kilobot-master/src/plugins/robots/kilobot/control_interface/ci_kilobot_controller.cpp: In member function ‘virtual void CCI_KilobotController::Init(argos::TConfigurationNode&)’:
/users/irausch/argos3-kilobot-master/src/plugins/robots/kilobot/control_interface/ci_kilobot_controller.cpp:59:59: warning: ignoring return value of ‘int ftruncate(int, __off_t)’, declared with attribute warn_unused_result [-Wunused-result]
       ::ftruncate(m_nSharedMemFD, sizeof(kilobot_state_t));
                                                           ^
[  5%] Building CXX object plugins/robots/kilobot/CMakeFiles/argos3plugin_simulator_kilobot.dir/control_interface/ci_kilobot_led_actuator.cpp.o
[  6%] Building CXX object plugins/robots/kilobot/CMakeFiles/argos3plugin_simulator_kilobot.dir/control_interface/ci_kilobot_light_sensor.cpp.o
[  7%] Building CXX object plugins/robots/kilobot/CMakeFiles/argos3plugin_simulator_kilobot.dir/simulator/dynamics2d_kilobot_model.cpp.o
/users/irausch/argos3-kilobot-master/src/plugins/robots/kilobot/simulator/dynamics2d_kilobot_model.cpp: In constructor ‘argos::CDynamics2DKilobotModel::CDynamics2DKilobotModel(argos::CDynamics2DEngine&, argos::CKilobotEntity&)’:
/users/irausch/argos3-kilobot-master/src/plugins/robots/kilobot/simulator/dynamics2d_kilobot_model.cpp:38:32: error: ‘class argos::CKilobotEntity’ has no member named ‘GetConfigurationNode’
                       c_entity.GetConfigurationNode()),
                                ^
/users/irausch/argos3-kilobot-master/src/plugins/robots/kilobot/simulator/dynamics2d_kilobot_model.cpp:42:19: error: ‘class argos::CKilobotEntity’ has no member named ‘GetConfigurationNode’
       if(c_entity.GetConfigurationNode() &&
                   ^
/users/irausch/argos3-kilobot-master/src/plugins/robots/kilobot/simulator/dynamics2d_kilobot_model.cpp:43:31: error: ‘class argos::CKilobotEntity’ has no member named ‘GetConfigurationNode’
          NodeExists(*c_entity.GetConfigurationNode(), "dynamics2d")) {
                               ^
/users/irausch/argos3-kilobot-master/src/plugins/robots/kilobot/simulator/dynamics2d_kilobot_model.cpp:44:57: error: ‘class argos::CKilobotEntity’ has no member named ‘GetConfigurationNode’
          TConfigurationNode& tDyn2D = GetNode(*c_entity.GetConfigurationNode(),
                                                         ^
plugins/robots/kilobot/CMakeFiles/argos3plugin_simulator_kilobot.dir/build.make:182: recipe for target 'plugins/robots/kilobot/CMakeFiles/argos3plugin_simulator_kilobot.dir/simulator/dynamics2d_kilobot_model.cpp.o' failed
make[2]: *** [plugins/robots/kilobot/CMakeFiles/argos3plugin_simulator_kilobot.dir/simulator/dynamics2d_kilobot_model.cpp.o] Error 1
CMakeFiles/Makefile2:125: recipe for target 'plugins/robots/kilobot/CMakeFiles/argos3plugin_simulator_kilobot.dir/all' failed
make[1]: *** [plugins/robots/kilobot/CMakeFiles/argos3plugin_simulator_kilobot.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

I use Ubuntu 16.04 LTS 64bit and installed the latest version of ARGoS (argos3_simulator-3.0.0-i686-beta53.deb; btw, shouldn't it be $ sudo dpkg -i argos3_simulator-3.0.0-i686-beta53.deb in https://www.argos-sim.info/core.php for Ubuntu 16.04 LTS 64bit?)

If I remove all lines containing _centity.GetConfigurationNode() from dynamics2d_kilobot_model.cpp, the code is built successfully and ARGoS runs without issues. However, I'm not sure what _centity.GetConfigurationNode() does and how to solve the issue without deleting it.

ilpincy commented 5 years ago

Hello, I just tried to reproduce your problem, but I can't seem to do it. I tried on a Ubuntu64 16.04 machine with the same package you tried, and my compilation works without problems.

Is it possible you have two different versions of ARGoS installed at the same time? Check in both /usr and /usr/local if argos3 is present.

Also, can you share the output of CMake when you type

$ cmake -DCMAKE_BUILD_TYPE=Release ../src

in an empty build/ directory?

shouldn't it be $ sudo dpkg -i argos3_simulator-3.0.0-i686-beta53.deb in https://www.argos-sim.info/core.php for Ubuntu 16.04 LTS 64bit?

Isn't that exactly the command that is written in the page you link? Am I missing something?

I'm not sure what c_entity.GetConfigurationNode() does and how to solve the issue without deleting it

We use it allow you to configure some aspects of the Kilobots directly from the XML. It's not a core feature, but it's very handy.

iljaRa commented 5 years ago

Hello,

Is it possible you have two different versions of ARGoS installed at the same time? Check in both /usr and /usr/local if argos3 is present.

Indeed, it appears that the previous version of argos3 was not properly removed. The issue does not occur when I install the latest argos3 version on a clean Ubuntu. Thank you!

shouldn't it be $ sudo dpkg -i argos3_simulator-3.0.0-i686-beta53.deb in https://www.argos-sim.info/core.php for Ubuntu 16.04 LTS 64bit?

Apologies, I made the same mistake, in fact the name of the file that is downloaded is argos3_simulator-3.0.0-x86_64-beta53.deb and not argos3_simulator-3.0.0-i686-beta53.deb

We use it allow you to configure some aspects of the Kilobots directly from the XML. It's not a core feature, but it's very handy.

Ok, thank you for the info.