Including Class in Orocos Component

Hi Everyone,

I am wondering if someone did that before, but Please everyone can share with us what is the best solution,,

With OROCOS I used to use and link my developed libraries and include the header with the Component to use it. But now I have a different case, as I need to use a developed class, not library. Which make me have .CPP and .h Files.

What is the best solution to include them in my component? or Is it better to write down the code in my Orocos Project?

Thanks,, Aladdin

Including Class in Orocos Component

2015-05-26 7:29 GMT+02:00 <alaaeldeen [dot] abdalrahman [..] ....j

:

> Hi Everyone,
>
> I am wondering if someone did that before, but Please everyone can share
> with
> us what is the best solution,,
>
> With OROCOS I used to use and link my developed libraries and include the
> header with the Component to use it. But now I have a different case, as I
> need to use a developed class, not library. Which make me have .CPP and .h
> Files.
>
> What is the best solution to include them in my component?

If you only have one cpp to use the simpliest solution would be to include
the cpp of the class you want in your orocos library (append it after the
Component.cpp file in the Cmakelist).. If this is difficult due to
packaging (because it comes from 2 independent projects with independent
lifecycles) just make a library with the cpp you want to include (even if
it's alone), add a dependency from orocos to your library and link it.

> or Is it better to
> write down the code in my Orocos Project?
>

NO ! Never ever do that. Keep your valuable code outside orocos and use
orocos for gluing.

>
> Thanks,,
> Aladdin
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>

Including Class in Orocos Component

This is a great answer. Thank you, Done!