Compare commits

...

10 Commits

Author SHA1 Message Date
b6c387dd0f update 2026-01-16 17:26:24 +07:00
b7a7a60b7b Remove unused directory utils and update robot_sensor msgs 2026-01-16 10:06:59 +07:00
ec3f1cda5f Remove unused directory utils and update robot_sensor msgs 2026-01-16 09:38:17 +07:00
28e48c902b Remove unused directory utils and update robot_sensor msgs 2026-01-16 09:29:23 +07:00
98543e6c54 update 2026-01-13 14:30:06 +07:00
b8b0528f1e update for ROS 2026-01-07 16:56:09 +07:00
1df5ed676f robot_nav_core 2026-01-07 09:18:33 +07:00
5c276afb34 update hieplm 2026-01-05 13:37:48 +07:00
fb03bdf2e8 update 2025-12-30 19:08:51 +07:00
32c034225f HiepLM update 2025-12-30 10:45:37 +07:00
50 changed files with 3363 additions and 643 deletions

View File

@@ -3,7 +3,6 @@ project(common_msgs)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_subdirectory(utils)
if (NOT TARGET robot_std_msgs) if (NOT TARGET robot_std_msgs)
add_subdirectory(robot_std_msgs) add_subdirectory(robot_std_msgs)

View File

