Discussion:
[Rock-dev] using base::NamedVector<> as ports
Ajish Babu
2014-07-31 12:39:38 UTC
Permalink
Hi all,

I tried to use the base::NamedVector<..> as port types.

when I include directly in the orogen like *output_port("wrenches",
"***/base/NamedVector< base/samples/Wrench >*")*

/ mars_core.orogen:231: type /base/NamedVector< /base/samples/Wrench
is not declared (Orocos::Generation::ConfigError)
Typelib[WARN]:
/home/babu-dfki/HDSDA2/DFKI-ROCK/install/include/base/NamedVector.hpp:12: ignoring
the empty struct/class /base/NamedVector</base/samples/Wrench>
Typelib[WARN]:
/home/babu-dfki/HDSDA2/DFKI-ROCK/simulation/orogen/mars_core/.orogen/typekit/types/simulation/ForceTorqueSensorTypes.hpp:8:
cannot create the /simulation/Wrenches typedef, as it points to
/base/NamedVector</base/samples/Wrench> which is ignored/

and when I do *typedef base::NamedVector< base::samples::Wrench >
Wrenches;* and then try to use it

/mars_core.orogen:230: type /simulation/Wrenches is not declared
(Orocos::Generation::ConfigError)//
// Typelib[WARN]:
/home/babu-dfki/HDSDA2/DFKI-ROCK/install/include/base/NamedVector.hpp:12: ignoring
the empty struct/class /base/NamedVector</base/samples/Wrench>//
// Typelib[WARN]:
/home/babu-dfki/HDSDA2/DFKI-ROCK/simulation/orogen/mars_core/.orogen/typekit/types/simulation/ForceTorqueSensorTypes.hpp:8:
cannot create the /simulation/Wrenches typedef, as it points to
/base/NamedVector</base/samples/Wrench> which is ignored/

It seems to work only if I create a new type like

///struct////Wrenches////:////public////base//:://NamedVector//<//Wrench//>/
///{/
///};/

Does anybody know what is going on or how it can be done without a new type?

best
Ajish Babu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20140731/293057fc/attachment.htm
Sylvain Joyeux
2014-08-01 18:52:10 UTC
Permalink
This is due to a limitation in gccxml (which clang will hopefully not
have ...). See

http://rock-robotics.org/stable/documentation/orogen/type_definitions.html#the-special-case-of-templates

Sylvain
Post by Ajish Babu
Hi all,
I tried to use the base::NamedVector<..> as port types.
when I include directly in the orogen like output_port("wrenches",
"/base/NamedVector< base/samples/Wrench >")
mars_core.orogen:231: type /base/NamedVector< /base/samples/Wrench > is
not declared (Orocos::Generation::ConfigError)
ignoring the empty struct/class /base/NamedVector</base/samples/Wrench>
cannot create the /simulation/Wrenches typedef, as it points to
/base/NamedVector</base/samples/Wrench> which is ignored
and when I do typedef base::NamedVector< base::samples::Wrench > Wrenches;
and then try to use it
mars_core.orogen:230: type /simulation/Wrenches is not declared
(Orocos::Generation::ConfigError)
ignoring the empty struct/class /base/NamedVector</base/samples/Wrench>
cannot create the /simulation/Wrenches typedef, as it points to
/base/NamedVector</base/samples/Wrench> which is ignored
It seems to work only if I create a new type like
struct Wrenches : public base::NamedVector<Wrench>
{
};
Does anybody know what is going on or how it can be done without a new type?
best
Ajish Babu
_______________________________________________
Rock-dev mailing list
Rock-dev at dfki.de
http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
Janosch Machowinski
2014-08-01 19:18:56 UTC
Permalink
Hm,
I don't see how clang will solve this issue. I know, that the
typedef will work, and that with clang we can catch template
declarations in general. But typelib does not support
templates. Only specialized instantiations.
Greetings
Janosch
Post by Sylvain Joyeux
This is due to a limitation in gccxml (which clang will hopefully not
have ...). See
http://rock-robotics.org/stable/documentation/orogen/type_definitions.html#the-special-case-of-templates
Sylvain
Post by Ajish Babu
Hi all,
I tried to use the base::NamedVector<..> as port types.
when I include directly in the orogen like output_port("wrenches",
"/base/NamedVector< base/samples/Wrench >")
mars_core.orogen:231: type /base/NamedVector< /base/samples/Wrench > is
not declared (Orocos::Generation::ConfigError)
ignoring the empty struct/class /base/NamedVector</base/samples/Wrench>
cannot create the /simulation/Wrenches typedef, as it points to
/base/NamedVector</base/samples/Wrench> which is ignored
and when I do typedef base::NamedVector< base::samples::Wrench > Wrenches;
and then try to use it
mars_core.orogen:230: type /simulation/Wrenches is not declared
(Orocos::Generation::ConfigError)
ignoring the empty struct/class /base/NamedVector</base/samples/Wrench>
cannot create the /simulation/Wrenches typedef, as it points to
/base/NamedVector</base/samples/Wrench> which is ignored
It seems to work only if I create a new type like
struct Wrenches : public base::NamedVector<Wrench>
{
};
Does anybody know what is going on or how it can be done without a new type?
best
Ajish Babu
_______________________________________________
Rock-dev mailing list
Rock-dev at dfki.de
http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
_______________________________________________
Rock-dev mailing list
Rock-dev at dfki.de
http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
Sylvain Joyeux
2014-08-02 13:31:38 UTC
Permalink
Since typelib knows that the type is being used, it can emit it into a
header (as e.g. a typedef) so that clang emits the type.

This actually could have been done with gccxml already ...

Sylvain

On Fri, Aug 1, 2014 at 4:18 PM, Janosch Machowinski
Post by Janosch Machowinski
Hm,
I don't see how clang will solve this issue. I know, that the
typedef will work, and that with clang we can catch template
declarations in general. But typelib does not support
templates. Only specialized instantiations.
Greetings
Janosch
Post by Sylvain Joyeux
This is due to a limitation in gccxml (which clang will hopefully not
have ...). See
http://rock-robotics.org/stable/documentation/orogen/type_definitions.html#the-special-case-of-templates
Sylvain
Post by Ajish Babu
Hi all,
I tried to use the base::NamedVector<..> as port types.
when I include directly in the orogen like output_port("wrenches",
"/base/NamedVector< base/samples/Wrench >")
mars_core.orogen:231: type /base/NamedVector< /base/samples/Wrench > is
not declared (Orocos::Generation::ConfigError)
ignoring the empty struct/class /base/NamedVector</base/samples/Wrench>
cannot create the /simulation/Wrenches typedef, as it points to
/base/NamedVector</base/samples/Wrench> which is ignored
and when I do typedef base::NamedVector< base::samples::Wrench > Wrenches;
and then try to use it
mars_core.orogen:230: type /simulation/Wrenches is not declared
(Orocos::Generation::ConfigError)
ignoring the empty struct/class /base/NamedVector</base/samples/Wrench>
cannot create the /simulation/Wrenches typedef, as it points to
/base/NamedVector</base/samples/Wrench> which is ignored
It seems to work only if I create a new type like
struct Wrenches : public base::NamedVector<Wrench>
{
};
Does anybody know what is going on or how it can be done without a new type?
best
Ajish Babu
_______________________________________________
Rock-dev mailing list
Rock-dev at dfki.de
http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
_______________________________________________
Rock-dev mailing list
Rock-dev at dfki.de
http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
_______________________________________________
Rock-dev mailing list
Rock-dev at dfki.de
http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
Loading...