transforms.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2008, Willow Garage, Inc.
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions are met:
00007  *
00008  *     * Redistributions of source code must retain the above copyright
00009  *       notice, this list of conditions and the following disclaimer.
00010  *     * Redistributions in binary form must reproduce the above copyright
00011  *       notice, this list of conditions and the following disclaimer in the
00012  *       documentation and/or other materials provided with the distribution.
00013  *     * Neither the name of the Willow Garage, Inc. nor the names of its
00014  *       contributors may be used to endorse or promote products derived from
00015  *       this software without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00018  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00021  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00022  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00023  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00024  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00025  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00026  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00027  * POSSIBILITY OF SUCH DAMAGE.
00028  *
00029  */
00030 
00031 
00042 #ifndef POSE_GRAPH_TRANSFORM_H
00043 #define POSE_GRAPH_TRANSFORM_H
00044 
00045 #include <Eigen3/Dense>
00046 #include <tf/transform_datatypes.h>
00047 #include <geometry_msgs/Pose.h>
00048 #include <geometry_msgs/Point32.h>
00049 #include <geometry_msgs/Pose2D.h>
00050 #include <nav_msgs/OccupancyGrid.h>
00051 
00052 namespace pose_graph
00053 {
00054 
00055 using Eigen3::Affine3d;
00056 using Eigen3::Vector3d;
00057 using Eigen3::Quaterniond;
00058 using geometry_msgs::Pose;
00059 using geometry_msgs::Point32;
00060 using geometry_msgs::Pose2D;
00061 using geometry_msgs::Point;
00062 
00063 
00065 Affine3d poseToWorldTransform (const Pose& pose);
00066 
00068 Affine3d relativeTransform (const Pose& pose1, const Pose& pose2);
00069 
00071 Affine3d relativeTransform (const Pose2D& pose1, const Pose2D& pose2);
00072 
00075 Pose relativePose (const Pose& pose1, const Pose& pose2);
00076 
00078 Point pointInReferenceFrame (const Point& p, const Pose& pose);
00079 
00082 Affine3d transformBetween (const Pose& pose1, const Pose& pose2);
00083 
00085 Pose applyTransform (const Affine3d& trans, const Pose& pose);
00086 
00088 Point32 transformPoint (const Affine3d& trans, const Point32& pt);
00089 
00091 Point transformPoint (const Affine3d& trans, const Point& pt);
00092 
00094 Pose perturbPose (const Pose& pose, double r);
00095 
00097 Eigen3::Vector4d quaternionMsgToVector4d (const geometry_msgs::Quaternion& m);
00098 
00100 Eigen3::Vector4d translationToVector4d(const geometry_msgs::Point& p);
00101 
00103 Pose2D projectToPose2D (const Pose& pose);
00104 
00106 Pose convertToPose (const Pose2D& pose2d);
00107 
00109 Pose convertToPose (const Affine3d trans);
00110 
00112 Pose2D makePose2D (double x, double y, double theta=0.0);
00113 
00115 nav_msgs::OccupancyGrid transformGrid (const Affine3d& trans, const nav_msgs::OccupancyGrid& g);
00116 
00118 nav_msgs::MapMetaData getMapInfo (const Pose& pose, const double size, const double resolution);
00119 
00120 
00121 } // namespace pose_graph
00122 
00123 #endif


pose_graph
Author(s): Bhaskara Marthi
autogenerated on Tue Jan 7 2014 11:17:15