@@ -1,42 +1,153 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.0.2)
project(robot_geometry_msgs) project(robot_geometry_msgs VERSION 1.0.0 LANGUAGES CXX)
if(DEFINED CATKIN_DEVEL_PREFIX OR DEFINED CATKIN_TOPLEVEL)
set(BUILDING_WITH_CATKIN TRUE)
message(STATUS "Building robot_geometry_msgs with Catkin")
else()
set(BUILDING_WITH_CATKIN FALSE)
message(STATUS "Building robot_geometry_msgs with Standalone CMake")
endif()
# C++ Standard - must be set before find_package
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Thư viện header-only if (NOT BUILDING_WITH_CATKIN)
add_library(robot_geometry_msgs INTERFACE)
# Include path tới thư mục chứa file header # Enable Position Independent Code
target_include_directories(robot_geometry_msgs set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Cấu hình RPATH để tránh cycle trong runtime search path
set(CMAKE_BUILD_RPATH_USE_ORIGIN TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}")
set(PACKAGES_DIR
robot_std_msgs
robot_time
)
else()
# ========================================================
# Catkin specific configuration
# ========================================================
find_package(catkin REQUIRED COMPONENTS
robot_std_msgs
robot_time
)
catkin_package(
INCLUDE_DIRS include
# LIBRARIES không cần vì đây là header-only library
CATKIN_DEPENDS robot_std_msgs robot_time
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
endif()
# Tìm tất cả header files
file(GLOB_RECURSE HEADERS "include/robot_geometry_msgs/*.h")
# Tạo INTERFACE library (header-only)
add_library(${PROJECT_NAME} INTERFACE)
if(BUILDING_WITH_CATKIN)
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
# Set include directories
target_include_directories(${PROJECT_NAME}
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
# Link dependencies (header-only, chỉ cần include paths)
target_link_libraries(${PROJECT_NAME}
INTERFACE INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> ${catkin_LIBRARIES}
$<INSTALL_INTERFACE:include> )
)
# Liên kết với robot_std_msgs nếu bạn có file Header.h trong include/robot_std_msgs/ else()
target_link_libraries(robot_geometry_msgs INTERFACE robot_std_msgs utils)
# Set include directories
target_include_directories(${PROJECT_NAME}
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
# Link dependencies (header-only, chỉ cần include paths)
target_link_libraries(${PROJECT_NAME}
INTERFACE
${PACKAGES_DIR}
)
endif()
# Create alias for backward compatibility # Create alias for backward compatibility
add_library(geometry_msgs ALIAS robot_geometry_msgs) add_library(geometry_msgs ALIAS ${PROJECT_NAME})
# --- Cài đặt thư viện vào hệ thống khi chạy make install --- if(BUILDING_WITH_CATKIN)
install(TARGETS robot_geometry_msgs ## Mark libraries for installation
EXPORT robot_geometry_msgs-targets ## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
INCLUDES DESTINATION include # Cài đặt include install(TARGETS ${PROJECT_NAME}
) ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
# --- Xuất export set robot_costmap_2dTargets thành file CMake module --- ## Mark cpp header files for installation
# --- Tạo file lib/cmake/robot_geometry_msgs/robot_costmap_2dTargets.cmake --- install(DIRECTORY include/${PROJECT_NAME}/
# --- File này chứa cấu hình giúp project khác có thể dùng --- DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# --- Find_package(robot_geometry_msgs REQUIRED) --- FILES_MATCHING PATTERN "*.h"
# --- Target_link_libraries(my_app PRIVATE robot_geometry_msgs::robot_geometry_msgs) --- PATTERN ".svn" EXCLUDE
install(EXPORT robot_geometry_msgs-targets )
FILE robot_geometry_msgs-targets.cmake
NAMESPACE robot_geometry_msgs::
DESTINATION lib/cmake/robot_geometry_msgs
)
add_executable(test_geometry test/main.cpp) else()
target_link_libraries(test_geometry PRIVATE robot_geometry_msgs)
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
# Export targets
install(EXPORT ${PROJECT_NAME}-targets
FILE ${PROJECT_NAME}-targets.cmake
NAMESPACE ${PROJECT_NAME}::
DESTINATION lib/cmake/${PROJECT_NAME}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION include
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
# Print configuration info
message(STATUS "=================================")
message(STATUS "Project: ${PROJECT_NAME} (Header-Only)")
message(STATUS "Version: ${PROJECT_VERSION}")
message(STATUS "C++ Standard: ${CMAKE_CXX_STANDARD}")
message(STATUS "Headers found:")
foreach(hdr ${HEADERS})
message(STATUS " - ${hdr}")
endforeach()
message(STATUS "Dependencies: robot_std_msgs, robot_time")
message(STATUS "=================================")
endif()
# # ========================================================
# # Test executable
# # ========================================================
# add_executable(${PROJECT_NAME}_test test/main.cpp)
# target_link_libraries(${PROJECT_NAME}_test PRIVATE ${PROJECT_NAME})

View File

@@ -19,8 +19,10 @@
<buildtool_depend version_gte="0.5.68">catkin</buildtool_depend> <buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>
<build_depend>libconsole-bridge-dev</build_depend> <build_depend>robot_std_msgs</build_depend>
<build_depend>robot_time</build_depend>
<run_depend>libconsole-bridge-dev</run_depend> <run_depend>robot_std_msgs</run_depend>
<run_depend>robot_time</run_depend>
</package> </package>

View File

@@ -1,35 +1,142 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.0.2)
project(robot_map_msgs) project(robot_map_msgs VERSION 1.0.0 LANGUAGES CXX)
if(DEFINED CATKIN_DEVEL_PREFIX OR DEFINED CATKIN_TOPLEVEL)
set(BUILDING_WITH_CATKIN TRUE)
message(STATUS "Building robot_map_msgs with Catkin")
else()
set(BUILDING_WITH_CATKIN FALSE)
message(STATUS "Building robot_map_msgs with Standalone CMake")
endif()
# C++ Standard - must be set before find_package
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Thư viện header-only if (NOT BUILDING_WITH_CATKIN)
add_library(robot_map_msgs INTERFACE)
# Include path tới thư mục chứa file header # Enable Position Independent Code
target_include_directories(robot_map_msgs set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Cấu hình RPATH để tránh cycle trong runtime search path
set(CMAKE_BUILD_RPATH_USE_ORIGIN TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}")
set(PACKAGES_DIR
robot_std_msgs
)
else()
# ========================================================
# Catkin specific configuration
# ========================================================
find_package(catkin REQUIRED COMPONENTS
robot_std_msgs
)
catkin_package(
INCLUDE_DIRS include
# LIBRARIES không cần vì đây là header-only library
CATKIN_DEPENDS robot_std_msgs
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
endif()
# Tìm tất cả header files
file(GLOB_RECURSE HEADERS "include/robot_map_msgs/*.h")
# Tạo INTERFACE library (header-only)
add_library(${PROJECT_NAME} INTERFACE)
if(BUILDING_WITH_CATKIN)
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
# Set include directories
target_include_directories(${PROJECT_NAME}
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
# Link dependencies (header-only, chỉ cần include paths)
target_link_libraries(${PROJECT_NAME}
INTERFACE INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> ${catkin_LIBRARIES}
$<INSTALL_INTERFACE:include> )
)
# Liên kết với robot_std_msgs nếu bạn có file Header.h trong include/robot_std_msgs/ else()
target_link_libraries(robot_map_msgs INTERFACE robot_std_msgs)
# --- Cài đặt thư viện vào hệ thống khi chạy make install --- # Set include directories
install(TARGETS robot_map_msgs target_include_directories(${PROJECT_NAME}
EXPORT robot_map_msgs-targets INTERFACE
INCLUDES DESTINATION include # Cài đặt include $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
) $<INSTALL_INTERFACE:include>
)
# --- Xuất export set robot_costmap_2dTargets thành file CMake module --- # Link dependencies (header-only, chỉ cần include paths)
# --- Tạo file lib/cmake/robot_map_msgs/robot_costmap_2dTargets.cmake --- target_link_libraries(${PROJECT_NAME}
# --- File này chứa cấu hình giúp project khác có thể dùng --- INTERFACE
# --- Find_package(robot_map_msgs REQUIRED) --- ${PACKAGES_DIR}
# --- Target_link_libraries(my_app PRIVATE robot_map_msgs::robot_map_msgs) --- )
install(EXPORT robot_map_msgs-targets
FILE robot_map_msgs-targets.cmake endif()
NAMESPACE robot_map_msgs::
DESTINATION lib/cmake/robot_map_msgs if(BUILDING_WITH_CATKIN)
) ## Mark libraries for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
else()
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
# Export targets
install(EXPORT ${PROJECT_NAME}-targets
FILE ${PROJECT_NAME}-targets.cmake
NAMESPACE ${PROJECT_NAME}::
DESTINATION lib/cmake/${PROJECT_NAME}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION include
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
# Print configuration info
message(STATUS "=================================")
message(STATUS "Project: ${PROJECT_NAME} (Header-Only)")
message(STATUS "Version: ${PROJECT_VERSION}")
message(STATUS "C++ Standard: ${CMAKE_CXX_STANDARD}")
message(STATUS "Headers found:")
foreach(hdr ${HEADERS})
message(STATUS " - ${hdr}")
endforeach()
message(STATUS "Dependencies: robot_std_msgs")
message(STATUS "=================================")
endif()

View File

@@ -2,7 +2,8 @@
#define ROBOT_OCCUPANCY_GRID_UPDATE_H #define ROBOT_OCCUPANCY_GRID_UPDATE_H
#include <vector> #include <vector>
#include "robot_std_msgs/Header.h" #include <robot_std_msgs/Header.h>
namespace robot_map_msgs namespace robot_map_msgs
{ {
struct OccupancyGridUpdate struct OccupancyGridUpdate

View File

@@ -1,13 +1,8 @@
<package> <package>
<name>robot_nav_msgs</name> <name>robot_map_msgs</name>
<version>0.7.10</version> <version>0.7.10</version>
<description> <description>
robot_nav_msgs is the second generation of the transform library, which lets robot_map_msgs provides message types for map-related data structures.
the user keep track of multiple coordinate frames over time. robot_nav_msgs
maintains the relationship between coordinate frames in a tree
structure buffered in time, and lets the user transform points,
vectors, etc between any two coordinate frames at any desired
point in time.
</description> </description>
<author>Tully Foote</author> <author>Tully Foote</author>
<author>Eitan Marder-Eppstein</author> <author>Eitan Marder-Eppstein</author>
@@ -15,12 +10,11 @@
<maintainer email="tfoote@osrfoundation.org">Tully Foote</maintainer> <maintainer email="tfoote@osrfoundation.org">Tully Foote</maintainer>
<license>BSD</license> <license>BSD</license>
<url type="website">http://www.ros.org/wiki/robot_nav_msgs</url> <url type="website">http://www.ros.org/wiki/robot_map_msgs</url>
<buildtool_depend version_gte="0.5.68">catkin</buildtool_depend> <buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>
<build_depend>libconsole-bridge-dev</build_depend> <build_depend>robot_std_msgs</build_depend>
<run_depend>robot_std_msgs</run_depend>
<run_depend>libconsole-bridge-dev</run_depend>
</package> </package>

View File

@@ -1,42 +1,152 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.0.2)
project(robot_nav_msgs) project(robot_nav_msgs VERSION 1.0.0 LANGUAGES CXX)
if(DEFINED CATKIN_DEVEL_PREFIX OR DEFINED CATKIN_TOPLEVEL)
set(BUILDING_WITH_CATKIN TRUE)
message(STATUS "Building robot_nav_msgs with Catkin")
else()
set(BUILDING_WITH_CATKIN FALSE)
message(STATUS "Building robot_nav_msgs with Standalone CMake")
endif()
# C++ Standard - must be set before find_package
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Thư viện header-only if (NOT BUILDING_WITH_CATKIN)
add_library(robot_nav_msgs INTERFACE)
# Include path tới thư mục chứa file header # Enable Position Independent Code
target_include_directories(robot_nav_msgs set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Cấu hình RPATH để tránh cycle trong runtime search path
set(CMAKE_BUILD_RPATH_USE_ORIGIN TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}")
set(PACKAGES_DIR
robot_std_msgs
robot_geometry_msgs
)
else()
# ========================================================
# Catkin specific configuration
# ========================================================
find_package(catkin REQUIRED COMPONENTS
robot_std_msgs
robot_geometry_msgs
)
catkin_package(
INCLUDE_DIRS include
# LIBRARIES không cần vì đây là header-only library
CATKIN_DEPENDS robot_std_msgs robot_geometry_msgs
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
endif()
# Tìm tất cả header files
file(GLOB_RECURSE HEADERS "include/robot_nav_msgs/*.h")
# Tạo INTERFACE library (header-only)
add_library(${PROJECT_NAME} INTERFACE)
if(BUILDING_WITH_CATKIN)
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
# Set include directories
target_include_directories(${PROJECT_NAME}
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
# Link dependencies (header-only, chỉ cần include paths)
target_link_libraries(${PROJECT_NAME}
INTERFACE INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> ${catkin_LIBRARIES}
$<INSTALL_INTERFACE:include> )
)
# Liên kết với robot_std_msgs nếu bạn có file Header.h trong include/robot_std_msgs/ else()
target_link_libraries(robot_nav_msgs INTERFACE
robot_std_msgs
robot_nav_msgs
geometry_msgs
)
# --- Cài đặt thư viện vào hệ thống khi chạy make install --- # Set include directories
install(TARGETS robot_nav_msgs target_include_directories(${PROJECT_NAME}
EXPORT robot_nav_msgs-targets INTERFACE
INCLUDES DESTINATION include # Cài đặt include $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
) $<INSTALL_INTERFACE:include>
)
# --- Xuất export set robot_costmap_2dTargets thành file CMake module --- # Link dependencies (header-only, chỉ cần include paths)
# --- Tạo file lib/cmake/robot_nav_msgs/robot_costmap_2dTargets.cmake --- target_link_libraries(${PROJECT_NAME}
# --- File này chứa cấu hình giúp project khác có thể dùng --- INTERFACE
# --- Find_package(robot_nav_msgs REQUIRED) --- ${PACKAGES_DIR}
# --- Target_link_libraries(my_app PRIVATE robot_nav_msgs::robot_nav_msgs) --- )
install(EXPORT robot_nav_msgs-targets
FILE robot_nav_msgs-targets.cmake
NAMESPACE robot_nav_msgs::
DESTINATION lib/cmake/robot_nav_msgs
)
add_executable(test_nav test/main.cpp) endif()
target_link_libraries(test_nav PRIVATE robot_nav_msgs)
if(BUILDING_WITH_CATKIN)
## Mark libraries for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
else()
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
# Export targets
install(EXPORT ${PROJECT_NAME}-targets
FILE ${PROJECT_NAME}-targets.cmake
NAMESPACE ${PROJECT_NAME}::
DESTINATION lib/cmake/${PROJECT_NAME}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION include
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
# Print configuration info
message(STATUS "=================================")
message(STATUS "Project: ${PROJECT_NAME} (Header-Only)")
message(STATUS "Version: ${PROJECT_VERSION}")
message(STATUS "C++ Standard: ${CMAKE_CXX_STANDARD}")
message(STATUS "Headers found:")
foreach(hdr ${HEADERS})
message(STATUS " - ${hdr}")
endforeach()
message(STATUS "Dependencies: robot_std_msgs, robot_geometry_msgs")
message(STATUS "=================================")
endif()
# ========================================================
# Test executables
# ========================================================
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test/main.cpp)
add_executable(${PROJECT_NAME}_test test/main.cpp)
target_link_libraries(${PROJECT_NAME}_test PRIVATE ${PROJECT_NAME})
endif()

View File

@@ -1,9 +1,9 @@
<package> <package>
<name>robot_robot_nav_msgs</name> <name>robot_nav_msgs</name>
<version>0.7.10</version> <version>0.7.10</version>
<description> <description>
robot_robot_nav_msgs is the second generation of the transform library, which lets robot_nav_msgs is the second generation of the transform library, which lets
the user keep track of multiple coordinate frames over time. robot_robot_nav_msgs the user keep track of multiple coordinate frames over time. robot_nav_msgs
maintains the relationship between coordinate frames in a tree maintains the relationship between coordinate frames in a tree
structure buffered in time, and lets the user transform points, structure buffered in time, and lets the user transform points,
vectors, etc between any two coordinate frames at any desired vectors, etc between any two coordinate frames at any desired
@@ -15,12 +15,13 @@
<maintainer email="tfoote@osrfoundation.org">Tully Foote</maintainer> <maintainer email="tfoote@osrfoundation.org">Tully Foote</maintainer>
<license>BSD</license> <license>BSD</license>
<url type="website">http://www.ros.org/wiki/robot_robot_nav_msgs</url> <url type="website">http://www.ros.org/wiki/robot_nav_msgs</url>
<buildtool_depend version_gte="0.5.68">catkin</buildtool_depend> <buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>
<build_depend>libconsole-bridge-dev</build_depend> <build_depend>robot_std_msgs</build_depend>
<build_depend>robot_geometry_msgs</build_depend>
<run_depend>libconsole-bridge-dev</run_depend>
<run_depend>robot_std_msgs</run_depend>
<run_depend>robot_geometry_msgs</run_depend>
</package> </package>

View File

@@ -1,36 +1,160 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.0.2)
project(robot_protocol_msgs) project(robot_protocol_msgs VERSION 1.0.0 LANGUAGES CXX)
if(DEFINED CATKIN_DEVEL_PREFIX OR DEFINED CATKIN_TOPLEVEL)
set(BUILDING_WITH_CATKIN TRUE)
message(STATUS "Building robot_protocol_msgs with Catkin")
else()
set(BUILDING_WITH_CATKIN FALSE)
message(STATUS "Building robot_protocol_msgs with Standalone CMake")
endif()
# C++ Standard - must be set before find_package
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Thư viện header-only if (NOT BUILDING_WITH_CATKIN)
add_library(robot_protocol_msgs INTERFACE)
# Include path tới thư mục chứa file header # Enable Position Independent Code
target_include_directories(robot_protocol_msgs set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Cấu hình RPATH để tránh cycle trong runtime search path
set(CMAKE_BUILD_RPATH_USE_ORIGIN TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}")
set(PACKAGES_DIR
robot_std_msgs
robot_geometry_msgs
)
else()
# ========================================================
# Catkin specific configuration
# ========================================================
find_package(catkin REQUIRED COMPONENTS
robot_std_msgs
robot_geometry_msgs
)
catkin_package(
INCLUDE_DIRS include
# LIBRARIES không cần vì đây là header-only library
CATKIN_DEPENDS robot_std_msgs robot_geometry_msgs
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
endif()
# Tìm tất cả header files
file(GLOB_RECURSE HEADERS "include/robot_protocol_msgs/*.h")
# Tạo INTERFACE library (header-only)
add_library(${PROJECT_NAME} INTERFACE)
if(BUILDING_WITH_CATKIN)
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
# Set include directories
target_include_directories(${PROJECT_NAME}
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
# Link dependencies (header-only, chỉ cần include paths)
target_link_libraries(${PROJECT_NAME}
INTERFACE INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> ${catkin_LIBRARIES}
$<INSTALL_INTERFACE:include> )
)
# Liên kết với robot_std_msgs nếu bạn có file Header.h trong include/robot_std_msgs/ else()
target_link_libraries(robot_protocol_msgs INTERFACE)
# --- Cài đặt thư viện vào hệ thống khi chạy make install --- # Set include directories
install(TARGETS robot_protocol_msgs target_include_directories(${PROJECT_NAME}
EXPORT robot_protocol_msgs-targets INTERFACE
INCLUDES DESTINATION include # Cài đặt include $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
) $<INSTALL_INTERFACE:include>
)
# --- Xuất export set robot_costmap_2dTargets thành file CMake module --- # Link dependencies (header-only, chỉ cần include paths)
# --- Tạo file lib/cmake/robot_protocol_msgs/robot_costmap_2dTargets.cmake --- target_link_libraries(${PROJECT_NAME}
# --- File này chứa cấu hình giúp project khác có thể dùng --- INTERFACE
# --- Find_package(robot_protocol_msgs REQUIRED) --- ${PACKAGES_DIR}
# --- Target_link_libraries(my_app PRIVATE robot_protocol_msgs::robot_protocol_msgs) --- )
install(EXPORT robot_protocol_msgs-targets
FILE robot_protocol_msgs-targets.cmake
NAMESPACE robot_protocol_msgs::
DESTINATION lib/cmake/robot_protocol_msgs
)
endif()
if(BUILDING_WITH_CATKIN)
## Mark libraries for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
else()
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
# Export targets
install(EXPORT ${PROJECT_NAME}-targets
FILE ${PROJECT_NAME}-targets.cmake
NAMESPACE ${PROJECT_NAME}::
DESTINATION lib/cmake/${PROJECT_NAME}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION include
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
# ========================================================
# Install CMake Config File for find_package() (Standalone only)
# ========================================================
# Generate config file from template
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
@ONLY
)
# Install config file
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
DESTINATION lib/cmake/${PROJECT_NAME}
)
# Print configuration info
message(STATUS "=================================")
message(STATUS "Project: ${PROJECT_NAME} (Header-Only)")
message(STATUS "Version: ${PROJECT_VERSION}")
message(STATUS "C++ Standard: ${CMAKE_CXX_STANDARD}")
message(STATUS "Headers found:")
foreach(hdr ${HEADERS})
message(STATUS " - ${hdr}")
endforeach()
message(STATUS "Dependencies: robot_std_msgs, robot_geometry_msgs")
message(STATUS "=================================")
endif()

View File

@@ -1,9 +1,9 @@
<package> <package>
<name>utils</name> <name>robot_protocol_msgs</name>
<version>0.7.10</version> <version>0.7.10</version>
<description> <description>
utils is the second generation of the transform library, which lets robot_protocol_msgs is the second generation of the transform library, which lets
the user keep track of multiple coordinate frames over time. utils the user keep track of multiple coordinate frames over time. robot_protocol_msgs
maintains the relationship between coordinate frames in a tree maintains the relationship between coordinate frames in a tree
structure buffered in time, and lets the user transform points, structure buffered in time, and lets the user transform points,
vectors, etc between any two coordinate frames at any desired vectors, etc between any two coordinate frames at any desired
@@ -15,12 +15,12 @@
<maintainer email="tfoote@osrfoundation.org">Tully Foote</maintainer> <maintainer email="tfoote@osrfoundation.org">Tully Foote</maintainer>
<license>BSD</license> <license>BSD</license>
<url type="website">http://www.ros.org/wiki/utils</url> <url type="website">http://www.ros.org/wiki/robot_protocol_msgs</url>
<buildtool_depend version_gte="0.5.68">catkin</buildtool_depend> <buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>
<build_depend>libconsole-bridge-dev</build_depend> <build_depend>robot_std_msgs</build_depend>
<build_depend>robot_geometry_msgs</build_depend>
<run_depend>libconsole-bridge-dev</run_depend> <run_depend>robot_std_msgs</run_depend>
<run_depend>robot_geometry_msgs</run_depend>
</package> </package>

View File

@@ -0,0 +1,20 @@
# robot_protocol_msgsConfig.cmake
# CMake configuration file for robot_protocol_msgs package
# Get the directory containing this file
get_filename_component(robot_protocol_msgs_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
# Include the targets file
include("${robot_protocol_msgs_CMAKE_DIR}/robot_protocol_msgs-targets.cmake")
# Set variables for compatibility
set(robot_protocol_msgs_FOUND TRUE)
set(robot_protocol_msgs_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include")
set(robot_protocol_msgs_LIBRARIES robot_protocol_msgs)
# Check if all required components are available
if(NOT TARGET robot_protocol_msgs)
set(robot_protocol_msgs_FOUND FALSE)
message(FATAL_ERROR "robot_protocol_msgs target not found")
endif()

View File

@@ -1,39 +1,152 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.0.2)
project(robot_sensor_msgs) project(robot_sensor_msgs VERSION 1.0.0 LANGUAGES CXX)
if(DEFINED CATKIN_DEVEL_PREFIX OR DEFINED CATKIN_TOPLEVEL)
set(BUILDING_WITH_CATKIN TRUE)
message(STATUS "Building robot_sensor_msgs with Catkin")
else()
set(BUILDING_WITH_CATKIN FALSE)
message(STATUS "Building robot_sensor_msgs with Standalone CMake")
endif()
# C++ Standard - must be set before find_package
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Thư viện header-only if (NOT BUILDING_WITH_CATKIN)
add_library(robot_sensor_msgs INTERFACE)
# Include path tới thư mục chứa file header # Enable Position Independent Code
target_include_directories(robot_sensor_msgs set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Cấu hình RPATH để tránh cycle trong runtime search path
set(CMAKE_BUILD_RPATH_USE_ORIGIN TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}")
set(PACKAGES_DIR
robot_std_msgs
robot_geometry_msgs
)
else()
# ========================================================
# Catkin specific configuration
# ========================================================
find_package(catkin REQUIRED COMPONENTS
robot_std_msgs
robot_geometry_msgs
)
catkin_package(
INCLUDE_DIRS include
# LIBRARIES không cần vì đây là header-only library
CATKIN_DEPENDS robot_std_msgs robot_geometry_msgs
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
endif()
# Tìm tất cả header files
file(GLOB_RECURSE HEADERS "include/robot_sensor_msgs/*.h")
# Tạo INTERFACE library (header-only)
add_library(${PROJECT_NAME} INTERFACE)
if(BUILDING_WITH_CATKIN)
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
# Set include directories
target_include_directories(${PROJECT_NAME}
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
# Link dependencies (header-only, chỉ cần include paths)
target_link_libraries(${PROJECT_NAME}
INTERFACE INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> ${catkin_LIBRARIES}
$<INSTALL_INTERFACE:include> )
)
# Liên kết với robot_std_msgs nếu bạn có file Header.h trong include/robot_std_msgs/ else()
target_link_libraries(robot_sensor_msgs INTERFACE robot_std_msgs)
# --- Cài đặt thư viện vào hệ thống khi chạy make install --- # Set include directories
install(TARGETS robot_sensor_msgs target_include_directories(${PROJECT_NAME}
EXPORT robot_sensor_msgs-targets INTERFACE
INCLUDES DESTINATION include # Cài đặt include $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
) $<INSTALL_INTERFACE:include>
)
# --- Xuất export set robot_costmap_2dTargets thành file CMake module --- # Link dependencies (header-only, chỉ cần include paths)
# --- Tạo file lib/cmake/robot_sensor_msgs/robot_costmap_2dTargets.cmake --- target_link_libraries(${PROJECT_NAME}
# --- File này chứa cấu hình giúp project khác có thể dùng --- INTERFACE
# --- Find_package(robot_sensor_msgs REQUIRED) --- ${PACKAGES_DIR}
# --- Target_link_libraries(my_app PRIVATE robot_sensor_msgs::robot_sensor_msgs) --- )
install(EXPORT robot_sensor_msgs-targets
FILE robot_sensor_msgs-targets.cmake
NAMESPACE robot_sensor_msgs::
DESTINATION lib/cmake/robot_sensor_msgs
)
# Tạo file test ví dụ endif()
add_executable(test_battery_state test/main.cpp)
target_link_libraries(test_battery_state PRIVATE robot_sensor_msgs) if(BUILDING_WITH_CATKIN)
## Mark libraries for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
else()
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
# Export targets
install(EXPORT ${PROJECT_NAME}-targets
FILE ${PROJECT_NAME}-targets.cmake
NAMESPACE ${PROJECT_NAME}::
DESTINATION lib/cmake/${PROJECT_NAME}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION include
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
# Print configuration info
message(STATUS "=================================")
message(STATUS "Project: ${PROJECT_NAME} (Header-Only)")
message(STATUS "Version: ${PROJECT_VERSION}")
message(STATUS "C++ Standard: ${CMAKE_CXX_STANDARD}")
message(STATUS "Headers found:")
foreach(hdr ${HEADERS})
message(STATUS " - ${hdr}")
endforeach()
message(STATUS "Dependencies: robot_std_msgs, robot_geometry_msgs")
message(STATUS "=================================")
endif()
# # ========================================================
# # Test executables
# # ========================================================
# if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test/main.cpp)
# add_executable(${PROJECT_NAME}_test test/main.cpp)
# target_link_libraries(${PROJECT_NAME}_test PRIVATE ${PROJECT_NAME})
# endif()

View File

@@ -1,66 +1,220 @@
#pragma once // Generated by gencpp from file robot_sensor_msgs/BatteryState.msg
#include "robot_std_msgs/Header.h" // DO NOT EDIT!
#include <cstdint>
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_BATTERYSTATE_H
#define ROBOT_SENSOR_MSGS_MESSAGE_BATTERYSTATE_H
#include <string> #include <string>
#include <vector> #include <vector>
#include <limits> #include <memory>
#include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct BatteryState struct BatteryState_
{ {
// ===== Power supply status constants ===== typedef BatteryState_<ContainerAllocator> Type;
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;
// ===== Power supply health constants ===== BatteryState_()
static constexpr uint8_t POWER_SUPPLY_HEALTH_UNKNOWN = 0; : header()
static constexpr uint8_t POWER_SUPPLY_HEALTH_GOOD = 1; , voltage(0.0)
static constexpr uint8_t POWER_SUPPLY_HEALTH_OVERHEAT = 2; , temperature(0.0)
static constexpr uint8_t POWER_SUPPLY_HEALTH_DEAD = 3; , current(0.0)
static constexpr uint8_t POWER_SUPPLY_HEALTH_OVERVOLTAGE = 4; , charge(0.0)
static constexpr uint8_t POWER_SUPPLY_HEALTH_UNSPEC_FAILURE = 5; , capacity(0.0)
static constexpr uint8_t POWER_SUPPLY_HEALTH_COLD = 6; , design_capacity(0.0)
static constexpr uint8_t POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE = 7; , percentage(0.0)
static constexpr uint8_t POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE = 8; , 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<float>::quiet_NaN(); // [V] typedef ::robot_std_msgs::Header_<ContainerAllocator> _header_type;
float temperature = std::numeric_limits<float>::quiet_NaN(); // [°C] _header_type header;
float current = std::numeric_limits<float>::quiet_NaN(); // [A]
float charge = std::numeric_limits<float>::quiet_NaN(); // [Ah]
float capacity = std::numeric_limits<float>::quiet_NaN(); // [Ah]
float design_capacity = std::numeric_limits<float>::quiet_NaN(); // [Ah]
float percentage = std::numeric_limits<float>::quiet_NaN(); // 0..1
uint8_t power_supply_status = POWER_SUPPLY_STATUS_UNKNOWN; typedef float _voltage_type;
uint8_t power_supply_health = POWER_SUPPLY_HEALTH_UNKNOWN; _voltage_type voltage;
uint8_t power_supply_technology = POWER_SUPPLY_TECHNOLOGY_UNKNOWN;
bool present = false;
std::vector<float> cell_voltage; typedef float _temperature_type;
std::vector<float> cell_temperature; _temperature_type temperature;
std::string location; typedef float _current_type;
std::string serial_number; _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<float, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<float>> _cell_voltage_type;
_cell_voltage_type cell_voltage;
typedef std::vector<float, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<float>> _cell_temperature_type;
_cell_temperature_type cell_temperature;
typedef std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<char>> _location_type;
_location_type location;
typedef std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<char>> _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_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::BatteryState_<ContainerAllocator> const> ConstPtr;
}; // struct BatteryState_
typedef ::robot_sensor_msgs::BatteryState_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::BatteryState_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::BatteryState_<ContainerAllocator2> & rhs)
{ {
return lhs.header == rhs.header && return lhs.header == rhs.header &&
lhs.voltage == rhs.voltage && 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; lhs.serial_number == rhs.serial_number;
} }
inline bool operator!=(const robot_sensor_msgs::BatteryState& lhs, const robot_sensor_msgs::BatteryState& rhs) template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::BatteryState_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::BatteryState_<ContainerAllocator2> & rhs)
{ {
return !(lhs == rhs); return !(lhs == rhs);
} }
} // namespace robot_sensor_msgs
} // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_BATTERYSTATE_H

View File

@@ -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 <string> #include <string>
#include <vector> #include <vector>
#include "robot_std_msgs/Header.h" #include <memory>
#include "robot_sensor_msgs/RegionOfInterest.h" #include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
#include <robot_sensor_msgs/RegionOfInterest.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
struct CameraInfo template <class ContainerAllocator>
struct CameraInfo_
{ {
robot_std_msgs::Header header; // thời gian và frame_id typedef CameraInfo_<ContainerAllocator> Type;
// Calibration parameters CameraInfo_()
uint32_t height = 0; : header()
uint32_t width = 0; , height(0)
std::string distortion_model; , 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_<ContainerAllocator> _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<char, std::char_traits<char>, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<char>> _distortion_model_type;
_distortion_model_type distortion_model;
typedef std::vector<double, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<double>> _D_type;
_D_type D;
typedef boost::array<double, 9> _K_type;
_K_type K;
typedef boost::array<double, 9> _R_type;
_R_type R;
typedef boost::array<double, 12> _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_<ContainerAllocator> _roi_type;
_roi_type roi;
typedef boost::shared_ptr< ::robot_sensor_msgs::CameraInfo_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::CameraInfo_<ContainerAllocator> const> ConstPtr;
}; // struct CameraInfo_
typedef ::robot_sensor_msgs::CameraInfo_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::CameraInfo_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::CameraInfo_<ContainerAllocator2> & 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::CameraInfo_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::CameraInfo_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
std::vector<double> 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 } // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_CAMERAINFO_H

View File

@@ -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 <string> #include <string>
#include <vector> #include <vector>
#include <memory>
#include <boost/shared_ptr.hpp>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
struct ChannelFloat32 template <class ContainerAllocator>
struct ChannelFloat32_
{ {
std::string name; // Tên của channel (vd: "intensity", "rgb", "u", "v") typedef ChannelFloat32_<ContainerAllocator> Type;
std::vector<float> values; // Dữ liệu float32 ứng với từng điểm trong PointCloud
}; ChannelFloat32_()
: name()
, values() {
}
ChannelFloat32_(const ContainerAllocator& _alloc)
: name(_alloc)
, values(_alloc) {
(void)_alloc;
}
typedef std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<char>> _name_type;
_name_type name;
typedef std::vector<float, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<float>> _values_type;
_values_type values;
typedef boost::shared_ptr< ::robot_sensor_msgs::ChannelFloat32_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::ChannelFloat32_<ContainerAllocator> const> ConstPtr;
}; // struct ChannelFloat32_
typedef ::robot_sensor_msgs::ChannelFloat32_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::ChannelFloat32_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::ChannelFloat32_<ContainerAllocator2> & rhs)
{
return lhs.name == rhs.name &&
lhs.values == rhs.values;
}
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::ChannelFloat32_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::ChannelFloat32_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace robot_sensor_msgs } // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_CHANNELFLOAT32_H

View File

@@ -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 <string> #include <string>
#include <vector> #include <vector>
#include "robot_std_msgs/Header.h" #include <memory>
#include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct CompressedImage struct CompressedImage_
{ {
robot_std_msgs::Header header; // Thông tin thời gian & frame_id typedef CompressedImage_<ContainerAllocator> Type;
std::string format; // Định dạng nén (jpeg, png, ...)
CompressedImage_()
: header()
, format()
, data() {
}
CompressedImage_(const ContainerAllocator& _alloc)
: header(_alloc)
, format(_alloc)
, data(_alloc) {
(void)_alloc;
}
typedef ::robot_std_msgs::Header_<ContainerAllocator> _header_type;
_header_type header;
typedef std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<char>> _format_type;
_format_type format;
typedef std::vector<uint8_t, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<uint8_t>> _data_type;
_data_type data;
typedef boost::shared_ptr< ::robot_sensor_msgs::CompressedImage_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::CompressedImage_<ContainerAllocator> const> ConstPtr;
}; // struct CompressedImage_
typedef ::robot_sensor_msgs::CompressedImage_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::CompressedImage_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::CompressedImage_<ContainerAllocator2> & rhs)
{
return lhs.header == rhs.header &&
lhs.format == rhs.format &&
lhs.data == rhs.data;
}
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::CompressedImage_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::CompressedImage_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
// Dữ liệu ảnh nén (binary buffer)
std::vector<uint8_t> data;
};
} // namespace robot_sensor_msgs } // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_COMPRESSEDIMAGE_H

View File

@@ -1,17 +1,81 @@
#pragma once // Generated by gencpp from file robot_sensor_msgs/FluidPressure.msg
#include "robot_std_msgs/Header.h" // DO NOT EDIT!
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_FLUIDPRESSURE_H
#define ROBOT_SENSOR_MSGS_MESSAGE_FLUIDPRESSURE_H
#include <string>
#include <vector>
#include <memory>
#include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct FluidPressure struct FluidPressure_
{ {
robot_std_msgs::Header header; // Thông tin thời gian và khung tọa độ typedef FluidPressure_<ContainerAllocator> Type;
double fluid_pressure; // Áp suất tuyệt đối (đơn vị: Pascal)
double variance; // Phương sai (0 = không xác định) 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_<ContainerAllocator> _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_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::FluidPressure_<ContainerAllocator> const> ConstPtr;
}; // struct FluidPressure_
typedef ::robot_sensor_msgs::FluidPressure_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::FluidPressure_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::FluidPressure_<ContainerAllocator2> & rhs)
{
return lhs.header == rhs.header &&
lhs.fluid_pressure == rhs.fluid_pressure &&
lhs.variance == rhs.variance;
}
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::FluidPressure_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::FluidPressure_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
FluidPressure()
: fluid_pressure(0.0), variance(0.0) {}
};
} // namespace robot_sensor_msgs } // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_FLUIDPRESSURE_H

View File

@@ -1,17 +1,80 @@
#pragma once // Generated by gencpp from file robot_sensor_msgs/Illuminance.msg
#include "robot_std_msgs/Header.h" // DO NOT EDIT!
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_ILLUMINANCE_H
#define ROBOT_SENSOR_MSGS_MESSAGE_ILLUMINANCE_H
#include <string>
#include <vector>
#include <memory>
#include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct Illuminance struct Illuminance_
{ {
robot_std_msgs::Header header; // Thông tin thời gian và khung tọa độ typedef Illuminance_<ContainerAllocator> Type;
double illuminance; // Độ rọi đo được (đơn vị: Lux)
double variance; // Phương sai (0 = không xác định) 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_<ContainerAllocator> _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_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::Illuminance_<ContainerAllocator> const> ConstPtr;
}; // struct Illuminance_
typedef ::robot_sensor_msgs::Illuminance_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::Illuminance_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::Illuminance_<ContainerAllocator2> & rhs)
{
return lhs.header == rhs.header &&
lhs.illuminance == rhs.illuminance &&
lhs.variance == rhs.variance;
}
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::Illuminance_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::Illuminance_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
Illuminance()
: illuminance(0.0), variance(0.0) {}
};
} // namespace robot_sensor_msgs } // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_ILLUMINANCE_H

View File

@@ -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 <string> #include <string>
#include <vector> #include <vector>
#include <cstdint> #include <memory>
#include "robot_std_msgs/Header.h" #include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
struct Image template <class ContainerAllocator>
struct Image_
{ {
robot_std_msgs::Header header; // Thông tin thời gian và frame typedef Image_<ContainerAllocator> Type;
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<uint8_t> data; // Mảng dữ liệu ảnh (kích thước step * height)
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_<ContainerAllocator> _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<char, std::char_traits<char>, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<char>> _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<uint8_t, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<uint8_t>> _data_type;
_data_type data;
typedef boost::shared_ptr< ::robot_sensor_msgs::Image_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::Image_<ContainerAllocator> const> ConstPtr;
}; // struct Image_
typedef ::robot_sensor_msgs::Image_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::Image_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::Image_<ContainerAllocator2> & 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::Image_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::Image_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace robot_sensor_msgs } // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_IMAGE_H

View File

@@ -1,31 +1,366 @@
#pragma once // Generated by gencpp from file robot_sensor_msgs/Imu.msg
#include <array> // DO NOT EDIT!
#include "robot_std_msgs/Header.h"
#include "geometry_msgs/Quaternion.h"
#include "geometry_msgs/Vector3.h" #ifndef ROBOT_SENSOR_MSGS_MESSAGE_IMU_H
#define ROBOT_SENSOR_MSGS_MESSAGE_IMU_H
#include <string>
#include <vector>
#include <memory>
#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 namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct Imu struct Imu_
{ {
robot_std_msgs::Header header; // Thời gian và frame gốc typedef Imu_<ContainerAllocator> Type;
robot_geometry_msgs::Quaternion orientation; // Góc quay (đơn vị: quaternion) Imu_()
std::array<double, 9> orientation_covariance; // Ma trận hiệp phương sai (row-major) : 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) angular_velocity_covariance.assign(0.0);
std::array<double, 9> angular_velocity_covariance; // Ma trận hiệp phương sai
robot_geometry_msgs::Vector3 linear_acceleration; // Gia tốc tuyến tính (m/s^2) linear_acceleration_covariance.assign(0.0);
std::array<double, 9> linear_acceleration_covariance; // Ma trận hiệp phương sai }
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_<ContainerAllocator> _header_type;
_header_type header;
typedef ::robot_geometry_msgs::Quaternion_<ContainerAllocator> _orientation_type;
_orientation_type orientation;
typedef boost::array<double, 9> _orientation_covariance_type;
_orientation_covariance_type orientation_covariance;
typedef ::robot_geometry_msgs::Vector3_<ContainerAllocator> _angular_velocity_type;
_angular_velocity_type angular_velocity;
typedef boost::array<double, 9> _angular_velocity_covariance_type;
_angular_velocity_covariance_type angular_velocity_covariance;
typedef ::robot_geometry_msgs::Vector3_<ContainerAllocator> _linear_acceleration_type;
_linear_acceleration_type linear_acceleration;
typedef boost::array<double, 9> _linear_acceleration_covariance_type;
_linear_acceleration_covariance_type linear_acceleration_covariance;
typedef boost::shared_ptr< ::robot_sensor_msgs::Imu_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::Imu_<ContainerAllocator> const> ConstPtr;
}; // struct Imu_
typedef ::robot_sensor_msgs::Imu_<std::allocator<void> > 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<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)
{
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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::Imu_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::Imu_<ContainerAllocator2> & 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 robot_sensor_msgs
namespace ros
{
namespace message_traits
{
template <class ContainerAllocator>
struct IsMessage< ::robot_sensor_msgs::Imu_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct IsMessage< ::robot_sensor_msgs::Imu_<ContainerAllocator> const>
: TrueType
{ };
template <class ContainerAllocator>
struct IsFixedSize< ::robot_sensor_msgs::Imu_<ContainerAllocator> >
: FalseType
{ };
template <class ContainerAllocator>
struct IsFixedSize< ::robot_sensor_msgs::Imu_<ContainerAllocator> const>
: FalseType
{ };
template <class ContainerAllocator>
struct HasHeader< ::robot_sensor_msgs::Imu_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct HasHeader< ::robot_sensor_msgs::Imu_<ContainerAllocator> const>
: TrueType
{ };
template<class ContainerAllocator>
struct MD5Sum< ::robot_sensor_msgs::Imu_<ContainerAllocator> >
{
static const char* value()
{
return "6a62c6daae103f4ff57a132d6f95cec2";
}
static const char* value(const ::robot_sensor_msgs::Imu_<ContainerAllocator>&) { return value(); }
static const uint64_t static_value1 = 0x6a62c6daae103f4fULL;
static const uint64_t static_value2 = 0xf57a132d6f95cec2ULL;
};
template<class ContainerAllocator>
struct DataType< ::robot_sensor_msgs::Imu_<ContainerAllocator> >
{
static const char* value()
{
return "robot_sensor_msgs/Imu";
}
static const char* value(const ::robot_sensor_msgs::Imu_<ContainerAllocator>&) { return value(); }
};
template<class ContainerAllocator>
struct Definition< ::robot_sensor_msgs::Imu_<ContainerAllocator> >
{
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_<ContainerAllocator>&) { return value(); }
};
} // namespace message_traits
} // namespace ros
namespace ros
{
namespace serialization
{
template<class ContainerAllocator> struct Serializer< ::robot_sensor_msgs::Imu_<ContainerAllocator> >
{
template<typename Stream, typename T> 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<class ContainerAllocator>
struct Printer< ::robot_sensor_msgs::Imu_<ContainerAllocator> >
{
template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::robot_sensor_msgs::Imu_<ContainerAllocator>& v)
{
if (false || !indent.empty())
s << std::endl;
s << indent << "header: ";
Printer< ::robot_std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
if (true || !indent.empty())
s << std::endl;
s << indent << "orientation: ";
Printer< ::robot_geometry_msgs::Quaternion_<ContainerAllocator> >::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<double>::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_<ContainerAllocator> >::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<double>::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_<ContainerAllocator> >::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<double>::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

View File

@@ -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 <string> #include <string>
#include <vector> #include <vector>
#include "robot_std_msgs/Header.h" #include <memory>
#include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct JointState struct JointState_
{ {
robot_std_msgs::Header header; // Thời điểm và frame ghi nhận trạng thái khớp typedef JointState_<ContainerAllocator> Type;
std::vector<std::string> name; // Tên từng khớp JointState_()
std::vector<double> position; // Vị trí (rad hoặc m) : header()
std::vector<double> velocity; // Vận tốc (rad/s hoặc m/s) , name()
std::vector<double> effort; // Mô-men hoặc lực (Nm hoặc N) , position()
, velocity()
, effort() {
}
JointState_(const ContainerAllocator& _alloc)
: header(_alloc)
, name(_alloc)
, position(_alloc)
, velocity(_alloc)
, effort(_alloc) {
(void)_alloc;
}
typedef ::robot_std_msgs::Header_<ContainerAllocator> _header_type;
_header_type header;
typedef std::vector<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<char>>, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<char>>>> _name_type;
_name_type name;
typedef std::vector<double, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<double>> _position_type;
_position_type position;
typedef std::vector<double, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<double>> _velocity_type;
_velocity_type velocity;
typedef std::vector<double, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<double>> _effort_type;
_effort_type effort;
typedef boost::shared_ptr< ::robot_sensor_msgs::JointState_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::JointState_<ContainerAllocator> const> ConstPtr;
}; // struct JointState_
typedef ::robot_sensor_msgs::JointState_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::JointState_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::JointState_<ContainerAllocator2> & rhs)
{
return lhs.header == rhs.header &&
lhs.name == rhs.name &&
lhs.position == rhs.position &&
lhs.velocity == rhs.velocity &&
lhs.effort == rhs.effort;
}
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::JointState_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::JointState_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
JointState() = default;
};
} // namespace robot_sensor_msgs } // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_JOINTSTATE_H

View File

@@ -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 <string>
#include <vector> #include <vector>
#include "robot_std_msgs/Header.h" #include <memory>
#include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct Joy struct Joy_
{ {
robot_std_msgs::Header header; // Thời điểm nhận dữ liệu từ joystick typedef Joy_<ContainerAllocator> Type;
std::vector<float> axes; // Các giá trị trục analog (ví dụ: X, Y, Z, throttle, ...)
std::vector<int32_t> buttons; // Trạng thái nút bấm (0 = nhả, 1 = nhấn) Joy_()
: header()
, axes()
, buttons() {
}
Joy_(const ContainerAllocator& _alloc)
: header(_alloc)
, axes(_alloc)
, buttons(_alloc) {
(void)_alloc;
}
typedef ::robot_std_msgs::Header_<ContainerAllocator> _header_type;
_header_type header;
typedef std::vector<float, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<float>> _axes_type;
_axes_type axes;
typedef std::vector<int32_t, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<int32_t>> _buttons_type;
_buttons_type buttons;
typedef boost::shared_ptr< ::robot_sensor_msgs::Joy_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::Joy_<ContainerAllocator> const> ConstPtr;
}; // struct Joy_
typedef ::robot_sensor_msgs::Joy_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::Joy_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::Joy_<ContainerAllocator2> & rhs)
{
return lhs.header == rhs.header &&
lhs.axes == rhs.axes &&
lhs.buttons == rhs.buttons;
}
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::Joy_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::Joy_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
Joy() = default;
};
} // namespace robot_sensor_msgs } // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_JOY_H

View File

@@ -1,24 +1,94 @@
#ifndef JOY_FEEDBACK_H // Generated by gencpp from file robot_sensor_msgs/JoyFeedback.msg
#define JOY_FEEDBACK_H // DO NOT EDIT!
#include <cstdint>
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_JOYFEEDBACK_H
#define ROBOT_SENSOR_MSGS_MESSAGE_JOYFEEDBACK_H
#include <string>
#include <vector>
#include <memory>
#include <boost/shared_ptr.hpp>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct JoyFeedback struct JoyFeedback_
{ {
// Declare of the type of feedback typedef JoyFeedback_<ContainerAllocator> Type;
static constexpr uint8_t TYPE_LED = 0;
static constexpr uint8_t TYPE_RUMBLE = 1;
static constexpr uint8_t TYPE_BUZZER = 2;
uint8_t type; // Loại feedback JoyFeedback_()
uint8_t id; // ID của từng loại feedback : type(0)
float intensity; // Cường độ (0.0 - 1.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_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::JoyFeedback_<ContainerAllocator> const> ConstPtr;
}; // struct JoyFeedback_
typedef ::robot_sensor_msgs::JoyFeedback_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::JoyFeedback_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::JoyFeedback_<ContainerAllocator2> & rhs)
{
return lhs.type == rhs.type &&
lhs.id == rhs.id &&
lhs.intensity == rhs.intensity;
}
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::JoyFeedback_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::JoyFeedback_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
} }
#endif // JOY_FEEDBACK_H
} // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_JOYFEEDBACK_H

