Compare commits
8 Commits
92264eaffc
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d51ecc0986 | |||
| 56d05e4322 | |||
| da82431cd9 | |||
| 8f0cd33ec7 | |||
| c4ae3961ab | |||
| 22aa83fe5a | |||
| b5a1b7b6d8 | |||
| 9c84e64253 |
232
CMakeLists.txt
232
CMakeLists.txt
@@ -1,39 +1,95 @@
|
|||||||
# --- CMake version và project name ---
|
cmake_minimum_required(VERSION 3.0.2)
|
||||||
cmake_minimum_required(VERSION 3.10)
|
project(dock_planner VERSION 1.0.0 LANGUAGES CXX)
|
||||||
project(dock_planner)
|
|
||||||
|
|
||||||
# --- C++ standard và position independent code ---
|
if(DEFINED CATKIN_DEVEL_PREFIX OR DEFINED CATKIN_TOPLEVEL)
|
||||||
set(CMAKE_CXX_STANDARD 17) # Sử dụng C++17
|
set(BUILDING_WITH_CATKIN TRUE)
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) # Thư viện có thể build thành shared lib
|
message(STATUS "Building dock_planner with Catkin")
|
||||||
|
|
||||||
# --- RPATH settings: ưu tiên thư viện build tại chỗ ---
|
else()
|
||||||
# Dùng để runtime linker tìm thư viện đã build trước khi install
|
set(BUILDING_WITH_CATKIN FALSE)
|
||||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
message(STATUS "Building dock_planner with Standalone CMake")
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
endif()
|
||||||
set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}/dock_planner")
|
|
||||||
set(CMAKE_INSTALL_RPATH "${CMAKE_BINARY_DIR}/dock_planner")
|
# C++ Standard - must be set before find_package
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
|
# Find dependencies
|
||||||
|
find_package(Eigen3 REQUIRED)
|
||||||
|
find_package(Boost REQUIRED COMPONENTS system thread filesystem)
|
||||||
|
|
||||||
|
if (NOT BUILDING_WITH_CATKIN)
|
||||||
|
|
||||||
|
# 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_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
|
set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}")
|
||||||
|
|
||||||
# --- Dependencies ---
|
set(PACKAGES_DIR
|
||||||
# Tìm các thư viện cần thiết
|
robot_visualization_msgs
|
||||||
# find_package(tf3 REQUIRED) # Nếu dùng tf3
|
robot_nav_msgs
|
||||||
find_package(Eigen3 REQUIRED) # Thư viện Eigen cho toán học
|
robot_nav_2d_msgs
|
||||||
find_package(Boost REQUIRED COMPONENTS system thread filesystem) # Boost: system, thread, filesystem
|
robot_nav_2d_utils
|
||||||
|
robot_std_msgs
|
||||||
# --- Include directories ---
|
robot_geometry_msgs
|
||||||
# Thêm các folder chứa header files
|
tf3
|
||||||
include_directories(
|
robot_time
|
||||||
include
|
data_convert
|
||||||
${EIGEN3_INCLUDE_DIRS}
|
robot_costmap_2d
|
||||||
${Boost_INCLUDE_DIRS}
|
robot_nav_core
|
||||||
|
robot_cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- Eigen và PCL definitions ---
|
find_library(TF3_LIBRARY NAMES tf3 PATHS /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu)
|
||||||
add_definitions(${EIGEN3_DEFINITIONS})
|
|
||||||
|
|
||||||
# --- Core library: dock_planner ---
|
else()
|
||||||
# Tạo thư viện chính
|
|
||||||
add_library(dock_planner
|
# ========================================================
|
||||||
|
# Catkin specific configuration
|
||||||
|
# ========================================================
|
||||||
|
find_package(catkin REQUIRED COMPONENTS
|
||||||
|
robot_visualization_msgs
|
||||||
|
robot_nav_msgs
|
||||||
|
robot_nav_2d_msgs
|
||||||
|
robot_nav_2d_utils
|
||||||
|
robot_std_msgs
|
||||||
|
robot_geometry_msgs
|
||||||
|
robot_time
|
||||||
|
data_convert
|
||||||
|
robot_costmap_2d
|
||||||
|
robot_nav_core
|
||||||
|
robot_cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
find_package(Boost REQUIRED COMPONENTS system thread filesystem)
|
||||||
|
find_package(Eigen3 REQUIRED)
|
||||||
|
# Find tf3 library
|
||||||
|
find_library(TF3_LIBRARY NAMES tf3 PATHS /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu)
|
||||||
|
|
||||||
|
catkin_package(
|
||||||
|
INCLUDE_DIRS include
|
||||||
|
LIBRARIES ${PROJECT_NAME}
|
||||||
|
CATKIN_DEPENDS robot_visualization_msgs robot_nav_msgs robot_nav_2d_msgs robot_nav_2d_utils robot_std_msgs robot_geometry_msgs robot_time data_convert robot_costmap_2d robot_nav_core robot_cpp
|
||||||
|
DEPENDS Eigen3 Boost
|
||||||
|
)
|
||||||
|
|
||||||
|
include_directories(
|
||||||
|
include
|
||||||
|
${catkin_INCLUDE_DIRS}
|
||||||
|
${EIGEN3_INCLUDE_DIRS}
|
||||||
|
${Boost_INCLUDE_DIRS}
|
||||||
|
${TF3_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# ========================================================
|
||||||
|
# Libraries
|
||||||
|
# ========================================================
|
||||||
|
add_library(${PROJECT_NAME} SHARED
|
||||||
src/dock_planner.cpp
|
src/dock_planner.cpp
|
||||||
src/dock_calc.cpp
|
src/dock_calc.cpp
|
||||||
src/utils/curve_common.cpp
|
src/utils/curve_common.cpp
|
||||||
@@ -41,50 +97,94 @@ add_library(dock_planner
|
|||||||
src/utils/line_common.cpp
|
src/utils/line_common.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- Link các thư viện phụ thuộc ---
|
if(BUILDING_WITH_CATKIN)
|
||||||
target_link_libraries(dock_planner
|
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||||
${Boost_LIBRARIES} # Boost
|
|
||||||
visualization_msgs
|
|
||||||
nav_msgs
|
|
||||||
tf3
|
|
||||||
tf3_geometry_msgs
|
|
||||||
robot_time
|
|
||||||
data_convert
|
|
||||||
costmap_2d
|
|
||||||
nav_core
|
|
||||||
robot_cpp
|
|
||||||
robot_nav_2d_utils
|
|
||||||
)
|
|
||||||
|
|
||||||
# --- Include directories cho target ---
|
target_include_directories(${PROJECT_NAME}
|
||||||
target_include_directories(dock_planner
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${Boost_INCLUDE_DIRS} # Boost headers
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> # Khi build từ source
|
$<INSTALL_INTERFACE:include>
|
||||||
$<INSTALL_INTERFACE:include/${PROJECT_NAME}> # Khi install
|
${TF3_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- Cài đặt thư viện vào hệ thống khi chạy make install ---
|
target_link_libraries(${PROJECT_NAME}
|
||||||
install(TARGETS dock_planner
|
PUBLIC ${catkin_LIBRARIES}
|
||||||
EXPORT dock_planner-targets
|
PRIVATE Eigen3::Eigen Boost::system Boost::thread Boost::filesystem
|
||||||
ARCHIVE DESTINATION lib # Thư viện tĩnh .a
|
${TF3_LIBRARY}
|
||||||
LIBRARY DESTINATION lib # Thư viện động .so
|
|
||||||
RUNTIME DESTINATION bin # File thực thi (nếu có)
|
|
||||||
INCLUDES DESTINATION include # Cài đặt include
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- Xuất export set costmap_2dTargets thành file CMake module ---
|
else()
|
||||||
# --- Tạo file lib/cmake/dock_planner/costmap_2dTargets.cmake ---
|
|
||||||
# --- File này chứa cấu hình giúp project khác có thể dùng ---
|
target_include_directories(${PROJECT_NAME}
|
||||||
# --- Find_package(dock_planner REQUIRED) ---
|
PUBLIC
|
||||||
# --- Target_link_libraries(my_app PRIVATE dock_planner::dock_planner) ---
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
install(EXPORT dock_planner-targets
|
$<INSTALL_INTERFACE:include>
|
||||||
FILE dock_planner-targets.cmake
|
${TF3_INCLUDE_DIR}
|
||||||
NAMESPACE dock_planner::
|
|
||||||
DESTINATION lib/cmake/dock_planner
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- Cài đặt headers ---
|
target_link_libraries(${PROJECT_NAME}
|
||||||
|
PUBLIC
|
||||||
|
${PACKAGES_DIR}
|
||||||
|
PRIVATE
|
||||||
|
Eigen3::Eigen Boost::system Boost::thread Boost::filesystem
|
||||||
|
${TF3_LIBRARY}
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
|
BUILD_RPATH "${CMAKE_BINARY_DIR}"
|
||||||
|
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib"
|
||||||
|
)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# ========================================================
|
||||||
|
# Install
|
||||||
|
# ========================================================
|
||||||
|
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}/
|
install(DIRECTORY include/${PROJECT_NAME}/
|
||||||
DESTINATION 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}")
|
||||||
|
message(STATUS "Version: ${PROJECT_VERSION}")
|
||||||
|
message(STATUS "C++ Standard: ${CMAKE_CXX_STANDARD}")
|
||||||
|
message(STATUS "Dependencies: robot_visualization_msgs, robot_nav_msgs, robot_nav_2d_msgs, robot_nav_2d_utils, robot_std_msgs, robot_geometry_msgs, tf3, robot_time, data_convert, robot_costmap_2d, robot_nav_core, robot_cpp, Eigen3, Boost")
|
||||||
|
message(STATUS "=================================")
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -4,20 +4,20 @@
|
|||||||
#include <robot_nav_2d_utils/footprint.h>
|
#include <robot_nav_2d_utils/footprint.h>
|
||||||
#include <robot_geometry_msgs/PoseStamped.h>
|
#include <robot_geometry_msgs/PoseStamped.h>
|
||||||
|
|
||||||
#include <nav_msgs/Path.h>
|
#include <robot_nav_msgs/Path.h>
|
||||||
#include <nav_msgs/OccupancyGrid.h>
|
#include <robot_nav_msgs/OccupancyGrid.h>
|
||||||
#include <nav_msgs/GetPlan.h>
|
#include <robot_nav_msgs/GetPlan.h>
|
||||||
|
|
||||||
#include <costmap_2d/costmap_2d_robot.h>
|
#include <robot_costmap_2d/costmap_2d_robot.h>
|
||||||
#include <costmap_2d/costmap_2d.h>
|
#include <robot_costmap_2d/costmap_2d.h>
|
||||||
#include <costmap_2d/inflation_layer.h>
|
#include <robot_costmap_2d/inflation_layer.h>
|
||||||
|
|
||||||
#include <tf3/LinearMath/Quaternion.h>
|
#include <tf3/LinearMath/Quaternion.h>
|
||||||
|
|
||||||
#include "dock_planner/utils/curve_common.h"
|
#include "dock_planner/utils/curve_common.h"
|
||||||
#include "dock_planner/utils/pose.h"
|
#include "dock_planner/utils/pose.h"
|
||||||
#include "dock_planner/utils/common.h"
|
#include "dock_planner/utils/common.h"
|
||||||
#include <robot/console.h>
|
#include <robot/robot.h>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ namespace dock_planner
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//Params
|
//Params
|
||||||
costmap_2d::Costmap2D* costmap_;
|
robot_costmap_2d::Costmap2D* costmap_;
|
||||||
|
|
||||||
int cost_threshold_; // Threshold for obstacle detection
|
int cost_threshold_; // Threshold for obstacle detection
|
||||||
double safety_distance_; // Safety distance from obstacles
|
double safety_distance_; // Safety distance from obstacles
|
||||||
|
|||||||
@@ -4,25 +4,27 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "dock_planner/dock_calc.h"
|
#include "dock_planner/dock_calc.h"
|
||||||
#include <nav_core/base_global_planner.h>
|
#include <robot_nav_core/base_global_planner.h>
|
||||||
|
|
||||||
namespace dock_planner {
|
namespace dock_planner {
|
||||||
class DockPlanner : public nav_core::BaseGlobalPlanner
|
class DockPlanner : public robot_nav_core::BaseGlobalPlanner
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DockPlanner();
|
DockPlanner();
|
||||||
DockPlanner(std::string name, costmap_2d::Costmap2DROBOT* costmap_robot);
|
DockPlanner(std::string name, robot_costmap_2d::Costmap2DROBOT* costmap_robot);
|
||||||
|
|
||||||
bool initialize(std::string name, costmap_2d::Costmap2DROBOT* costmap_robot);
|
bool initialize(std::string name, robot_costmap_2d::Costmap2DROBOT* costmap_robot);
|
||||||
|
|
||||||
bool makePlan(const robot_geometry_msgs::PoseStamped& start,
|
bool makePlan(const robot_geometry_msgs::PoseStamped& start,
|
||||||
const robot_geometry_msgs::PoseStamped& goal,
|
const robot_geometry_msgs::PoseStamped& goal,
|
||||||
std::vector<robot_geometry_msgs::PoseStamped>& plan);
|
std::vector<robot_geometry_msgs::PoseStamped>& plan);
|
||||||
|
|
||||||
|
static robot_nav_core::BaseGlobalPlanner::Ptr create();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Core components
|
// Core components
|
||||||
costmap_2d::Costmap2DROBOT* costmap_robot_;
|
robot_costmap_2d::Costmap2DROBOT* costmap_robot_;
|
||||||
costmap_2d::Costmap2D* costmap_;
|
robot_costmap_2d::Costmap2D* costmap_;
|
||||||
bool initialized_;
|
bool initialized_;
|
||||||
std::string frame_id_;
|
std::string frame_id_;
|
||||||
// ros::Publisher plan_pub_;
|
// ros::Publisher plan_pub_;
|
||||||
@@ -33,9 +35,6 @@ namespace dock_planner {
|
|||||||
bool check_free_space_;
|
bool check_free_space_;
|
||||||
|
|
||||||
DockCalc calc_plan_to_dock_;
|
DockCalc calc_plan_to_dock_;
|
||||||
|
|
||||||
|
|
||||||
void publishPlan(const std::vector<robot_geometry_msgs::PoseStamped>& plan);
|
|
||||||
};
|
};
|
||||||
} // namespace dock_planner
|
} // namespace dock_planner
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
#ifndef COLOR_H_
|
#ifndef COLOR_H_
|
||||||
#define COLOR_H_
|
#define COLOR_H_
|
||||||
|
|
||||||
#include <std_msgs/ColorRGBA.h>
|
#include <robot_std_msgs/ColorRGBA.h>
|
||||||
|
|
||||||
namespace agv_visualization
|
namespace agv_visualization
|
||||||
{
|
{
|
||||||
class Color : public std_msgs::ColorRGBA
|
class Color : public robot_std_msgs::ColorRGBA
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Color() : std_msgs::ColorRGBA() {}
|
Color() : robot_std_msgs::ColorRGBA() {}
|
||||||
Color(double red, double green, double blue) : Color(red, green, blue, 1.0) {}
|
Color(double red, double green, double blue) : Color(red, green, blue, 1.0) {}
|
||||||
Color(double red, double green, double blue, double alpha) : Color() {
|
Color(double red, double green, double blue, double alpha) : Color() {
|
||||||
r = red;
|
r = red;
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
#define CURVE_COMMON_H_
|
#define CURVE_COMMON_H_
|
||||||
|
|
||||||
#include <Eigen/Eigen>
|
#include <Eigen/Eigen>
|
||||||
#include <nav_msgs/Path.h>
|
#include <robot_nav_msgs/Path.h>
|
||||||
#include <robot_geometry_msgs/Point.h>
|
#include <robot_geometry_msgs/Point.h>
|
||||||
#include <visualization_msgs/Marker.h>
|
#include <robot_visualization_msgs/Marker.h>
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
#include <robot/console.h>
|
#include <robot/robot.h>
|
||||||
|
|
||||||
struct Spline_Inf
|
struct Spline_Inf
|
||||||
{
|
{
|
||||||
@@ -43,12 +43,12 @@ class CurveCommon
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CurveCommon();
|
CurveCommon();
|
||||||
nav_msgs::Path Generate_Line(robot_geometry_msgs::Point start_point, robot_geometry_msgs::Point end_point, double t_intervel, std::string frame_id);
|
robot_nav_msgs::Path Generate_Line(robot_geometry_msgs::Point start_point, robot_geometry_msgs::Point end_point, double t_intervel, std::string frame_id);
|
||||||
nav_msgs::Path Generate_BezierCurve(EigenTrajectoryPoint::Vector control_point, double t_intervel, std::string frame_id);
|
robot_nav_msgs::Path Generate_BezierCurve(EigenTrajectoryPoint::Vector control_point, double t_intervel, std::string frame_id);
|
||||||
nav_msgs::Path Generate_BsplineCurve(Spline_Inf bspline_inf, double t_intervel, std::string frame_id);
|
robot_nav_msgs::Path Generate_BsplineCurve(Spline_Inf bspline_inf, double t_intervel, std::string frame_id);
|
||||||
nav_msgs::Path Generate_NURBSCurve(Spline_Inf spline_inf, double t_intervel, std::string frame_id);
|
robot_nav_msgs::Path Generate_NURBSCurve(Spline_Inf spline_inf, double t_intervel, std::string frame_id);
|
||||||
nav_msgs::Path Generate_DerivativeBsplineCurve(Spline_Inf bspline_inf, int differential_times, double t_intervel, std::string frame_id);
|
robot_nav_msgs::Path Generate_DerivativeBsplineCurve(Spline_Inf bspline_inf, int differential_times, double t_intervel, std::string frame_id);
|
||||||
nav_msgs::Path Generate_DerivativeBasisFuncCurve(Spline_Inf bspline_inf, int differential_times, int index, double t_intervel, std::string frame_id);
|
robot_nav_msgs::Path Generate_DerivativeBasisFuncCurve(Spline_Inf bspline_inf, int differential_times, int index, double t_intervel, std::string frame_id);
|
||||||
|
|
||||||
void CalculateDerivativeBasisFunc(Spline_Inf* spline_inf, double u_data, int differential_times);
|
void CalculateDerivativeBasisFunc(Spline_Inf* spline_inf, double u_data, int differential_times);
|
||||||
robot_geometry_msgs::Point CalculateDerivativeCurvePoint(Spline_Inf* spline_inf, double u_data, int differential_times, bool UsingNURBS);
|
robot_geometry_msgs::Point CalculateDerivativeCurvePoint(Spline_Inf* spline_inf, double u_data, int differential_times, bool UsingNURBS);
|
||||||
@@ -65,15 +65,15 @@ public:
|
|||||||
void ReadSplineInf(Spline_Inf* bspline_inf, std::vector<double> weight_vector, bool use_limit_derivative_fitting);
|
void ReadSplineInf(Spline_Inf* bspline_inf, std::vector<double> weight_vector, bool use_limit_derivative_fitting);
|
||||||
void ReadDiscreate2DPointFromLaunch(EigenTrajectoryPoint::Vector* input_point, std::vector<double> file_discreate_point);
|
void ReadDiscreate2DPointFromLaunch(EigenTrajectoryPoint::Vector* input_point, std::vector<double> file_discreate_point);
|
||||||
void ReadDiscreate2DPointFromLaunch(std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d> >* input_point, std::vector<double> file_discreate_point);
|
void ReadDiscreate2DPointFromLaunch(std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d> >* input_point, std::vector<double> file_discreate_point);
|
||||||
void ShowDiscreatePoint(visualization_msgs::Marker* points, EigenTrajectoryPoint::Vector discreate_point);
|
void ShowDiscreatePoint(robot_visualization_msgs::Marker* points, EigenTrajectoryPoint::Vector discreate_point);
|
||||||
void ShowDiscreatePoint(visualization_msgs::Marker* points, std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d> > discreate_point);
|
void ShowDiscreatePoint(robot_visualization_msgs::Marker* points, std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d> > discreate_point);
|
||||||
|
|
||||||
//TODO: move relate visualize function to new vislization.h
|
//TODO: move relate visualize function to new vislization.h
|
||||||
int print();
|
int print();
|
||||||
visualization_msgs::Marker ShowDiscreatePoint(EigenTrajectoryPoint::Vector& discreate_point, const std::string& frame_id, const std::string& name, double scale);
|
robot_visualization_msgs::Marker ShowDiscreatePoint(EigenTrajectoryPoint::Vector& discreate_point, const std::string& frame_id, const std::string& name, double scale);
|
||||||
visualization_msgs::Marker ShowDiscreatePoint2(EigenTrajectoryPoint::Vector& discreate_point, const std::string& frame_id, std_msgs::ColorRGBA point_color, const std::string& name, double scale);
|
robot_visualization_msgs::Marker ShowDiscreatePoint2(EigenTrajectoryPoint::Vector& discreate_point, const std::string& frame_id, robot_std_msgs::ColorRGBA point_color, const std::string& name, double scale);
|
||||||
visualization_msgs::Marker ShowDiscreatePoint(std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d> > discreate_point, const std::string& frame_id, const std::string& name, double scale);
|
robot_visualization_msgs::Marker ShowDiscreatePoint(std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d> > discreate_point, const std::string& frame_id, const std::string& name, double scale);
|
||||||
visualization_msgs::Marker ShowDiscreatePoint2(std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d> > discreate_point, const std::string& frame_id, std_msgs::ColorRGBA point_color, const std::string& name, double scale);
|
robot_visualization_msgs::Marker ShowDiscreatePoint2(std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d> > discreate_point, const std::string& frame_id, robot_std_msgs::ColorRGBA point_color, const std::string& name, double scale);
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
58
package.xml
Normal file
58
package.xml
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<package>
|
||||||
|
<name>dock_planner</name>
|
||||||
|
<version>0.7.10</version>
|
||||||
|
<description>
|
||||||
|
dock_planner is the second generation of the transform library, which lets
|
||||||
|
the user keep track of multiple coordinate frames over time. dock_planner
|
||||||
|
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/dock_planner</url>
|
||||||
|
|
||||||
|
<buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>
|
||||||
|
|
||||||
|
<build_depend>robot_costmap_2d</build_depend>
|
||||||
|
<run_depend>robot_costmap_2d</run_depend>
|
||||||
|
|
||||||
|
<build_depend>robot_nav_core</build_depend>
|
||||||
|
<run_depend>robot_nav_core</run_depend>
|
||||||
|
|
||||||
|
<build_depend>robot_geometry_msgs</build_depend>
|
||||||
|
<run_depend>robot_geometry_msgs</run_depend>
|
||||||
|
|
||||||
|
<build_depend>robot_nav_msgs</build_depend>
|
||||||
|
<run_depend>robot_nav_msgs</run_depend>
|
||||||
|
|
||||||
|
<build_depend>robot_std_msgs</build_depend>
|
||||||
|
<run_depend>robot_std_msgs</run_depend>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<build_depend>robot_cpp</build_depend>
|
||||||
|
<run_depend>robot_cpp</run_depend>
|
||||||
|
|
||||||
|
<build_depend>robot_time</build_depend>
|
||||||
|
<run_depend>robot_time</run_depend>
|
||||||
|
|
||||||
|
<build_depend>robot_visualization_msgs</build_depend>
|
||||||
|
<run_depend>robot_visualization_msgs</run_depend>
|
||||||
|
|
||||||
|
<build_depend>data_convert</build_depend>
|
||||||
|
<run_depend>data_convert</run_depend>
|
||||||
|
|
||||||
|
<build_depend>robot_nav_2d_msgs</build_depend>
|
||||||
|
<run_depend>robot_nav_2d_msgs</run_depend>
|
||||||
|
|
||||||
|
<build_depend>robot_nav_2d_utils</build_depend>
|
||||||
|
<run_depend>robot_nav_2d_utils</run_depend>
|
||||||
|
|
||||||
|
</package>
|
||||||
@@ -728,7 +728,7 @@ namespace dock_planner
|
|||||||
// check_y >= 0 && check_y < costmap_->getSizeInCellsY())
|
// check_y >= 0 && check_y < costmap_->getSizeInCellsY())
|
||||||
// {
|
// {
|
||||||
// unsigned char cost = costmap_->getCost(check_x, check_y);
|
// unsigned char cost = costmap_->getCost(check_x, check_y);
|
||||||
// if (cost >= costmap_2d::LETHAL_OBSTACLE)
|
// if (cost >= robot_costmap_2d::LETHAL_OBSTACLE)
|
||||||
// {
|
// {
|
||||||
// double dx = pose.position.x - space_footprint[i].x;
|
// double dx = pose.position.x - space_footprint[i].x;
|
||||||
// double dy = pose.position.y - space_footprint[i].y;
|
// double dy = pose.position.y - space_footprint[i].y;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "dock_planner/dock_planner.h"
|
#include "dock_planner/dock_planner.h"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <boost/dll/alias.hpp>
|
||||||
|
|
||||||
namespace dock_planner
|
namespace dock_planner
|
||||||
{
|
{
|
||||||
@@ -21,7 +22,7 @@ namespace dock_planner
|
|||||||
* @param costmap_robot Pointer tới costmap ROS wrapper
|
* @param costmap_robot Pointer tới costmap ROS wrapper
|
||||||
* Tự động gọi initialize() nếu được cung cấp costmap
|
* Tự động gọi initialize() nếu được cung cấp costmap
|
||||||
*/
|
*/
|
||||||
DockPlanner::DockPlanner(std::string name, costmap_2d::Costmap2DROBOT* costmap_robot)
|
DockPlanner::DockPlanner(std::string name, robot_costmap_2d::Costmap2DROBOT* costmap_robot)
|
||||||
: costmap_robot_(nullptr),
|
: costmap_robot_(nullptr),
|
||||||
costmap_(nullptr),
|
costmap_(nullptr),
|
||||||
initialized_(false),
|
initialized_(false),
|
||||||
@@ -43,7 +44,7 @@ namespace dock_planner
|
|||||||
* - Load parameters từ ROS parameter server
|
* - Load parameters từ ROS parameter server
|
||||||
* - Đánh dấu trạng thái initialized
|
* - Đánh dấu trạng thái initialized
|
||||||
*/
|
*/
|
||||||
bool DockPlanner::initialize(std::string name, costmap_2d::Costmap2DROBOT* costmap_robot)
|
bool DockPlanner::initialize(std::string name, robot_costmap_2d::Costmap2DROBOT* costmap_robot)
|
||||||
{
|
{
|
||||||
if (!initialized_)
|
if (!initialized_)
|
||||||
{
|
{
|
||||||
@@ -63,7 +64,7 @@ namespace dock_planner
|
|||||||
calc_plan_to_dock_.calib_safety_distance_ = calib_safety_distance_;
|
calc_plan_to_dock_.calib_safety_distance_ = calib_safety_distance_;
|
||||||
|
|
||||||
|
|
||||||
// plan_pub_ = private_nh.advertise<nav_msgs::Path>("plan", 1);
|
// plan_pub_ = private_nh.advertise<robot_nav_msgs::Path>("plan", 1);
|
||||||
|
|
||||||
robot_nav_2d_msgs::Polygon2D footprint_dock ;//= robot_nav_2d_utils::footprintFromParams(private_nh,false);
|
robot_nav_2d_msgs::Polygon2D footprint_dock ;//= robot_nav_2d_utils::footprintFromParams(private_nh,false);
|
||||||
|
|
||||||
@@ -79,6 +80,7 @@ namespace dock_planner
|
|||||||
initialized_ = true;
|
initialized_ = true;
|
||||||
// ROS_WARN("[dock_planner] check_free_space_(%d)", check_free_space_);
|
// ROS_WARN("[dock_planner] check_free_space_(%d)", check_free_space_);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DockPlanner::makePlan(const robot_geometry_msgs::PoseStamped& start,
|
bool DockPlanner::makePlan(const robot_geometry_msgs::PoseStamped& start,
|
||||||
@@ -108,17 +110,25 @@ namespace dock_planner
|
|||||||
pose.pose.orientation = planMoveToDock[i].orientation;
|
pose.pose.orientation = planMoveToDock[i].orientation;
|
||||||
plan.push_back(pose);
|
plan.push_back(pose);
|
||||||
}
|
}
|
||||||
publishPlan(plan);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// void DockPlanner::publishPlan(const std::vector<robot_geometry_msgs::PoseStamped>& plan)
|
// void DockPlanner::publishPlan(const std::vector<robot_geometry_msgs::PoseStamped>& plan)
|
||||||
// {
|
// {
|
||||||
// nav_msgs::Path path_msg;
|
// robot_nav_msgs::Path path_msg;
|
||||||
// path_msg.header.stamp = robot::Time::now();
|
// path_msg.header.stamp = robot::Time::now();
|
||||||
// path_msg.header.frame_id = frame_id_;
|
// path_msg.header.frame_id = frame_id_;
|
||||||
// path_msg.poses = plan;
|
// path_msg.poses = plan;
|
||||||
// plan_pub_.publish(path_msg);
|
// plan_pub_.publish(path_msg);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// Export factory function
|
||||||
|
robot_nav_core::BaseGlobalPlanner::Ptr DockPlanner::create() {
|
||||||
|
return std::make_shared<dock_planner::DockPlanner>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace dock_planner
|
} // namespace dock_planner
|
||||||
|
|
||||||
|
// Alias cho Boost.DLL (nếu muốn dùng boost::dll::import_alias)
|
||||||
|
BOOST_DLL_ALIAS(dock_planner::DockPlanner::create, DockPlanner)
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ CurveCommon::CurveCommon()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
nav_msgs::Path CurveCommon::Generate_Line(robot_geometry_msgs::Point start_point, robot_geometry_msgs::Point end_point, double t_intervel, std::string frame_id)
|
robot_nav_msgs::Path CurveCommon::Generate_Line(robot_geometry_msgs::Point start_point, robot_geometry_msgs::Point end_point, double t_intervel, std::string frame_id)
|
||||||
{
|
{
|
||||||
nav_msgs::Path line_result;
|
robot_nav_msgs::Path line_result;
|
||||||
robot_geometry_msgs::PoseStamped current_pose;
|
robot_geometry_msgs::PoseStamped current_pose;
|
||||||
|
|
||||||
line_result.header.frame_id = frame_id;
|
line_result.header.frame_id = frame_id;
|
||||||
@@ -35,9 +35,9 @@ nav_msgs::Path CurveCommon::Generate_Line(robot_geometry_msgs::Point start_point
|
|||||||
return line_result;
|
return line_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav_msgs::Path CurveCommon::Generate_BezierCurve(EigenTrajectoryPoint::Vector control_point, double t_intervel, std::string frame_id)
|
robot_nav_msgs::Path CurveCommon::Generate_BezierCurve(EigenTrajectoryPoint::Vector control_point, double t_intervel, std::string frame_id)
|
||||||
{
|
{
|
||||||
nav_msgs::Path bezier_curve_result;
|
robot_nav_msgs::Path bezier_curve_result;
|
||||||
robot_geometry_msgs::PoseStamped current_pose;
|
robot_geometry_msgs::PoseStamped current_pose;
|
||||||
EigenTrajectoryPoint::Vector temp_control_point_vec;
|
EigenTrajectoryPoint::Vector temp_control_point_vec;
|
||||||
|
|
||||||
@@ -133,13 +133,13 @@ void CurveCommon::ReadDiscreate2DPointFromLaunch(std::vector<Eigen::Vector3d, Ei
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
visualization_msgs::Marker CurveCommon::ShowDiscreatePoint(std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d>> discreate_point, const std::string &frame_id, const std::string &name, double scale)
|
robot_visualization_msgs::Marker CurveCommon::ShowDiscreatePoint(std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d>> discreate_point, const std::string &frame_id, const std::string &name, double scale)
|
||||||
{
|
{
|
||||||
visualization_msgs::Marker waypoints_marker;
|
robot_visualization_msgs::Marker waypoints_marker;
|
||||||
|
|
||||||
waypoints_marker.header.frame_id = frame_id;
|
waypoints_marker.header.frame_id = frame_id;
|
||||||
waypoints_marker.header.stamp = robot::Time::now();
|
waypoints_marker.header.stamp = robot::Time::now();
|
||||||
waypoints_marker.type = visualization_msgs::Marker::SPHERE_LIST;
|
waypoints_marker.type = robot_visualization_msgs::Marker::SPHERE_LIST;
|
||||||
// waypoints_marker.color = color;
|
// waypoints_marker.color = color;
|
||||||
waypoints_marker.color.r = 1;
|
waypoints_marker.color.r = 1;
|
||||||
waypoints_marker.color.g = 1;
|
waypoints_marker.color.g = 1;
|
||||||
@@ -162,13 +162,13 @@ visualization_msgs::Marker CurveCommon::ShowDiscreatePoint(std::vector<Eigen::Ve
|
|||||||
return waypoints_marker;
|
return waypoints_marker;
|
||||||
}
|
}
|
||||||
|
|
||||||
visualization_msgs::Marker CurveCommon::ShowDiscreatePoint2(std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d>> discreate_point, const std::string &frame_id, std_msgs::ColorRGBA point_color, const std::string &name, double scale)
|
robot_visualization_msgs::Marker CurveCommon::ShowDiscreatePoint2(std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d>> discreate_point, const std::string &frame_id, robot_std_msgs::ColorRGBA point_color, const std::string &name, double scale)
|
||||||
{
|
{
|
||||||
visualization_msgs::Marker waypoints_marker;
|
robot_visualization_msgs::Marker waypoints_marker;
|
||||||
|
|
||||||
waypoints_marker.header.frame_id = frame_id;
|
waypoints_marker.header.frame_id = frame_id;
|
||||||
waypoints_marker.header.stamp = robot::Time::now();
|
waypoints_marker.header.stamp = robot::Time::now();
|
||||||
waypoints_marker.type = visualization_msgs::Marker::SPHERE_LIST;
|
waypoints_marker.type = robot_visualization_msgs::Marker::SPHERE_LIST;
|
||||||
waypoints_marker.color = point_color;
|
waypoints_marker.color = point_color;
|
||||||
waypoints_marker.color.a = 0.75;
|
waypoints_marker.color.a = 0.75;
|
||||||
waypoints_marker.ns = name;
|
waypoints_marker.ns = name;
|
||||||
@@ -189,13 +189,13 @@ visualization_msgs::Marker CurveCommon::ShowDiscreatePoint2(std::vector<Eigen::V
|
|||||||
return waypoints_marker;
|
return waypoints_marker;
|
||||||
}
|
}
|
||||||
|
|
||||||
visualization_msgs::Marker CurveCommon::ShowDiscreatePoint(EigenTrajectoryPoint::Vector &discreate_point, const std::string &frame_id, const std::string &name, double scale)
|
robot_visualization_msgs::Marker CurveCommon::ShowDiscreatePoint(EigenTrajectoryPoint::Vector &discreate_point, const std::string &frame_id, const std::string &name, double scale)
|
||||||
{
|
{
|
||||||
visualization_msgs::Marker waypoints_marker;
|
robot_visualization_msgs::Marker waypoints_marker;
|
||||||
|
|
||||||
waypoints_marker.header.frame_id = frame_id;
|
waypoints_marker.header.frame_id = frame_id;
|
||||||
waypoints_marker.header.stamp = robot::Time::now();
|
waypoints_marker.header.stamp = robot::Time::now();
|
||||||
waypoints_marker.type = visualization_msgs::Marker::SPHERE_LIST;
|
waypoints_marker.type = robot_visualization_msgs::Marker::SPHERE_LIST;
|
||||||
// waypoints_marker.color = color;
|
// waypoints_marker.color = color;
|
||||||
waypoints_marker.color.r = 1;
|
waypoints_marker.color.r = 1;
|
||||||
waypoints_marker.color.g = 1;
|
waypoints_marker.color.g = 1;
|
||||||
@@ -218,13 +218,13 @@ visualization_msgs::Marker CurveCommon::ShowDiscreatePoint(EigenTrajectoryPoint:
|
|||||||
return waypoints_marker;
|
return waypoints_marker;
|
||||||
}
|
}
|
||||||
|
|
||||||
visualization_msgs::Marker CurveCommon::ShowDiscreatePoint2(EigenTrajectoryPoint::Vector &discreate_point, const std::string &frame_id, std_msgs::ColorRGBA point_color, const std::string &name, double scale)
|
robot_visualization_msgs::Marker CurveCommon::ShowDiscreatePoint2(EigenTrajectoryPoint::Vector &discreate_point, const std::string &frame_id, robot_std_msgs::ColorRGBA point_color, const std::string &name, double scale)
|
||||||
{
|
{
|
||||||
visualization_msgs::Marker waypoints_marker;
|
robot_visualization_msgs::Marker waypoints_marker;
|
||||||
|
|
||||||
waypoints_marker.header.frame_id = frame_id;
|
waypoints_marker.header.frame_id = frame_id;
|
||||||
waypoints_marker.header.stamp = robot::Time::now();
|
waypoints_marker.header.stamp = robot::Time::now();
|
||||||
waypoints_marker.type = visualization_msgs::Marker::SPHERE_LIST;
|
waypoints_marker.type = robot_visualization_msgs::Marker::SPHERE_LIST;
|
||||||
waypoints_marker.color = point_color;
|
waypoints_marker.color = point_color;
|
||||||
// waypoints_marker.color.r = r;
|
// waypoints_marker.color.r = r;
|
||||||
// waypoints_marker.color.g = g;
|
// waypoints_marker.color.g = g;
|
||||||
@@ -248,7 +248,7 @@ visualization_msgs::Marker CurveCommon::ShowDiscreatePoint2(EigenTrajectoryPoint
|
|||||||
return waypoints_marker;
|
return waypoints_marker;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurveCommon::ShowDiscreatePoint(visualization_msgs::Marker *points, EigenTrajectoryPoint::Vector discreate_point)
|
void CurveCommon::ShowDiscreatePoint(robot_visualization_msgs::Marker *points, EigenTrajectoryPoint::Vector discreate_point)
|
||||||
{
|
{
|
||||||
robot_geometry_msgs::Point view_point;
|
robot_geometry_msgs::Point view_point;
|
||||||
for (int i = 0; i < discreate_point.size(); i++)
|
for (int i = 0; i < discreate_point.size(); i++)
|
||||||
@@ -259,7 +259,7 @@ void CurveCommon::ShowDiscreatePoint(visualization_msgs::Marker *points, EigenTr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurveCommon::ShowDiscreatePoint(visualization_msgs::Marker *points, std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d>> discreate_point)
|
void CurveCommon::ShowDiscreatePoint(robot_visualization_msgs::Marker *points, std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d>> discreate_point)
|
||||||
{
|
{
|
||||||
robot_geometry_msgs::Point view_point;
|
robot_geometry_msgs::Point view_point;
|
||||||
for (int i = 0; i < discreate_point.size(); i++)
|
for (int i = 0; i < discreate_point.size(); i++)
|
||||||
@@ -322,9 +322,9 @@ void CurveCommon::ReadSplineInf(Spline_Inf *spline_inf, std::vector<double> weig
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
nav_msgs::Path CurveCommon::Generate_BsplineCurve(Spline_Inf bspline_inf, double t_intervel, std::string frame_id)
|
robot_nav_msgs::Path CurveCommon::Generate_BsplineCurve(Spline_Inf bspline_inf, double t_intervel, std::string frame_id)
|
||||||
{
|
{
|
||||||
nav_msgs::Path bspline_curve_result;
|
robot_nav_msgs::Path bspline_curve_result;
|
||||||
robot_geometry_msgs::PoseStamped current_pose;
|
robot_geometry_msgs::PoseStamped current_pose;
|
||||||
|
|
||||||
bspline_curve_result.header.frame_id = frame_id;
|
bspline_curve_result.header.frame_id = frame_id;
|
||||||
@@ -495,9 +495,9 @@ nav_msgs::Path CurveCommon::Generate_BsplineCurve(Spline_Inf bspline_inf, double
|
|||||||
return bspline_curve_result;
|
return bspline_curve_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav_msgs::Path CurveCommon::Generate_NURBSCurve(Spline_Inf spline_inf, double t_intervel, std::string frame_id)
|
robot_nav_msgs::Path CurveCommon::Generate_NURBSCurve(Spline_Inf spline_inf, double t_intervel, std::string frame_id)
|
||||||
{
|
{
|
||||||
nav_msgs::Path nurbs_curve_result;
|
robot_nav_msgs::Path nurbs_curve_result;
|
||||||
robot_geometry_msgs::PoseStamped current_pose;
|
robot_geometry_msgs::PoseStamped current_pose;
|
||||||
|
|
||||||
nurbs_curve_result.header.frame_id = frame_id;
|
nurbs_curve_result.header.frame_id = frame_id;
|
||||||
@@ -873,10 +873,10 @@ robot_geometry_msgs::Point CurveCommon::CalculateDerivativeCurvePoint(Spline_Inf
|
|||||||
return derivative_curve_point;
|
return derivative_curve_point;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav_msgs::Path CurveCommon::Generate_DerivativeBsplineCurve(Spline_Inf bspline_inf, int differential_times, double t_intervel, std::string frame_id)
|
robot_nav_msgs::Path CurveCommon::Generate_DerivativeBsplineCurve(Spline_Inf bspline_inf, int differential_times, double t_intervel, std::string frame_id)
|
||||||
{
|
{
|
||||||
robot_geometry_msgs::Point derivative_point_result;
|
robot_geometry_msgs::Point derivative_point_result;
|
||||||
nav_msgs::Path bspline_derivative_result;
|
robot_nav_msgs::Path bspline_derivative_result;
|
||||||
robot_geometry_msgs::PoseStamped current_pose;
|
robot_geometry_msgs::PoseStamped current_pose;
|
||||||
|
|
||||||
bspline_derivative_result.header.frame_id = frame_id;
|
bspline_derivative_result.header.frame_id = frame_id;
|
||||||
@@ -916,10 +916,10 @@ nav_msgs::Path CurveCommon::Generate_DerivativeBsplineCurve(Spline_Inf bspline_i
|
|||||||
return bspline_derivative_result;
|
return bspline_derivative_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav_msgs::Path CurveCommon::Generate_DerivativeBasisFuncCurve(Spline_Inf bspline_inf, int differential_times, int index, double t_intervel, std::string frame_id)
|
robot_nav_msgs::Path CurveCommon::Generate_DerivativeBasisFuncCurve(Spline_Inf bspline_inf, int differential_times, int index, double t_intervel, std::string frame_id)
|
||||||
{
|
{
|
||||||
robot_geometry_msgs::Point derivative_point_result;
|
robot_geometry_msgs::Point derivative_point_result;
|
||||||
nav_msgs::Path derivative_basis_result;
|
robot_nav_msgs::Path derivative_basis_result;
|
||||||
robot_geometry_msgs::PoseStamped current_pose;
|
robot_geometry_msgs::PoseStamped current_pose;
|
||||||
|
|
||||||
derivative_basis_result.header.frame_id = frame_id;
|
derivative_basis_result.header.frame_id = frame_id;
|
||||||
|
|||||||
Reference in New Issue
Block a user