fix: make the Imu header self-contained after the ROS traits removal

The previous commit deleted ros::message_operations::Printer but left the
operator<< that called it, so any translation unit including Imu.h failed to
compile. Remove that operator, include <boost/array.hpp> directly since the
covariance fields are boost::array<double, 9> and no longer get it through
the removed ROS blocks, drop the duplicate Vector3.h include, and correct the
include guard to match the package name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-09 14:33:22 +07:00
parent b68545e5ee
commit b3e0857472

View File

@@ -9,11 +9,11 @@
#include <string>
#include <vector>
#include <memory>
#include <boost/array.hpp>
#include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
#include <robot_geometry_msgs/Quaternion.h>
#include <robot_geometry_msgs/Vector3.h>
#include <robot_geometry_msgs/Vector3.h>
namespace robot_sensor_msgs
{
@@ -91,16 +91,6 @@ typedef boost::shared_ptr< ::robot_sensor_msgs::Imu const> ImuConstPtr;
// constants requiring out of line definition
template<typename ContainerAllocator>
std::ostream& operator<<(std::ostream& s, const ::robot_sensor_msgs::Imu_<ContainerAllocator> & v)
{
ros::message_operations::Printer< ::robot_sensor_msgs::Imu_<ContainerAllocator> >::stream(s, "", v);
return s;
}
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::Imu_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::Imu_<ContainerAllocator2> & rhs)
{
@@ -122,4 +112,4 @@ bool operator!=(const ::robot_sensor_msgs::Imu_<ContainerAllocator1> & lhs, cons
} // namespace robot_sensor_msgs
#endif // SENSOR_MSGS_MESSAGE_IMU_H
#endif // ROBOT_SENSOR_MSGS_MESSAGE_IMU_H