TransformBroadcaster.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 #pragma once
33 
34 #include <QObject>
36 #include <geometry_msgs/Pose.h>
37 #include <Eigen/Geometry>
38 
42 class TransformBroadcaster : public QObject
43 {
44  Q_OBJECT
45 public:
46  explicit TransformBroadcaster(const QString &parent_frame="",
47  const QString &child_frame="",
48  QObject *parent = 0);
49 
50  const geometry_msgs::TransformStamped& value() const;
51  void setValue(const geometry_msgs::TransformStamped &tf);
52  void setPose(const geometry_msgs::Pose &pose);
53 
54  bool enabled() const;
55 
56 public slots:
57  void setEnabled(bool bEnabled=true);
58  void setDisabled(bool bDisabled=true);
59 
60  void setParentFrame(const QString &frame);
61  void setChildFrame(const QString &frame);
62 
63  void setPosition(const Eigen::Vector3d &p);
64  void setQuaternion(const Eigen::Quaterniond &q);
65 
66  void setPosition(double x, double y, double z);
67  void setQuaternion(double x, double y, double z, double w);
68 
69 protected:
70  void send();
71  void check();
72 
73 private:
75  geometry_msgs::TransformStamped msg_;
76  bool valid_;
77  bool enabled_;
78 };
void setDisabled(bool bDisabled=true)
const geometry_msgs::TransformStamped & value() const
TransformBroadcaster(const QString &parent_frame="", const QString &child_frame="", QObject *parent=0)
TFSIMD_FORCE_INLINE const tfScalar & y() const
void setQuaternion(const Eigen::Quaterniond &q)
void setChildFrame(const QString &frame)
geometry_msgs::TransformStamped msg_
TFSIMD_FORCE_INLINE const tfScalar & x() const
void setParentFrame(const QString &frame)
TFSIMD_FORCE_INLINE const tfScalar & z() const
void setEnabled(bool bEnabled=true)
TFSIMD_FORCE_INLINE const tfScalar & w() const
void setPosition(const Eigen::Vector3d &p)
void setPose(const geometry_msgs::Pose &pose)
void setValue(const geometry_msgs::TransformStamped &tf)
tf2_ros::StaticTransformBroadcaster broadcaster_


agni_tf_tools
Author(s): Robert Haschke
autogenerated on Fri Jun 7 2019 22:04:59