to_rpy.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Michael Ferguson
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 // Author: Michael Ferguson
18 
19 #include <stdio.h>
21 
22 /*
23  * usage:
24  * to_rpy a b c
25  */
26 int main(int argc, char** argv)
27 {
28  if (argc < 4)
29  {
30  std::cerr << "to_rpy: Converts axis-magnitude to RPY notation" << std::endl;
31  std::cerr << std::endl;
32  std::cerr << "usage: to_rpy a b c" << std::endl;
33  std::cerr << std::endl;
34  return -1;
35  }
36  double x = atof(argv[1]);
37  double y = atof(argv[2]);
38  double z = atof(argv[3]);
39 
40  KDL::Rotation r;
42 
43  r.GetRPY(x, y, z);
44  std::cout << x << ", " << y << ", " << z << std::endl;
45  return 0;
46 }
TFSIMD_FORCE_INLINE const tfScalar & y() const
int main(int argc, char **argv)
Definition: to_rpy.cpp:26
TFSIMD_FORCE_INLINE const tfScalar & x() const
void GetRPY(double &roll, double &pitch, double &yaw) const
KDL::Rotation rotation_from_axis_magnitude(const double x, const double y, const double z)
Converts our angle-axis-with-integrated-magnitude representation to a KDL::Rotation.
Definition: models.cpp:248
TFSIMD_FORCE_INLINE const tfScalar & z() const


robot_calibration
Author(s): Michael Ferguson
autogenerated on Tue Nov 3 2020 17:30:30