View File

@@ -1,16 +1,67 @@
#ifndef JOY_FEEDBACK_ARRAY_H // Generated by gencpp from file robot_sensor_msgs/JoyFeedbackArray.msg
#define JOY_FEEDBACK_ARRAY_H // DO NOT EDIT!
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_JOYFEEDBACKARRAY_H
#define ROBOT_SENSOR_MSGS_MESSAGE_JOYFEEDBACKARRAY_H
#include <string>
#include <vector> #include <vector>
#include "robot_sensor_msgs/JoyFeedback.h" #include <memory>
#include <boost/shared_ptr.hpp>
#include <robot_sensor_msgs/JoyFeedback.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct JoyFeedbackArray struct JoyFeedbackArray_
{ {
std::vector<JoyFeedback> array; // Danh sách các feedback typedef JoyFeedbackArray_<ContainerAllocator> Type;
};
JoyFeedbackArray_()
: array() {
}
JoyFeedbackArray_(const ContainerAllocator& _alloc)
: array(_alloc) {
(void)_alloc;
}
typedef std::vector< ::robot_sensor_msgs::JoyFeedback_<ContainerAllocator> , typename std::allocator_traits<ContainerAllocator>::template rebind_alloc< ::robot_sensor_msgs::JoyFeedback_<ContainerAllocator> >> _array_type;
_array_type array;
typedef boost::shared_ptr< ::robot_sensor_msgs::JoyFeedbackArray_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::JoyFeedbackArray_<ContainerAllocator> const> ConstPtr;
}; // struct JoyFeedbackArray_
typedef ::robot_sensor_msgs::JoyFeedbackArray_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::JoyFeedbackArray_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::JoyFeedbackArray_<ContainerAllocator2> & rhs)
{
return lhs.array == rhs.array;
}
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::JoyFeedbackArray_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::JoyFeedbackArray_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace robot_sensor_msgs } // namespace robot_sensor_msgs
#endif // JOY_FEEDBACK_ARRAY_H
#endif // ROBOT_SENSOR_MSGS_MESSAGE_JOYFEEDBACKARRAY_H

