tf2 rolling
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.
Loading...
Searching...
No Matches
utils.hpp
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_HPP_
16#define TF2__UTILS_HPP_
17
19
22#include <tf2/impl/utils.hpp>
23
24namespace tf2
25{
33template<class A>
34void getEulerYPR(const A & a, double & yaw, double & pitch, double & roll)
35{
38}
39
47template<class A>
48double getYaw(const A & a)
49{
51 return impl::getYaw(q);
52}
53
57template<class A>
59{
61 t.setIdentity();
62 A a;
63 convert(t, a);
64 return a;
65}
66} // namespace tf2
67#endif // TF2__UTILS_HPP_
The Quaternion implements quaternion to perform linear algebra rotations in combination with Matrix3x...
Definition Quaternion.hpp:30
The Transform class supports rigid transforms with only translation and rotation and no scaling/shear...
Definition Transform.hpp:33
void setIdentity()
Set this transformation to the identity.
Definition Transform.hpp:177
void getEulerYPR(const tf2::Quaternion &q, double &yaw, double &pitch, double &roll)
Definition utils.hpp:102
double getYaw(const tf2::Quaternion &q)
Definition utils.hpp:140
tf2::Quaternion toQuaternion(const tf2::Quaternion &q)
Definition utils.hpp:39
Definition buffer_core.hpp:58
A getTransformIdentity()
Definition utils.hpp:58
double getYaw(const A &a)
Definition utils.hpp:48
B toMsg(const A &a)
Function that converts from one type to a ROS message type. It has to be implemented by each data typ...
void getEulerYPR(const A &a, double &yaw, double &pitch, double &roll)
Definition utils.hpp:34
void convert(const A &a, B &b)
Function that converts any type to any type (messages or not). Matching toMsg and from Msg conversion...
Definition convert.hpp:150