Skip to content

Commit

Permalink
Merge pull request #13 from meyerj/rtt_tf
Browse files Browse the repository at this point in the history
Move ROS-dependent packages from rtt_geometry to rtt_ros_integration (cleanup of #11)
  • Loading branch information
Ruben Smits committed Jan 7, 2014
2 parents dce6b3e + ac9e4fb commit 1dce854
Show file tree
Hide file tree
Showing 29 changed files with 1,003 additions and 606 deletions.
70 changes: 26 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ This repository contains ROS packages necessary for building OROCOS libraries,
plugins, and components which communicate with the ROS messaging system and the
ROS parameter server.

## Changelog

See the metapackage [rtt_ros_integration/CHANGELOG.rst](CHANGELOG.rst) for a
comprehensive changelog.

## Packages

The packages in this repository provide:
Expand All @@ -28,24 +33,20 @@ The packages in this repository provide:
[metapackage](http://ros.org/wiki/catkin/package.xml#Metapackages) for this
repository.

See each package's README.md file for more information.

The following packages are in the planning stages:

* [**rtt\_rostime**](rtt_rostime) Plugin for basing RTT time off of ROS sim
time.
* [**rtt\_rosops**](rtt_rosops) Plugin for executing Orocos Ops script via ROS
service call.
* [**rtt\_dynamic_reconfigure**](rtt_dynamic_reconfigure) Plugin for running
a [dynamic\_reconfigure](http://ros.org/wiki/dynamic_reconfigure) server from
an RTT component.
***See each package's README.md file for more information.***

## Usage

For numerous examples of usage, see the
[**rtt\_ros\_examples**](http://github.com/jhu-lcsr/rtt_ros_examples)
stack.

### Installing Orocos From Binary Packages

The Orocos toolchain and the rtt_ros_integration packages are available as
binary packages hosted by the Open Source Robotics Foundation (OSRF) and can be
installed on supported operating systems.

### Building Orocos From Source

The [Orocos Toolchain](http://www.orocos.org/orocos/toolchain) can be built from
Expand All @@ -58,7 +59,7 @@ Orocos:
export OROCOS_TARGET=gnulinux
mkdir -p ~/ws/underlay_isolated/src/orocos
cd ~/ws/underlay_isolated
git clone --recursive git://gitorious.org/orocos-toolchain/orocos_toolchain.git src/orocos/orocos_toolchain
git clone --recursive git://gitorious.org/orocos-toolchain/orocos_toolchain.git -b toolchain-2.7 src/orocos/orocos_toolchain
catkin_make_isolated --install
source install/setup.sh
```
Expand All @@ -67,7 +68,7 @@ Then, in the same shell, create an underlay for building Catkin-based packages:
```shell
mkdir -p ~/ws/underlay/src
cd ~/ws/underlay
git clone git@github.com:jhu_lcsr_forks/rtt_ros_integration.git src/rtt_ros_integration
git clone https://github.com/orocos/rtt_ros_integration.git src/rtt_ros_integration
catkin_make
source devel/setup.sh
```
Expand Down Expand Up @@ -166,8 +167,8 @@ the README in the [rtt_ros](rtt_ros) package.
### Bulding ROS-Based Orocos Plugins

Orocos plugins are built normally, with Orocos CMake macros. See
[rtt_ros_integration_example](rtt_ros_integration_example/CMakeLists.txt) for
an example.
[rtt_actionlib](rtt_actionlib/CMakeLists.txt) for
an example of an Orocos RTT service plugin.

### Running Orocos Programs

Expand All @@ -194,36 +195,17 @@ The `rtt_actionlib` package provides a C++ API and an RTT service for
implementing [actionlib](http://www.ros.org/wiki/actionlib) actions with Orocos
RTT components. See [rtt_actionlib](rtt_actionlib) for more information.

## History

Orocos used to include optional built-in ROS support, wherein each Orocos
package could also be treated like a rosbuild package. This former design was
desirable due to the challenges in incorporating ROS package management
standards with non-ROS libraries. Orocos now takes advantage of
[Catkin](http://www.ros.org/wiki/catkin) in order to provide simple integration
with a catkin workspace while removing the dependency on ROS.

With rosbuild, all orocos components were built within a given package's own
build directory, and all generated typekit code was also placed in a given
package's include and src directories. Now, all such files are built in the
Catkin develspace.

As of now, the new interfaces have only been developed to support catkin-based
ROS packages, but adding backwards-compatible rosbuild support shouldn't be too hard.
## Future Work

There are a few organizational changes that have been made in
`rtt_ros_integration` compared to the ROS Groovy Galapagos release:
The following packages are in the planning stages, please contact the
maintainers if you're interested in using or contributing to them:

* "rtt_rosnode" has been split into three packages:
1. "rtt_rosnode": Contains a plugin for creating a ROS node in an RTT program
2. "rtt_roscomm": Contains msg primitive typekit and the transport plugin for using ROS topics
3. "rtt_rosparam": Contains a plugin for synchronizing a component's properties with ROS parameters

* A new package, "rtt_ros" has been added. This package contains convenience
launchfiles and wrapper scripts for running Orocos programs (typegen,
deployer, etc). This package also contains a plugin for importing ROS
packages and their dependencies, instead of overloading the use of the
deployer's "import()" function.
* [**rtt\_rostime**](rtt_rostime) Plugin for basing RTT time off of ROS sim
time.
* [**rtt\_rosops**](rtt_rosops) Plugin for executing Orocos Ops script via ROS
service call.
* [**rtt\_dynamic_reconfigure**](rtt_dynamic_reconfigure) Plugin for running
a [dynamic\_reconfigure](http://ros.org/wiki/dynamic_reconfigure) server from
an RTT component.

There are also several API changes related to importing plugins from ROS
packages and creating ROS topic connections.
Empty file.
129 changes: 0 additions & 129 deletions rtt_dynamic_reconfigure/CMakeLists.txt

This file was deleted.

53 changes: 0 additions & 53 deletions rtt_dynamic_reconfigure/package.xml

This file was deleted.

17 changes: 17 additions & 0 deletions rtt_kdl_conversions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 2.8.3)
project(rtt_kdl_conversions)

find_package(catkin REQUIRED COMPONENTS kdl_conversions)

find_package(OROCOS-RTT REQUIRED)
include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake)

include_directories(${catkin_INCLUDE_DIRS})

orocos_typekit(kdlconversions kdl_conversions-types.cpp)
target_link_libraries(kdlconversions ${catkin_LIBRARIES})

orocos_generate_package(
DEPENDS kdl_conversions
)

47 changes: 47 additions & 0 deletions rtt_kdl_conversions/kdl_conversions-types.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#include <rtt/types/TypekitPlugin.hpp>
#include <rtt/internal/GlobalService.hpp>
#include <kdl_conversions/kdl_msg.h>

namespace KDL
{
/**
* KDL RTT bindings
*/
class KDLConversionTypekitPlugin
: public RTT::types::TypekitPlugin
{
public:
std::string getName(){return "KDLConversions";};
bool loadTypes(){return true;};
bool loadConstructors(){return true;};
bool loadOperators()
{
RTT::Service::shared_ptr gs = RTT::internal::GlobalService::Instance();
gs->provides("KDL")->addOperation("pointMsgToKDL",&tf::pointMsgToKDL);
gs->provides("KDL")->addOperation("pointKDLToMsg",&tf::pointKDLToMsg);
gs->provides("KDL")->addOperation("poseMsgToKDL",&tf::poseMsgToKDL);
gs->provides("KDL")->addOperation("poseKDLToMsg",&tf::poseKDLToMsg);
gs->provides("KDL")->addOperation("quaternionMsgToKDL",&tf::quaternionMsgToKDL);
gs->provides("KDL")->addOperation("quaternionKDLToMsg",&tf::quaternionKDLToMsg);
gs->provides("KDL")->addOperation("transformMsgToKDL",&tf::transformMsgToKDL);
gs->provides("KDL")->addOperation("transformKDLToMsg",&tf::transformKDLToMsg);
gs->provides("KDL")->addOperation("twistMsgToKDL",&tf::twistMsgToKDL);
gs->provides("KDL")->addOperation("twistKDLToMsg",&tf::twistKDLToMsg);
gs->provides("KDL")->addOperation("vectorMsgToKDL",&tf::vectorMsgToKDL);
gs->provides("KDL")->addOperation("vectorKDLToMsg",&tf::vectorKDLToMsg);
gs->provides("KDL")->addOperation("wrenchMsgToKDL",&tf::wrenchMsgToKDL);
gs->provides("KDL")->addOperation("wrenchKDLToMsg",&tf::wrenchKDLToMsg);
gs->provides("KDL")->addOperation("TwistToMsg",&tf::TwistKDLToMsg);
gs->provides("KDL")->addOperation("MsgToTwist",&tf::TwistMsgToKDL);
gs->provides("KDL")->addOperation("FrameToMsg",&tf::PoseKDLToMsg);
gs->provides("KDL")->addOperation("MsgToFrame",&tf::PoseMsgToKDL);
return true;
}
};
/**
* The single global instance of the KDL Typekit.
*/
extern KDLConversionTypekitPlugin KDLTypekit;
}

ORO_TYPEKIT_PLUGIN(KDL::KDLConversionTypekitPlugin)
15 changes: 15 additions & 0 deletions rtt_kdl_conversions/lua/kdl_conversions.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
local rttlib = require "rttlib"
local rtt = rtt
module("kdl_conversions")

function frame_to_msg(f)
msg = rtt.Variable("geometry_msgs/Pose")
rtt.provides("KDL"):FrameToMsg(f,msg)
return msg
end
function msg_to_frame(msg)
f = rtt.Variable("KDL/Frame")
rtt.provides("KDL"):MsgToFrame(msg,f)
return f
end

Loading

0 comments on commit 1dce854

Please sign in to comment.