SMACC2
Loading...
Searching...
No Matches
common.cpp
Go to the documentation of this file.
1// Copyright 2021 RobosoftAI 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/*****************************************************************************************************************
16 *
17 * Authors: Pablo Inigo Blasco, Brett Aldrich
18 *
19 ******************************************************************************************************************/
20
21#include <tf2/impl/utils.h>
22#include <tf2/utils.h>
24#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
25
26std::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Quaternion & msg)
27{
28 return out << " Quaternion[" << msg.x << " , " << msg.y << " , " << msg.z << ", w:" << msg.w;
29}
30
31std::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Transform & msg)
32{
33 return out << "Translation[" << msg.translation << "], Rotation[" << msg.rotation << "]";
34}
35
36std::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Pose & msg)
37{
38 return out << "Position[" << msg.position << "], Orientation[" << msg.orientation << "]";
39}
40
41std::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::PoseStamped & msg)
42{
43 return out << "[serialization geometry_msgs::msg::PoseStamped] frame_id: " << msg.header.frame_id
44 << ", pose: " << msg.pose;
45}
46
47std::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Vector3 & msg)
48{
49 return out << "[ " << msg.x << " " << msg.y << " " << msg.z << "]";
50}
51
52std::ostream & operator<<(std::ostream & out, const geometry_msgs::msg::Point & msg)
53{
54 return out << "[ " << msg.x << " " << msg.y << " " << msg.z << "]";
55}
56
57std::ostream & operator<<(std::ostream & out, const moveit_msgs::srv::GetPositionIK::Request & msg)
58{
59 return out << "[moveit_msgs::srv::GetPositionIK::Request] position["
60 << msg.ik_request.pose_stamped << "]";
61}
62
63std::ostream & operator<<(std::ostream & out, const sensor_msgs::msg::JointState & /*msg*/)
64{
65 return out << "[sensor_msgs::msg::JointState]";
66}
std::ostream & operator<<(std::ostream &out, const geometry_msgs::msg::Quaternion &msg)
Definition common.cpp:26