View File

@@ -1,16 +1,65 @@
#ifndef LASER_ECHO_H // Generated by gencpp from file robot_sensor_msgs/LaserEcho.msg
#define LASER_ECHO_H // DO NOT EDIT!
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_LASERECHO_H
#define ROBOT_SENSOR_MSGS_MESSAGE_LASERECHO_H
#include <string>
#include <vector> #include <vector>
#include <memory>
#include <boost/shared_ptr.hpp>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct LaserEcho struct LaserEcho_
{ {
// Mảng chứa nhiều giá trị đo (range hoặc intensity) typedef LaserEcho_<ContainerAllocator> Type;
// Tất cả đều thuộc cùng một góc quét
std::vector<float> echoes;
};
LaserEcho_()
: echoes() {
}
LaserEcho_(const ContainerAllocator& _alloc)
: echoes(_alloc) {
(void)_alloc;
}
typedef std::vector<float, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<float>> _echoes_type;
_echoes_type echoes;
typedef boost::shared_ptr< ::robot_sensor_msgs::LaserEcho_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::LaserEcho_<ContainerAllocator> const> ConstPtr;
}; // struct LaserEcho_
typedef ::robot_sensor_msgs::LaserEcho_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::LaserEcho_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::LaserEcho_<ContainerAllocator2> & rhs)
{
return lhs.echoes == rhs.echoes;
} }
#endif // LASER_ECHO_H
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::LaserEcho_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::LaserEcho_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_LASERECHO_H

View File

@@ -1,34 +1,120 @@
#ifndef LASER_SCAN_H // Generated by gencpp from file robot_sensor_msgs/LaserScan.msg
#define LASER_SCAN_H // DO NOT EDIT!
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_LASERSCAN_H
#define ROBOT_SENSOR_MSGS_MESSAGE_LASERSCAN_H
#include <string>
#include <vector> #include <vector>
#include "robot_std_msgs/Header.h" #include <memory>
#include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct LaserScan struct LaserScan_
{ {
robot_std_msgs::Header header; // Thời gian và frame của phép đo typedef LaserScan_<ContainerAllocator> Type;
// Góc bắt đầu và kết thúc của tia quét [rad] LaserScan_()
float angle_min = 0.0f; : header()
float angle_max = 0.0f; , angle_min(0.0)
float angle_increment = 0.0f; // Khoảng cách góc giữa hai tia quét liên tiếp [rad] , 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 typedef ::robot_std_msgs::Header_<ContainerAllocator> _header_type;
std::vector<float> ranges; // Dữ liệu khoảng cách [m] _header_type header;
std::vector<float> intensities; // Cường độ phản xạ (đơn vị phụ thuộc thiết bị)
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<float, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<float>> _ranges_type;
_ranges_type ranges;
typedef std::vector<float, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<float>> _intensities_type;
_intensities_type intensities;
typedef boost::shared_ptr< ::robot_sensor_msgs::LaserScan_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::LaserScan_<ContainerAllocator> const> ConstPtr;
}; // struct LaserScan_
typedef ::robot_sensor_msgs::LaserScan_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::LaserScan_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::LaserScan_<ContainerAllocator2> & 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::LaserScan_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::LaserScan_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_LASERSCAN_H

View File

@@ -1,32 +1,122 @@
#ifndef MULTI_ECHO_LASER_SCAN_H // Generated by gencpp from file robot_sensor_msgs/MultiEchoLaserScan.msg
#define MULTI_ECHO_LASER_SCAN_H // DO NOT EDIT!
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_MULTIECHOLASERSCAN_H
#define ROBOT_SENSOR_MSGS_MESSAGE_MULTIECHOLASERSCAN_H
#include <string>
#include <vector> #include <vector>
#include "robot_std_msgs/Header.h" #include <memory>
#include "robot_sensor_msgs/LaserEcho.h" // Định nghĩa struct LaserEcho (float32[] echoes) #include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
#include <robot_sensor_msgs/LaserEcho.h>
#include <robot_sensor_msgs/LaserEcho.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct MultiEchoLaserScan struct MultiEchoLaserScan_
{ {
robot_std_msgs::Header header; // Thông tin thời gian & frame của phép đo typedef MultiEchoLaserScan_<ContainerAllocator> Type;
float angle_min = 0.0f; // Góc bắt đầu quét (radians) MultiEchoLaserScan_()
float angle_max = 0.0f; // Góc kết thúc quét (radians) : header()
float angle_increment = 0.0f; // Độ tăng góc giữa 2 tia liên tiếp (radians) , 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<LaserEcho> ranges; // Dữ liệu khoảng cách (m) typedef ::robot_std_msgs::Header_<ContainerAllocator> _header_type;
std::vector<LaserEcho> intensities; // Dữ liệu cường độ (tùy chọn) _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_<ContainerAllocator> , typename std::allocator_traits<ContainerAllocator>::template rebind_alloc< ::robot_sensor_msgs::LaserEcho_<ContainerAllocator> >> _ranges_type;
_ranges_type ranges;
typedef std::vector< ::robot_sensor_msgs::LaserEcho_<ContainerAllocator> , typename std::allocator_traits<ContainerAllocator>::template rebind_alloc< ::robot_sensor_msgs::LaserEcho_<ContainerAllocator> >> _intensities_type;
_intensities_type intensities;
typedef boost::shared_ptr< ::robot_sensor_msgs::MultiEchoLaserScan_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::MultiEchoLaserScan_<ContainerAllocator> const> ConstPtr;
}; // struct MultiEchoLaserScan_
typedef ::robot_sensor_msgs::MultiEchoLaserScan_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::MultiEchoLaserScan_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::MultiEchoLaserScan_<ContainerAllocator2> & 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::MultiEchoLaserScan_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::MultiEchoLaserScan_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_MULTIECHOLASERSCAN_H

View File

@@ -1,24 +1,81 @@
#ifndef POINTCLOUD_H // Generated by gencpp from file robot_sensor_msgs/PointCloud.msg
#define POINTCLOUD_H // DO NOT EDIT!
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_POINTCLOUD_H
#define ROBOT_SENSOR_MSGS_MESSAGE_POINTCLOUD_H
#include <vector>
#include <string> #include <string>
#include "robot_std_msgs/Header.h" #include <vector>
#include "robot_geometry_msgs/Point32.h" #include <memory>
#include "robot_sensor_msgs/ChannelFloat32.h" #include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
#include <robot_geometry_msgs/Point32.h>
#include <robot_sensor_msgs/ChannelFloat32.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct PointCloud struct PointCloud_
{ {
robot_std_msgs::Header header; // Thông tin thời gian & frame của dữ liệu typedef PointCloud_<ContainerAllocator> Type;
std::vector<robot_geometry_msgs::Point32> points; // Danh sách các điểm 3D (x, y, z) PointCloud_()
std::vector<ChannelFloat32> channels; // Dữ liệu phụ đi kèm (vd: "intensity", "rgb") : header()
, points()
, channels() {
}
PointCloud_(const ContainerAllocator& _alloc)
: header(_alloc)
, points(_alloc)
, channels(_alloc) {
(void)_alloc;
}
PointCloud() = default;
};
typedef ::robot_std_msgs::Header_<ContainerAllocator> _header_type;
_header_type header;
typedef std::vector< ::robot_geometry_msgs::Point32_<ContainerAllocator> , typename std::allocator_traits<ContainerAllocator>::template rebind_alloc< ::robot_geometry_msgs::Point32_<ContainerAllocator> >> _points_type;
_points_type points;
typedef std::vector< ::robot_sensor_msgs::ChannelFloat32_<ContainerAllocator> , typename std::allocator_traits<ContainerAllocator>::template rebind_alloc< ::robot_sensor_msgs::ChannelFloat32_<ContainerAllocator> >> _channels_type;
_channels_type channels;
typedef boost::shared_ptr< ::robot_sensor_msgs::PointCloud_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::PointCloud_<ContainerAllocator> const> ConstPtr;
}; // struct PointCloud_
typedef ::robot_sensor_msgs::PointCloud_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::PointCloud_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::PointCloud_<ContainerAllocator2> & rhs)
{
return lhs.header == rhs.header &&
lhs.points == rhs.points &&
lhs.channels == rhs.channels;
} }
#endif // POINTCLOUD_H
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::PointCloud_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::PointCloud_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_POINTCLOUD_H

View File

@@ -1,34 +1,118 @@
#ifndef POINTCLOUD2_H // Generated by gencpp from file robot_sensor_msgs/PointCloud2.msg
#define POINTCLOUD2_H // DO NOT EDIT!
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_POINTCLOUD2_H
#define ROBOT_SENSOR_MSGS_MESSAGE_POINTCLOUD2_H
#include <cstdint>
#include <string> #include <string>
#include <vector> #include <vector>
#include "robot_std_msgs/Header.h" #include <memory>
#include "robot_sensor_msgs/PointField.h" #include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
#include <robot_sensor_msgs/PointField.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct PointCloud2 struct PointCloud2_
{ {
robot_std_msgs::Header header; // Thời gian và frame của dữ liệu typedef PointCloud2_<ContainerAllocator> Type;
uint32_t height = 1; // Số hàng (1 nếu là point cloud 1D) PointCloud2_()
uint32_t width = 0; // Số lượng điểm trên mỗi hàng (tổng điểm = height * width) : 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<PointField> 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<uint8_t> data; // Dữ liệu nhị phân (raw bytes), kích thước = row_step * height typedef ::robot_std_msgs::Header_<ContainerAllocator> _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_<ContainerAllocator> , typename std::allocator_traits<ContainerAllocator>::template rebind_alloc< ::robot_sensor_msgs::PointField_<ContainerAllocator> >> _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<uint8_t, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<uint8_t>> _data_type;
_data_type data;
typedef uint8_t _is_dense_type;
_is_dense_type is_dense;
typedef boost::shared_ptr< ::robot_sensor_msgs::PointCloud2_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::PointCloud2_<ContainerAllocator> const> ConstPtr;
}; // struct PointCloud2_
typedef ::robot_sensor_msgs::PointCloud2_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::PointCloud2_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::PointCloud2_<ContainerAllocator2> & 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::PointCloud2_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::PointCloud2_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_POINTCLOUD2_H

View File

@@ -1,31 +1,122 @@
#ifndef POINTFIELD_H // Generated by gencpp from file robot_sensor_msgs/PointField.msg
#define POINTFIELD_H // DO NOT EDIT!
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_POINTFIELD_H
#define ROBOT_SENSOR_MSGS_MESSAGE_POINTFIELD_H
#include <cstdint>
#include <string> #include <string>
#include <vector>
#include <memory>
#include <boost/shared_ptr.hpp>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct PointField struct PointField_
{ {
// Các hằng số kiểu dữ liệu (theo chuẩn ROS) typedef PointField_<ContainerAllocator> Type;
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;
std::string name; // Tên trường (vd: "x", "y", "z", "intensity") PointField_()
uint32_t offset = 0; // Vị trí byte bắt đầu trong cấu trúc mỗi điểm : name()
uint8_t datatype = 0; // Kiểu dữ liệu (sử dụng các hằng ở trên) , offset(0)
uint32_t count = 0; // Số phần tử trong trường (vd: 3 cho vector3) , datatype(0)
, count(0) {
}
PointField_(const ContainerAllocator& _alloc)
: name(_alloc)
, offset(0)
, datatype(0)
, count(0) {
(void)_alloc;
}
PointField() = default;
};
typedef std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<char>> _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_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::PointField_<ContainerAllocator> const> ConstPtr;
}; // struct PointField_
typedef ::robot_sensor_msgs::PointField_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::PointField_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::PointField_<ContainerAllocator2> & rhs)
{
return lhs.name == rhs.name &&
lhs.offset == rhs.offset &&
lhs.datatype == rhs.datatype &&
lhs.count == rhs.count;
} }
#endif // POINTFIELD_H
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::PointField_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::PointField_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_POINTFIELD_H

View File

@@ -1,28 +1,108 @@
#ifndef RANGE_H // Generated by gencpp from file robot_sensor_msgs/Range.msg
#define RANGE_H // DO NOT EDIT!
#include <cstdint>
#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 <string>
#include <vector>
#include <memory>
#include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct Range struct Range_
{ {
// Các hằng số loại bức xạ (radiation type) typedef Range_<ContainerAllocator> Type;
static constexpr uint8_t ULTRASOUND = 0;
static constexpr uint8_t INFRARED = 1;
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_<ContainerAllocator> _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_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::Range_<ContainerAllocator> const> ConstPtr;
}; // struct Range_
typedef ::robot_sensor_msgs::Range_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::Range_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::Range_<ContainerAllocator2> & 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::Range_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::Range_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_RANGE_H

View File

@@ -1,21 +1,89 @@
#ifndef REGION_OF_INTEREST_H // Generated by gencpp from file robot_sensor_msgs/RegionOfInterest.msg
#define REGION_OF_INTEREST_H // DO NOT EDIT!
#include <cstdint>
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_REGIONOFINTEREST_H
#define ROBOT_SENSOR_MSGS_MESSAGE_REGIONOFINTEREST_H
#include <string>
#include <vector>
#include <memory>
#include <boost/shared_ptr.hpp>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct RegionOfInterest struct RegionOfInterest_
{ {
uint32_t x_offset = 0; // Pixel ngoài cùng bên trái của ROI typedef RegionOfInterest_<ContainerAllocator> Type;
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
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_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::RegionOfInterest_<ContainerAllocator> const> ConstPtr;
}; // struct RegionOfInterest_
typedef ::robot_sensor_msgs::RegionOfInterest_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::RegionOfInterest_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::RegionOfInterest_<ContainerAllocator2> & 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::RegionOfInterest_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::RegionOfInterest_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_REGIONOFINTEREST_H

View File

@@ -1,19 +1,78 @@
#ifndef RELATIVE_HUMIDITY_H // Generated by gencpp from file robot_sensor_msgs/RelativeHumidity.msg
#define RELATIVE_HUMIDITY_H // DO NOT EDIT!
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_RELATIVEHUMIDITY_H
#define ROBOT_SENSOR_MSGS_MESSAGE_RELATIVEHUMIDITY_H
#include <string>
#include <vector>
#include <memory>
#include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
#include <cstdint>
#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 namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct RelativeHumidity struct RelativeHumidity_
{ {
Header header; // Thời điểm đo và khung tọa độ cảm biến typedef RelativeHumidity_<ContainerAllocator> Type;
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"
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_<ContainerAllocator> _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_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::RelativeHumidity_<ContainerAllocator> const> ConstPtr;
}; // struct RelativeHumidity_
typedef ::robot_sensor_msgs::RelativeHumidity_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::RelativeHumidity_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::RelativeHumidity_<ContainerAllocator2> & rhs)
{
return lhs.header == rhs.header &&
lhs.relative_humidity == rhs.relative_humidity &&
lhs.variance == rhs.variance;
} }
#endif // RELATIVE_HUMIDITY_H
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::RelativeHumidity_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::RelativeHumidity_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_RELATIVEHUMIDITY_H

View File

@@ -1,19 +1,80 @@
#ifndef TEMPERATURE_H // Generated by gencpp from file robot_sensor_msgs/Temperature.msg
#define TEMPERATURE_H // DO NOT EDIT!
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_TEMPERATURE_H
#define ROBOT_SENSOR_MSGS_MESSAGE_TEMPERATURE_H
#include <string>
#include <vector>
#include <memory>
#include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
#include <cstdint>
#include "robot_std_msgs/Header.h" // Định nghĩa struct Header tương tự robot_std_msgs/Header
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct Temperature struct Temperature_
{ {
Header header; // Thông tin thời gian và vị trí cảm biến typedef Temperature_<ContainerAllocator> Type;
double temperature = 0.0; // Nhiệt độ đo được (°C)
double variance = 0.0; // Phương sai, 0 nghĩa là "không biết"
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_<ContainerAllocator> _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_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::Temperature_<ContainerAllocator> const> ConstPtr;
}; // struct Temperature_
typedef ::robot_sensor_msgs::Temperature_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::Temperature_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::Temperature_<ContainerAllocator2> & rhs)
{
return lhs.header == rhs.header &&
lhs.temperature == rhs.temperature &&
lhs.variance == rhs.variance;
} }
#endif // TEMPERATURE_H
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::Temperature_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::Temperature_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_TEMPERATURE_H

View File

@@ -1,20 +1,78 @@
#ifndef TIMEREFERENCE_H // Generated by gencpp from file robot_sensor_msgs/TimeReference.msg
#define TIMEREFERENCE_H // DO NOT EDIT!
#ifndef ROBOT_SENSOR_MSGS_MESSAGE_TIMEREFERENCE_H
#define ROBOT_SENSOR_MSGS_MESSAGE_TIMEREFERENCE_H
#include <string> #include <string>
#include "robot_std_msgs/Header.h" // Định nghĩa struct Header tương tự robot_std_msgs/Header #include <vector>
#include <memory>
#include <boost/shared_ptr.hpp>
#include <robot_std_msgs/Header.h>
namespace robot_sensor_msgs namespace robot_sensor_msgs
{ {
template <class ContainerAllocator>
struct TimeReference struct TimeReference_
{ {
Header header; // stamp: thời điểm đo (theo đồng hồ hệ thống) typedef TimeReference_<ContainerAllocator> Type;
// 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)
TimeReference() = default; TimeReference_()
}; : header()
, time_ref()
, source() {
}
TimeReference_(const ContainerAllocator& _alloc)
: header(_alloc)
, time_ref()
, source(_alloc) {
(void)_alloc;
}
typedef ::robot_std_msgs::Header_<ContainerAllocator> _header_type;
_header_type header;
typedef ros::Time _time_ref_type;
_time_ref_type time_ref;
typedef std::basic_string<char, std::char_traits<char>, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<char>> _source_type;
_source_type source;
typedef boost::shared_ptr< ::robot_sensor_msgs::TimeReference_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::robot_sensor_msgs::TimeReference_<ContainerAllocator> const> ConstPtr;
}; // struct TimeReference_
typedef ::robot_sensor_msgs::TimeReference_<std::allocator<void> > 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<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::robot_sensor_msgs::TimeReference_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::TimeReference_<ContainerAllocator2> & rhs)
{
return lhs.header == rhs.header &&
lhs.time_ref == rhs.time_ref &&
lhs.source == rhs.source;
} }
#endif // TIMEREFERENCE_H
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::robot_sensor_msgs::TimeReference_<ContainerAllocator1> & lhs, const ::robot_sensor_msgs::TimeReference_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace robot_sensor_msgs
#endif // ROBOT_SENSOR_MSGS_MESSAGE_TIMEREFERENCE_H

View File

@@ -33,8 +33,8 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*********************************************************************/ *********************************************************************/
#ifndef SENSOR_MSGS_DISTORTION_MODELS_H #ifndef ROBOT_SENSOR_MSGS_DISTORTION_MODELS_H
#define SENSOR_MSGS_DISTORTION_MODELS_H #define ROBOT_SENSOR_MSGS_DISTORTION_MODELS_H
#include <string> #include <string>

View File

@@ -32,8 +32,8 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*********************************************************************/ *********************************************************************/
#ifndef FILLIMAGE_HH #ifndef ROBOT_FILLIMAGE_HH
#define FILLIMAGE_HH #define ROBOT_FILLIMAGE_HH
#include "robot_sensor_msgs/Image.h" #include "robot_sensor_msgs/Image.h"
#include "robot_sensor_msgs/image_encodings.h" #include "robot_sensor_msgs/image_encodings.h"

View File

@@ -33,8 +33,8 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*********************************************************************/ *********************************************************************/
#ifndef SENSOR_MSGS_IMAGE_ENCODINGS_H #ifndef ROBOT_SENSOR_MSGS_IMAGE_ENCODINGS_H
#define SENSOR_MSGS_IMAGE_ENCODINGS_H #define ROBOT_SENSOR_MSGS_IMAGE_ENCODINGS_H
#include <cstdlib> #include <cstdlib>
#include <stdexcept> #include <stdexcept>

View File

@@ -32,8 +32,8 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef SENSOR_MSGS_POINT_CLOUD2_ITERATOR_H #ifndef ROBOT_SENSOR_MSGS_POINT_CLOUD2_ITERATOR_H
#define SENSOR_MSGS_POINT_CLOUD2_ITERATOR_H #define ROBOT_SENSOR_MSGS_POINT_CLOUD2_ITERATOR_H
#include <robot_sensor_msgs/PointCloud2.h> #include <robot_sensor_msgs/PointCloud2.h>
#include <cstdarg> #include <cstdarg>
@@ -299,4 +299,4 @@ public:
#include <robot_sensor_msgs/impl/point_cloud2_iterator.h> #include <robot_sensor_msgs/impl/point_cloud2_iterator.h>
#endif// SENSOR_MSGS_POINT_CLOUD2_ITERATOR_H #endif// ROBOT_SENSOR_MSGS_POINT_CLOUD2_ITERATOR_H

View File

@@ -35,8 +35,8 @@
* *
*/ */
#ifndef SENSOR_MSGS_POINT_CLOUD_CONVERSION_H #ifndef ROBOT_SENSOR_MSGS_POINT_CLOUD_CONVERSION_H
#define SENSOR_MSGS_POINT_CLOUD_CONVERSION_H #define ROBOT_SENSOR_MSGS_POINT_CLOUD_CONVERSION_H
#include <robot_sensor_msgs/PointCloud.h> #include <robot_sensor_msgs/PointCloud.h>
#include <robot_sensor_msgs/PointCloud2.h> #include <robot_sensor_msgs/PointCloud2.h>
@@ -166,4 +166,4 @@ static inline bool convertPointCloud2ToPointCloud (const robot_sensor_msgs::Poin
return (true); return (true);
} }
} }
#endif// SENSOR_MSGS_POINT_CLOUD_CONVERSION_H #endif// ROBOT_SENSOR_MSGS_POINT_CLOUD_CONVERSION_H

View File

@@ -43,8 +43,8 @@
* Authors: Sebastian Pütz <spuetz@uni-osnabrueck.de> * Authors: Sebastian Pütz <spuetz@uni-osnabrueck.de>
*/ */
#ifndef SENSOR_MSGS_POINT_FIELD_CONVERSION_H #ifndef ROBOT_SENSOR_MSGS_POINT_FIELD_CONVERSION_H
#define 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 * \brief This file provides a type to enum mapping for the different

