ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I had the same issue... here's how to fix it:
use rosidl_generator_traits::to_yaml(poseMsg) instead of just poseMsg

#include <rclcpp/rclcpp.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
geometry_msgs::msg::PoseStamped poseMsg = [...];
RCLCPP_INFO_STREAM(get_logger(), "posevalue:" << rosidl_generator_traits::to_yaml(poseMsg));

I dug through the generated message header files and found it.