From b7a7a60b7b780189648e21585542a853b50d729f Mon Sep 17 00:00:00 2001 From: duongtd Date: Fri, 16 Jan 2026 10:06:59 +0700 Subject: [PATCH] Remove unused directory utils and update robot_sensor msgs --- .../include/robot_sensor_msgs/BatteryState.h | 261 +++++++++--- .../include/robot_sensor_msgs/CameraInfo.h | 147 ++++++- .../robot_sensor_msgs/ChannelFloat32.h | 70 +++- .../robot_sensor_msgs/CompressedImage.h | 79 +++- .../include/robot_sensor_msgs/FluidPressure.h | 84 +++- .../include/robot_sensor_msgs/Illuminance.h | 83 +++- .../include/robot_sensor_msgs/Image.h | 108 ++++- .../include/robot_sensor_msgs/Imu.h | 377 +++++++++++++++++- .../include/robot_sensor_msgs/JointState.h | 91 ++++- .../include/robot_sensor_msgs/Joy.h | 81 +++- .../include/robot_sensor_msgs/JoyFeedback.h | 98 ++++- .../robot_sensor_msgs/JoyFeedbackArray.h | 67 +++- .../include/robot_sensor_msgs/LaserEcho.h | 67 +++- .../include/robot_sensor_msgs/LaserScan.h | 130 +++++- .../robot_sensor_msgs/MultiEchoLaserScan.h | 128 +++++- .../include/robot_sensor_msgs/PointCloud.h | 85 +++- .../include/robot_sensor_msgs/PointCloud2.h | 122 +++++- .../include/robot_sensor_msgs/PointField.h | 133 +++++- .../include/robot_sensor_msgs/Range.h | 116 +++++- .../robot_sensor_msgs/RegionOfInterest.h | 94 ++++- .../robot_sensor_msgs/RelativeHumidity.h | 83 +++- .../include/robot_sensor_msgs/Temperature.h | 85 +++- .../include/robot_sensor_msgs/TimeReference.h | 82 +++- .../robot_sensor_msgs/distortion_models.h | 4 +- .../include/robot_sensor_msgs/fill_image.h | 4 +- .../robot_sensor_msgs/image_encodings.h | 4 +- .../robot_sensor_msgs/point_cloud2_iterator.h | 6 +- .../point_cloud_conversion.h | 6 +- .../point_field_conversion.h | 4 +- 29 files changed, 2332 insertions(+), 367 deletions(-) diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/BatteryState.h b/robot_sensor_msgs/include/robot_sensor_msgs/BatteryState.h index 1d9bd69..75d3f3a 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/BatteryState.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/BatteryState.h @@ -1,66 +1,220 @@ -#pragma once -#include "robot_std_msgs/Header.h" -#include +// Generated by gencpp from file robot_sensor_msgs/BatteryState.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_BATTERYSTATE_H +#define ROBOT_SENSOR_MSGS_MESSAGE_BATTERYSTATE_H + + #include #include -#include +#include +#include +#include namespace robot_sensor_msgs { - -struct BatteryState +template +struct BatteryState_ { - // ===== Power supply status constants ===== - static constexpr uint8_t POWER_SUPPLY_STATUS_UNKNOWN = 0; - static constexpr uint8_t POWER_SUPPLY_STATUS_CHARGING = 1; - static constexpr uint8_t POWER_SUPPLY_STATUS_DISCHARGING = 2; - static constexpr uint8_t POWER_SUPPLY_STATUS_NOT_CHARGING = 3; - static constexpr uint8_t POWER_SUPPLY_STATUS_FULL = 4; + typedef BatteryState_ Type; - // ===== Power supply health constants ===== - static constexpr uint8_t POWER_SUPPLY_HEALTH_UNKNOWN = 0; - static constexpr uint8_t POWER_SUPPLY_HEALTH_GOOD = 1; - static constexpr uint8_t POWER_SUPPLY_HEALTH_OVERHEAT = 2; - static constexpr uint8_t POWER_SUPPLY_HEALTH_DEAD = 3; - static constexpr uint8_t POWER_SUPPLY_HEALTH_OVERVOLTAGE = 4; - static constexpr uint8_t POWER_SUPPLY_HEALTH_UNSPEC_FAILURE = 5; - static constexpr uint8_t POWER_SUPPLY_HEALTH_COLD = 6; - static constexpr uint8_t POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE = 7; - static constexpr uint8_t POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE = 8; + BatteryState_() + : header() + , voltage(0.0) + , temperature(0.0) + , current(0.0) + , charge(0.0) + , capacity(0.0) + , design_capacity(0.0) + , percentage(0.0) + , power_supply_status(0) + , power_supply_health(0) + , power_supply_technology(0) + , present(false) + , cell_voltage() + , cell_temperature() + , location() + , serial_number() { + } + BatteryState_(const ContainerAllocator& _alloc) + : header(_alloc) + , voltage(0.0) + , temperature(0.0) + , current(0.0) + , charge(0.0) + , capacity(0.0) + , design_capacity(0.0) + , percentage(0.0) + , power_supply_status(0) + , power_supply_health(0) + , power_supply_technology(0) + , present(false) + , cell_voltage(_alloc) + , cell_temperature(_alloc) + , location(_alloc) + , serial_number(_alloc) { + (void)_alloc; + } - // ===== Power supply technology (chemistry) constants ===== - static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0; - static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_NIMH = 1; - static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_LION = 2; - static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_LIPO = 3; - static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_LIFE = 4; - static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_NICD = 5; - static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_LIMN = 6; - // ===== Data fields ===== - robot_std_msgs::Header header; - float voltage = std::numeric_limits::quiet_NaN(); // [V] - float temperature = std::numeric_limits::quiet_NaN(); // [°C] - float current = std::numeric_limits::quiet_NaN(); // [A] - float charge = std::numeric_limits::quiet_NaN(); // [Ah] - float capacity = std::numeric_limits::quiet_NaN(); // [Ah] - float design_capacity = std::numeric_limits::quiet_NaN(); // [Ah] - float percentage = std::numeric_limits::quiet_NaN(); // 0..1 + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; - uint8_t power_supply_status = POWER_SUPPLY_STATUS_UNKNOWN; - uint8_t power_supply_health = POWER_SUPPLY_HEALTH_UNKNOWN; - uint8_t power_supply_technology = POWER_SUPPLY_TECHNOLOGY_UNKNOWN; - bool present = false; + typedef float _voltage_type; + _voltage_type voltage; - std::vector cell_voltage; - std::vector cell_temperature; + typedef float _temperature_type; + _temperature_type temperature; - std::string location; - std::string serial_number; -}; + typedef float _current_type; + _current_type current; -inline bool operator==(const robot_sensor_msgs::BatteryState& lhs, const robot_sensor_msgs::BatteryState& rhs) + typedef float _charge_type; + _charge_type charge; + + typedef float _capacity_type; + _capacity_type capacity; + + typedef float _design_capacity_type; + _design_capacity_type design_capacity; + + typedef float _percentage_type; + _percentage_type percentage; + + typedef uint8_t _power_supply_status_type; + _power_supply_status_type power_supply_status; + + typedef uint8_t _power_supply_health_type; + _power_supply_health_type power_supply_health; + + typedef uint8_t _power_supply_technology_type; + _power_supply_technology_type power_supply_technology; + + typedef uint8_t _present_type; + _present_type present; + + typedef std::vector::template rebind_alloc> _cell_voltage_type; + _cell_voltage_type cell_voltage; + + typedef std::vector::template rebind_alloc> _cell_temperature_type; + _cell_temperature_type cell_temperature; + + typedef std::basic_string, typename std::allocator_traits::template rebind_alloc> _location_type; + _location_type location; + + typedef std::basic_string, typename std::allocator_traits::template rebind_alloc> _serial_number_type; + _serial_number_type serial_number; + + + +// reducing the odds to have name collisions with Windows.h +#if defined(_WIN32) && defined(POWER_SUPPLY_STATUS_UNKNOWN) + #undef POWER_SUPPLY_STATUS_UNKNOWN +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_STATUS_CHARGING) + #undef POWER_SUPPLY_STATUS_CHARGING +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_STATUS_DISCHARGING) + #undef POWER_SUPPLY_STATUS_DISCHARGING +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_STATUS_NOT_CHARGING) + #undef POWER_SUPPLY_STATUS_NOT_CHARGING +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_STATUS_FULL) + #undef POWER_SUPPLY_STATUS_FULL +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_HEALTH_UNKNOWN) + #undef POWER_SUPPLY_HEALTH_UNKNOWN +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_HEALTH_GOOD) + #undef POWER_SUPPLY_HEALTH_GOOD +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_HEALTH_OVERHEAT) + #undef POWER_SUPPLY_HEALTH_OVERHEAT +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_HEALTH_DEAD) + #undef POWER_SUPPLY_HEALTH_DEAD +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_HEALTH_OVERVOLTAGE) + #undef POWER_SUPPLY_HEALTH_OVERVOLTAGE +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_HEALTH_UNSPEC_FAILURE) + #undef POWER_SUPPLY_HEALTH_UNSPEC_FAILURE +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_HEALTH_COLD) + #undef POWER_SUPPLY_HEALTH_COLD +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE) + #undef POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE) + #undef POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_TECHNOLOGY_UNKNOWN) + #undef POWER_SUPPLY_TECHNOLOGY_UNKNOWN +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_TECHNOLOGY_NIMH) + #undef POWER_SUPPLY_TECHNOLOGY_NIMH +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_TECHNOLOGY_LION) + #undef POWER_SUPPLY_TECHNOLOGY_LION +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_TECHNOLOGY_LIPO) + #undef POWER_SUPPLY_TECHNOLOGY_LIPO +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_TECHNOLOGY_LIFE) + #undef POWER_SUPPLY_TECHNOLOGY_LIFE +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_TECHNOLOGY_NICD) + #undef POWER_SUPPLY_TECHNOLOGY_NICD +#endif +#if defined(_WIN32) && defined(POWER_SUPPLY_TECHNOLOGY_LIMN) + #undef POWER_SUPPLY_TECHNOLOGY_LIMN +#endif + + enum { + POWER_SUPPLY_STATUS_UNKNOWN = 0u, + POWER_SUPPLY_STATUS_CHARGING = 1u, + POWER_SUPPLY_STATUS_DISCHARGING = 2u, + POWER_SUPPLY_STATUS_NOT_CHARGING = 3u, + POWER_SUPPLY_STATUS_FULL = 4u, + POWER_SUPPLY_HEALTH_UNKNOWN = 0u, + POWER_SUPPLY_HEALTH_GOOD = 1u, + POWER_SUPPLY_HEALTH_OVERHEAT = 2u, + POWER_SUPPLY_HEALTH_DEAD = 3u, + POWER_SUPPLY_HEALTH_OVERVOLTAGE = 4u, + POWER_SUPPLY_HEALTH_UNSPEC_FAILURE = 5u, + POWER_SUPPLY_HEALTH_COLD = 6u, + POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE = 7u, + POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE = 8u, + POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0u, + POWER_SUPPLY_TECHNOLOGY_NIMH = 1u, + POWER_SUPPLY_TECHNOLOGY_LION = 2u, + POWER_SUPPLY_TECHNOLOGY_LIPO = 3u, + POWER_SUPPLY_TECHNOLOGY_LIFE = 4u, + POWER_SUPPLY_TECHNOLOGY_NICD = 5u, + POWER_SUPPLY_TECHNOLOGY_LIMN = 6u, + }; + + + typedef boost::shared_ptr< ::robot_sensor_msgs::BatteryState_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::BatteryState_ const> ConstPtr; + +}; // struct BatteryState_ + +typedef ::robot_sensor_msgs::BatteryState_ > BatteryState; + +typedef boost::shared_ptr< ::robot_sensor_msgs::BatteryState > BatteryStatePtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::BatteryState const> BatteryStateConstPtr; + +// constants requiring out of line definition + + + +template +bool operator==(const ::robot_sensor_msgs::BatteryState_ & lhs, const ::robot_sensor_msgs::BatteryState_ & rhs) { return lhs.header == rhs.header && lhs.voltage == rhs.voltage && @@ -80,9 +234,14 @@ inline bool operator==(const robot_sensor_msgs::BatteryState& lhs, const robot_s lhs.serial_number == rhs.serial_number; } -inline bool operator!=(const robot_sensor_msgs::BatteryState& lhs, const robot_sensor_msgs::BatteryState& rhs) +template +bool operator!=(const ::robot_sensor_msgs::BatteryState_ & lhs, const ::robot_sensor_msgs::BatteryState_ & rhs) { return !(lhs == rhs); } -} // namespace robot_sensor_msgs + +} // namespace robot_sensor_msgs + + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_BATTERYSTATE_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/CameraInfo.h b/robot_sensor_msgs/include/robot_sensor_msgs/CameraInfo.h index 0f7f0eb..d342414 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/CameraInfo.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/CameraInfo.h @@ -1,29 +1,138 @@ -#pragma once +// Generated by gencpp from file robot_sensor_msgs/CameraInfo.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_CAMERAINFO_H +#define ROBOT_SENSOR_MSGS_MESSAGE_CAMERAINFO_H + + #include #include -#include "robot_std_msgs/Header.h" -#include "robot_sensor_msgs/RegionOfInterest.h" +#include +#include +#include +#include namespace robot_sensor_msgs { -struct CameraInfo +template +struct CameraInfo_ { - robot_std_msgs::Header header; // thời gian và frame_id + typedef CameraInfo_ Type; - // Calibration parameters - uint32_t height = 0; - uint32_t width = 0; - std::string distortion_model; + CameraInfo_() + : header() + , height(0) + , width(0) + , distortion_model() + , D() + , K() + , R() + , P() + , binning_x(0) + , binning_y(0) + , roi() { + K.assign(0.0); + + R.assign(0.0); + + P.assign(0.0); + } + CameraInfo_(const ContainerAllocator& _alloc) + : header(_alloc) + , height(0) + , width(0) + , distortion_model(_alloc) + , D(_alloc) + , K() + , R() + , P() + , binning_x(0) + , binning_y(0) + , roi(_alloc) { + (void)_alloc; + K.assign(0.0); + + R.assign(0.0); + + P.assign(0.0); + } + + + + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; + + typedef uint32_t _height_type; + _height_type height; + + typedef uint32_t _width_type; + _width_type width; + + typedef std::basic_string, typename std::allocator_traits::template rebind_alloc> _distortion_model_type; + _distortion_model_type distortion_model; + + typedef std::vector::template rebind_alloc> _D_type; + _D_type D; + + typedef boost::array _K_type; + _K_type K; + + typedef boost::array _R_type; + _R_type R; + + typedef boost::array _P_type; + _P_type P; + + typedef uint32_t _binning_x_type; + _binning_x_type binning_x; + + typedef uint32_t _binning_y_type; + _binning_y_type binning_y; + + typedef ::robot_sensor_msgs::RegionOfInterest_ _roi_type; + _roi_type roi; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::CameraInfo_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::CameraInfo_ const> ConstPtr; + +}; // struct CameraInfo_ + +typedef ::robot_sensor_msgs::CameraInfo_ > CameraInfo; + +typedef boost::shared_ptr< ::robot_sensor_msgs::CameraInfo > CameraInfoPtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::CameraInfo const> CameraInfoConstPtr; + +// constants requiring out of line definition + + + +template +bool operator==(const ::robot_sensor_msgs::CameraInfo_ & lhs, const ::robot_sensor_msgs::CameraInfo_ & rhs) +{ + return lhs.header == rhs.header && + lhs.height == rhs.height && + lhs.width == rhs.width && + lhs.distortion_model == rhs.distortion_model && + lhs.D == rhs.D && + lhs.K == rhs.K && + lhs.R == rhs.R && + lhs.P == rhs.P && + lhs.binning_x == rhs.binning_x && + lhs.binning_y == rhs.binning_y && + lhs.roi == rhs.roi; +} + +template +bool operator!=(const ::robot_sensor_msgs::CameraInfo_ & lhs, const ::robot_sensor_msgs::CameraInfo_ & rhs) +{ + return !(lhs == rhs); +} - std::vector D; // distortion coefficients - double K[9] = {0.0}; // intrinsic matrix - double R[9] = {0.0}; // rectification matrix - double P[12] = {0.0}; // projection matrix - // Operational parameters - uint32_t binning_x = 0; - uint32_t binning_y = 0; - robot_sensor_msgs::RegionOfInterest roi; -}; } // namespace robot_sensor_msgs - +#endif // ROBOT_SENSOR_MSGS_MESSAGE_CAMERAINFO_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/ChannelFloat32.h b/robot_sensor_msgs/include/robot_sensor_msgs/ChannelFloat32.h index 0d91214..d306eec 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/ChannelFloat32.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/ChannelFloat32.h @@ -1,12 +1,72 @@ -#pragma once +// Generated by gencpp from file robot_sensor_msgs/ChannelFloat32.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_CHANNELFLOAT32_H +#define ROBOT_SENSOR_MSGS_MESSAGE_CHANNELFLOAT32_H + + #include #include +#include +#include namespace robot_sensor_msgs { -struct ChannelFloat32 +template +struct ChannelFloat32_ { - std::string name; // Tên của channel (vd: "intensity", "rgb", "u", "v") - std::vector values; // Dữ liệu float32 ứng với từng điểm trong PointCloud -}; + typedef ChannelFloat32_ Type; + + ChannelFloat32_() + : name() + , values() { + } + ChannelFloat32_(const ContainerAllocator& _alloc) + : name(_alloc) + , values(_alloc) { + (void)_alloc; + } + + + + typedef std::basic_string, typename std::allocator_traits::template rebind_alloc> _name_type; + _name_type name; + + typedef std::vector::template rebind_alloc> _values_type; + _values_type values; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::ChannelFloat32_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::ChannelFloat32_ const> ConstPtr; + +}; // struct ChannelFloat32_ + +typedef ::robot_sensor_msgs::ChannelFloat32_ > ChannelFloat32; + +typedef boost::shared_ptr< ::robot_sensor_msgs::ChannelFloat32 > ChannelFloat32Ptr; +typedef boost::shared_ptr< ::robot_sensor_msgs::ChannelFloat32 const> ChannelFloat32ConstPtr; + +// constants requiring out of line definition + +template +bool operator==(const ::robot_sensor_msgs::ChannelFloat32_ & lhs, const ::robot_sensor_msgs::ChannelFloat32_ & rhs) +{ + return lhs.name == rhs.name && + lhs.values == rhs.values; +} + +template +bool operator!=(const ::robot_sensor_msgs::ChannelFloat32_ & lhs, const ::robot_sensor_msgs::ChannelFloat32_ & rhs) +{ + return !(lhs == rhs); +} + + } // namespace robot_sensor_msgs + + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_CHANNELFLOAT32_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/CompressedImage.h b/robot_sensor_msgs/include/robot_sensor_msgs/CompressedImage.h index cb2373f..4e776b7 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/CompressedImage.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/CompressedImage.h @@ -1,18 +1,79 @@ -#pragma once +// Generated by gencpp from file robot_sensor_msgs/CompressedImage.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_COMPRESSEDIMAGE_H +#define ROBOT_SENSOR_MSGS_MESSAGE_COMPRESSEDIMAGE_H + + #include #include -#include "robot_std_msgs/Header.h" +#include +#include +#include namespace robot_sensor_msgs { - -struct CompressedImage +template +struct CompressedImage_ { - robot_std_msgs::Header header; // Thông tin thời gian & frame_id - std::string format; // Định dạng nén (jpeg, png, ...) + typedef CompressedImage_ Type; + + CompressedImage_() + : header() + , format() + , data() { + } + CompressedImage_(const ContainerAllocator& _alloc) + : header(_alloc) + , format(_alloc) + , data(_alloc) { + (void)_alloc; + } + + + + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; + + typedef std::basic_string, typename std::allocator_traits::template rebind_alloc> _format_type; + _format_type format; + + typedef std::vector::template rebind_alloc> _data_type; + _data_type data; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::CompressedImage_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::CompressedImage_ const> ConstPtr; + +}; // struct CompressedImage_ + +typedef ::robot_sensor_msgs::CompressedImage_ > CompressedImage; + +typedef boost::shared_ptr< ::robot_sensor_msgs::CompressedImage > CompressedImagePtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::CompressedImage const> CompressedImageConstPtr; + +// constants requiring out of line definition + +template +bool operator==(const ::robot_sensor_msgs::CompressedImage_ & lhs, const ::robot_sensor_msgs::CompressedImage_ & rhs) +{ + return lhs.header == rhs.header && + lhs.format == rhs.format && + lhs.data == rhs.data; +} + +template +bool operator!=(const ::robot_sensor_msgs::CompressedImage_ & lhs, const ::robot_sensor_msgs::CompressedImage_ & rhs) +{ + return !(lhs == rhs); +} - // Dữ liệu ảnh nén (binary buffer) - std::vector data; -}; } // namespace robot_sensor_msgs + + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_COMPRESSEDIMAGE_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/FluidPressure.h b/robot_sensor_msgs/include/robot_sensor_msgs/FluidPressure.h index 65d0ce4..287ed7d 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/FluidPressure.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/FluidPressure.h @@ -1,17 +1,81 @@ -#pragma once -#include "robot_std_msgs/Header.h" +// Generated by gencpp from file robot_sensor_msgs/FluidPressure.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_FLUIDPRESSURE_H +#define ROBOT_SENSOR_MSGS_MESSAGE_FLUIDPRESSURE_H + + +#include +#include +#include +#include +#include namespace robot_sensor_msgs { - -struct FluidPressure +template +struct FluidPressure_ { - robot_std_msgs::Header header; // Thông tin thời gian và khung tọa độ - double fluid_pressure; // Áp suất tuyệt đối (đơn vị: Pascal) - double variance; // Phương sai (0 = không xác định) + typedef FluidPressure_ Type; + + FluidPressure_() + : header() + , fluid_pressure(0.0) + , variance(0.0) { + } + FluidPressure_(const ContainerAllocator& _alloc) + : header(_alloc) + , fluid_pressure(0.0) + , variance(0.0) { + (void)_alloc; + } + + + + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; + + typedef double _fluid_pressure_type; + _fluid_pressure_type fluid_pressure; + + typedef double _variance_type; + _variance_type variance; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::FluidPressure_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::FluidPressure_ const> ConstPtr; + +}; // struct FluidPressure_ + +typedef ::robot_sensor_msgs::FluidPressure_ > FluidPressure; + +typedef boost::shared_ptr< ::robot_sensor_msgs::FluidPressure > FluidPressurePtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::FluidPressure const> FluidPressureConstPtr; + +// constants requiring out of line definition + + + +template +bool operator==(const ::robot_sensor_msgs::FluidPressure_ & lhs, const ::robot_sensor_msgs::FluidPressure_ & rhs) +{ + return lhs.header == rhs.header && + lhs.fluid_pressure == rhs.fluid_pressure && + lhs.variance == rhs.variance; +} + +template +bool operator!=(const ::robot_sensor_msgs::FluidPressure_ & lhs, const ::robot_sensor_msgs::FluidPressure_ & rhs) +{ + return !(lhs == rhs); +} - FluidPressure() - : fluid_pressure(0.0), variance(0.0) {} -}; } // namespace robot_sensor_msgs + + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_FLUIDPRESSURE_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/Illuminance.h b/robot_sensor_msgs/include/robot_sensor_msgs/Illuminance.h index 4e4043d..69bef21 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/Illuminance.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/Illuminance.h @@ -1,17 +1,80 @@ -#pragma once -#include "robot_std_msgs/Header.h" +// Generated by gencpp from file robot_sensor_msgs/Illuminance.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_ILLUMINANCE_H +#define ROBOT_SENSOR_MSGS_MESSAGE_ILLUMINANCE_H + + +#include +#include +#include +#include +#include namespace robot_sensor_msgs { - -struct Illuminance +template +struct Illuminance_ { - robot_std_msgs::Header header; // Thông tin thời gian và khung tọa độ - double illuminance; // Độ rọi đo được (đơn vị: Lux) - double variance; // Phương sai (0 = không xác định) + typedef Illuminance_ Type; + + Illuminance_() + : header() + , illuminance(0.0) + , variance(0.0) { + } + Illuminance_(const ContainerAllocator& _alloc) + : header(_alloc) + , illuminance(0.0) + , variance(0.0) { + (void)_alloc; + } + + + + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; + + typedef double _illuminance_type; + _illuminance_type illuminance; + + typedef double _variance_type; + _variance_type variance; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::Illuminance_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::Illuminance_ const> ConstPtr; + +}; // struct Illuminance_ + +typedef ::robot_sensor_msgs::Illuminance_ > Illuminance; + +typedef boost::shared_ptr< ::robot_sensor_msgs::Illuminance > IlluminancePtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::Illuminance const> IlluminanceConstPtr; + +// constants requiring out of line definition + + +template +bool operator==(const ::robot_sensor_msgs::Illuminance_ & lhs, const ::robot_sensor_msgs::Illuminance_ & rhs) +{ + return lhs.header == rhs.header && + lhs.illuminance == rhs.illuminance && + lhs.variance == rhs.variance; +} + +template +bool operator!=(const ::robot_sensor_msgs::Illuminance_ & lhs, const ::robot_sensor_msgs::Illuminance_ & rhs) +{ + return !(lhs == rhs); +} - Illuminance() - : illuminance(0.0), variance(0.0) {} -}; } // namespace robot_sensor_msgs + + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_ILLUMINANCE_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/Image.h b/robot_sensor_msgs/include/robot_sensor_msgs/Image.h index 95a9b34..c181752 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/Image.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/Image.h @@ -1,26 +1,104 @@ -#pragma once +// Generated by gencpp from file robot_sensor_msgs/Image.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_IMAGE_H +#define ROBOT_SENSOR_MSGS_MESSAGE_IMAGE_H + + #include #include -#include -#include "robot_std_msgs/Header.h" +#include +#include +#include namespace robot_sensor_msgs { -struct Image +template +struct Image_ { - robot_std_msgs::Header header; // Thông tin thời gian và frame - uint32_t height = 0; // Số hàng (pixels theo chiều dọc) - uint32_t width = 0; // Số cột (pixels theo chiều ngang) - std::string encoding; // Kiểu mã hóa (vd: "rgb8", "mono8") - uint8_t is_bigendian = 0; // 0 = little endian - uint32_t step = 0; // Số byte mỗi dòng ảnh - std::vector data; // Mảng dữ liệu ảnh (kích thước step * height) + typedef Image_ Type; - Image() = default; + Image_() + : header() + , height(0) + , width(0) + , encoding() + , is_bigendian(0) + , step(0) + , data() { + } + Image_(const ContainerAllocator& _alloc) + : header(_alloc) + , height(0) + , width(0) + , encoding(_alloc) + , is_bigendian(0) + , step(0) + , data(_alloc) { + (void)_alloc; + } - inline size_t size() const { return data.size(); } - inline bool empty() const { return data.empty(); } -}; + + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; + + typedef uint32_t _height_type; + _height_type height; + + typedef uint32_t _width_type; + _width_type width; + + typedef std::basic_string, typename std::allocator_traits::template rebind_alloc> _encoding_type; + _encoding_type encoding; + + typedef uint8_t _is_bigendian_type; + _is_bigendian_type is_bigendian; + + typedef uint32_t _step_type; + _step_type step; + + typedef std::vector::template rebind_alloc> _data_type; + _data_type data; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::Image_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::Image_ const> ConstPtr; + +}; // struct Image_ + +typedef ::robot_sensor_msgs::Image_ > Image; + +typedef boost::shared_ptr< ::robot_sensor_msgs::Image > ImagePtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::Image const> ImageConstPtr; + +// constants requiring out of line definition + + +template +bool operator==(const ::robot_sensor_msgs::Image_ & lhs, const ::robot_sensor_msgs::Image_ & rhs) +{ + return lhs.header == rhs.header && + lhs.height == rhs.height && + lhs.width == rhs.width && + lhs.encoding == rhs.encoding && + lhs.is_bigendian == rhs.is_bigendian && + lhs.step == rhs.step && + lhs.data == rhs.data; +} + +template +bool operator!=(const ::robot_sensor_msgs::Image_ & lhs, const ::robot_sensor_msgs::Image_ & rhs) +{ + return !(lhs == rhs); +} + } // namespace robot_sensor_msgs + + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_IMAGE_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/Imu.h b/robot_sensor_msgs/include/robot_sensor_msgs/Imu.h index f086891..0bb8227 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/Imu.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/Imu.h @@ -1,31 +1,366 @@ -#pragma once -#include -#include "robot_std_msgs/Header.h" -#include "geometry_msgs/Quaternion.h" -#include "geometry_msgs/Vector3.h" +// Generated by gencpp from file robot_sensor_msgs/Imu.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_IMU_H +#define ROBOT_SENSOR_MSGS_MESSAGE_IMU_H + + +#include +#include +#include +#include +#include +#include +#include +#include namespace robot_sensor_msgs { - -struct Imu +template +struct Imu_ { - robot_std_msgs::Header header; // Thời gian và frame gốc + typedef Imu_ Type; - robot_geometry_msgs::Quaternion orientation; // Góc quay (đơn vị: quaternion) - std::array orientation_covariance; // Ma trận hiệp phương sai (row-major) + Imu_() + : header() + , orientation() + , orientation_covariance() + , angular_velocity() + , angular_velocity_covariance() + , linear_acceleration() + , linear_acceleration_covariance() { + orientation_covariance.assign(0.0); - robot_geometry_msgs::Vector3 angular_velocity; // Tốc độ góc (rad/s) - std::array angular_velocity_covariance; // Ma trận hiệp phương sai + angular_velocity_covariance.assign(0.0); - robot_geometry_msgs::Vector3 linear_acceleration; // Gia tốc tuyến tính (m/s^2) - std::array linear_acceleration_covariance; // Ma trận hiệp phương sai + linear_acceleration_covariance.assign(0.0); + } + Imu_(const ContainerAllocator& _alloc) + : header(_alloc) + , orientation(_alloc) + , orientation_covariance() + , angular_velocity(_alloc) + , angular_velocity_covariance() + , linear_acceleration(_alloc) + , linear_acceleration_covariance() { + (void)_alloc; + orientation_covariance.assign(0.0); + + angular_velocity_covariance.assign(0.0); + + linear_acceleration_covariance.assign(0.0); + } + + + + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; + + typedef ::robot_geometry_msgs::Quaternion_ _orientation_type; + _orientation_type orientation; + + typedef boost::array _orientation_covariance_type; + _orientation_covariance_type orientation_covariance; + + typedef ::robot_geometry_msgs::Vector3_ _angular_velocity_type; + _angular_velocity_type angular_velocity; + + typedef boost::array _angular_velocity_covariance_type; + _angular_velocity_covariance_type angular_velocity_covariance; + + typedef ::robot_geometry_msgs::Vector3_ _linear_acceleration_type; + _linear_acceleration_type linear_acceleration; + + typedef boost::array _linear_acceleration_covariance_type; + _linear_acceleration_covariance_type linear_acceleration_covariance; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::Imu_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::Imu_ const> ConstPtr; + +}; // struct Imu_ + +typedef ::robot_sensor_msgs::Imu_ > Imu; + +typedef boost::shared_ptr< ::robot_sensor_msgs::Imu > ImuPtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::Imu const> ImuConstPtr; + +// constants requiring out of line definition + + + +template +std::ostream& operator<<(std::ostream& s, const ::robot_sensor_msgs::Imu_ & v) +{ +ros::message_operations::Printer< ::robot_sensor_msgs::Imu_ >::stream(s, "", v); +return s; +} + + +template +bool operator==(const ::robot_sensor_msgs::Imu_ & lhs, const ::robot_sensor_msgs::Imu_ & rhs) +{ + return lhs.header == rhs.header && + lhs.orientation == rhs.orientation && + lhs.orientation_covariance == rhs.orientation_covariance && + lhs.angular_velocity == rhs.angular_velocity && + lhs.angular_velocity_covariance == rhs.angular_velocity_covariance && + lhs.linear_acceleration == rhs.linear_acceleration && + lhs.linear_acceleration_covariance == rhs.linear_acceleration_covariance; +} + +template +bool operator!=(const ::robot_sensor_msgs::Imu_ & lhs, const ::robot_sensor_msgs::Imu_ & rhs) +{ + return !(lhs == rhs); +} - Imu() - { - orientation_covariance.fill(0.0); - angular_velocity_covariance.fill(0.0); - linear_acceleration_covariance.fill(0.0); - } -}; } // namespace robot_sensor_msgs + +namespace ros +{ +namespace message_traits +{ + + + + + +template +struct IsMessage< ::robot_sensor_msgs::Imu_ > + : TrueType + { }; + +template +struct IsMessage< ::robot_sensor_msgs::Imu_ const> + : TrueType + { }; + +template +struct IsFixedSize< ::robot_sensor_msgs::Imu_ > + : FalseType + { }; + +template +struct IsFixedSize< ::robot_sensor_msgs::Imu_ const> + : FalseType + { }; + +template +struct HasHeader< ::robot_sensor_msgs::Imu_ > + : TrueType + { }; + +template +struct HasHeader< ::robot_sensor_msgs::Imu_ const> + : TrueType + { }; + + +template +struct MD5Sum< ::robot_sensor_msgs::Imu_ > +{ + static const char* value() + { + return "6a62c6daae103f4ff57a132d6f95cec2"; + } + + static const char* value(const ::robot_sensor_msgs::Imu_&) { return value(); } + static const uint64_t static_value1 = 0x6a62c6daae103f4fULL; + static const uint64_t static_value2 = 0xf57a132d6f95cec2ULL; +}; + +template +struct DataType< ::robot_sensor_msgs::Imu_ > +{ + static const char* value() + { + return "robot_sensor_msgs/Imu"; + } + + static const char* value(const ::robot_sensor_msgs::Imu_&) { return value(); } +}; + +template +struct Definition< ::robot_sensor_msgs::Imu_ > +{ + static const char* value() + { + return "# This is a message to hold data from an IMU (Inertial Measurement Unit)\n" +"#\n" +"# Accelerations should be in m/s^2 (not in g's), and rotational velocity should be in rad/sec\n" +"#\n" +"# If the covariance of the measurement is known, it should be filled in (if all you know is the \n" +"# variance of each measurement, e.g. from the datasheet, just put those along the diagonal)\n" +"# A covariance matrix of all zeros will be interpreted as \"covariance unknown\", and to use the\n" +"# data a covariance will have to be assumed or gotten from some other source\n" +"#\n" +"# If you have no estimate for one of the data elements (e.g. your IMU doesn't produce an orientation \n" +"# estimate), please set element 0 of the associated covariance matrix to -1\n" +"# If you are interpreting this message, please check for a value of -1 in the first element of each \n" +"# covariance matrix, and disregard the associated estimate.\n" +"\n" +"Header header\n" +"\n" +"robot_geometry_msgs/Quaternion orientation\n" +"float64[9] orientation_covariance # Row major about x, y, z axes\n" +"\n" +"robot_geometry_msgs/Vector3 angular_velocity\n" +"float64[9] angular_velocity_covariance # Row major about x, y, z axes\n" +"\n" +"robot_geometry_msgs/Vector3 linear_acceleration\n" +"float64[9] linear_acceleration_covariance # Row major x, y z \n" +"\n" +"================================================================================\n" +"MSG: robot_std_msgs/Header\n" +"# Standard metadata for higher-level stamped data types.\n" +"# This is generally used to communicate timestamped data \n" +"# in a particular coordinate frame.\n" +"# \n" +"# sequence ID: consecutively increasing ID \n" +"uint32 seq\n" +"#Two-integer timestamp that is expressed as:\n" +"# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n" +"# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n" +"# time-handling sugar is provided by the client library\n" +"time stamp\n" +"#Frame this data is associated with\n" +"string frame_id\n" +"\n" +"================================================================================\n" +"MSG: robot_geometry_msgs/Quaternion\n" +"# This represents an orientation in free space in quaternion form.\n" +"\n" +"float64 x\n" +"float64 y\n" +"float64 z\n" +"float64 w\n" +"\n" +"================================================================================\n" +"MSG: robot_geometry_msgs/Vector3\n" +"# This represents a vector in free space. \n" +"# It is only meant to represent a direction. Therefore, it does not\n" +"# make sense to apply a translation to it (e.g., when applying a \n" +"# generic rigid transformation to a Vector3, tf2 will only apply the\n" +"# rotation). If you want your data to be translatable too, use the\n" +"# robot_geometry_msgs/Point message instead.\n" +"\n" +"float64 x\n" +"float64 y\n" +"float64 z\n" +; + } + + static const char* value(const ::robot_sensor_msgs::Imu_&) { return value(); } +}; + +} // namespace message_traits +} // namespace ros + +namespace ros +{ +namespace serialization +{ + + template struct Serializer< ::robot_sensor_msgs::Imu_ > + { + template inline static void allInOne(Stream& stream, T m) + { + stream.next(m.header); + stream.next(m.orientation); + stream.next(m.orientation_covariance); + stream.next(m.angular_velocity); + stream.next(m.angular_velocity_covariance); + stream.next(m.linear_acceleration); + stream.next(m.linear_acceleration_covariance); + } + + ROS_DECLARE_ALLINONE_SERIALIZER + }; // struct Imu_ + +} // namespace serialization +} // namespace ros + +namespace ros +{ +namespace message_operations +{ + +template +struct Printer< ::robot_sensor_msgs::Imu_ > +{ + template static void stream(Stream& s, const std::string& indent, const ::robot_sensor_msgs::Imu_& v) + { + if (false || !indent.empty()) + s << std::endl; + s << indent << "header: "; + Printer< ::robot_std_msgs::Header_ >::stream(s, indent + " ", v.header); + if (true || !indent.empty()) + s << std::endl; + s << indent << "orientation: "; + Printer< ::robot_geometry_msgs::Quaternion_ >::stream(s, indent + " ", v.orientation); + if (true || !indent.empty()) + s << std::endl; + s << indent << "orientation_covariance: "; + if (v.orientation_covariance.empty() || true) + s << "["; + for (size_t i = 0; i < v.orientation_covariance.size(); ++i) + { + if (true && i > 0) + s << ", "; + else if (!true) + s << std::endl << indent << " -"; + Printer::stream(s, true ? std::string() : indent + " ", v.orientation_covariance[i]); + } + if (v.orientation_covariance.empty() || true) + s << "]"; + if (true || !indent.empty()) + s << std::endl; + s << indent << "angular_velocity: "; + Printer< ::robot_geometry_msgs::Vector3_ >::stream(s, indent + " ", v.angular_velocity); + if (true || !indent.empty()) + s << std::endl; + s << indent << "angular_velocity_covariance: "; + if (v.angular_velocity_covariance.empty() || true) + s << "["; + for (size_t i = 0; i < v.angular_velocity_covariance.size(); ++i) + { + if (true && i > 0) + s << ", "; + else if (!true) + s << std::endl << indent << " -"; + Printer::stream(s, true ? std::string() : indent + " ", v.angular_velocity_covariance[i]); + } + if (v.angular_velocity_covariance.empty() || true) + s << "]"; + if (true || !indent.empty()) + s << std::endl; + s << indent << "linear_acceleration: "; + Printer< ::robot_geometry_msgs::Vector3_ >::stream(s, indent + " ", v.linear_acceleration); + if (true || !indent.empty()) + s << std::endl; + s << indent << "linear_acceleration_covariance: "; + if (v.linear_acceleration_covariance.empty() || true) + s << "["; + for (size_t i = 0; i < v.linear_acceleration_covariance.size(); ++i) + { + if (true && i > 0) + s << ", "; + else if (!true) + s << std::endl << indent << " -"; + Printer::stream(s, true ? std::string() : indent + " ", v.linear_acceleration_covariance[i]); + } + if (v.linear_acceleration_covariance.empty() || true) + s << "]"; + } +}; + +} // namespace message_operations +} // namespace ros + +#endif // SENSOR_MSGS_MESSAGE_IMU_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/JointState.h b/robot_sensor_msgs/include/robot_sensor_msgs/JointState.h index 18f76e4..6e75c80 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/JointState.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/JointState.h @@ -1,21 +1,90 @@ -#pragma once +// Generated by gencpp from file robot_sensor_msgs/JointState.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_JOINTSTATE_H +#define ROBOT_SENSOR_MSGS_MESSAGE_JOINTSTATE_H + + #include #include -#include "robot_std_msgs/Header.h" +#include +#include +#include namespace robot_sensor_msgs { - -struct JointState +template +struct JointState_ { - robot_std_msgs::Header header; // Thời điểm và frame ghi nhận trạng thái khớp + typedef JointState_ Type; - std::vector name; // Tên từng khớp - std::vector position; // Vị trí (rad hoặc m) - std::vector velocity; // Vận tốc (rad/s hoặc m/s) - std::vector effort; // Mô-men hoặc lực (Nm hoặc N) + JointState_() + : header() + , name() + , position() + , velocity() + , effort() { + } + JointState_(const ContainerAllocator& _alloc) + : header(_alloc) + , name(_alloc) + , position(_alloc) + , velocity(_alloc) + , effort(_alloc) { + (void)_alloc; + } + + + + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; + + typedef std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> _name_type; + _name_type name; + + typedef std::vector::template rebind_alloc> _position_type; + _position_type position; + + typedef std::vector::template rebind_alloc> _velocity_type; + _velocity_type velocity; + + typedef std::vector::template rebind_alloc> _effort_type; + _effort_type effort; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::JointState_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::JointState_ const> ConstPtr; + +}; // struct JointState_ + +typedef ::robot_sensor_msgs::JointState_ > JointState; + +typedef boost::shared_ptr< ::robot_sensor_msgs::JointState > JointStatePtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::JointState const> JointStateConstPtr; + +// constants requiring out of line definition + +template +bool operator==(const ::robot_sensor_msgs::JointState_ & lhs, const ::robot_sensor_msgs::JointState_ & rhs) +{ + return lhs.header == rhs.header && + lhs.name == rhs.name && + lhs.position == rhs.position && + lhs.velocity == rhs.velocity && + lhs.effort == rhs.effort; +} + +template +bool operator!=(const ::robot_sensor_msgs::JointState_ & lhs, const ::robot_sensor_msgs::JointState_ & rhs) +{ + return !(lhs == rhs); +} - JointState() = default; -}; } // namespace robot_sensor_msgs + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_JOINTSTATE_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/Joy.h b/robot_sensor_msgs/include/robot_sensor_msgs/Joy.h index 3a40d57..68130c7 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/Joy.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/Joy.h @@ -1,17 +1,80 @@ -#pragma once +// Generated by gencpp from file robot_sensor_msgs/Joy.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_JOY_H +#define ROBOT_SENSOR_MSGS_MESSAGE_JOY_H + + +#include #include -#include "robot_std_msgs/Header.h" +#include +#include +#include namespace robot_sensor_msgs { - -struct Joy +template +struct Joy_ { - robot_std_msgs::Header header; // Thời điểm nhận dữ liệu từ joystick - std::vector axes; // Các giá trị trục analog (ví dụ: X, Y, Z, throttle, ...) - std::vector buttons; // Trạng thái nút bấm (0 = nhả, 1 = nhấn) + typedef Joy_ Type; + + Joy_() + : header() + , axes() + , buttons() { + } + Joy_(const ContainerAllocator& _alloc) + : header(_alloc) + , axes(_alloc) + , buttons(_alloc) { + (void)_alloc; + } + + + + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; + + typedef std::vector::template rebind_alloc> _axes_type; + _axes_type axes; + + typedef std::vector::template rebind_alloc> _buttons_type; + _buttons_type buttons; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::Joy_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::Joy_ const> ConstPtr; + +}; // struct Joy_ + +typedef ::robot_sensor_msgs::Joy_ > Joy; + +typedef boost::shared_ptr< ::robot_sensor_msgs::Joy > JoyPtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::Joy const> JoyConstPtr; + +// constants requiring out of line definition + + +template +bool operator==(const ::robot_sensor_msgs::Joy_ & lhs, const ::robot_sensor_msgs::Joy_ & rhs) +{ + return lhs.header == rhs.header && + lhs.axes == rhs.axes && + lhs.buttons == rhs.buttons; +} + +template +bool operator!=(const ::robot_sensor_msgs::Joy_ & lhs, const ::robot_sensor_msgs::Joy_ & rhs) +{ + return !(lhs == rhs); +} - Joy() = default; -}; } // namespace robot_sensor_msgs + + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_JOY_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/JoyFeedback.h b/robot_sensor_msgs/include/robot_sensor_msgs/JoyFeedback.h index 897bbcc..a300711 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/JoyFeedback.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/JoyFeedback.h @@ -1,24 +1,94 @@ -#ifndef JOY_FEEDBACK_H -#define JOY_FEEDBACK_H +// Generated by gencpp from file robot_sensor_msgs/JoyFeedback.msg +// DO NOT EDIT! -#include + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_JOYFEEDBACK_H +#define ROBOT_SENSOR_MSGS_MESSAGE_JOYFEEDBACK_H + + +#include +#include +#include +#include namespace robot_sensor_msgs { - -struct JoyFeedback +template +struct JoyFeedback_ { - // Declare of the type of feedback - static constexpr uint8_t TYPE_LED = 0; - static constexpr uint8_t TYPE_RUMBLE = 1; - static constexpr uint8_t TYPE_BUZZER = 2; + typedef JoyFeedback_ Type; - uint8_t type; // Loại feedback - uint8_t id; // ID của từng loại feedback - float intensity; // Cường độ (0.0 - 1.0) -}; + JoyFeedback_() + : type(0) + , id(0) + , intensity(0.0) { + } + JoyFeedback_(const ContainerAllocator& _alloc) + : type(0) + , id(0) + , intensity(0.0) { + (void)_alloc; + } + + + typedef uint8_t _type_type; + _type_type type; + + typedef uint8_t _id_type; + _id_type id; + + typedef float _intensity_type; + _intensity_type intensity; + + + +// reducing the odds to have name collisions with Windows.h +#if defined(_WIN32) && defined(TYPE_LED) + #undef TYPE_LED +#endif +#if defined(_WIN32) && defined(TYPE_RUMBLE) + #undef TYPE_RUMBLE +#endif +#if defined(_WIN32) && defined(TYPE_BUZZER) + #undef TYPE_BUZZER +#endif + + enum { + TYPE_LED = 0u, + TYPE_RUMBLE = 1u, + TYPE_BUZZER = 2u, + }; + + + typedef boost::shared_ptr< ::robot_sensor_msgs::JoyFeedback_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::JoyFeedback_ const> ConstPtr; + +}; // struct JoyFeedback_ + +typedef ::robot_sensor_msgs::JoyFeedback_ > JoyFeedback; + +typedef boost::shared_ptr< ::robot_sensor_msgs::JoyFeedback > JoyFeedbackPtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::JoyFeedback const> JoyFeedbackConstPtr; + +// constants requiring out of line definition + + +template +bool operator==(const ::robot_sensor_msgs::JoyFeedback_ & lhs, const ::robot_sensor_msgs::JoyFeedback_ & rhs) +{ + return lhs.type == rhs.type && + lhs.id == rhs.id && + lhs.intensity == rhs.intensity; +} + +template +bool operator!=(const ::robot_sensor_msgs::JoyFeedback_ & lhs, const ::robot_sensor_msgs::JoyFeedback_ & rhs) +{ + return !(lhs == rhs); } -#endif // JOY_FEEDBACK_H +} // namespace robot_sensor_msgs + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_JOYFEEDBACK_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/JoyFeedbackArray.h b/robot_sensor_msgs/include/robot_sensor_msgs/JoyFeedbackArray.h index 486b4c6..63149cc 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/JoyFeedbackArray.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/JoyFeedbackArray.h @@ -1,16 +1,67 @@ -#ifndef JOY_FEEDBACK_ARRAY_H -#define JOY_FEEDBACK_ARRAY_H +// Generated by gencpp from file robot_sensor_msgs/JoyFeedbackArray.msg +// DO NOT EDIT! + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_JOYFEEDBACKARRAY_H +#define ROBOT_SENSOR_MSGS_MESSAGE_JOYFEEDBACKARRAY_H + + +#include #include -#include "robot_sensor_msgs/JoyFeedback.h" +#include +#include +#include namespace robot_sensor_msgs { - -struct JoyFeedbackArray +template +struct JoyFeedbackArray_ { - std::vector array; // Danh sách các feedback -}; + typedef JoyFeedbackArray_ Type; + + JoyFeedbackArray_() + : array() { + } + JoyFeedbackArray_(const ContainerAllocator& _alloc) + : array(_alloc) { + (void)_alloc; + } + + + + typedef std::vector< ::robot_sensor_msgs::JoyFeedback_ , typename std::allocator_traits::template rebind_alloc< ::robot_sensor_msgs::JoyFeedback_ >> _array_type; + _array_type array; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::JoyFeedbackArray_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::JoyFeedbackArray_ const> ConstPtr; + +}; // struct JoyFeedbackArray_ + +typedef ::robot_sensor_msgs::JoyFeedbackArray_ > JoyFeedbackArray; + +typedef boost::shared_ptr< ::robot_sensor_msgs::JoyFeedbackArray > JoyFeedbackArrayPtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::JoyFeedbackArray const> JoyFeedbackArrayConstPtr; + +// constants requiring out of line definition + + +template +bool operator==(const ::robot_sensor_msgs::JoyFeedbackArray_ & lhs, const ::robot_sensor_msgs::JoyFeedbackArray_ & rhs) +{ + return lhs.array == rhs.array; +} + +template +bool operator!=(const ::robot_sensor_msgs::JoyFeedbackArray_ & lhs, const ::robot_sensor_msgs::JoyFeedbackArray_ & rhs) +{ + return !(lhs == rhs); +} + } // namespace robot_sensor_msgs -#endif // JOY_FEEDBACK_ARRAY_H + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_JOYFEEDBACKARRAY_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/LaserEcho.h b/robot_sensor_msgs/include/robot_sensor_msgs/LaserEcho.h index d6224b4..5bcb1c8 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/LaserEcho.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/LaserEcho.h @@ -1,16 +1,65 @@ -#ifndef LASER_ECHO_H -#define LASER_ECHO_H +// Generated by gencpp from file robot_sensor_msgs/LaserEcho.msg +// DO NOT EDIT! + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_LASERECHO_H +#define ROBOT_SENSOR_MSGS_MESSAGE_LASERECHO_H + + +#include #include +#include +#include + namespace robot_sensor_msgs { - -struct LaserEcho +template +struct LaserEcho_ { - // Mảng chứa nhiều giá trị đo (range hoặc intensity) - // Tất cả đều thuộc cùng một góc quét - std::vector echoes; -}; + typedef LaserEcho_ Type; + LaserEcho_() + : echoes() { + } + LaserEcho_(const ContainerAllocator& _alloc) + : echoes(_alloc) { + (void)_alloc; + } + + + + typedef std::vector::template rebind_alloc> _echoes_type; + _echoes_type echoes; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::LaserEcho_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::LaserEcho_ const> ConstPtr; + +}; // struct LaserEcho_ + +typedef ::robot_sensor_msgs::LaserEcho_ > LaserEcho; + +typedef boost::shared_ptr< ::robot_sensor_msgs::LaserEcho > LaserEchoPtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::LaserEcho const> LaserEchoConstPtr; + +// constants requiring out of line definition + +template +bool operator==(const ::robot_sensor_msgs::LaserEcho_ & lhs, const ::robot_sensor_msgs::LaserEcho_ & rhs) +{ + return lhs.echoes == rhs.echoes; } -#endif // LASER_ECHO_H + +template +bool operator!=(const ::robot_sensor_msgs::LaserEcho_ & lhs, const ::robot_sensor_msgs::LaserEcho_ & rhs) +{ + return !(lhs == rhs); +} + + +} // namespace robot_sensor_msgs + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_LASERECHO_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/LaserScan.h b/robot_sensor_msgs/include/robot_sensor_msgs/LaserScan.h index 88b4ece..649d075 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/LaserScan.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/LaserScan.h @@ -1,34 +1,120 @@ -#ifndef LASER_SCAN_H -#define LASER_SCAN_H +// Generated by gencpp from file robot_sensor_msgs/LaserScan.msg +// DO NOT EDIT! + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_LASERSCAN_H +#define ROBOT_SENSOR_MSGS_MESSAGE_LASERSCAN_H + + +#include #include -#include "robot_std_msgs/Header.h" +#include +#include +#include + namespace robot_sensor_msgs { - -struct LaserScan +template +struct LaserScan_ { - robot_std_msgs::Header header; // Thời gian và frame của phép đo + typedef LaserScan_ Type; - // Góc bắt đầu và kết thúc của tia quét [rad] - float angle_min = 0.0f; - float angle_max = 0.0f; - float angle_increment = 0.0f; // Khoảng cách góc giữa hai tia quét liên tiếp [rad] + LaserScan_() + : header() + , angle_min(0.0) + , angle_max(0.0) + , angle_increment(0.0) + , time_increment(0.0) + , scan_time(0.0) + , range_min(0.0) + , range_max(0.0) + , ranges() + , intensities() { + } + LaserScan_(const ContainerAllocator& _alloc) + : header(_alloc) + , angle_min(0.0) + , angle_max(0.0) + , angle_increment(0.0) + , time_increment(0.0) + , scan_time(0.0) + , range_min(0.0) + , range_max(0.0) + , ranges(_alloc) + , intensities(_alloc) { + (void)_alloc; + } - // Thông tin về thời gian quét - float time_increment = 0.0f; // Thời gian giữa hai phép đo liên tiếp [s] - float scan_time = 0.0f; // Thời gian hoàn tất một lần quét [s] - // Giới hạn khoảng đo - float range_min = 0.0f; // Giá trị khoảng cách nhỏ nhất [m] - float range_max = 0.0f; // Giá trị khoảng cách lớn nhất [m] - // Dữ liệu chính của laser - std::vector ranges; // Dữ liệu khoảng cách [m] - std::vector intensities; // Cường độ phản xạ (đơn vị phụ thuộc thiết bị) + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; - LaserScan() = default; -}; + typedef float _angle_min_type; + _angle_min_type angle_min; + typedef float _angle_max_type; + _angle_max_type angle_max; + + typedef float _angle_increment_type; + _angle_increment_type angle_increment; + + typedef float _time_increment_type; + _time_increment_type time_increment; + + typedef float _scan_time_type; + _scan_time_type scan_time; + + typedef float _range_min_type; + _range_min_type range_min; + + typedef float _range_max_type; + _range_max_type range_max; + + typedef std::vector::template rebind_alloc> _ranges_type; + _ranges_type ranges; + + typedef std::vector::template rebind_alloc> _intensities_type; + _intensities_type intensities; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::LaserScan_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::LaserScan_ const> ConstPtr; + +}; // struct LaserScan_ + +typedef ::robot_sensor_msgs::LaserScan_ > LaserScan; + +typedef boost::shared_ptr< ::robot_sensor_msgs::LaserScan > LaserScanPtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::LaserScan const> LaserScanConstPtr; + +// constants requiring out of line definition + +template +bool operator==(const ::robot_sensor_msgs::LaserScan_ & lhs, const ::robot_sensor_msgs::LaserScan_ & rhs) +{ + return lhs.header == rhs.header && + lhs.angle_min == rhs.angle_min && + lhs.angle_max == rhs.angle_max && + lhs.angle_increment == rhs.angle_increment && + lhs.time_increment == rhs.time_increment && + lhs.scan_time == rhs.scan_time && + lhs.range_min == rhs.range_min && + lhs.range_max == rhs.range_max && + lhs.ranges == rhs.ranges && + lhs.intensities == rhs.intensities; } -#endif // LASER_SCAN_H + +template +bool operator!=(const ::robot_sensor_msgs::LaserScan_ & lhs, const ::robot_sensor_msgs::LaserScan_ & rhs) +{ + return !(lhs == rhs); +} + + +} // namespace robot_sensor_msgs + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_LASERSCAN_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/MultiEchoLaserScan.h b/robot_sensor_msgs/include/robot_sensor_msgs/MultiEchoLaserScan.h index 1acf748..f28d218 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/MultiEchoLaserScan.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/MultiEchoLaserScan.h @@ -1,32 +1,122 @@ -#ifndef MULTI_ECHO_LASER_SCAN_H -#define MULTI_ECHO_LASER_SCAN_H +// Generated by gencpp from file robot_sensor_msgs/MultiEchoLaserScan.msg +// DO NOT EDIT! + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_MULTIECHOLASERSCAN_H +#define ROBOT_SENSOR_MSGS_MESSAGE_MULTIECHOLASERSCAN_H + + +#include #include -#include "robot_std_msgs/Header.h" -#include "robot_sensor_msgs/LaserEcho.h" // Định nghĩa struct LaserEcho (float32[] echoes) +#include +#include +#include +#include +#include namespace robot_sensor_msgs { - -struct MultiEchoLaserScan +template +struct MultiEchoLaserScan_ { - robot_std_msgs::Header header; // Thông tin thời gian & frame của phép đo + typedef MultiEchoLaserScan_ Type; - float angle_min = 0.0f; // Góc bắt đầu quét (radians) - float angle_max = 0.0f; // Góc kết thúc quét (radians) - float angle_increment = 0.0f; // Độ tăng góc giữa 2 tia liên tiếp (radians) + MultiEchoLaserScan_() + : header() + , angle_min(0.0) + , angle_max(0.0) + , angle_increment(0.0) + , time_increment(0.0) + , scan_time(0.0) + , range_min(0.0) + , range_max(0.0) + , ranges() + , intensities() { + } + MultiEchoLaserScan_(const ContainerAllocator& _alloc) + : header(_alloc) + , angle_min(0.0) + , angle_max(0.0) + , angle_increment(0.0) + , time_increment(0.0) + , scan_time(0.0) + , range_min(0.0) + , range_max(0.0) + , ranges(_alloc) + , intensities(_alloc) { + (void)_alloc; + } - float time_increment = 0.0f; // Thời gian giữa 2 phép đo (seconds) - float scan_time = 0.0f; // Thời gian quét toàn bộ (seconds) - float range_min = 0.0f; // Khoảng cách đo nhỏ nhất (m) - float range_max = 0.0f; // Khoảng cách đo lớn nhất (m) - std::vector ranges; // Dữ liệu khoảng cách (m) - std::vector intensities; // Dữ liệu cường độ (tùy chọn) + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; - MultiEchoLaserScan() = default; -}; + typedef float _angle_min_type; + _angle_min_type angle_min; + typedef float _angle_max_type; + _angle_max_type angle_max; + + typedef float _angle_increment_type; + _angle_increment_type angle_increment; + + typedef float _time_increment_type; + _time_increment_type time_increment; + + typedef float _scan_time_type; + _scan_time_type scan_time; + + typedef float _range_min_type; + _range_min_type range_min; + + typedef float _range_max_type; + _range_max_type range_max; + + typedef std::vector< ::robot_sensor_msgs::LaserEcho_ , typename std::allocator_traits::template rebind_alloc< ::robot_sensor_msgs::LaserEcho_ >> _ranges_type; + _ranges_type ranges; + + typedef std::vector< ::robot_sensor_msgs::LaserEcho_ , typename std::allocator_traits::template rebind_alloc< ::robot_sensor_msgs::LaserEcho_ >> _intensities_type; + _intensities_type intensities; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::MultiEchoLaserScan_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::MultiEchoLaserScan_ const> ConstPtr; + +}; // struct MultiEchoLaserScan_ + +typedef ::robot_sensor_msgs::MultiEchoLaserScan_ > MultiEchoLaserScan; + +typedef boost::shared_ptr< ::robot_sensor_msgs::MultiEchoLaserScan > MultiEchoLaserScanPtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::MultiEchoLaserScan const> MultiEchoLaserScanConstPtr; + +// constants requiring out of line definition + +template +bool operator==(const ::robot_sensor_msgs::MultiEchoLaserScan_ & lhs, const ::robot_sensor_msgs::MultiEchoLaserScan_ & rhs) +{ + return lhs.header == rhs.header && + lhs.angle_min == rhs.angle_min && + lhs.angle_max == rhs.angle_max && + lhs.angle_increment == rhs.angle_increment && + lhs.time_increment == rhs.time_increment && + lhs.scan_time == rhs.scan_time && + lhs.range_min == rhs.range_min && + lhs.range_max == rhs.range_max && + lhs.ranges == rhs.ranges && + lhs.intensities == rhs.intensities; } -#endif // MULTI_ECHO_LASER_SCAN_H + +template +bool operator!=(const ::robot_sensor_msgs::MultiEchoLaserScan_ & lhs, const ::robot_sensor_msgs::MultiEchoLaserScan_ & rhs) +{ + return !(lhs == rhs); +} + + +} // namespace robot_sensor_msgs + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_MULTIECHOLASERSCAN_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/PointCloud.h b/robot_sensor_msgs/include/robot_sensor_msgs/PointCloud.h index 31b5cd9..e62d0cf 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/PointCloud.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/PointCloud.h @@ -1,24 +1,81 @@ -#ifndef POINTCLOUD_H -#define POINTCLOUD_H +// Generated by gencpp from file robot_sensor_msgs/PointCloud.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_POINTCLOUD_H +#define ROBOT_SENSOR_MSGS_MESSAGE_POINTCLOUD_H + -#include #include -#include "robot_std_msgs/Header.h" -#include "robot_geometry_msgs/Point32.h" -#include "robot_sensor_msgs/ChannelFloat32.h" +#include +#include +#include +#include +#include +#include namespace robot_sensor_msgs { - -struct PointCloud +template +struct PointCloud_ { - robot_std_msgs::Header header; // Thông tin thời gian & frame của dữ liệu + typedef PointCloud_ Type; - std::vector points; // Danh sách các điểm 3D (x, y, z) - std::vector channels; // Dữ liệu phụ đi kèm (vd: "intensity", "rgb") + PointCloud_() + : header() + , points() + , channels() { + } + PointCloud_(const ContainerAllocator& _alloc) + : header(_alloc) + , points(_alloc) + , channels(_alloc) { + (void)_alloc; + } - PointCloud() = default; -}; + + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; + + typedef std::vector< ::robot_geometry_msgs::Point32_ , typename std::allocator_traits::template rebind_alloc< ::robot_geometry_msgs::Point32_ >> _points_type; + _points_type points; + + typedef std::vector< ::robot_sensor_msgs::ChannelFloat32_ , typename std::allocator_traits::template rebind_alloc< ::robot_sensor_msgs::ChannelFloat32_ >> _channels_type; + _channels_type channels; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::PointCloud_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::PointCloud_ const> ConstPtr; + +}; // struct PointCloud_ + +typedef ::robot_sensor_msgs::PointCloud_ > PointCloud; + +typedef boost::shared_ptr< ::robot_sensor_msgs::PointCloud > PointCloudPtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::PointCloud const> PointCloudConstPtr; + +// constants requiring out of line definition + + +template +bool operator==(const ::robot_sensor_msgs::PointCloud_ & lhs, const ::robot_sensor_msgs::PointCloud_ & rhs) +{ + return lhs.header == rhs.header && + lhs.points == rhs.points && + lhs.channels == rhs.channels; } -#endif // POINTCLOUD_H + +template +bool operator!=(const ::robot_sensor_msgs::PointCloud_ & lhs, const ::robot_sensor_msgs::PointCloud_ & rhs) +{ + return !(lhs == rhs); +} + + +} // namespace robot_sensor_msgs + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_POINTCLOUD_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/PointCloud2.h b/robot_sensor_msgs/include/robot_sensor_msgs/PointCloud2.h index 7a1d0f2..6c076dd 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/PointCloud2.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/PointCloud2.h @@ -1,34 +1,118 @@ -#ifndef POINTCLOUD2_H -#define POINTCLOUD2_H +// Generated by gencpp from file robot_sensor_msgs/PointCloud2.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_POINTCLOUD2_H +#define ROBOT_SENSOR_MSGS_MESSAGE_POINTCLOUD2_H + -#include #include #include -#include "robot_std_msgs/Header.h" -#include "robot_sensor_msgs/PointField.h" +#include +#include +#include +#include namespace robot_sensor_msgs { - -struct PointCloud2 +template +struct PointCloud2_ { - robot_std_msgs::Header header; // Thời gian và frame của dữ liệu + typedef PointCloud2_ Type; - uint32_t height = 1; // Số hàng (1 nếu là point cloud 1D) - uint32_t width = 0; // Số lượng điểm trên mỗi hàng (tổng điểm = height * width) + PointCloud2_() + : header() + , height(0) + , width(0) + , fields() + , is_bigendian(false) + , point_step(0) + , row_step(0) + , data() + , is_dense(false) { + } + PointCloud2_(const ContainerAllocator& _alloc) + : header(_alloc) + , height(0) + , width(0) + , fields(_alloc) + , is_bigendian(false) + , point_step(0) + , row_step(0) + , data(_alloc) + , is_dense(false) { + (void)_alloc; + } - std::vector fields; // Thông tin layout của từng trường trong dữ liệu (vd: x, y, z, intensity,...) - bool is_bigendian = false; // true nếu dữ liệu lưu ở dạng big-endian - uint32_t point_step = 0; // Số byte cho mỗi điểm - uint32_t row_step = 0; // Số byte cho mỗi hàng - std::vector data; // Dữ liệu nhị phân (raw bytes), kích thước = row_step * height + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; - bool is_dense = false; // true nếu không có điểm NaN hoặc vô hiệu + typedef uint32_t _height_type; + _height_type height; - PointCloud2() = default; -}; + typedef uint32_t _width_type; + _width_type width; + typedef std::vector< ::robot_sensor_msgs::PointField_ , typename std::allocator_traits::template rebind_alloc< ::robot_sensor_msgs::PointField_ >> _fields_type; + _fields_type fields; + + typedef uint8_t _is_bigendian_type; + _is_bigendian_type is_bigendian; + + typedef uint32_t _point_step_type; + _point_step_type point_step; + + typedef uint32_t _row_step_type; + _row_step_type row_step; + + typedef std::vector::template rebind_alloc> _data_type; + _data_type data; + + typedef uint8_t _is_dense_type; + _is_dense_type is_dense; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::PointCloud2_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::PointCloud2_ const> ConstPtr; + +}; // struct PointCloud2_ + +typedef ::robot_sensor_msgs::PointCloud2_ > PointCloud2; + +typedef boost::shared_ptr< ::robot_sensor_msgs::PointCloud2 > PointCloud2Ptr; +typedef boost::shared_ptr< ::robot_sensor_msgs::PointCloud2 const> PointCloud2ConstPtr; + +// constants requiring out of line definition + + +template +bool operator==(const ::robot_sensor_msgs::PointCloud2_ & lhs, const ::robot_sensor_msgs::PointCloud2_ & rhs) +{ + return lhs.header == rhs.header && + lhs.height == rhs.height && + lhs.width == rhs.width && + lhs.fields == rhs.fields && + lhs.is_bigendian == rhs.is_bigendian && + lhs.point_step == rhs.point_step && + lhs.row_step == rhs.row_step && + lhs.data == rhs.data && + lhs.is_dense == rhs.is_dense; } -#endif // POINTCLOUD2_H + +template +bool operator!=(const ::robot_sensor_msgs::PointCloud2_ & lhs, const ::robot_sensor_msgs::PointCloud2_ & rhs) +{ + return !(lhs == rhs); +} + + +} // namespace robot_sensor_msgs + + + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_POINTCLOUD2_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/PointField.h b/robot_sensor_msgs/include/robot_sensor_msgs/PointField.h index deb1aae..d50b999 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/PointField.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/PointField.h @@ -1,31 +1,122 @@ -#ifndef POINTFIELD_H -#define POINTFIELD_H +// Generated by gencpp from file robot_sensor_msgs/PointField.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_POINTFIELD_H +#define ROBOT_SENSOR_MSGS_MESSAGE_POINTFIELD_H + -#include #include +#include +#include +#include + namespace robot_sensor_msgs { - -struct PointField +template +struct PointField_ { - // Các hằng số kiểu dữ liệu (theo chuẩn ROS) - static constexpr uint8_t INT8 = 1; - static constexpr uint8_t UINT8 = 2; - static constexpr uint8_t INT16 = 3; - static constexpr uint8_t UINT16 = 4; - static constexpr uint8_t INT32 = 5; - static constexpr uint8_t UINT32 = 6; - static constexpr uint8_t FLOAT32 = 7; - static constexpr uint8_t FLOAT64 = 8; + typedef PointField_ Type; - std::string name; // Tên trường (vd: "x", "y", "z", "intensity") - uint32_t offset = 0; // Vị trí byte bắt đầu trong cấu trúc mỗi điểm - uint8_t datatype = 0; // Kiểu dữ liệu (sử dụng các hằng ở trên) - uint32_t count = 0; // Số phần tử trong trường (vd: 3 cho vector3) + PointField_() + : name() + , offset(0) + , datatype(0) + , count(0) { + } + PointField_(const ContainerAllocator& _alloc) + : name(_alloc) + , offset(0) + , datatype(0) + , count(0) { + (void)_alloc; + } - PointField() = default; -}; + + typedef std::basic_string, typename std::allocator_traits::template rebind_alloc> _name_type; + _name_type name; + + typedef uint32_t _offset_type; + _offset_type offset; + + typedef uint8_t _datatype_type; + _datatype_type datatype; + + typedef uint32_t _count_type; + _count_type count; + + + +// reducing the odds to have name collisions with Windows.h +#if defined(_WIN32) && defined(INT8) + #undef INT8 +#endif +#if defined(_WIN32) && defined(UINT8) + #undef UINT8 +#endif +#if defined(_WIN32) && defined(INT16) + #undef INT16 +#endif +#if defined(_WIN32) && defined(UINT16) + #undef UINT16 +#endif +#if defined(_WIN32) && defined(INT32) + #undef INT32 +#endif +#if defined(_WIN32) && defined(UINT32) + #undef UINT32 +#endif +#if defined(_WIN32) && defined(FLOAT32) + #undef FLOAT32 +#endif +#if defined(_WIN32) && defined(FLOAT64) + #undef FLOAT64 +#endif + + enum { + INT8 = 1u, + UINT8 = 2u, + INT16 = 3u, + UINT16 = 4u, + INT32 = 5u, + UINT32 = 6u, + FLOAT32 = 7u, + FLOAT64 = 8u, + }; + + + typedef boost::shared_ptr< ::robot_sensor_msgs::PointField_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::PointField_ const> ConstPtr; + +}; // struct PointField_ + +typedef ::robot_sensor_msgs::PointField_ > PointField; + +typedef boost::shared_ptr< ::robot_sensor_msgs::PointField > PointFieldPtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::PointField const> PointFieldConstPtr; + +// constants requiring out of line definition + + +template +bool operator==(const ::robot_sensor_msgs::PointField_ & lhs, const ::robot_sensor_msgs::PointField_ & rhs) +{ + return lhs.name == rhs.name && + lhs.offset == rhs.offset && + lhs.datatype == rhs.datatype && + lhs.count == rhs.count; } -#endif // POINTFIELD_H + +template +bool operator!=(const ::robot_sensor_msgs::PointField_ & lhs, const ::robot_sensor_msgs::PointField_ & rhs) +{ + return !(lhs == rhs); +} + + +} // namespace robot_sensor_msgs + + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_POINTFIELD_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/Range.h b/robot_sensor_msgs/include/robot_sensor_msgs/Range.h index fec9efe..a970e44 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/Range.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/Range.h @@ -1,28 +1,108 @@ -#ifndef RANGE_H -#define RANGE_H +// Generated by gencpp from file robot_sensor_msgs/Range.msg +// DO NOT EDIT! -#include -#include "robot_std_msgs/Header.h" // Header tương tự robot_std_msgs/Header + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_RANGE_H +#define ROBOT_SENSOR_MSGS_MESSAGE_RANGE_H + + +#include +#include +#include +#include +#include namespace robot_sensor_msgs { - -struct Range +template +struct Range_ { - // Các hằng số loại bức xạ (radiation type) - static constexpr uint8_t ULTRASOUND = 0; - static constexpr uint8_t INFRARED = 1; + typedef Range_ Type; - Header header; // Thời gian đo và frame_id + Range_() + : header() + , radiation_type(0) + , field_of_view(0.0) + , min_range(0.0) + , max_range(0.0) + , range(0.0) { + } + Range_(const ContainerAllocator& _alloc) + : header(_alloc) + , radiation_type(0) + , field_of_view(0.0) + , min_range(0.0) + , max_range(0.0) + , range(0.0) { + (void)_alloc; + } - uint8_t radiation_type = ULTRASOUND; // Loại cảm biến (âm thanh, IR, v.v.) - float field_of_view = 0.0f; // Góc mở của cảm biến [rad] - float min_range = 0.0f; // Khoảng cách nhỏ nhất [m] - float max_range = 0.0f; // Khoảng cách lớn nhất [m] - float range = 0.0f; // Khoảng cách đo được [m] - Range() = default; -}; + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; + + typedef uint8_t _radiation_type_type; + _radiation_type_type radiation_type; + + typedef float _field_of_view_type; + _field_of_view_type field_of_view; + + typedef float _min_range_type; + _min_range_type min_range; + + typedef float _max_range_type; + _max_range_type max_range; + + typedef float _range_type; + _range_type range; + + + +// reducing the odds to have name collisions with Windows.h +#if defined(_WIN32) && defined(ULTRASOUND) + #undef ULTRASOUND +#endif +#if defined(_WIN32) && defined(INFRARED) + #undef INFRARED +#endif + + enum { + ULTRASOUND = 0u, + INFRARED = 1u, + }; + + + typedef boost::shared_ptr< ::robot_sensor_msgs::Range_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::Range_ const> ConstPtr; + +}; // struct Range_ + +typedef ::robot_sensor_msgs::Range_ > Range; + +typedef boost::shared_ptr< ::robot_sensor_msgs::Range > RangePtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::Range const> RangeConstPtr; + +// constants requiring out of line definition + +template +bool operator==(const ::robot_sensor_msgs::Range_ & lhs, const ::robot_sensor_msgs::Range_ & rhs) +{ + return lhs.header == rhs.header && + lhs.radiation_type == rhs.radiation_type && + lhs.field_of_view == rhs.field_of_view && + lhs.min_range == rhs.min_range && + lhs.max_range == rhs.max_range && + lhs.range == rhs.range; } -#endif // RANGE_H + +template +bool operator!=(const ::robot_sensor_msgs::Range_ & lhs, const ::robot_sensor_msgs::Range_ & rhs) +{ + return !(lhs == rhs); +} + + +} // namespace robot_sensor_msgs + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_RANGE_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/RegionOfInterest.h b/robot_sensor_msgs/include/robot_sensor_msgs/RegionOfInterest.h index 290c6fe..52bdaf6 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/RegionOfInterest.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/RegionOfInterest.h @@ -1,21 +1,89 @@ -#ifndef REGION_OF_INTEREST_H -#define REGION_OF_INTEREST_H +// Generated by gencpp from file robot_sensor_msgs/RegionOfInterest.msg +// DO NOT EDIT! -#include + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_REGIONOFINTEREST_H +#define ROBOT_SENSOR_MSGS_MESSAGE_REGIONOFINTEREST_H + + +#include +#include +#include +#include namespace robot_sensor_msgs { - -struct RegionOfInterest +template +struct RegionOfInterest_ { - uint32_t x_offset = 0; // Pixel ngoài cùng bên trái của ROI - uint32_t y_offset = 0; // Pixel ngoài cùng bên trên của ROI - uint32_t height = 0; // Chiều cao vùng ROI - uint32_t width = 0; // Chiều rộng vùng ROI + typedef RegionOfInterest_ Type; - bool do_rectify = false; // Có cần tính toán lại ROI sau khi hiệu chỉnh ảnh không + RegionOfInterest_() + : x_offset(0) + , y_offset(0) + , height(0) + , width(0) + , do_rectify(false) { + } + RegionOfInterest_(const ContainerAllocator& _alloc) + : x_offset(0) + , y_offset(0) + , height(0) + , width(0) + , do_rectify(false) { + (void)_alloc; + } - RegionOfInterest() = default; -}; + + typedef uint32_t _x_offset_type; + _x_offset_type x_offset; + + typedef uint32_t _y_offset_type; + _y_offset_type y_offset; + + typedef uint32_t _height_type; + _height_type height; + + typedef uint32_t _width_type; + _width_type width; + + typedef uint8_t _do_rectify_type; + _do_rectify_type do_rectify; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::RegionOfInterest_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::RegionOfInterest_ const> ConstPtr; + +}; // struct RegionOfInterest_ + +typedef ::robot_sensor_msgs::RegionOfInterest_ > RegionOfInterest; + +typedef boost::shared_ptr< ::robot_sensor_msgs::RegionOfInterest > RegionOfInterestPtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::RegionOfInterest const> RegionOfInterestConstPtr; + +// constants requiring out of line definition + +template +bool operator==(const ::robot_sensor_msgs::RegionOfInterest_ & lhs, const ::robot_sensor_msgs::RegionOfInterest_ & rhs) +{ + return lhs.x_offset == rhs.x_offset && + lhs.y_offset == rhs.y_offset && + lhs.height == rhs.height && + lhs.width == rhs.width && + lhs.do_rectify == rhs.do_rectify; } -#endif // REGION_OF_INTEREST_H + +template +bool operator!=(const ::robot_sensor_msgs::RegionOfInterest_ & lhs, const ::robot_sensor_msgs::RegionOfInterest_ & rhs) +{ + return !(lhs == rhs); +} + + +} // namespace robot_sensor_msgs + + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_REGIONOFINTEREST_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/RelativeHumidity.h b/robot_sensor_msgs/include/robot_sensor_msgs/RelativeHumidity.h index 3a7d989..486e678 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/RelativeHumidity.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/RelativeHumidity.h @@ -1,19 +1,78 @@ -#ifndef RELATIVE_HUMIDITY_H -#define RELATIVE_HUMIDITY_H +// Generated by gencpp from file robot_sensor_msgs/RelativeHumidity.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_RELATIVEHUMIDITY_H +#define ROBOT_SENSOR_MSGS_MESSAGE_RELATIVEHUMIDITY_H + + +#include +#include +#include +#include +#include -#include -#include "robot_std_msgs/Header.h" // Giả định bạn đã có struct Header tương tự ROS robot_std_msgs/Header namespace robot_sensor_msgs { - -struct RelativeHumidity +template +struct RelativeHumidity_ { - Header header; // Thời điểm đo và khung tọa độ cảm biến - double relative_humidity = 0.0; // Độ ẩm tương đối (0.0 - 1.0) - double variance = 0.0; // Phương sai, 0 nghĩa là "không biết" + typedef RelativeHumidity_ Type; - RelativeHumidity() = default; -}; + RelativeHumidity_() + : header() + , relative_humidity(0.0) + , variance(0.0) { + } + RelativeHumidity_(const ContainerAllocator& _alloc) + : header(_alloc) + , relative_humidity(0.0) + , variance(0.0) { + (void)_alloc; + } + + + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; + + typedef double _relative_humidity_type; + _relative_humidity_type relative_humidity; + + typedef double _variance_type; + _variance_type variance; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::RelativeHumidity_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::RelativeHumidity_ const> ConstPtr; + +}; // struct RelativeHumidity_ + +typedef ::robot_sensor_msgs::RelativeHumidity_ > RelativeHumidity; + +typedef boost::shared_ptr< ::robot_sensor_msgs::RelativeHumidity > RelativeHumidityPtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::RelativeHumidity const> RelativeHumidityConstPtr; + +// constants requiring out of line definition + +template +bool operator==(const ::robot_sensor_msgs::RelativeHumidity_ & lhs, const ::robot_sensor_msgs::RelativeHumidity_ & rhs) +{ + return lhs.header == rhs.header && + lhs.relative_humidity == rhs.relative_humidity && + lhs.variance == rhs.variance; } -#endif // RELATIVE_HUMIDITY_H + +template +bool operator!=(const ::robot_sensor_msgs::RelativeHumidity_ & lhs, const ::robot_sensor_msgs::RelativeHumidity_ & rhs) +{ + return !(lhs == rhs); +} + + +} // namespace robot_sensor_msgs + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_RELATIVEHUMIDITY_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/Temperature.h b/robot_sensor_msgs/include/robot_sensor_msgs/Temperature.h index ac49f3c..ffa12e5 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/Temperature.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/Temperature.h @@ -1,19 +1,80 @@ -#ifndef TEMPERATURE_H -#define TEMPERATURE_H +// Generated by gencpp from file robot_sensor_msgs/Temperature.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_TEMPERATURE_H +#define ROBOT_SENSOR_MSGS_MESSAGE_TEMPERATURE_H + + +#include +#include +#include +#include + +#include -#include -#include "robot_std_msgs/Header.h" // Định nghĩa struct Header tương tự robot_std_msgs/Header namespace robot_sensor_msgs { - -struct Temperature +template +struct Temperature_ { - Header header; // Thông tin thời gian và vị trí cảm biến - double temperature = 0.0; // Nhiệt độ đo được (°C) - double variance = 0.0; // Phương sai, 0 nghĩa là "không biết" + typedef Temperature_ Type; - Temperature() = default; -}; + Temperature_() + : header() + , temperature(0.0) + , variance(0.0) { + } + Temperature_(const ContainerAllocator& _alloc) + : header(_alloc) + , temperature(0.0) + , variance(0.0) { + (void)_alloc; + } + + + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; + + typedef double _temperature_type; + _temperature_type temperature; + + typedef double _variance_type; + _variance_type variance; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::Temperature_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::Temperature_ const> ConstPtr; + +}; // struct Temperature_ + +typedef ::robot_sensor_msgs::Temperature_ > Temperature; + +typedef boost::shared_ptr< ::robot_sensor_msgs::Temperature > TemperaturePtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::Temperature const> TemperatureConstPtr; + +// constants requiring out of line definition + +template +bool operator==(const ::robot_sensor_msgs::Temperature_ & lhs, const ::robot_sensor_msgs::Temperature_ & rhs) +{ + return lhs.header == rhs.header && + lhs.temperature == rhs.temperature && + lhs.variance == rhs.variance; } -#endif // TEMPERATURE_H + +template +bool operator!=(const ::robot_sensor_msgs::Temperature_ & lhs, const ::robot_sensor_msgs::Temperature_ & rhs) +{ + return !(lhs == rhs); +} + + +} // namespace robot_sensor_msgs + + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_TEMPERATURE_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/TimeReference.h b/robot_sensor_msgs/include/robot_sensor_msgs/TimeReference.h index 2fed87e..1fc206c 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/TimeReference.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/TimeReference.h @@ -1,20 +1,78 @@ -#ifndef TIMEREFERENCE_H -#define TIMEREFERENCE_H +// Generated by gencpp from file robot_sensor_msgs/TimeReference.msg +// DO NOT EDIT! + + +#ifndef ROBOT_SENSOR_MSGS_MESSAGE_TIMEREFERENCE_H +#define ROBOT_SENSOR_MSGS_MESSAGE_TIMEREFERENCE_H + #include -#include "robot_std_msgs/Header.h" // Định nghĩa struct Header tương tự robot_std_msgs/Header +#include +#include +#include +#include + namespace robot_sensor_msgs { - -struct TimeReference +template +struct TimeReference_ { - Header header; // stamp: thời điểm đo (theo đồng hồ hệ thống) - // frame_id: không sử dụng trong message này - double time_ref = 0.0; // Thời gian từ nguồn thời gian bên ngoài (giây) - std::string source; // Tên của nguồn thời gian (tùy chọn) + typedef TimeReference_ Type; - TimeReference() = default; -}; + TimeReference_() + : header() + , time_ref() + , source() { + } + TimeReference_(const ContainerAllocator& _alloc) + : header(_alloc) + , time_ref() + , source(_alloc) { + (void)_alloc; + } + + + typedef ::robot_std_msgs::Header_ _header_type; + _header_type header; + + typedef ros::Time _time_ref_type; + _time_ref_type time_ref; + + typedef std::basic_string, typename std::allocator_traits::template rebind_alloc> _source_type; + _source_type source; + + + + + + typedef boost::shared_ptr< ::robot_sensor_msgs::TimeReference_ > Ptr; + typedef boost::shared_ptr< ::robot_sensor_msgs::TimeReference_ const> ConstPtr; + +}; // struct TimeReference_ + +typedef ::robot_sensor_msgs::TimeReference_ > TimeReference; + +typedef boost::shared_ptr< ::robot_sensor_msgs::TimeReference > TimeReferencePtr; +typedef boost::shared_ptr< ::robot_sensor_msgs::TimeReference const> TimeReferenceConstPtr; + +// constants requiring out of line definition + +template +bool operator==(const ::robot_sensor_msgs::TimeReference_ & lhs, const ::robot_sensor_msgs::TimeReference_ & rhs) +{ + return lhs.header == rhs.header && + lhs.time_ref == rhs.time_ref && + lhs.source == rhs.source; } -#endif // TIMEREFERENCE_H + +template +bool operator!=(const ::robot_sensor_msgs::TimeReference_ & lhs, const ::robot_sensor_msgs::TimeReference_ & rhs) +{ + return !(lhs == rhs); +} + + +} // namespace robot_sensor_msgs + +#endif // ROBOT_SENSOR_MSGS_MESSAGE_TIMEREFERENCE_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/distortion_models.h b/robot_sensor_msgs/include/robot_sensor_msgs/distortion_models.h index fddfd99..d601353 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/distortion_models.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/distortion_models.h @@ -33,8 +33,8 @@ * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ -#ifndef SENSOR_MSGS_DISTORTION_MODELS_H -#define SENSOR_MSGS_DISTORTION_MODELS_H +#ifndef ROBOT_SENSOR_MSGS_DISTORTION_MODELS_H +#define ROBOT_SENSOR_MSGS_DISTORTION_MODELS_H #include diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/fill_image.h b/robot_sensor_msgs/include/robot_sensor_msgs/fill_image.h index 37aa9ea..2bdcc70 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/fill_image.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/fill_image.h @@ -32,8 +32,8 @@ * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ -#ifndef FILLIMAGE_HH -#define FILLIMAGE_HH +#ifndef ROBOT_FILLIMAGE_HH +#define ROBOT_FILLIMAGE_HH #include "robot_sensor_msgs/Image.h" #include "robot_sensor_msgs/image_encodings.h" diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/image_encodings.h b/robot_sensor_msgs/include/robot_sensor_msgs/image_encodings.h index eae3bb9..924d841 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/image_encodings.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/image_encodings.h @@ -33,8 +33,8 @@ * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ -#ifndef SENSOR_MSGS_IMAGE_ENCODINGS_H -#define SENSOR_MSGS_IMAGE_ENCODINGS_H +#ifndef ROBOT_SENSOR_MSGS_IMAGE_ENCODINGS_H +#define ROBOT_SENSOR_MSGS_IMAGE_ENCODINGS_H #include #include diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/point_cloud2_iterator.h b/robot_sensor_msgs/include/robot_sensor_msgs/point_cloud2_iterator.h index 56f4f2f..fdf626d 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/point_cloud2_iterator.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/point_cloud2_iterator.h @@ -32,8 +32,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SENSOR_MSGS_POINT_CLOUD2_ITERATOR_H -#define SENSOR_MSGS_POINT_CLOUD2_ITERATOR_H +#ifndef ROBOT_SENSOR_MSGS_POINT_CLOUD2_ITERATOR_H +#define ROBOT_SENSOR_MSGS_POINT_CLOUD2_ITERATOR_H #include #include @@ -299,4 +299,4 @@ public: #include -#endif// SENSOR_MSGS_POINT_CLOUD2_ITERATOR_H +#endif// ROBOT_SENSOR_MSGS_POINT_CLOUD2_ITERATOR_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/point_cloud_conversion.h b/robot_sensor_msgs/include/robot_sensor_msgs/point_cloud_conversion.h index 53eda06..adb2ce7 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/point_cloud_conversion.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/point_cloud_conversion.h @@ -35,8 +35,8 @@ * */ -#ifndef SENSOR_MSGS_POINT_CLOUD_CONVERSION_H -#define SENSOR_MSGS_POINT_CLOUD_CONVERSION_H +#ifndef ROBOT_SENSOR_MSGS_POINT_CLOUD_CONVERSION_H +#define ROBOT_SENSOR_MSGS_POINT_CLOUD_CONVERSION_H #include #include @@ -166,4 +166,4 @@ static inline bool convertPointCloud2ToPointCloud (const robot_sensor_msgs::Poin return (true); } } -#endif// SENSOR_MSGS_POINT_CLOUD_CONVERSION_H +#endif// ROBOT_SENSOR_MSGS_POINT_CLOUD_CONVERSION_H diff --git a/robot_sensor_msgs/include/robot_sensor_msgs/point_field_conversion.h b/robot_sensor_msgs/include/robot_sensor_msgs/point_field_conversion.h index 8b09a2c..1df20f3 100644 --- a/robot_sensor_msgs/include/robot_sensor_msgs/point_field_conversion.h +++ b/robot_sensor_msgs/include/robot_sensor_msgs/point_field_conversion.h @@ -43,8 +43,8 @@ * Authors: Sebastian Pütz */ -#ifndef SENSOR_MSGS_POINT_FIELD_CONVERSION_H -#define SENSOR_MSGS_POINT_FIELD_CONVERSION_H +#ifndef ROBOT_SENSOR_MSGS_POINT_FIELD_CONVERSION_H +#define ROBOT_SENSOR_MSGS_POINT_FIELD_CONVERSION_H /** * \brief This file provides a type to enum mapping for the different