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

RTT version 2.8.99 fix #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ link_directories(${OROCOS-RTT_LIBRARY_DIRS})
add_definitions(${OROCOS-RTT_DEFINITIONS})

if(NOT DEFINED ROS_FOUND)
find_package( ROS QUIET REQUIRED COMPONENTS roslib )
# find_package( ROS QUIET REQUIRED COMPONENTS roslib )
find_package( roscpp )
endif(NOT DEFINED ROS_FOUND)

include_directories(${ROS_INCLUDE_DIRS})
link_directories(${ROS_LIBRARY_DIRS})
include_directories(${roscpp_INCLUDE_DIRS})
link_directories(${roscpp_LIBRARY_DIRS})

add_library(rtt-transport-ros-${OROCOS_TARGET} SHARED
ros_publish_activity.cpp)
Expand Down
2 changes: 1 addition & 1 deletion manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<author>Ruben Smits, [email protected]</author>
<license>BSD</license>
<url>http://ros.org/wiki/rtt_rosnode</url>
<depend package="roslib"/>

<depend package="rtt"/>
</package>

Expand Down
11 changes: 10 additions & 1 deletion ros_msg_transporter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,22 @@ namespace ros {
RTT::base::ChannelElementBase* buf = internal::ConnFactory::buildDataStorage<T>(policy);
RTT::base::ChannelElementBase::shared_ptr tmp;
if(is_sender){

tmp = RTT::base::ChannelElementBase::shared_ptr(new RosPubChannelElement<T,Msg>(port,policy));
#if(RTT_VERSION_MAJOR >= 2 && RTT_VERSION_MINOR >= 8 && RTT_VERSION_PATCH >= 99)
buf->connectTo(tmp);
#else
buf->setOutput(tmp);
#endif
return buf;
}
else{
tmp = new RosSubChannelElement<T,Msg>(port,policy);
tmp->setOutput(buf);
#if(RTT_VERSION_MAJOR >= 2 && RTT_VERSION_MINOR >= 8 && RTT_VERSION_PATCH >= 99)
tmp->connectFrom(buf);
#else
buf->setOutput(tmp);
#endif
return tmp;
}
}
Expand Down