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 
22 namespace tf2 {
30 template <class A>
31  void getEulerYPR(const A& a, double& yaw, double& pitch, double& roll)
32  {
34  impl::getEulerYPR(q, yaw, pitch, roll);
35  }
36 
44 template <class A>
45  double getYaw(const A& a)
46  {
48  return impl::getYaw(q);
49  }
50 
54 template <class A>
56  {
58  t.setIdentity();
59  A a;
60  convert(t, a);
61  return a;
62  }
63 
64 }
65 
66 #endif //TF2_UTILS_H
tf2::convert
void convert(const A &a, B &b)
Definition: convert.h:113
tf2::getYaw
double getYaw(const A &a)
Definition: utils.h:45
tf2::getTransformIdentity
A getTransformIdentity()
Definition: utils.h:55
Transform.h
tf2::impl::toQuaternion
tf2::Quaternion toQuaternion(const tf2::Quaternion &q)
Definition: impl/utils.h:30
tf2::Transform
The Transform class supports rigid transforms with only translation and rotation and no scaling/shear...
Definition: Transform.h:32
Quaternion.h
tf2::getEulerYPR
void getEulerYPR(const A &a, double &yaw, double &pitch, double &roll)
Definition: utils.h:31
tf2::impl::getEulerYPR
void getEulerYPR(const tf2::Quaternion &q, double &yaw, double &pitch, double &roll)
Definition: impl/utils.h:87
tf2::impl::getYaw
double getYaw(const tf2::Quaternion &q)
Definition: impl/utils.h:123
utils.h
tf2
Definition: buffer_core.h:54
tf2::Quaternion
The Quaternion implements quaternion to perform linear algebra rotations in combination with Matrix3x...
Definition: Quaternion.h:30
tf2::Transform::setIdentity
void setIdentity()
Set this transformation to the identity.
Definition: Transform.h:171


tf2
Author(s): Tully Foote, Eitan Marder-Eppstein, Wim Meeussen
autogenerated on Sun Feb 4 2024 03:18:11