Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwritten TypeInfo for standard types? #25

Closed
meyerj opened this issue Dec 2, 2014 · 1 comment
Closed

Overwritten TypeInfo for standard types? #25

meyerj opened this issue Dec 2, 2014 · 1 comment

Comments

@meyerj
Copy link
Member

meyerj commented Dec 2, 2014

Some standard types from the RTT typekit (bool, int, float, double etc.) do not print anymore in the TaskBrowser after a typekit generated by typegen has been imported.

Example:

Deployer [S]> var bool b1
 = false               

Deployer [S]> var int i1
 = 0                   

Deployer [S]> import("foo")
4.473 [ Info   ][Thread] Creating Thread for scheduler=ORO_SCHED_OTHER, priority=1, CPU affinity=0, with name='GlobalEngine'
4.473 [ Debug  ][Thread] Setting CPU affinity to 0
4.473 [ Info   ][GlobalEngine] Thread created with scheduler type 'ORO_SCHED_OTHER', priority 0, cpu affinity 15 and period 0 (PID= 29398 ).
4.474 [ Info   ][ComponentLoader::import(path_list)] Importing directory foo ...
4.474 [ Debug  ][ComponentLoader::import(path_list)] Scanning file foo/include ...not a regular file: ignored.
4.474 [ Debug  ][ComponentLoader::import(path_list)] Scanning file foo/src ...not a regular file: ignored.
4.474 [ Debug  ][ComponentLoader::import(path_list)] Scanning file foo/package.xml ...not a .so library: ignored.
4.474 [ Debug  ][ComponentLoader::import(path_list)] Scanning file foo/CMakeLists.txt ...not a .so library: ignored.
4.474 [ Debug  ][ComponentLoader::import(path_list)] Looking for plugins or typekits in directory foo ...
4.474 [ Debug  ][ComponentLoader::import(path_list)] No such directory: "foo/types"
4.474 [ Debug  ][ComponentLoader::import(path_list)] No such directory: "foo/plugins"
4.474 [ Debug  ][ComponentLoader::import(path_list)] No such directory: "foo/gnulinux"
4.474 [ Info   ][ComponentLoader::import(path_list)] Importing directory /opt/orocos/indigo/tmp/install/lib/orocos/gnulinux/foo ...
4.474 [ Debug  ][ComponentLoader::import(path_list)] Scanning file /opt/orocos/indigo/tmp/install/lib/orocos/gnulinux/foo/plugins ...not a regular file: ignored.
4.475 [ Debug  ][ComponentLoader::import(path_list)] Scanning file /opt/orocos/indigo/tmp/install/lib/orocos/gnulinux/foo/libfoo-gnulinux.so ...Succesfully loaded foo
4.475 [ Info   ][ComponentLoader::import(path_list)] Loaded component type 'Foo'
4.475 [ Debug  ][ComponentLoader::import(path_list)] Scanning file /opt/orocos/indigo/tmp/install/lib/orocos/gnulinux/foo/types ...not a regular file: ignored.
4.475 [ Debug  ][ComponentLoader::import(path_list)] Looking for plugins or typekits in directory /opt/orocos/indigo/tmp/install/lib/orocos/gnulinux/foo ...
4.475 [ Info   ][ComponentLoader::import(path_list)] Loading typekit libraries from directory /opt/orocos/indigo/tmp/install/lib/orocos/gnulinux/foo/types ...
4.483 [ Debug  ][ComponentLoader::import(path_list)] Scanning file /opt/orocos/indigo/tmp/install/lib/orocos/gnulinux/foo/types/libfoo-transport-mqueue-gnulinux.so ...Found library libfoo-transport-mqueue-gnulinux.so
4.486 [ Info   ][TypekitRepository::Import] Loading Transport MQueue:///orogen/foo.
4.486 [ Debug  ][TypekitRepository::Import] Transport MQueue did not install a fallback handler for 'unknown_t'.
4.486 [ Info   ][ComponentLoader::import(path_list)] Loaded RTT TypeKit/Transport '/orogen/foo/MQueue' from 'foo-transport-mqueue'
4.486 [ Debug  ][ComponentLoader::import(path_list)] Scanning file /opt/orocos/indigo/tmp/install/lib/orocos/gnulinux/foo/types/libfoo-transport-typelib-gnulinux.so ...Found library libfoo-transport-typelib-gnulinux.so
4.486 [ Info   ][TypekitRepository::Import] Loading Transport Typelib:///orogen/foo.
4.487 [ Debug  ][TypekitRepository::Import] Transport Typelib did not install a fallback handler for 'unknown_t'.
4.488 [ Info   ][ComponentLoader::import(path_list)] Loaded RTT TypeKit/Transport '/orogen/foo/TYPELIB' from 'foo-transport-typelib'
4.490 [ Debug  ][ComponentLoader::import(path_list)] Scanning file /opt/orocos/indigo/tmp/install/lib/orocos/gnulinux/foo/types/libfoo-transport-corba-gnulinux.so ...Found library libfoo-transport-corba-gnulinux.so
4.490 [ Info   ][TypekitRepository::Import] Loading Transport CORBA:///orogen/foo.
4.490 [ Debug  ][TypekitRepository::Import] Transport CORBA did not install a fallback handler for 'unknown_t'.
4.490 [ Info   ][ComponentLoader::import(path_list)] Loaded RTT TypeKit/Transport '/orogen/foo/CORBA' from 'foo-transport-corba'
4.517 [ Debug  ][ComponentLoader::import(path_list)] Scanning file /opt/orocos/indigo/tmp/install/lib/orocos/gnulinux/foo/types/libfoo-typekit-gnulinux.so ...Found library libfoo-typekit-gnulinux.so
4.517 [ Info   ][TypekitRepository::Import] Loading Typekit /orogen/foo.
4.517 [ Debug  ][TypekitRepository::Import] Registered Type '/FooData' to the Orocos Type System.
4.517 [ Info   ][TypekitRepository::Import] Registered new 'MQueue' transport for /FooData
4.518 [ Info   ][TypekitRepository::Import] Registered new 'Typelib' transport for /FooData
4.518 [ Info   ][TypekitRepository::Import] Registered new 'CORBA' transport for /FooData
4.518 [ Debug  ][TypekitRepository::Import] Registered Type '/bool' to the Orocos Type System.
4.518 [ Debug  ][TypekitRepository::Import] A protocol with id 2 was already added for type bool
4.518 [ Info   ][TypekitRepository::Import] Registered new 'MQueue' transport for /bool
4.518 [ Info   ][TypekitRepository::Import] Registered new 'Typelib' transport for /bool
4.518 [ Debug  ][TypekitRepository::Import] Registered Type '/double' to the Orocos Type System.
4.518 [ Debug  ][TypekitRepository::Import] A protocol with id 2 was already added for type double
4.518 [ Info   ][TypekitRepository::Import] Registered new 'MQueue' transport for /double
4.518 [ Info   ][TypekitRepository::Import] Registered new 'Typelib' transport for /double
4.518 [ Debug  ][TypekitRepository::Import] Registered Type '/float' to the Orocos Type System.
4.518 [ Debug  ][TypekitRepository::Import] A protocol with id 2 was already added for type float
4.518 [ Info   ][TypekitRepository::Import] Registered new 'MQueue' transport for /float
4.518 [ Info   ][TypekitRepository::Import] Registered new 'Typelib' transport for /float
4.518 [ Debug  ][TypekitRepository::Import] Registered Type '/int16_t' to the Orocos Type System.
4.518 [ Info   ][TypekitRepository::Import] Registered new 'MQueue' transport for /int16_t
4.518 [ Info   ][TypekitRepository::Import] Registered new 'Typelib' transport for /int16_t
4.518 [ Info   ][TypekitRepository::Import] Registered new 'CORBA' transport for /int16_t
4.518 [ Debug  ][TypekitRepository::Import] Registered Type '/int32_t' to the Orocos Type System.
4.518 [ Debug  ][TypekitRepository::Import] A protocol with id 2 was already added for type int
4.518 [ Info   ][TypekitRepository::Import] Registered new 'MQueue' transport for /int32_t
4.518 [ Info   ][TypekitRepository::Import] Registered new 'Typelib' transport for /int32_t
4.518 [ Debug  ][TypekitRepository::Import] Registered Type '/std/string' to the Orocos Type System.
4.518 [ Info   ][TypekitRepository::Import] Registered new 'MQueue' transport for /std/string
4.518 [ Info   ][TypekitRepository::Import] Registered new 'Typelib' transport for /std/string
4.518 [ Debug  ][TypekitRepository::Import] Registered Type '/std/vector</double>' to the Orocos Type System.
4.518 [ Debug  ][TypekitRepository::Import] A protocol with id 2 was already added for type array
4.518 [ Info   ][TypekitRepository::Import] Registered new 'MQueue' transport for /std/vector</double>
4.518 [ Info   ][TypekitRepository::Import] Registered new 'Typelib' transport for /std/vector</double>
4.518 [ Debug  ][TypekitRepository::Import] Registered Type '/uint16_t' to the Orocos Type System.
4.518 [ Info   ][TypekitRepository::Import] Registered new 'MQueue' transport for /uint16_t
4.518 [ Info   ][TypekitRepository::Import] Registered new 'Typelib' transport for /uint16_t
4.518 [ Info   ][TypekitRepository::Import] Registered new 'CORBA' transport for /uint16_t
4.518 [ Debug  ][TypekitRepository::Import] Registered Type '/uint32_t' to the Orocos Type System.
4.518 [ Debug  ][TypekitRepository::Import] A protocol with id 2 was already added for type uint
4.518 [ Info   ][TypekitRepository::Import] Registered new 'MQueue' transport for /uint32_t
4.518 [ Info   ][TypekitRepository::Import] Registered new 'Typelib' transport for /uint32_t
4.518 [ Debug  ][TypekitRepository::Import] Registered Type '/uint8_t' to the Orocos Type System.
4.519 [ Info   ][TypekitRepository::Import] Registered new 'MQueue' transport for /uint8_t
4.519 [ Info   ][TypekitRepository::Import] Registered new 'Typelib' transport for /uint8_t
4.519 [ Info   ][TypekitRepository::Import] Registered new 'CORBA' transport for /uint8_t
4.519 [ Info   ][ComponentLoader::import(path_list)] Loaded RTT TypeKit/Transport '/orogen/foo' from 'foo-typekit'
4.519 [ Info   ][ComponentLoader::import(path_list)] Loading plugin libraries from directory /opt/orocos/indigo/tmp/install/lib/orocos/gnulinux/foo/plugins ...
4.519 [ Debug  ][ComponentLoader::import(path_list)] Scanning file /opt/orocos/indigo/tmp/install/lib/orocos/gnulinux/foo/plugins/libfoo-plugin-gnulinux.so ...Found library libfoo-plugin-gnulinux.so
Plugin of foo loaded in process.
4.519 [ Info   ][ComponentLoader::import(path_list)] Loaded RTT Plugin 'foo-example-plugin' from 'foo-plugin'
4.520 [ Debug  ][ComponentLoader::import(path_list)] Scanning file /opt/orocos/indigo/tmp/install/lib/orocos/gnulinux/foo/plugins/libfoo-service-gnulinux.so ...Found library libfoo-service-gnulinux.so
4.520 [ Info   ][ComponentLoader::import(path_list)] Loaded RTT Service 'myservice' from 'foo-service'
4.520 [ Info   ][ComponentLoader::import(path_list)] Importing directory ./foo ...
4.520 [ Debug  ][ComponentLoader::import(path_list)] Scanning file ./foo/include ...not a regular file: ignored.
4.520 [ Debug  ][ComponentLoader::import(path_list)] Scanning file ./foo/src ...not a regular file: ignored.
4.520 [ Debug  ][ComponentLoader::import(path_list)] Scanning file ./foo/package.xml ...not a .so library: ignored.
4.520 [ Debug  ][ComponentLoader::import(path_list)] Scanning file ./foo/CMakeLists.txt ...not a .so library: ignored.
4.520 [ Debug  ][ComponentLoader::import(path_list)] Looking for plugins or typekits in directory ./foo ...
4.520 [ Debug  ][ComponentLoader::import(path_list)] No such directory: "./foo/types"
4.520 [ Debug  ][ComponentLoader::import(path_list)] No such directory: "./foo/plugins"
 = (bool)              

