forked from orocos/rtt_ros_integration
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from meyerj/rtt_tf
Move ROS-dependent packages from rtt_geometry to rtt_ros_integration (cleanup of #11)
- Loading branch information
Showing
29 changed files
with
1,003 additions
and
606 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
Oops, something went wrong.