Hiep sua ten file
This commit is contained in:
35
robot_map_msgs/CMakeLists.txt
Normal file
35
robot_map_msgs/CMakeLists.txt
Normal file
@@ -0,0 +1,35 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(robot_map_msgs)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Thư viện header-only
|
||||
add_library(robot_map_msgs INTERFACE)
|
||||
|
||||
# Include path tới thư mục chứa file header
|
||||
target_include_directories(robot_map_msgs
|
||||
INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<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/
|
||||
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 ---
|
||||
install(TARGETS robot_map_msgs
|
||||
EXPORT robot_map_msgs-targets
|
||||
INCLUDES DESTINATION include # Cài đặt include
|
||||
)
|
||||
|
||||
# --- Xuất export set costmap_2dTargets thành file CMake module ---
|
||||
# --- Tạo file lib/cmake/robot_map_msgs/costmap_2dTargets.cmake ---
|
||||
# --- File này chứa cấu hình giúp project khác có thể dùng ---
|
||||
# --- Find_package(robot_map_msgs REQUIRED) ---
|
||||
# --- Target_link_libraries(my_app PRIVATE robot_map_msgs::robot_map_msgs) ---
|
||||
install(EXPORT robot_map_msgs-targets
|
||||
FILE robot_map_msgs-targets.cmake
|
||||
NAMESPACE robot_map_msgs::
|
||||
DESTINATION lib/cmake/robot_map_msgs
|
||||
)
|
||||
35
robot_map_msgs/include/robot_map_msgs/OccupancyGridUpdate.h
Normal file
35
robot_map_msgs/include/robot_map_msgs/OccupancyGridUpdate.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef OCCUPANCY_GRID_UPDATE_H
|
||||
#define OCCUPANCY_GRID_UPDATE_H
|
||||
|
||||
#include <vector>
|
||||
#include "robot_std_msgs/Header.h"
|
||||
namespace robot_map_msgs
|
||||
{
|
||||
struct OccupancyGridUpdate
|
||||
{
|
||||
robot_std_msgs::Header header; // Thời gian và frame của bản đồ cập nhật
|
||||
int32_t x; // Tọa độ x của góc trên bên trái của vùng cập nhật trong bản đồ
|
||||
int32_t y; // Tọa độ y của góc trên bên trái của vùng cập nhật trong bản đồ
|
||||
uint32_t width; // Chiều rộng của vùng cập nhật
|
||||
uint32_t height; // Chiều cao của vùng cập nhật
|
||||
std::vector<int8_t> data; // Dữ liệu cập nhật của vùng (giá trị từ -1 đến 100, trong đó -1 là không biết, 0 là không có chướng ngại vật, và 100 là chướng ngại vật chắc chắn
|
||||
OccupancyGridUpdate() = default;
|
||||
};
|
||||
|
||||
inline bool operator==(const robot_map_msgs::OccupancyGridUpdate & lhs, const robot_map_msgs::OccupancyGridUpdate & rhs)
|
||||
{
|
||||
return lhs.header == rhs.header &&
|
||||
lhs.x == rhs.x &&
|
||||
lhs.y == rhs.y &&
|
||||
lhs.width == rhs.width &&
|
||||
lhs.height == rhs.height &&
|
||||
lhs.data == rhs.data;
|
||||
}
|
||||
|
||||
|
||||
inline bool operator!=(const robot_map_msgs::OccupancyGridUpdate & lhs, const robot_map_msgs::OccupancyGridUpdate & rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
} // namespace robot_map_msgs
|
||||
#endif
|
||||
26
robot_map_msgs/package.xml
Normal file
26
robot_map_msgs/package.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<package>
|
||||
<name>robot_nav_msgs</name>
|
||||
<version>0.7.10</version>
|
||||
<description>
|
||||
robot_nav_msgs is the second generation of the transform library, which lets
|
||||
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>
|
||||
<author>Tully Foote</author>
|
||||
<author>Eitan Marder-Eppstein</author>
|
||||
<author>Wim Meeussen</author>
|
||||
<maintainer email="tfoote@osrfoundation.org">Tully Foote</maintainer>
|
||||
<license>BSD</license>
|
||||
|
||||
<url type="website">http://www.ros.org/wiki/robot_nav_msgs</url>
|
||||
|
||||
<buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>
|
||||
|
||||
<build_depend>libconsole-bridge-dev</build_depend>
|
||||
|
||||
<run_depend>libconsole-bridge-dev</run_depend>
|
||||
|
||||
</package>
|
||||
Reference in New Issue
Block a user