sas
Modularised monitoring, logging, and control of robots.
Loading...
Searching...
No Matches
DQ_geometry_msgs_conversions.hpp
1#pragma once
2/*
3# Copyright (c) 2016-2023 Murilo Marques Marinho
4#
5# This file is part of sas_conversions.
6#
7# sas_conversions is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11#
12# sas_conversions is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Lesser General Public License for more details.
16#
17# You should have received a copy of the GNU Lesser General Public License
18# along with sas_conversions. If not, see <https://www.gnu.org/licenses/>.
19#
20# ################################################################
21#
22# Author: Murilo M. Marinho, email: murilomarinho@ieee.org
23#
24# ################################################################*/
25
26#include<dqrobotics/DQ.h>
27
28#include<rclcpp/rclcpp.hpp>
29
30#include<std_msgs/msg/header.hpp>
31
32#include<geometry_msgs/msg/point.hpp>
33#include<geometry_msgs/msg/point_stamped.hpp>
34#include<geometry_msgs/msg/quaternion.hpp>
35#include<geometry_msgs/msg/pose.hpp>
36#include<geometry_msgs/msg/pose_stamped.hpp>
37#include<geometry_msgs/msg/wrench.hpp>
38#include<geometry_msgs/msg/wrench_stamped.hpp>
39#include<geometry_msgs/msg/twist.hpp>
40
41using namespace DQ_robotics;
42
43namespace sas
44{
48
56DQ geometry_msgs_point_to_dq(const geometry_msgs::msg::Point& msg);
57
64geometry_msgs::msg::Point dq_to_geometry_msgs_point(const DQ& dq);
65
75DQ geometry_msgs_point_stamped_to_dq(const geometry_msgs::msg::PointStamped& msg);
76
86geometry_msgs::msg::PointStamped dq_to_geometry_msgs_point_stamped(const DQ& dq);
87
91
100DQ geometry_msgs_pose_to_dq(const geometry_msgs::msg::Pose& msg);
101
111geometry_msgs::msg::Pose dq_to_geometry_msgs_pose(const DQ& dq);
112
121DQ geometry_msgs_pose_stamped_to_dq(const geometry_msgs::msg::PoseStamped& msg);
122
132geometry_msgs::msg::PoseStamped dq_to_geometry_msgs_pose_stamped(const DQ& dq);
133
137
146DQ geometry_msgs_quaternion_to_dq(const geometry_msgs::msg::Quaternion& msg);
147
158geometry_msgs::msg::Quaternion dq_to_geometry_msgs_quaternion(const DQ& dq);
159
163
173void geometry_msgs_wrench_to_dq(const geometry_msgs::msg::Wrench& msg, DQ& force, DQ& torque);
174
185geometry_msgs::msg::Wrench dq_to_geometry_msgs_wrench(const DQ& force, const DQ& torque);
186
196void geometry_msgs_wrench_stamped_to_dq(const geometry_msgs::msg::WrenchStamped& msg, DQ& force, DQ& torque);
197
208geometry_msgs::msg::WrenchStamped dq_to_geometry_msgs_wrench_stamped(const DQ& force, const DQ& torque);
209
213
223void geometry_msgs_twist_to_dq(const geometry_msgs::msg::Twist& msg, DQ& linear, DQ& angular);
224
235geometry_msgs::msg::Twist dq_to_geometry_msgs_twist(const DQ& linear, const DQ& angular);
236
237}
238