Ask Your Question
0

OROCOS TypekitRepository::Import errors

asked 2011-10-31 04:47:40 -0500

Ross P gravatar image

updated 2014-01-28 17:10:40 -0500

ngrennan gravatar image

I am attempting to make a ROS node and OROCOS component communicate with eachother using a ROS topic that has a custom message type. When I import the OROCOS component that uses the custom message type into the OROCOS Deployer, I get about 15 TypekitRepository::Import errors. When I quit from the OROCOS Deployer I get a segmentation fault.

I have done some investigating and managed to reduce the number of TypekitRepository::Import errors and eliminate the segmentation fault but I haven’t managed to get rid of all of the errors yet and I don’t understand why I’m getting the errors in the first place. Any help would be appreciated.

I am using ROS Diamondback 1.4.3 and the latest OROCOS Debian package for Diamandback.

I was following the example at http://www.ros.org/wiki/rtt_ros_integrationThis is what I did:

  • Created a ROS package

    a. roscreate-pkg MyRosPkg

    b. roscd MyRosPkg

    c. created msg/MyMsgType.msg with the following three lines.

    string name

    int32 val1

    float32 val2

    d. edited CMakeLists.txt to uncomment the rosbuild_genmsg() line

    e. rosmake MyRosPkg

  • Created an OROCOS typekit

a. rosrun ocl orocreate-pkg MyOrocosTypekit

b. edited CMakeLists.txt file, added the following just before the orocos_generate_package() line.

rosbuild_include(rtt_ros_integration GenerateRTTtypekit)
ros_generate_rtt_typekit(MyRosPkg)

c. Edited the manifest.xml file, added the following just before the </package> line.

<depend package="rtt_ros_integration"/>
<depend package="MyRosPkg"/>
    <export>
       <cpp cflags="-I${prefix}/include"/>
    </export>

d. cmake ./ && make

  • Created an OROCOS component

a. rosrun ocl orocreate-pkg MyOrocosComp

b. Edited the manifest.xml file, added the following just before the </package> line.

<depend package=" MyOrocosTypekit"/>

c. Edited the MyOrocosComp-component.hpp file, added the following after the #include <iostream> line.

#include <MyRosPkg/typekit/MyMsgType.h>

d. cmake ./ && make

  • Ran the OROCOS Deployer

a. rosrun ocl deployer-gnulinux

b. import(“MyOrocosComp”)

c. I saw several instances of the following errors (errors included protocol with id of 1, 2, and 42)

[ ERROR  ][TypekitRepository::Import] A protocol with id 1 was already added for type /std/string
[ ERROR  ][TypekitRepository::Import] A protocol with id 1 was already added for type /std/vector</double>

d. quit

e. I saw:

TLSF bytes allocated=20480 overhead=6384 max-used=6384 currently-used=6384 still-allocated=0
Segmentation fault
  • While looking into the problem, I found that the MyOrocosTypekit-types.hpp and MyOrocosComp-types.hpp files that were created as part of the template contain a structure that has a single member -- std::vector<double samples.="" if="" i="" change="" this="" to="" int="" samples="" in="" both="" files,="" clean,="" remake,="" and="" rerun,="" all="" of="" the="" std="" vector<="" double=""> error messages are gone and the Deployer does not generate a segmentation fault on exit. I still get the std/string error messages.
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2011-11-01 07:02:12 -0500

Ross P gravatar image

I have found that these problems go away if I don't use rosrun to create MyOrocosTypekit. So if I replace the •Created a ROS package a - d steps with

a. mkdir MyOrocosTypekit

b. create a MyOrocosTypekit/CMakeLists.txt file that contains

cmake_minimum_required(VERSION 2.6.3)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()
rosbuild_include(rtt_ros_integration GenerateRTTtypekit)
ros_generate_rtt_typekit(MyRosPkg)

c. create a MyOrocosTypekit/manifest.xml file that contains

<package>
    <description brief="my typekit">
        This package contains my typekit
    </description>
    <license></license>
    <author>Unknown Author</author>
    <depend package="rtt" />
    <depend package="rtt_ros_integration"/>
    <depend package="MyRosPkg"/>
    <export>
        <cpp cflags="-I${prefix}/include"/>
    </export>
</package>

d. cmake ./ && make

Also makeing sure that when I create MyOrocosComponent that I include the modifier to get just component support -- rosrun ocl orocreate-pkg MyOrocosComp component

All of the error messages go away.

edit flag offensive delete link more
0

answered 2011-11-03 21:33:07 -0500

I'm glad to see you have been able to resolve the problems yourself.

Note that, for generating RTT ROS typekits, you can (should) use the script in the rtt_ros_integration package: rosrun rtt_ros_integration create_rtt_msgs <ros-msg-package> (this is for the diamondback version)

The instructions on the ROS wiki were a little bit outdated, I'm updating them right now.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-10-31 04:47:40 -0500

Seen: 415 times

Last updated: Nov 03 '11