rotation_property.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016, Bielefeld University, CITEC
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  *
29  * Author: Robert Haschke <rhaschke@techfak.uni-bielefeld.de>
30  */
31 
32 #ifndef ROTATION_PROPERTY_H
33 #define ROTATION_PROPERTY_H
34 
35 #include <Eigen/Geometry>
36 #include <stdexcept>
37 
41 #include "euler_property.h"
42 
43 namespace agni_tf_tools {
44 
46 {
47  Q_OBJECT
48 public:
49  RotationProperty(Property* parent = nullptr,
50  const QString& name = QString(),
51  const Eigen::Quaterniond& value = Eigen::Quaterniond::Identity(),
52  const char* changed_slot = nullptr,
53  QObject* receiver = nullptr);
54 
55  Eigen::Quaterniond getQuaternion() const;
56  bool setValue(const QVariant& value) override;
57 
59  void load(const rviz::Config& config) override;
60  void save(rviz::Config config) const override;
61 
63  void setReadOnly(bool read_only) override;
64 
65 public Q_SLOTS:
66  void setQuaternion(const Eigen::Quaterniond& q);
67  void setEulerAngles(double euler[3], bool normalize);
68  void setEulerAngles(double e1, double e2, double e3, bool normalize);
69  void setEulerAxes(const QString& axes);
70 
71 private Q_SLOTS:
72  void updateFromEuler();
73  void updateFromQuaternion();
74 
75 Q_SIGNALS:
77  void quaternionChanged(Eigen::Quaterniond q);
79  void statusUpdate(rviz::StatusProperty::Level, const QString&, const QString&);
80 
81 private:
82  void updateString();
83 
88 };
89 
90 } // end namespace agni_tf_tools
91 
92 #endif // ROTATION_PROPERTY_H
quaternion_property.h
agni_tf_tools::RotationProperty::setReadOnly
void setReadOnly(bool read_only) override
Overridden from Property to propagate read-only-ness to children.
Definition: rotation_property.cpp:153
agni_tf_tools::RotationProperty::quaternionChanged
void quaternionChanged(Eigen::Quaterniond q)
rviz::StatusProperty::Level
Level
agni_tf_tools::RotationProperty::updateFromEuler
void updateFromEuler()
Definition: rotation_property.cpp:79
agni_tf_tools
Definition: rotation_property.cpp:36
rviz::QuaternionProperty
agni_tf_tools::RotationProperty::euler_property_
rviz::EulerProperty * euler_property_
Definition: rotation_property.h:84
agni_tf_tools::RotationProperty::ignore_quaternion_property_updates_
bool ignore_quaternion_property_updates_
Definition: rotation_property.h:86
agni_tf_tools::RotationProperty::show_euler_string_
bool show_euler_string_
Definition: rotation_property.h:87
agni_tf_tools::RotationProperty::statusUpdate
void statusUpdate(rviz::StatusProperty::Level, const QString &, const QString &)
rviz::Property::Property
Property(const QString &name, const QVariant &default_value, const QString &description, P *parent, Func &&changed_slot)
agni_tf_tools::RotationProperty::updateFromQuaternion
void updateFromQuaternion()
Definition: rotation_property.cpp:89
rviz::StringProperty
agni_tf_tools::RotationProperty::setQuaternion
void setQuaternion(const Eigen::Quaterniond &q)
Definition: rotation_property.cpp:70
agni_tf_tools::RotationProperty::load
void load(const rviz::Config &config) override
Load the value of this property and/or its children from the given Config node.
Definition: rotation_property.cpp:143
agni_tf_tools::RotationProperty::quaternion_property_
rviz::QuaternionProperty * quaternion_property_
Definition: rotation_property.h:85
rviz::EulerProperty
Definition: euler_property.h:45
agni_tf_tools::RotationProperty::updateString
void updateString()
Definition: rotation_property.cpp:132
agni_tf_tools::RotationProperty
Definition: rotation_property.h:45
agni_tf_tools::RotationProperty::save
void save(rviz::Config config) const override
Definition: rotation_property.cpp:148
agni_tf_tools::RotationProperty::getQuaternion
Eigen::Quaterniond getQuaternion() const
Definition: rotation_property.cpp:66
status_property.h
agni_tf_tools::RotationProperty::setEulerAngles
void setEulerAngles(double euler[3], bool normalize)
string_property.h
agni_tf_tools::RotationProperty::setEulerAxes
void setEulerAxes(const QString &axes)
Definition: rotation_property.cpp:117
config
config
rviz::Config
agni_tf_tools::RotationProperty::setValue
bool setValue(const QVariant &value) override
Definition: rotation_property.cpp:121
agni_tf_tools::RotationProperty::RotationProperty
RotationProperty(Property *parent=nullptr, const QString &name=QString(), const Eigen::Quaterniond &value=Eigen::Quaterniond::Identity(), const char *changed_slot=nullptr, QObject *receiver=nullptr)
Definition: rotation_property.cpp:38
euler_property.h


agni_tf_tools
Author(s): Robert Haschke
autogenerated on Tue Oct 15 2024 02:57:48