SMACC2
Functions
common.hpp File Reference
#include <iostream>
#include <tf2/transform_datatypes.h>
#include <builtin_interfaces/msg/time.hpp>
#include <geometry_msgs/msg/point.hpp>
#include <geometry_msgs/msg/pose.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/quaternion.hpp>
#include <geometry_msgs/msg/quaternion_stamped.hpp>
#include <nav2_msgs/action/navigate_to_pose.hpp>
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
Include dependency graph for common.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &out, const geometry_msgs::msg::Quaternion &msg)
 
std::ostream & operator<< (std::ostream &out, const geometry_msgs::msg::Pose &msg)
 
std::ostream & operator<< (std::ostream &out, const geometry_msgs::msg::Point &msg)
 
std::ostream & operator<< (std::ostream &out, const geometry_msgs::msg::PoseStamped &msg)
 
std::ostream & operator<< (std::ostream &out, const nav2_msgs::action::NavigateToPose::Goal &msg)
 
std::ostream & operator<< (std::ostream &out, const builtin_interfaces::msg::Time &msg)
 

Function Documentation

◆ operator<<() [1/6]

std::ostream & operator<< ( std::ostream &  out,
const builtin_interfaces::msg::Time &  msg 
)

Definition at line 61 of file common.cpp.

62{
63 out << "seconds: " << rclcpp::Time(msg).seconds();
64 return out;
65}

◆ operator<<() [2/6]

std::ostream & operator<< ( std::ostream &  out,
const geometry_msgs::msg::Point &  msg 
)

Definition at line 52 of file common.cpp.

53{
54 return out << "[ " << msg.x << " " << msg.y << " " << msg.z << "]";
55}

◆ operator<<() [3/6]

std::ostream & operator<< ( std::ostream &  out,
const geometry_msgs::msg::Pose &  msg 
)

Definition at line 36 of file common.cpp.

37{
38 return out << "Position[" << msg.position << "], Orientation[" << msg.orientation << "]";
39}

◆ operator<<() [4/6]

std::ostream & operator<< ( std::ostream &  out,
const geometry_msgs::msg::PoseStamped &  msg 
)

Definition at line 41 of file common.cpp.

42{
43 return out << "[serialization geometry_msgs::msg::PoseStamped] frame_id: " << msg.header.frame_id
44 << ", pose: " << msg.pose;
45}

◆ operator<<() [5/6]

std::ostream & operator<< ( std::ostream &  out,
const geometry_msgs::msg::Quaternion &  msg 
)

Definition at line 26 of file common.cpp.

27{
28 return out << " Quaternion[" << msg.x << " , " << msg.y << " , " << msg.z << ", w:" << msg.w;
29}

◆ operator<<() [6/6]

std::ostream & operator<< ( std::ostream &  out,
const nav2_msgs::action::NavigateToPose::Goal &  msg 
)

Definition at line 55 of file common.cpp.

56{
57 out << msg.pose;
58 return out;
59}