View File

@@ -19,8 +19,9 @@
<buildtool_depend version_gte="0.5.68">catkin</buildtool_depend> <buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>
<build_depend>libconsole-bridge-dev</build_depend> <build_depend>robot_std_msgs</build_depend>
<build_depend>robot_geometry_msgs</build_depend>
<run_depend>libconsole-bridge-dev</run_depend> <run_depend>robot_std_msgs</run_depend>
<run_depend>robot_geometry_msgs</run_depend>
</package> </package>

View File

@@ -1,32 +1,142 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.0.2)
project(robot_std_msgs) project(robot_std_msgs VERSION 1.0.0 LANGUAGES CXX)
if(DEFINED CATKIN_DEVEL_PREFIX OR DEFINED CATKIN_TOPLEVEL)
set(BUILDING_WITH_CATKIN TRUE)
message(STATUS "Building robot_std_msgs with Catkin")
else()
set(BUILDING_WITH_CATKIN FALSE)
message(STATUS "Building robot_std_msgs with Standalone CMake")
endif()
# C++ Standard - must be set before find_package
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_library(robot_std_msgs INTERFACE) if (NOT BUILDING_WITH_CATKIN)
target_include_directories(robot_std_msgs # Enable Position Independent Code
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Cấu hình RPATH để tránh cycle trong runtime search path
set(CMAKE_BUILD_RPATH_USE_ORIGIN TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}")
set(PACKAGES_DIR
robot_time
)
else()
# ========================================================
# Catkin specific configuration
# ========================================================
find_package(catkin REQUIRED COMPONENTS
robot_time
)
catkin_package(
INCLUDE_DIRS include
# LIBRARIES không cần vì đây là header-only library
CATKIN_DEPENDS robot_time
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
endif()
# Tìm tất cả header files
file(GLOB_RECURSE HEADERS "include/robot_std_msgs/*.h")
# Tạo INTERFACE library (header-only)
add_library(${PROJECT_NAME} INTERFACE)
if(BUILDING_WITH_CATKIN)
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
# Set include directories
target_include_directories(${PROJECT_NAME}
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
# Link dependencies (header-only, chỉ cần include paths)
target_link_libraries(${PROJECT_NAME}
INTERFACE INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> ${catkin_LIBRARIES}
$<INSTALL_INTERFACE:include> )
)
target_link_libraries(robot_std_msgs INTERFACE robot_time) else()
# --- Cài đặt thư viện vào hệ thống khi chạy make install --- # Set include directories
install(TARGETS robot_std_msgs target_include_directories(${PROJECT_NAME}
EXPORT robot_std_msgs-targets INTERFACE
INCLUDES DESTINATION include # Cài đặt include $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
) $<INSTALL_INTERFACE:include>
)
# --- Xuất export set robot_std_msgs-targets thành file CMake module --- # Link dependencies (header-only, chỉ cần include paths)
# --- Tạo file lib/cmake/robot_std_msgs/robot_std_msgs-targets.cmake --- target_link_libraries(${PROJECT_NAME}
# --- File này chứa cấu hình giúp project khác có thể dùng --- INTERFACE
# --- Find_package(robot_std_msgs REQUIRED) --- ${PACKAGES_DIR}
# --- Target_link_libraries(my_app PRIVATE robot_std_msgs::robot_std_msgs) --- )
install(EXPORT robot_std_msgs-targets
FILE robot_std_msgs-targets.cmake endif()
NAMESPACE robot_std_msgs::
DESTINATION lib/cmake/robot_std_msgs if(BUILDING_WITH_CATKIN)
) ## Mark libraries for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
else()
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
# Export targets
install(EXPORT ${PROJECT_NAME}-targets
FILE ${PROJECT_NAME}-targets.cmake
NAMESPACE ${PROJECT_NAME}::
DESTINATION lib/cmake/${PROJECT_NAME}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION include
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
# Print configuration info
message(STATUS "=================================")
message(STATUS "Project: ${PROJECT_NAME} (Header-Only)")
message(STATUS "Version: ${PROJECT_VERSION}")
message(STATUS "C++ Standard: ${CMAKE_CXX_STANDARD}")
message(STATUS "Headers found:")
foreach(hdr ${HEADERS})
message(STATUS " - ${hdr}")
endforeach()
message(STATUS "Dependencies: robot_time")
message(STATUS "=================================")
endif()

View File

@@ -10,7 +10,7 @@
#include <vector> #include <vector>
#include <memory> #include <memory>
#include <robot/duration.h> #include <robot/robot.h>
namespace robot_std_msgs namespace robot_std_msgs
{ {

View File

@@ -8,7 +8,7 @@
#include <vector> #include <vector>
#include <memory> #include <memory>
#include <robot/time.h> #include <robot/robot.h>
namespace robot_std_msgs namespace robot_std_msgs
{ {

View File

@@ -19,8 +19,8 @@
<buildtool_depend version_gte="0.5.68">catkin</buildtool_depend> <buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>
<build_depend>libconsole-bridge-dev</build_depend> <build_depend>robot_time</build_depend>
<run_depend>libconsole-bridge-dev</run_depend> <run_depend>robot_time</run_depend>
</package> </package>

View File

@@ -1,35 +1,142 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.0.2)
project(robot_visualization_msgs) project(robot_visualization_msgs VERSION 1.0.0 LANGUAGES CXX)
if(DEFINED CATKIN_DEVEL_PREFIX OR DEFINED CATKIN_TOPLEVEL)
set(BUILDING_WITH_CATKIN TRUE)
message(STATUS "Building robot_visualization_msgs with Catkin")
else()
set(BUILDING_WITH_CATKIN FALSE)
message(STATUS "Building robot_visualization_msgs with Standalone CMake")
endif()
# C++ Standard - must be set before find_package
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Thư viện header-only if (NOT BUILDING_WITH_CATKIN)
add_library(robot_visualization_msgs INTERFACE)
# Include path tới thư mục chứa file header # Enable Position Independent Code
target_include_directories(robot_visualization_msgs set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Cấu hình RPATH để tránh cycle trong runtime search path
set(CMAKE_BUILD_RPATH_USE_ORIGIN TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}")
set(PACKAGES_DIR
robot_std_msgs
)
else()
# ========================================================
# Catkin specific configuration
# ========================================================
find_package(catkin REQUIRED COMPONENTS
robot_std_msgs
)
catkin_package(
INCLUDE_DIRS include
# LIBRARIES không cần vì đây là header-only library
CATKIN_DEPENDS robot_std_msgs
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
endif()
# Tìm tất cả header files
file(GLOB_RECURSE HEADERS "include/robot_visualization_msgs/*.h")
# Tạo INTERFACE library (header-only)
add_library(${PROJECT_NAME} INTERFACE)
if(BUILDING_WITH_CATKIN)
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
# Set include directories
target_include_directories(${PROJECT_NAME}
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
# Link dependencies (header-only, chỉ cần include paths)
target_link_libraries(${PROJECT_NAME}
INTERFACE INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> ${catkin_LIBRARIES}
$<INSTALL_INTERFACE:include> )
)
# Liên kết với robot_std_msgs nếu bạn có file Header.h trong include/robot_std_msgs/ else()
target_link_libraries(robot_visualization_msgs INTERFACE robot_std_msgs)
# --- Cài đặt thư viện vào hệ thống khi chạy make install --- # Set include directories
install(TARGETS robot_visualization_msgs target_include_directories(${PROJECT_NAME}
EXPORT robot_visualization_msgs-targets INTERFACE
INCLUDES DESTINATION include # Cài đặt include $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
) $<INSTALL_INTERFACE:include>
)
# --- Xuất export set robot_costmap_2dTargets thành file CMake module --- # Link dependencies (header-only, chỉ cần include paths)
# --- Tạo file lib/cmake/robot_visualization_msgs/robot_costmap_2dTargets.cmake --- target_link_libraries(${PROJECT_NAME}
# --- File này chứa cấu hình giúp project khác có thể dùng --- INTERFACE
# --- Find_package(robot_visualization_msgs REQUIRED) --- ${PACKAGES_DIR}
# --- Target_link_libraries(my_app PRIVATE robot_visualization_msgs::robot_visualization_msgs) --- )
install(EXPORT robot_visualization_msgs-targets
FILE robot_visualization_msgs-targets.cmake endif()
NAMESPACE robot_visualization_msgs::
DESTINATION lib/cmake/robot_visualization_msgs if(BUILDING_WITH_CATKIN)
) ## Mark libraries for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
else()
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
# Export targets
install(EXPORT ${PROJECT_NAME}-targets
FILE ${PROJECT_NAME}-targets.cmake
NAMESPACE ${PROJECT_NAME}::
DESTINATION lib/cmake/${PROJECT_NAME}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION include
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
# Print configuration info
message(STATUS "=================================")
message(STATUS "Project: ${PROJECT_NAME} (Header-Only)")
message(STATUS "Version: ${PROJECT_VERSION}")
message(STATUS "C++ Standard: ${CMAKE_CXX_STANDARD}")
message(STATUS "Headers found:")
foreach(hdr ${HEADERS})
message(STATUS " - ${hdr}")
endforeach()
message(STATUS "Dependencies: robot_std_msgs")
message(STATUS "=================================")
endif()

View File

@@ -19,8 +19,6 @@
<buildtool_depend version_gte="0.5.68">catkin</buildtool_depend> <buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>
<build_depend>libconsole-bridge-dev</build_depend> <build_depend>robot_std_msgs</build_depend>
<run_depend>robot_std_msgs</run_depend>
<run_depend>libconsole-bridge-dev</run_depend>
</package> </package>

View File

@@ -1,32 +0,0 @@
cmake_minimum_required(VERSION 3.10)
# --- Project riêng cho utils ---
project(utils LANGUAGES CXX)
# --- Tạo INTERFACE library (header-only) ---
add_library(utils INTERFACE)
# --- Include directories ---
target_include_directories(utils
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> # build nội bộ
$<INSTALL_INTERFACE:include/utils> # dùng khi install/export
)
# --- Cài đặt header files ---
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION include/utils
FILES_MATCHING PATTERN "*.h"
)
# --- Cài đặt target INTERFACE để export ---
install(TARGETS utils
EXPORT utils-targets
)
# --- Export target file ---
install(EXPORT utils-targets
FILE utils-targets.cmake
NAMESPACE utils::
DESTINATION lib/cmake/utils
)

View File

@@ -1,11 +0,0 @@
#ifndef UTILIS_MSGS_H
#define UTILIS_MSGS_H
#include <cmath>
template <typename T>
bool isEqual(const T& a, const T& b, double eps = 1e-5)
{
return std::fabs(a - b) < eps;
}
#endif // UTILIS_MSGS_H