tf2  master
tf2 maintains the relationship between coordinate frames in a tree structure buffered in time, and lets the user transform points, vectors, etc between any two coordinate frames at any desired point in time.
utils.h
Go to the documentation of this file.
1 // Copyright 2014 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef TF2_UTILS_H
16 #define TF2_UTILS_H
17 
20 #include <tf2/impl/utils.h>
21 #include <tf2/visibility_control.h>
22 
23 namespace tf2 {
31 template <class A>
32  void getEulerYPR(const A& a, double& yaw, double& pitch, double& roll)
33  {
35  impl::getEulerYPR(q, yaw, pitch, roll);
36  }
37 
45 template <class A>
46  double getYaw(const A& a)
47  {
49  return impl::getYaw(q);
50  }
51 
55 template <class A>
57  {
59  t.setIdentity();
60  A a;
61  convert(t, a);
62  return a;
63  }
64 
65 }
66 
67 #endif //TF2_UTILS_H
tf2::convert
void convert(const A &a, B &b)
Definition: convert.h:116
tf2::getYaw
double getYaw(const A &a)
Definition: utils.h:46
tf2::getTransformIdentity
A getTransformIdentity()
Definition: utils.h:56
Transform.h
tf2::impl::toQuaternion
tf2::Quaternion toQuaternion(const tf2::Quaternion &q)
Definition: utils.h:30
tf2::Transform
The Transform class supports rigid transforms with only translation and rotation and no scaling/shear...
Definition: Transform.h:33
Quaternion.h
tf2::getEulerYPR
void getEulerYPR(const A &a, double &yaw, double &pitch, double &roll)
Definition: utils.h:32
visibility_control.h
tf2::impl::getEulerYPR
void getEulerYPR(const tf2::Quaternion &q, double &yaw, double &pitch, double &roll)
Definition: utils.h:87
tf2::impl::getYaw
double getYaw(const tf2::Quaternion &q)
Definition: utils.h:124
utils.h
tf2
Definition: buffer_core.h:55
tf2::Quaternion
The Quaternion implements quaternion to perform linear algebra rotations in combination with Matrix3x...
Definition: Quaternion.h:29
tf2::Transform::setIdentity
void setIdentity()
Set this transformation to the identity.
Definition: Transform.h:177