leggedrobotics / ethercat_device_configurator

Manages setup yaml files for the RSL ethercat infrastructure
BSD 3-Clause "New" or "Revised" License
14 stars 13 forks source link

Trouble building with Rokubimini #3

Closed zoenglinghou closed 3 years ago

zoenglinghou commented 3 years ago

When compiling with rokubimini in both the master and features/maxon_epos_ethercat branches, the following errors appear:

./src/ethercat_device_configurator/src/standalone.cpp: In function ‘int main(int, char**)’:
./src/ethercat_device_configurator/src/standalone.cpp:302:102: error: no matching function for call to ‘EthercatDeviceConfigurator::getSlavesOfType<rokubimini::ethercat::RokubiminiEthercat>()’
  302 |     for(const auto& device : configurator->getSlavesOfType<rokubimini::ethercat::RokubiminiEthercat>()){
      |                                                                                                      ^
In file included from ./src/ethercat_device_configurator/src/standalone.cpp:37:
./ethercat_device_configurator/include/ethercat_device_configurator/EthercatDeviceConfigurator.hpp:94:37: note: candidate: ‘template<class T, class dummy> std::vector<std::shared_ptr<_Tp> > EthercatDeviceConfigurator::getSlavesOfType()’
   94 |     std::vector<std::shared_ptr<T>> getSlavesOfType()
      |                                     ^~~~~~~~~~~~~~~
./src/ethercat_device_configurator/include/ethercat_device_configurator/EthercatDeviceConfigurator.hpp:94:37: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/bits/move.h:55,
                 from /usr/include/c++/9/bits/stl_pair.h:59,
                 from /usr/include/c++/9/bits/stl_algobase.h:64,
                 from /usr/include/c++/9/memory:62,
                 from ./src/ethercat_device_configurator/include/ethercat_device_configurator/EthercatDeviceConfigurator.hpp:17,
                 from /home/carlos/Nextcloud/Documents/dynaarm_ws/src/ethercat_device_configurator/src/standalone.cpp:37:
/usr/include/c++/9/type_traits: In substitution of ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = std::is_base_of_v<ecat_master::EthercatDevice, rokubimini::ethercat::RokubiminiEthercat>; _Tp = void]’:
./src/ethercat_device_configurator/include/ethercat_device_configurator/EthercatDeviceConfigurator.hpp:93:26:   required from here
/usr/include/c++/9/type_traits:2385:11: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
 2385 |     using enable_if_t = typename enable_if<_Cond, _Tp>::type;
      |           ^~~~~~~~~~~
make[2]: *** [CMakeFiles/ethercat_device_configurator.dir/build.make:76: CMakeFiles/ethercat_device_configurator.dir/src/standalone.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
./src/ethercat_device_configurator/src/EthercatDeviceConfigurator.cpp: In member function ‘void EthercatDeviceConfigurator::setup(bool)’:
./src/ethercat_device_configurator/src/EthercatDeviceConfigurator.cpp:351:63: error: ‘deviceFromFile’ is not a member of ‘rokubimini::ethercat::RokubiminiEthercat’
  351 |             slave = rokubimini::ethercat::RokubiminiEthercat::deviceFromFile(configuration_file_path, entry.name, entry.ethercat_address, pdo);
      |                                                               ^~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/ethercat_device_configurator.dir/build.make:63: CMakeFiles/ethercat_device_configurator.dir/src/EthercatDeviceConfigurator.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:590: CMakeFiles/ethercat_device_configurator.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

I hope I am not doing things wrong here...

zoenglinghou commented 3 years ago

Problem solved. I wasn't able to compile with rokubimini_ethercat_sdk on master branch before Refactoring/ethercat sdk master was merged in PR. Now it compiles with the master branch.