ERROR - ROSService::import("rtt_std_msgs")
MatheusPinto opened this issue · comments
I install the rtt_ros_integration in a x86 machine with Ubuntu and Xenomai 3, using the normal steps in: https://github.com/orocos/rtt_ros_integration.
The rtt package from orocos_toolchain used was taked from this branch: https://github.com/orocos-toolchain/rtt/tree/ahoarau-xenomai3-support-v2.
My workspace is in: /home/robo/workspaces/catkin_ws.
And OROCOS_TARGET=xenomai.
First, was created a package for application:
$ cd ~/workspaces/catkin_ws/src
$ catkin_create_pkg rtt_ros_example
Then, I create a rtt_ros application in C++. The code "rtt_ros_example" is given below:
#include <rtt/TaskContext.hpp>
#include <rtt/Port.hpp>
#include <std_msgs/Float64.h>
#include <std_msgs/String.h>
//#include <std_msgs/typekit/Float64.h>
//#include <std_msgs/typekit/String.h>
#include <rtt/Component.hpp>
#include <std_srvs/Empty.h>
#include <rtt/Activity.hpp> // for use setActivity
#include <rtt/os/main.h> // for linker find ORO_main function
#include <ros/ros.h>
#include <rtt_roscomm/rostopic.h>
#include <rtt/Component.hpp>
#include <rtt_ros/rtt_ros.h>
//#include <iostream>
using namespace RTT;
class HelloRobot : public RTT::TaskContext
{
private:
InputPort<std_msgs::Float64> inport;
OutputPort<std_msgs::Float64> outport;
InputPort<std_msgs::String> sinport;
OutputPort<std_msgs::String> soutport;
std::string prop_answer;
double prop_counter_step;
double counter;
public:
HelloRobot(const std::string& name):
TaskContext(name),
inport("float_in"),
sinport("string_in"),soutport("string_out","Hello Robot"),
prop_answer("Hello Robot"),prop_counter_step(0.01), counter(0.0)
{
std_msgs::Float64 float_sample;
std_msgs::String string_sample;
//outport.setName("float_out");
//outport.doc("Sends out 'answer'.");
//outport.setDataSample(float_sample);
//ports()->addPort(outport);
this->ports()->addPort("float_out", outport);
outport.createStream(rtt_roscomm::topic("float_out"));
}
/* HelloRobot(const std::string& name):
TaskContext(name),
inport("float_in"),outport("float_out"),
sinport("string_in"),soutport("string_out","Hello Robot"),
prop_answer("Hello Robot"),prop_counter_step(0.01), counter(0.0)
{
inpo.setName("out_force_port");
out_force_port.doc("Output port for sending force");
out_force_port.setDataSample(F);
ports()->addPort(out_force_port);
this->addEventPort(inport).doc("Receiving a message here will wake up this component.");
//this->inport.createStream(rtt_roscomm::topic("float_in"));
this->addPort(outport).doc("Sends out 'answer'.");
//this->outport.createStream(rtt_roscomm::topic("float_out"));
this->addEventPort(sinport).doc("Receiving a message here will wake up this component.");
//this->sinport.createStream(rtt_roscomm::topic("string_in"));
this->addPort(soutport).doc("Sends out a counter value based on 'counter_step'.");
//this->soutport.createStream(rtt_roscomm::topic("string_out"));
}
*/
~HelloRobot(){}
private:
bool startHook()
{
this->inport.createStream(rtt_roscomm::topic("float_in"));
this->outport.createStream(rtt_roscomm::topic("float_out"));
this->sinport.createStream(rtt_roscomm::topic("string_in"));
this->soutport.createStream(rtt_roscomm::topic("string_out"));
return true;
}
void updateHook()
{
std_msgs::Float64 fdata;
std_msgs::String sdata;
//std::cout << "hello" << std::endl;
if(NewData==inport.read(fdata))
{
log(Info)<<"Float in: "<<fdata<<endlog();
}
if(NewData==sinport.read(sdata))
{
log(Info)<<"String in: "<<sdata<<endlog();
}
counter+=prop_counter_step;
fdata.data+=counter;
outport.write(fdata);
sdata.data=prop_answer;
soutport.write(sdata);
}
};
//ORO_CREATE_COMPONENT_LIBRARY()ORO_LIST_COMPONENT_TYPE(HelloRobot)
ORO_CREATE_COMPONENT(HelloRobot)
int ORO_main(int argc, char** argv)
{
rtt_ros::import("rtt_std_msgs");
HelloRobot myComponent("HelloRobot");
// Execute a component
myComponent.setActivity( new Activity(5, 0.01 ) );
myComponent.start();
// Wait when task are not executing anymore
getchar();
// Finalize component
myComponent.stop();
return 0;
}
Basically, the application try import the "rtt_std_msgs" package dinamically through "rtt_ros" service and connect ports to ros topics.
The xml package is that:
<package>
<name>rtt_ros_example</name>
<version>0.1.0</version>
<description>rtt_ros_integration_example provides a very basic example. A HelloRobot component with two input and two output ports is created. You can use 'rostopic echo/pub' to read from and write to them, e.g: rostopic pub /string_in std_msgs/String 'Hi, HelloRobot component'</description>
<maintainer email="ruben.smits@mech.kuleuven.be">Ruben Smits</maintainer>
<license>BSD</license>
<url type="website">http://ros.org/wiki/rtt_ros_integration_example</url>
<!-- <url type="bugtracker"></url> -->
<author email="ruben.smits@mech.kuleuven.be">Ruben Smits</author>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>rtt</build_depend>
<build_depend>ocl</build_depend>
<build_depend>rtt_ros</build_depend>
<build_depend>rtt_roscomm</build_depend>
<build_depend>rtt_std_msgs</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>rtt_rosnode</build_depend>
<build_depend>rtt_rosparam</build_depend>
<run_depend>rtt</run_depend>
<run_depend>ocl</run_depend>
<run_depend>rtt_ros</run_depend>
<run_depend>rtt_roscomm</run_depend>
<run_depend>rtt_std_msgs</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>rtt_rosnode</run_depend>
<run_depend>rtt_rosparam</run_depend>
<export>
<rtt_ros>
<plugin_depend>rtt_roscomm</plugin_depend>
<plugin_depend>rtt_std_msgs</plugin_depend>
<plugin_depend>std_msgs</plugin_depend>
<plugin_depend>rtt_rosnode</plugin_depend>
<plugin_depend>rtt_rosparam</plugin_depend>
</rtt_ros>
</export>
</package>
And de CMakeLists.txt is:
cmake_minimum_required(VERSION 2.8.3)
project(rtt_ros_example)
# To build Orocos components in a Catkin package, you need to first include the RTT CMake macros with rtt_ros.
#find_package(catkin REQUIRED COMPONENTS rtt_ros)
find_package(catkin REQUIRED COMPONENTS
roscpp rtt_ros rtt_roscomm rtt_std_msgs std_msgs cmake_modules message_generation)
# Do not use find_package(catkin COMPONENTS) to find orocos packages, since catkin doesn't properly handle the orocos-target-specific packages. Listing them in the package.xml file will also enforce proper build ordering.
# If you need other RTT libraries (eg.:CORBA transport), you can use the use_orocos() macro provided by the rtt_ros package.
generate_messages(DEPENDENCIES std_msgs)
LINK_LIBRARIES(/home/robo/workspaces/catkin_ws/underlay/devel/lib/librtt_ros-xenomai.so
/home/robo/workspaces/catkin_ws/underlay/devel/lib/librtt_rostopic-xenomai.so)
include_directories(
include
${catkin_INCLUDE_DIRS}
${USE_OROCOS_INCLUDE_DIRS}
/home/robo/workspaces/catkin_ws/underlay/install/include/orocos)
link_directories(${catkin_LIBRARY_DIRS})
add_definitions(-DRTT_COMPONENT)
orocos_executable(${PROJECT_NAME} src/HelloRobot.cpp)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})
orocos_generate_package(INCLUDE_DIRS include
DEPENDS rtt_ros
rtt_roscomm
rtt_std_msgs)
orocos_generate_package(
INCLUDE_DIRS include
DEPENDS roscpp
DEPENDS_TARGETS rtt_ros rtt_roscomm rtt_std_msgs std_msgs
)
So, the configuration scripts was executed:
$ source underlay/devel/setup.bash
Then, was trying a first attempt to build the package:
$ cd ~/workspaces/catkin_ws
$ catkin_make
Base path: /home/robo/workspaces/catkin_ws
Source space: /home/robo/workspaces/catkin_ws/src
Build space: /home/robo/workspaces/catkin_ws/build
Devel space: /home/robo/workspaces/catkin_ws/devel
Install space: /home/robo/workspaces/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/robo/workspaces/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/robo/workspaces/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/robo/workspaces/catkin_ws/underlay/devel;/home/robo/workspaces/catkin_ws/underlay_isolated/install_isolated;/opt/ros/kinetic
-- This workspace overlays: /home/robo/workspaces/catkin_ws/underlay/devel;/home/robo/workspaces/catkin_ws/underlay_isolated/install_isolated;/opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/robo/workspaces/catkin_ws/build/test_results
-- Found gmock sources under '/usr/src/gmock': gmock will be built
-- Found gtest sources under '/usr/src/gmock': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.14
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - rtt_ros_example
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'rtt_ros_example'
-- ==> add_subdirectory(rtt_ros_example)
-- - Detected OROCOS_TARGET environment variable. Using: xenomai
-- Orocos-RTT found in /home/robo/workspaces/catkin_ws/underlay_isolated/install_isolated/lib/cmake/orocos-rtt/orocos-rtt-xenomai-libraries.cmake
-- Found orocos-rtt 2.9.0 for the xenomai target. Available transports: mqueue
-- - Found requested orocos-rtt components: rtt-marshalling rtt-scripting
-- [UseOrocos] Building package rtt_ros_example with catkin develspace support.
-- [UseOrocos] Using Orocos RTT in rtt_ros_example
-- Checking for one of the modules 'ocl-xenomai'
-- [UseOrocos] Found orocos package 'ocl'.
-- Checking for one of the modules 'rtt_ros-xenomai'
-- [UseOrocos] Found orocos package 'rtt_ros'.
-- Checking for one of the modules 'rtt_roscomm-xenomai'
-- [UseOrocos] Found orocos package 'rtt_roscomm'.
-- Checking for one of the modules 'rtt_std_msgs-xenomai'
-- [UseOrocos] Found orocos package 'rtt_std_msgs'.
-- Checking for one of the modules 'std_msgs-xenomai'
-- Checking for one of the modules 'rtt_rosnode-xenomai'
-- [UseOrocos] Found orocos package 'rtt_rosnode'.
-- Checking for one of the modules 'rtt_rosparam-xenomai'
-- [UseOrocos] Found orocos package 'rtt_rosparam'.
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Warning at /home/robo/workspaces/catkin_ws/build/rtt_ros_example/cmake/rtt_ros_example-genmsg.cmake:3 (message):
Invoking generate_messages() without having added any message or service
file before.
You should either add add_message_files() and/or add_service_files() calls
or remove the invocation of generate_messages().
Call Stack (most recent call first):
/opt/ros/kinetic/share/genmsg/cmake/genmsg-extras.cmake:307 (include)
rtt_ros_example/CMakeLists.txt:14 (generate_messages)
-- rtt_ros_example: 0 messages, 0 services
ola
-- [UseOrocos] Building executable rtt_ros_example
-- [UseOrocos] Generating package version 0.1.0 from rtt_ros_example_VERSION (package.xml).
-- [UseOrocos] Generating pkg-config file for package in catkin devel space.
-- [UseOrocos] Exporting targets rtt_ros_example_generate_messages_cpp;rtt_ros_example_generate_messages_eus;rtt_ros_example_generate_messages_lisp;rtt_ros_example_generate_messages_nodejs;rtt_ros_example_generate_messages_py;roscpp_generate_messages_cpp;roscpp_generate_messages_eus;roscpp_generate_messages_lisp;roscpp_generate_messages_nodejs;roscpp_generate_messages_py;rosgraph_msgs_generate_messages_cpp;rosgraph_msgs_generate_messages_eus;rosgraph_msgs_generate_messages_lisp;rosgraph_msgs_generate_messages_nodejs;rosgraph_msgs_generate_messages_py;std_msgs_generate_messages_cpp;std_msgs_generate_messages_eus;std_msgs_generate_messages_lisp;std_msgs_generate_messages_nodejs;std_msgs_generate_messages_py;rtt-std_msgs-typekit;rtt-std_msgs-ros-transport;rtt-ros-primitives-transport.
-- [UseOrocos] Exporting libraries rtt_ros_example_generate_messages_eus;rtt_ros_example_generate_messages_nodejs;/home/robo/workspaces/catkin_ws/underlay/devel/lib/librtt_ros-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_ros/plugins/librtt_ros_service-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_ros/types/librtt-ros-primitives-typekit-xenomai.so;/home/robo/workspaces/catkin_ws/underlay_isolated/install_isolated/lib/liborocos-rtt-xenomai.so;/opt/ros/kinetic/lib/librostime.so;/opt/ros/kinetic/lib/libcpp_common.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/librtt_rostopic-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_roscomm/plugins/librtt_rostopic_service-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_roscomm/plugins/librtt_rosservice_registry-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_roscomm/plugins/librtt_rosservice-xenomai.so;/opt/ros/kinetic/lib/libroscpp.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_signals.so;/opt/ros/kinetic/lib/librosconsole.so;/opt/ros/kinetic/lib/librosconsole_log4cxx.so;/opt/ros/kinetic/lib/librosconsole_backend_interface.so;/usr/lib/x86_64-linux-gnu/liblog4cxx.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so;/opt/ros/kinetic/lib/libroscpp_serialization.so;/opt/ros/kinetic/lib/libxmlrpcpp.so;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libconsole_bridge.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_std_msgs/plugins/librtt-ros-primitives-transport-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_std_msgs/types/librtt-std_msgs-typekit-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_std_msgs/types/librtt-std_msgs-ros-transport-xenomai.so.
-- [UseOrocos] Exporting include directories /home/robo/workspaces/catkin_ws/src/rtt_ros_example/include;/home/robo/workspaces/catkin_ws/underlay/devel/include/orocos;/home/robo/workspaces/catkin_ws/underlay/src/rtt_ros_integration-toolchain-2.9/rtt_ros/include;/home/robo/workspaces/catkin_ws/underlay_isolated/install_isolated/include;/usr/xenomai/include/cobalt;/usr/xenomai/include;/usr/xenomai/include/alchemy;/opt/ros/kinetic/include;/home/robo/workspaces/catkin_ws/underlay/src/rtt_ros_integration-toolchain-2.9/rtt_roscomm/include;/usr/include;/opt/ros/kinetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp;/home/robo/workspaces/catkin_ws/underlay/src/rtt_ros_integration-toolchain-2.9/typekits/rtt_std_msgs/include/orocos.
-- [UseOrocos] Exporting library directories /home/robo/workspaces/catkin_ws/underlay/devel/lib;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_ros/plugins;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_ros/types;/home/robo/workspaces/catkin_ws/underlay_isolated/install_isolated/lib;/opt/ros/kinetic/lib;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_roscomm/plugins;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_std_msgs/plugins;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_std_msgs/types.
-- [UseOrocos] Generating package version 0.1.0 from rtt_ros_example_VERSION (package.xml).
-- [UseOrocos] Generating pkg-config file for package in catkin devel space.
-- [UseOrocos] Exporting targets rtt_ros_example_generate_messages_cpp;rtt_ros_example_generate_messages_eus;rtt_ros_example_generate_messages_lisp;rtt_ros_example_generate_messages_nodejs;rtt_ros_example_generate_messages_py;roscpp_generate_messages_cpp;roscpp_generate_messages_eus;roscpp_generate_messages_lisp;roscpp_generate_messages_nodejs;roscpp_generate_messages_py;rosgraph_msgs_generate_messages_cpp;rosgraph_msgs_generate_messages_eus;rosgraph_msgs_generate_messages_lisp;rosgraph_msgs_generate_messages_nodejs;rosgraph_msgs_generate_messages_py;std_msgs_generate_messages_cpp;std_msgs_generate_messages_eus;std_msgs_generate_messages_lisp;std_msgs_generate_messages_nodejs;std_msgs_generate_messages_py;rtt-std_msgs-typekit;rtt-std_msgs-ros-transport;rtt-ros-primitives-transport.
-- [UseOrocos] Exporting libraries rtt_ros_example_generate_messages_eus;rtt_ros_example_generate_messages_nodejs;roscpp_generate_messages_cpp;roscpp_generate_messages_eus;roscpp_generate_messages_lisp;roscpp_generate_messages_nodejs;roscpp_generate_messages_py;rosgraph_msgs_generate_messages_cpp;rosgraph_msgs_generate_messages_eus;rosgraph_msgs_generate_messages_lisp;rosgraph_msgs_generate_messages_nodejs;rosgraph_msgs_generate_messages_py;std_msgs_generate_messages_cpp;std_msgs_generate_messages_eus;std_msgs_generate_messages_lisp;std_msgs_generate_messages_nodejs;std_msgs_generate_messages_py;rtt-std_msgs-typekit;rtt-std_msgs-ros-transport;rtt-ros-primitives-transport;/opt/ros/kinetic/lib/libroscpp.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_signals.so;/opt/ros/kinetic/lib/librosconsole.so;/opt/ros/kinetic/lib/librosconsole_log4cxx.so;/opt/ros/kinetic/lib/librosconsole_backend_interface.so;/usr/lib/x86_64-linux-gnu/liblog4cxx.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so;/opt/ros/kinetic/lib/libroscpp_serialization.so;/opt/ros/kinetic/lib/libxmlrpcpp.so;/opt/ros/kinetic/lib/librostime.so;/opt/ros/kinetic/lib/libcpp_common.so;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libconsole_bridge.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/librtt_ros-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_ros/plugins/librtt_ros_service-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_ros/types/librtt-ros-primitives-typekit-xenomai.so;/home/robo/workspaces/catkin_ws/underlay_isolated/install_isolated/lib/liborocos-rtt-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/librtt_rostopic-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_roscomm/plugins/librtt_rostopic_service-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_roscomm/plugins/librtt_rosservice_registry-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_roscomm/plugins/librtt_rosservice-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_std_msgs/plugins/librtt-ros-primitives-transport-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_std_msgs/types/librtt-std_msgs-typekit-xenomai.so;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_std_msgs/types/librtt-std_msgs-ros-transport-xenomai.so.
-- [UseOrocos] Exporting include directories /home/robo/workspaces/catkin_ws/src/rtt_ros_example/include;/home/robo/workspaces/catkin_ws/underlay/devel/include/orocos;/home/robo/workspaces/catkin_ws/underlay/src/rtt_ros_integration-toolchain-2.9/rtt_ros/include;/home/robo/workspaces/catkin_ws/underlay_isolated/install_isolated/include;/usr/xenomai/include/cobalt;/usr/xenomai/include;/usr/xenomai/include/alchemy;/opt/ros/kinetic/include;/home/robo/workspaces/catkin_ws/underlay/src/rtt_ros_integration-toolchain-2.9/rtt_roscomm/include;/usr/include;/opt/ros/kinetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp;/home/robo/workspaces/catkin_ws/underlay/src/rtt_ros_integration-toolchain-2.9/typekits/rtt_std_msgs/include/orocos.
-- [UseOrocos] Exporting library directories /home/robo/workspaces/catkin_ws/underlay/devel/lib;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_ros/plugins;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_ros/types;/home/robo/workspaces/catkin_ws/underlay_isolated/install_isolated/lib;/opt/ros/kinetic/lib;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_roscomm/plugins;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_std_msgs/plugins;/home/robo/workspaces/catkin_ws/underlay/devel/lib/orocos/xenomai/rtt_std_msgs/types.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/robo/workspaces/catkin_ws/build
####
#### Running command: "make -j2 -l2" in "/home/robo/workspaces/catkin_ws/build"
####
[ 0%] Built target std_msgs_generate_messages_cpp
[ 33%] Linking CXX executable /home/robo/workspaces/catkin_ws/devel/lib/rtt_ros_example/rtt_ros_example-xenomai
[ 33%] Built target std_msgs_generate_messages_py
[ 33%] Built target std_msgs_generate_messages_nodejs
[ 33%] Built target std_msgs_generate_messages_eus
[ 33%] Built target std_msgs_generate_messages_lisp
[ 33%] Built target rtt_ros_example_generate_messages_cpp
[ 33%] Built target rtt_ros_example_generate_messages_py
[ 33%] Built target rtt_ros_example_generate_messages_nodejs
[ 66%] Built target rtt_ros_example_generate_messages_eus
[ 66%] Built target rtt_ros_example_generate_messages_lisp
[ 66%] Built target rtt_ros_example_generate_messages
[100%] Built target rtt_ros_example
Now, the ros Master is executed:
$ roscore
Then the application is executed:
sudo ./devel/lib/rtt_ros_example/rtt_ros_example-xenomai
However, the follow output is generated:
0.127 [ ERROR ][ROSService::import("rtt_std_msgs")] No paths in the ROS_PACKAGE_PATH environment variable! Could not load ROS package "rtt_std_msgs"
0.134 [ Warning][./devel/lib/rtt_ros_example/rtt_ros_example-xenomai::main()] The protocol with id 3 did not register a fall-back handler for unknown types!
0.134 [ Warning][./devel/lib/rtt_ros_example/rtt_ros_example-xenomai::main()] triggered by: unknown_t which does not have a transport.
0.134 [ ERROR ][./devel/lib/rtt_ros_example/rtt_ros_example-xenomai::main()] Could not create transport stream for port float_out with transport id 3
0.134 [ ERROR ][./devel/lib/rtt_ros_example/rtt_ros_example-xenomai::main()] No such transport registered. Check your policy.transport settings or add the transport for type unknown_t
0.139 [ Warning][Thread] The protocol with id 3 did not register a fall-back handler for unknown types!
0.140 [ Warning][Thread] triggered by: unknown_t which does not have a transport.
0.141 [ ERROR ][Thread] Could not create transport stream for port float_in with transport id 3
0.141 [ ERROR ][Thread] No such transport registered. Check your policy.transport settings or add the transport for type unknown_t
0.141 [ Warning][Thread] The protocol with id 3 did not register a fall-back handler for unknown types!
0.141 [ Warning][Thread] triggered by: unknown_t which does not have a transport.
0.142 [ ERROR ][Thread] Could not create transport stream for port float_out with transport id 3
0.142 [ ERROR ][Thread] No such transport registered. Check your policy.transport settings or add the transport for type unknown_t
0.142 [ Warning][Thread] The protocol with id 3 did not register a fall-back handler for unknown types!
0.142 [ Warning][Thread] triggered by: unknown_t which does not have a transport.
0.143 [ ERROR ][Thread] Could not create transport stream for port string_in with transport id 3
0.143 [ ERROR ][Thread] No such transport registered. Check your policy.transport settings or add the transport for type unknown_t
0.145 [ Warning][Thread] The protocol with id 3 did not register a fall-back handler for unknown types!
0.145 [ Warning][Thread] triggered by: unknown_t which does not have a transport.
0.145 [ ERROR ][Thread] Could not create transport stream for port string_out with transport id 3
0.145 [ ERROR ][Thread] No such transport registered. Check your policy.transport settings or add the transport for type unknown_t
So, the executable cant load dinamically the "rtt_std_msgs" package. The ROS_PACKAGE_PATH, contains:
$ echo $ROS_PACKAGE_PATH
/home/robo/workspaces/catkin_ws/underlay/src:/home/robo/workspaces/catkin_ws/underlay_isolated/install_isolated/share:/opt/ros/kinetic/share
Any advice?
do you solve it
I can solve
cmakelist
The find_package macro for Orocos-RTT requires
cmake >= 2.8
cmake_minimum_required(VERSION 2.8)
This creates a standard cmake project. You may extend this file with
any cmake macro you see fit.
project(rtt_robot_state_pub)
add_compile_options(-std=c++11 -pthread)
Use 'source orocos_toolchain/env.sh' if the command below fails:
find_package(OROCOS-RTT QUIET)
if (NOT OROCOS-RTT_FOUND)
message (FATAL_ERROR "\nCould not find Orocos. Please use the shell command\n 'source orocos_toolchain/env.sh' and then run cmake again.")
endif()
find_package(Eigen3 REQUIRED COMPONENTS Core Dense)
find_package(OROCOS-RTT REQUIRED)
#find_package(catkin QUIET)
Defines the orocos_* cmake macros. See that file for additional
documentation.
include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake)
find_package(catkin REQUIRED COMPONENTS
rtt_ros
control_msgs
geometry_msgs
roscpp
rospy
sensor_msgs
std_msgs
realtime_tools
tf
rtt_std_msgs
eigen_conversions
robot_data
rtt_roscomm
)
catkin_package(
LIBRARIES
INCLUDE_DIRS
${THIS_PACKAGE_INCLUDE_DIRS}
CATKIN_DEPENDS
message_runtime
#reflexxes_type2
DEPENDS
EIGEN3
#DEPENDS system_lib
)
Defines the orocos_* cmake macros. See that file for additional
documentation.
include( ${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake )
include_directories(
include
${catkin_INCLUDE_DIRS}
${Eigen_INCLUDE_DIRS}
)
Rest of the configuration is in src/
#add_subdirectory( src )
orocos_component(${PROJECT_NAME} src/rtt_robot_state_pub-component.cpp) # ...you may add multiple source files
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY COMPILE_DEFINITIONS RTT_COMPONENT)
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})
orocos_install_headers(DIRECTORY include/${PROJECT_NAME})
orocos_generate_package(
INCLUDE_DIRS include
DEPENDS roscpp
DEPENDS_TARGETS rtt_ros rtt_roscomm rtt_std_msgs std_msgs)
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY scripts DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
Generates and installs our package. Must be the last statement such
that it can pick up all above settings.
package :
rtt_robot_state_pub 0.0.0 The rtt_robot_state_pub packageTODO
<buildtool_depend>catkin</buildtool_depend>
<build_depend>rtt</build_depend>
<build_depend>rtt_ros</build_depend>
<build_depend>rtt_roscomm</build_depend>
<build_depend>rtt_rosparam</build_depend>
<build_depend>rtt_rosclock</build_depend>
<build_depend>rtt_std_msgs</build_depend>
<build_depend>rtt_rosnode</build_depend>
<build_depend>orogen</build_depend>
<build_depend>control_msgs</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>eigen_conversions</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>tf</build_depend>
<build_depend>robot_data</build_depend>
<build_export_depend>geometry_msgs</build_export_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>sensor_msgs</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<build_export_depend>tf</build_export_depend>
<exec_depend>rtt</exec_depend>
<exec_depend>rtt_ros</exec_depend>
<exec_depend>rtt_roscomm</exec_depend>
<exec_depend>rtt_rosparam</exec_depend>
<exec_depend>rtt_rosclock</exec_depend>
<exec_depend>rtt_std_msgs</exec_depend>
<exec_depend>rtt_rosnode</exec_depend>
<exec_depend>control_msgs</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>eigen_conversions</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>tf</exec_depend>
<exec_depend>robot_data</exec_depend>
<exec_depend>message_runtime</exec_depend>