Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » How to Merge Manually FORTE ROS Branch to Current Master Branch(Making ROS communication protocol work in FORTE Master development branch)
How to Merge Manually FORTE ROS Branch to Current Master Branch [message #1791762] Thu, 05 July 2018 05:50 Go to next message
Victor Hartanto is currently offline Victor HartantoFriend
Messages: 5
Registered: July 2018
Location: Beijing
Junior Member
My team and I are trying to combine our FORTE into one. What code should I copy, and/or changes I should made on the code?

The forte branch that he has been using is the master branch. And I've been using ROS branch.
The method that I have done:

  1. Copy /src/modules/ros from ros branch to /src/modules/ros on master branch.
  2. Add These definitions to setup_posix.sh:

    • -DCMAKE_BUILD_TYPE=Debug
    • -DFORTE_MODULE_ROS=ON
    • -DFORTE_COM_ROS=ON
    • -DFORTE_RTTI_AND_EXCEPTIONS=TRUE

Then, I run this code to build FORTE:

  • chmod +x setup_posix.sh
  • ./setup_posix.sh
    ----------------------------------------------------------------------------
     Automatically set up development environment for POSIX-platform
    ----------------------------------------------------------------------------
    
     Includes 64bit-datatypes, float-datatypes, Ethernet-Interface,
     ASN1-encoding, ...
    
     To include tests set directories for boost-test-framework and 
     set FORTE_TESTS-option to 'ON'
    
    ----------------------------------------------------------------------------
    For building forte go to bin/posix and execute "make"
    forte can be found at bin/posix/src
    forte_tests can be found at bin/posix/tests
    -- The C compiler identification is GNU 4.8.4
    -- The CXX compiler identification is GNU 4.8.4
    -- 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
    -- 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
    No Log Level was specified. Setting Log Level to Debug default LOGINFO.
    -- FORTE_EXTERNAL_MODULES_DIRECTORY: 
    [FORTE] CMake variable FORTE_ARCHITECTURE: Posix
    [FORTE] CMake variable FORTE_COM_ROS: ON
    [FORTE] CMake variable FORTE_MODULE_ROS: ON
    [FORTE] CMake variable FORTE_TRACE_EVENTS: OFF
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/victor/forte-master/bin/posix
    

  • cd bin/posix/
  • make, then I got this error:
    [ 50%] Building CXX object src/CMakeFiles/forte.dir/__/core/cominfra/comlayersmanager.cpp.o
    /home/victor/forte-master/bin/posix/core/cominfra/comlayersmanager.cpp: In static member function 'static forte::com_infra::CComLayer* forte::com_infra::CComLayersManager::createCommunicationLayer(char*, forte::com_infra::CComLayer*, forte::com_infra::CBaseCommFB*)':
    /home/victor/forte-master/bin/posix/core/cominfra/comlayersmanager.cpp:44:61: error: invalid conversion from 'forte::com_infra::CBaseCommFB*' to 'forte::com_infra::CCommFB*' [-fpermissive]
         m_poNewLayer = new CROSLayer(pa_poUpperLayer, pa_poComFB);
                                                                 ^
    In file included from /home/victor/forte-master/bin/posix/core/cominfra/comlayersmanager.cpp:22:0:
    /home/victor/forte-master/src/modules/ros/ROSLayer.h:30:5: error:   initializing argument 2 of 'CROSLayer::CROSLayer(forte::com_infra::CComLayer*, forte::com_infra::CCommFB*)' [-fpermissive]
         CROSLayer(forte::com_infra::CComLayer* pa_poUpperLayer, forte::com_infra::CCommFB* pa_poComFB);
         ^
    In file included from /opt/ros/indigo/include/ros/ros.h:38:0,
                     from /home/victor/forte-master/src/modules/ros/ROSLayer.h:16,
                     from /home/victor/forte-master/bin/posix/core/cominfra/comlayersmanager.cpp:22:
    /opt/ros/indigo/include/ros/time.h: In instantiation of 'T& ros::TimeBase<T, D>::fromSec(double) [with T = ros::Time; D = ros::Duration]':
    /opt/ros/indigo/include/ros/time.h:187:31:   required from here
    /opt/ros/indigo/include/ros/time.h:157:11: warning: conversion to 'uint32_t {aka unsigned int}' from 'long unsigned int' may alter its value [-Wconversion]
           sec += (nsec / 1000000000ul);
               ^
    /opt/ros/indigo/include/ros/time.h: In instantiation of 'T& ros::TimeBase<T, D>::fromSec(double) [with T = ros::WallTime; D = ros::WallDuration]':
    /opt/ros/indigo/include/ros/time.h:242:35:   required from here
    /opt/ros/indigo/include/ros/time.h:157:11: warning: conversion to 'uint32_t {aka unsigned int}' from 'long unsigned int' may alter its value [-Wconversion]
    make[2]: *** [src/CMakeFiles/forte.dir/__/core/cominfra/comlayersmanager.cpp.o] Error 1
    make[1]: *** [src/CMakeFiles/forte.dir/all] Error 2
    make: *** [all] Error 2
    



Is there any other config I need to modify?

Thank you in advance!

[Updated on: Thu, 19 July 2018 03:20]

Report message to a moderator

Re: How to Merge Manually FORTE ROS Branch to Current Master Branch [message #1792129 is a reply to message #1791762] Thu, 12 July 2018 05:32 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 657
Registered: January 2014
Senior Member
I tlloks like we haven't touched the ROS branch for quite some time. 4diac follows a bit the git flow model. Therefore in the master branch you find always the latest stable release. The ROS branch is based on the development branch. Thefore I would recomend to take the ROS branch and merge the current development branch into the ROS branch. But I would assume that you'll see a similar issue. I think in the mid term we should finally merge the ROS branch into the development branch.

@Ben Schneider: Do you see an obstacle in fixing this and finally merging the ROS branch into the development branch?
Re: How to Merge Manually FORTE ROS Branch to Current Master Branch [message #1792141 is a reply to message #1792129] Thu, 12 July 2018 07:04 Go to previous messageGo to next message
Ben Schneider is currently offline Ben SchneiderFriend
Messages: 24
Registered: February 2017
Junior Member
@Alois: We still have some issues when initializing the ROS features in forte.

I will have a look at this again. But unfortunately not before mid of next week..

Cheers,
Ben
Re: How to Merge Manually FORTE ROS Branch to Current Master Branch [message #1792434 is a reply to message #1792141] Wed, 18 July 2018 02:35 Go to previous messageGo to next message
Victor Hartanto is currently offline Victor HartantoFriend
Messages: 5
Registered: July 2018
Location: Beijing
Junior Member
Ben Schneider wrote on Thu, 12 July 2018 07:04
@Alois: We still have some issues when initializing the ROS features in forte.

I will have a look at this again. But unfortunately not before mid of next week..

Cheers,
Ben


@Ben Schneider,

When you have updates, please let me know.

Looking forward to making this work. Thank you so much in advance!

Victor
Re: How to Merge Manually FORTE ROS Branch to Current Master Branch [message #1792660 is a reply to message #1792434] Fri, 20 July 2018 15:33 Go to previous messageGo to next message
Ben Schneider is currently offline Ben SchneiderFriend
Messages: 24
Registered: February 2017
Junior Member
Hi Victor,

I have updated the the ROS implementation and merged it into 4diac's develop branch.

The code is currently in the review state. I'll let you know when it is added to the official forte repository.

Best,
Ben
Re: How to Merge Manually FORTE ROS Branch to Current Master Branch [message #1792807 is a reply to message #1792660] Tue, 24 July 2018 09:48 Go to previous messageGo to next message
Ben Schneider is currently offline Ben SchneiderFriend
Messages: 24
Registered: February 2017
Junior Member
Hi Victor,

the code for ROS Communication in 4diac has been merged a few minutes ago.

I will update the Documentation on the 4diac webpage shortly with the current changes.

Cheers,
Ben
Re: How to Merge Manually FORTE ROS Branch to Current Master Branch [message #1793284 is a reply to message #1792807] Fri, 03 August 2018 02:36 Go to previous messageGo to next message
Victor Hartanto is currently offline Victor HartantoFriend
Messages: 5
Registered: July 2018
Location: Beijing
Junior Member
Hi Ben,

Thank you for the ROS update.

There's still an error when I merge it to Master branch though.

[ 58%] Building CXX object src/CMakeFiles/forte.dir/modules/ros/ROSLayer.cpp.o
/home/victor/4diac/forte/src/modules/ros/ROSLayer.cpp: In member function 'void CROSLayer::handleReceivedValue(const boost::shared_ptr<const topic_tools::ShapeShifter>&)':
/home/victor/4diac/forte/src/modules/ros/ROSLayer.cpp:155:42: error: expected primary-expression before ')' token
   GET_HANDLER_FROM_COMM_LAYER(CROSManager)->startChain(this->getCommFB());
                                          ^
/home/victor/4diac/forte/src/modules/ros/ROSLayer.cpp:155:42: error: 'GET_HANDLER_FROM_COMM_LAYER' was not declared in this scope
In file included from /opt/ros/indigo/include/ros/ros.h:38:0,
                 from /home/victor/4diac/forte/src/modules/ros/ROSLayer.h:16,
                 from /home/victor/4diac/forte/src/modules/ros/ROSLayer.cpp:13:
/opt/ros/indigo/include/ros/time.h: In instantiation of 'T& ros::TimeBase<T, D>::fromSec(double) [with T = ros::Time; D = ros::Duration]':
/opt/ros/indigo/include/ros/time.h:187:31:   required from here
/opt/ros/indigo/include/ros/time.h:157:11: warning: conversion to 'uint32_t {aka unsigned int}' from 'long unsigned int' may alter its value [-Wconversion]
       sec += (nsec / 1000000000ul);
           ^
/opt/ros/indigo/include/ros/time.h: In instantiation of 'T& ros::TimeBase<T, D>::fromSec(double) [with T = ros::WallTime; D = ros::WallDuration]':
/opt/ros/indigo/include/ros/time.h:242:35:   required from here
/opt/ros/indigo/include/ros/time.h:157:11: warning: conversion to 'uint32_t {aka unsigned int}' from 'long unsigned int' may alter its value [-Wconversion]
make[2]: *** [src/CMakeFiles/forte.dir/modules/ros/ROSLayer.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/forte.dir/all] Error 2
make: *** [all] Error 2
victor@victor:~/RAS_WP2_IntSensing/4diac/forte/bin/posix$ 


Would it require more configurations?

Thank you in advance!
Re: How to Merge Manually FORTE ROS Branch to Current Master Branch [message #1793288 is a reply to message #1793284] Fri, 03 August 2018 06:33 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 657
Registered: January 2014
Senior Member
Please don't merge it into master. Please just check out the develop branch. The develop branch is our working branch for 4diac 1.10. While master holds 1.9.1. The ros module will only work in 1.10 and later.

Cheers,
Alois
Previous Topic:Is there anyway to start the 4DIAC application automatically on raspberry´╝č
Next Topic:Error at building open62541
Goto Forum:
  


Current Time: Tue Nov 13 01:23:27 GMT 2018

Powered by FUDForum. Page generated in 0.02280 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top