Deployer [S]> .types
Available data types:  FooData bool double float int16_t int32_t std.string std.vector<double> uint16_t uint32_t uint8_t ConnPolicy FlowStatus PropertyBag SendHandle SendStatus TaskContext array bool char double float int ints rt_string string strings uint void
Deployer [S]> var bool b2
 = (bool)              

Deployer [S]> var int i2
 = (int)               

Deployer [S]> var string s2
 =                     

Deployer [S]> var std.string s3
 =                     

Deployer [S]>

The typekit is the default typekit generated with orocreate-pkg, where the struct FooData only contains a vector of doubles. I am testing with the current toolchain-2.8 branches of all toolchain repositories.

@meyerj
Copy link
Member Author

meyerj commented Jan 23, 2015

@psoetens and I looked into this problem on Wednesday. The printing problem has been fixed in orocos-toolchain/rtt@a4659bb and orocos-toolchain/rtt@8cc95bc. The reason why the values were not printed is that orogen installs the typekit with a TemplateTypeInfo<T, use_stream> with the use_stream parameter set to its default value false and without the patches in rtt the stream factory was therefore overwritten, even if another typekit provides streaming operators.

However, that still does not explain why the typekit generated with the toolchain-2.8 branch (which is based on commit b0c55a1 in the master branch) registers new TypeInfos for the primitive types /bool, /double and so on. With the latest revision in master merged into toolchain-2.8 (v2.8.0-rc1) the result is different and the typekit only registers the /FooData and /std/vector</double> types, as expected.

There seems to be a difference depending on whether RTT has been compiled with scripting enabled or disabled.

@meyerj meyerj closed this as completed Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant