sua ten file

This commit is contained in:
2025-12-30 09:58:57 +07:00
parent 92fedb1ee8
commit e12033556b
40 changed files with 96 additions and 96 deletions

View File

@@ -30,8 +30,8 @@ set(PACKAGES_DIR
angles
nav_grid
costmap_2d
sensor_msgs
std_msgs
robot_sensor_msgs
robot_std_msgs
)
# Tìm tất cả file source cho diff library

View File

@@ -14,7 +14,7 @@
#include <angles/angles.h>
#include <tf3/exceptions.h>
#include <tf3/utils.h>
#include <nav_msgs/Path.h>
#include <robot_nav_msgs/Path.h>
#include <kalman/kalman.h>
#include <vector>

View File

@@ -33,9 +33,9 @@ set(PACKAGES_DIR
robot_nav_2d_utils
nav_core2
geometry_msgs
nav_msgs
std_msgs
sensor_msgs
robot_nav_msgs
robot_std_msgs
robot_sensor_msgs
angles
)

View File

@@ -30,8 +30,8 @@ set(PACKAGES_DIR
costmap_2d
nav_core
geometry_msgs
nav_msgs
std_msgs
robot_nav_msgs
robot_std_msgs
tf3
tf3_geometry_msgs
)

View File

@@ -2,7 +2,7 @@
#include <two_points_planner/two_points_planner.h>
#include <costmap_2d/inflation_layer.h>
#include <boost/dll/alias.hpp>
#include <nav_msgs/Path.h>
#include <robot_nav_msgs/Path.h>
#include <tf3/LinearMath/Quaternion.h>
#include <tf3/utils.h>
#include <tf3_geometry_msgs/tf3_geometry_msgs.h>

View File

@@ -29,10 +29,10 @@ include_directories(
# Dependencies packages (internal libraries)
set(PACKAGES_DIR
geometry_msgs
nav_msgs
std_msgs
sensor_msgs
visualization_msgs
robot_nav_msgs
robot_std_msgs
robot_sensor_msgs
robot_visualization_msgs
robot_nav_2d_utils
nav_core2
mkt_msgs

View File

@@ -118,7 +118,7 @@ namespace pnkx_local_planner
bool geLocalGoal(robot_nav_2d_msgs::Pose2DStamped &local_goal);
bool getLocalPath(const robot_nav_2d_msgs::Pose2DStamped &local_pose,
const robot_nav_2d_msgs::Pose2DStamped &local_goal, nav_msgs::Path &local_path);
const robot_nav_2d_msgs::Pose2DStamped &local_goal, robot_nav_msgs::Path &local_path);
bool initialized_;
bool is_detected_;

View File

@@ -6,10 +6,10 @@
#include <robot_nav_2d_utils/parameters.h>
#include <robot_nav_2d_utils/footprint.h>
#include <angles/angles.h>
#include <nav_msgs/Path.h>
#include <std_msgs/Bool.h>
#include <std_msgs/UInt16.h>
#include <visualization_msgs/MarkerArray.h>
#include <robot_nav_msgs/Path.h>
#include <robot_std_msgs/Bool.h>
#include <robot_std_msgs/UInt16.h>
#include <robot_visualization_msgs/MarkerArray.h>
#include <boost/dll/import.hpp>
#include <boost/dll/alias.hpp>
@@ -490,7 +490,7 @@ bool pnkx_local_planner::PNKXDockingLocalPlanner::dockingHanlde(const robot_nav_
{
dkpl_.front()->is_detected_ = true;
start_docking_ = true;
nav_msgs::Path path;
robot_nav_msgs::Path path;
robot_nav_2d_msgs::Pose2DStamped local_pose = this->transformPoseToLocal(pose);
dkpl_.front()->getLocalPath(local_pose, local_goal, path);
this->setPlan(robot_nav_2d_utils::pathToPath(path));
@@ -731,7 +731,7 @@ bool pnkx_local_planner::PNKXDockingLocalPlanner::DockingPlanner::geLocalGoal(ro
}
bool pnkx_local_planner::PNKXDockingLocalPlanner::DockingPlanner::getLocalPath(
const robot_nav_2d_msgs::Pose2DStamped &local_pose, const robot_nav_2d_msgs::Pose2DStamped &local_goal, nav_msgs::Path &local_path)
const robot_nav_2d_msgs::Pose2DStamped &local_pose, const robot_nav_2d_msgs::Pose2DStamped &local_goal, robot_nav_msgs::Path &local_path)
{
robot_geometry_msgs::PoseStamped start = robot_nav_2d_utils::pose2DToPoseStamped(local_pose);
robot_geometry_msgs::PoseStamped goal = robot_nav_2d_utils::pose2DToPoseStamped(local_goal);

View File

@@ -9,7 +9,7 @@
// #include <g2o/core/base_unary_edge.h>
// #include <g2o/core/base_multi_edge.h>
#include <angles/angles.h>
#include <nav_msgs/Path.h>
#include <robot_nav_msgs/Path.h>
#include "pnkx_local_planner/pnkx_go_straight_local_planner.h"
#include <boost/dll/import.hpp>
#include <boost/dll/alias.hpp>

View File

@@ -9,7 +9,7 @@
#include <mkt_msgs/Trajectory2D.h>
#include <angles/angles.h>
#include <nav_msgs/Path.h>
#include <robot_nav_msgs/Path.h>
#include <boost/dll/import.hpp>
#include <boost/dll/alias.hpp>

View File

@@ -24,7 +24,7 @@ target_include_directories(robot_nav_2d_msgs
# Các dependencies này cũng là header-only từ common_msgs
target_link_libraries(robot_nav_2d_msgs
INTERFACE
std_msgs
robot_std_msgs
geometry_msgs
)
@@ -41,7 +41,7 @@ install(TARGETS robot_nav_2d_msgs
RUNTIME DESTINATION bin)
# Export targets
# Bây giờ có thể export dependencies vì std_msgs và geometry_msgs đã được export
# Bây giờ có thể export dependencies vì robot_std_msgs và geometry_msgs đã được export
install(EXPORT robot_nav_2d_msgs-targets
FILE robot_nav_2d_msgs-targets.cmake
NAMESPACE robot_nav_2d_msgs::
@@ -56,6 +56,6 @@ message(STATUS "Headers found:")
foreach(hdr ${HEADERS})
message(STATUS " - ${hdr}")
endforeach()
message(STATUS "Dependencies: std_msgs, geometry_msgs")
message(STATUS "Dependencies: robot_std_msgs, geometry_msgs")
message(STATUS "=================================")

View File

@@ -10,7 +10,7 @@
#include <vector>
#include <memory>
#include <std_msgs/Header.h>
#include <robot_std_msgs/Header.h>
#include <robot_nav_2d_msgs/Pose2DStamped.h>
namespace robot_nav_2d_msgs
@@ -30,7 +30,7 @@ struct Path2D_
(void)_alloc;
}
typedef ::std_msgs::Header _header_type;
typedef ::robot_std_msgs::Header _header_type;
_header_type header;
typedef std::vector< ::robot_nav_2d_msgs::Pose2DStamped_<ContainerAllocator> , typename std::allocator_traits<ContainerAllocator>::template rebind_alloc< ::robot_nav_2d_msgs::Pose2DStamped_<ContainerAllocator> >> _poses_type;

View File

@@ -10,9 +10,9 @@
#include <vector>
#include <memory>
#include <std_msgs/Header.h>
#include <robot_std_msgs/Header.h>
#include <robot_nav_2d_msgs/ComplexPolygon2D.h>
#include <std_msgs/ColorRGBA.h>
#include <robot_std_msgs/ColorRGBA.h>
namespace robot_nav_2d_msgs
{
@@ -35,13 +35,13 @@ struct Polygon2DCollection_
typedef ::std_msgs::Header _header_type;
typedef ::robot_std_msgs::Header _header_type;
_header_type header;
typedef std::vector< ::robot_nav_2d_msgs::ComplexPolygon2D_<ContainerAllocator> , typename std::allocator_traits<ContainerAllocator>::template rebind_alloc< ::robot_nav_2d_msgs::ComplexPolygon2D_<ContainerAllocator> >> _polygons_type;
_polygons_type polygons;
typedef std::vector< ::std_msgs::ColorRGBA , typename std::allocator_traits<ContainerAllocator>::template rebind_alloc< ::std_msgs::ColorRGBA >> _colors_type;
typedef std::vector< ::robot_std_msgs::ColorRGBA , typename std::allocator_traits<ContainerAllocator>::template rebind_alloc< ::robot_std_msgs::ColorRGBA >> _colors_type;
_colors_type colors;

View File

@@ -10,7 +10,7 @@
#include <vector>
#include <memory>
#include <std_msgs/Header.h>
#include <robot_std_msgs/Header.h>
#include <robot_nav_2d_msgs/Polygon2D.h>
namespace robot_nav_2d_msgs
@@ -32,7 +32,7 @@ struct Polygon2DStamped_
typedef ::std_msgs::Header _header_type;
typedef ::robot_std_msgs::Header _header_type;
_header_type header;
typedef ::robot_nav_2d_msgs::Polygon2D_<ContainerAllocator> _polygon_type;

View File

@@ -10,7 +10,7 @@
#include <vector>
#include <memory>
#include <std_msgs/Header.h>
#include <robot_std_msgs/Header.h>
#include <robot_geometry_msgs/Pose2D.h>
namespace robot_nav_2d_msgs
@@ -32,7 +32,7 @@ struct Pose2DStamped_
typedef ::std_msgs::Header _header_type;
typedef ::robot_std_msgs::Header _header_type;
_header_type header;
typedef ::robot_geometry_msgs::Pose2D _pose_type;

View File

@@ -10,7 +10,7 @@
#include <vector>
#include <memory>
#include <std_msgs/Header.h>
#include <robot_std_msgs/Header.h>
#include <robot_nav_2d_msgs/Twist2D.h>
namespace robot_nav_2d_msgs
@@ -32,7 +32,7 @@ struct Twist2DStamped_
typedef ::std_msgs::Header _header_type;
typedef ::robot_std_msgs::Header _header_type;
_header_type header;
typedef ::robot_nav_2d_msgs::Twist2D_<ContainerAllocator> _velocity_type;

View File

@@ -29,7 +29,7 @@ target_link_libraries(conversions
PUBLIC
robot_nav_2d_msgs
robot_geometry_msgs
nav_msgs
robot_nav_msgs
nav_grid
nav_core2
robot_cpp
@@ -166,5 +166,5 @@ message(STATUS "Project: ${PROJECT_NAME}")
message(STATUS "Version: ${PROJECT_VERSION}")
message(STATUS "C++ Standard: ${CMAKE_CXX_STANDARD}")
message(STATUS "Libraries: conversions, path_ops, polygons, bounds, tf_help")
message(STATUS "Dependencies: robot_nav_2d_msgs, robot_geometry_msgs, nav_msgs, nav_grid, nav_core2, tf3, console_bridge, Boost")
message(STATUS "Dependencies: robot_nav_2d_msgs, robot_geometry_msgs, robot_nav_msgs, nav_grid, nav_core2, tf3, console_bridge, Boost")
message(STATUS "=================================")

View File

@@ -2,7 +2,7 @@
A handful of useful utility functions for nav_core2 packages.
* Bounds - Utilities for `nav_core2::Bounds` objects interacting with other messages/types and for dividing a `UIntBounds` into multiple smaller bounds.
* [Conversions](doc/Conversions.md) - Tools for converting between `robot_nav_2d_msgs` and other types.
* OdomSubscriber - subscribes to the standard `nav_msgs::Odometry` message and provides access to the velocity component as a `robot_nav_2d_msgs::Twist`
* OdomSubscriber - subscribes to the standard `robot_nav_msgs::Odometry` message and provides access to the velocity component as a `robot_nav_2d_msgs::Twist`
* Parameters - a couple ROS parameter patterns
* PathOps - functions for working with `robot_nav_2d_msgs::Path2D` objects (beyond strict conversion)
* [Plugin Mux](doc/PluginMux.md) - tool for switching between multiple `pluginlib` plugins

View File

@@ -24,10 +24,10 @@
## Path Transformations
| to `robot_nav_2d_msgs` | from `robot_nav_2d_msgs` |
| -- | -- |
| `Path2D pathToPath(nav_msgs::Path)` |`nav_msgs::Path pathToPath(Path2D)`
| `Path2D posesToPath2D(std::vector<robot_geometry_msgs::PoseStamped>)` | `nav_msgs::Path poses2DToPath(std::vector<robot_geometry_msgs::Pose2D>, std::string, robot::Time)`
| `Path2D pathToPath(robot_nav_msgs::Path)` |`robot_nav_msgs::Path pathToPath(Path2D)`
| `Path2D posesToPath2D(std::vector<robot_geometry_msgs::PoseStamped>)` | `robot_nav_msgs::Path poses2DToPath(std::vector<robot_geometry_msgs::Pose2D>, std::string, robot::Time)`
Also, `nav_msgs::Path posesToPath(std::vector<robot_geometry_msgs::PoseStamped>)`
Also, `robot_nav_msgs::Path posesToPath(std::vector<robot_geometry_msgs::PoseStamped>)`
## Polygon Transformations
| to `robot_nav_2d_msgs` | from `robot_nav_2d_msgs` |
@@ -42,7 +42,7 @@ Also, `nav_msgs::Path posesToPath(std::vector<robot_geometry_msgs::PoseStamped>)
| to `nav_grid` info | from `nav_grid` info |
| -- | -- |
|`nav_grid::NavGridInfo infoToInfo(nav_msgs::MapMetaData, std::string)` | `nav_msgs::MapMetaData infoToInfo(nav_grid::NavGridInfo)`
|`nav_grid::NavGridInfo infoToInfo(robot_nav_msgs::MapMetaData, std::string)` | `robot_nav_msgs::MapMetaData infoToInfo(nav_grid::NavGridInfo)`
| to two dimensional pose | to three dimensional pose |
| -- | -- |

View File

@@ -47,8 +47,8 @@
#include <robot_nav_2d_msgs/Pose2DStamped.h>
#include <robot_nav_2d_msgs/NavGridInfo.h>
#include <robot_nav_2d_msgs/UIntBounds.h>
#include <nav_msgs/MapMetaData.h>
#include <nav_msgs/Path.h>
#include <robot_nav_msgs/MapMetaData.h>
#include <robot_nav_msgs/Path.h>
#include <nav_grid/nav_grid.h>
#include <nav_core2/bounds.h>
// #include <tf/tf.h>
@@ -76,12 +76,12 @@ namespace robot_nav_2d_utils
const ::std::string &frame, const robot::Time &stamp);
// Path Transformations
::robot_nav_2d_msgs::Path2D pathToPath(const nav_msgs::Path &path);
nav_msgs::Path posesToPath(const ::std::vector<::robot_geometry_msgs::PoseStamped> &poses);
::robot_nav_2d_msgs::Path2D pathToPath(const robot_nav_msgs::Path &path);
robot_nav_msgs::Path posesToPath(const ::std::vector<::robot_geometry_msgs::PoseStamped> &poses);
::robot_nav_2d_msgs::Path2D posesToPath2D(const ::std::vector<::robot_geometry_msgs::PoseStamped> &poses);
nav_msgs::Path poses2DToPath(const ::std::vector<::robot_geometry_msgs::Pose2D> &poses,
robot_nav_msgs::Path poses2DToPath(const ::std::vector<::robot_geometry_msgs::Pose2D> &poses,
const ::std::string &frame, const robot::Time &stamp);
nav_msgs::Path pathToPath(const ::robot_nav_2d_msgs::Path2D &path2d);
robot_nav_msgs::Path pathToPath(const ::robot_nav_2d_msgs::Path2D &path2d);
// Polygon Transformations
::robot_geometry_msgs::Polygon polygon2Dto3D(const ::robot_nav_2d_msgs::Polygon2D &polygon_2d);
@@ -94,8 +94,8 @@ namespace robot_nav_2d_utils
nav_grid::NavGridInfo fromMsg(const ::robot_nav_2d_msgs::NavGridInfo &msg);
::robot_geometry_msgs::Pose getOrigin3D(const nav_grid::NavGridInfo &info);
::robot_geometry_msgs::Pose2D getOrigin2D(const nav_grid::NavGridInfo &info);
nav_grid::NavGridInfo infoToInfo(const nav_msgs::MapMetaData &metadata, const ::std::string &frame);
nav_msgs::MapMetaData infoToInfo(const nav_grid::NavGridInfo &info);
nav_grid::NavGridInfo infoToInfo(const robot_nav_msgs::MapMetaData &metadata, const ::std::string &frame);
robot_nav_msgs::MapMetaData infoToInfo(const nav_grid::NavGridInfo &info);
// Bounds Transformations
robot_nav_2d_msgs::UIntBounds toMsg(const nav_core2::UIntBounds &bounds);

View File

@@ -36,7 +36,7 @@
#define ROBOT_NAV_2D_UTILS_ODOM_SUBSCRIBER_H
#include <robot_nav_2d_utils/conversions.h>
#include <nav_msgs/Odometry.h>
#include <robot_nav_msgs/Odometry.h>
#include <robot_nav_2d_msgs/Twist2DStamped.h>
#include <boost/thread/mutex.hpp>
#include <string>
@@ -63,14 +63,14 @@ namespace robot_nav_2d_utils
{
std::string odom_topic;
// nh.param("odom_topic", odom_topic, default_topic);
// odom_sub_ = nh.subscribe<nav_msgs::Odometry>(odom_topic, 1, boost::bind(&OdomSubscriber::odomCallback, this, _1));
// odom_sub_ = nh.subscribe<robot_nav_msgs::Odometry>(odom_topic, 1, boost::bind(&OdomSubscriber::odomCallback, this, _1));
}
inline robot_nav_2d_msgs::Twist2D getTwist() { return odom_vel_.velocity; }
inline robot_nav_2d_msgs::Twist2DStamped getTwistStamped() { return odom_vel_; }
protected:
void odomCallback(const nav_msgs::Odometry::ConstPtr &msg)
void odomCallback(const robot_nav_msgs::Odometry::ConstPtr &msg)
{
std::cout << "odom received!" << std::endl;
boost::mutex::scoped_lock lock(odom_mutex_);

View File

@@ -37,7 +37,7 @@
#include <ros/ros.h>
#include <pluginlib/class_loader.h>
#include <std_msgs/String.h>
#include <robot_std_msgs/String.h>
#include <robot_nav_2d_msgs/SwitchPlugin.h>
#include <map>
#include <string>
@@ -101,7 +101,7 @@ namespace robot_nav_2d_utils
current_plugin_ = name;
// Update ROS info
std_msgs::String str_msg;
robot_std_msgs::String str_msg;
str_msg.data = current_plugin_;
current_plugin_pub_.publish(str_msg);
private_nh_.setParam(ros_name_, current_plugin_);
@@ -225,7 +225,7 @@ namespace robot_nav_2d_utils
: plugin_loader_(plugin_package, plugin_class), private_nh_("~"), ros_name_(ros_name), switch_callback_(nullptr)
{
// Create the latched publisher
current_plugin_pub_ = private_nh_.advertise<std_msgs::String>(ros_name_, 1, true);
current_plugin_pub_ = private_nh_.advertise<robot_std_msgs::String>(ros_name_, 1, true);
// Load Plugins
std::string plugin_class_name;

View File

@@ -138,7 +138,7 @@ namespace robot_nav_2d_utils
// return pose;
// }
robot_nav_2d_msgs::Path2D pathToPath(const nav_msgs::Path &path)
robot_nav_2d_msgs::Path2D pathToPath(const robot_nav_msgs::Path &path)
{
robot_nav_2d_msgs::Path2D path2d;
path2d.header = path.header;
@@ -152,9 +152,9 @@ namespace robot_nav_2d_utils
return path2d;
}
nav_msgs::Path posesToPath(const std::vector<robot_geometry_msgs::PoseStamped> &poses)
robot_nav_msgs::Path posesToPath(const std::vector<robot_geometry_msgs::PoseStamped> &poses)
{
nav_msgs::Path path;
robot_nav_msgs::Path path;
if (poses.empty())
return path;
@@ -186,10 +186,10 @@ namespace robot_nav_2d_utils
return path;
}
// nav_msgs::Path poses2DToPath(const std::vector<robot_geometry_msgs::Pose2D>& poses,
// robot_nav_msgs::Path poses2DToPath(const std::vector<robot_geometry_msgs::Pose2D>& poses,
// const std::string& frame, const robot::Time& stamp)
// {
// nav_msgs::Path path;
// robot_nav_msgs::Path path;
// path.poses.resize(poses.size());
// path.header.frame_id = frame;
// path.header.stamp = stamp;
@@ -200,9 +200,9 @@ namespace robot_nav_2d_utils
// return path;
// }
nav_msgs::Path pathToPath(const robot_nav_2d_msgs::Path2D &path2d)
robot_nav_msgs::Path pathToPath(const robot_nav_2d_msgs::Path2D &path2d)
{
nav_msgs::Path path;
robot_nav_msgs::Path path;
path.header = path2d.header;
path.poses.resize(path2d.poses.size());
for (unsigned int i = 0; i < path.poses.size(); i++)
@@ -275,7 +275,7 @@ namespace robot_nav_2d_utils
return info;
}
nav_grid::NavGridInfo infoToInfo(const nav_msgs::MapMetaData &metadata, const std::string &frame)
nav_grid::NavGridInfo infoToInfo(const robot_nav_msgs::MapMetaData &metadata, const std::string &frame)
{
nav_grid::NavGridInfo info;
info.frame_id = frame;
@@ -308,9 +308,9 @@ namespace robot_nav_2d_utils
return origin;
}
nav_msgs::MapMetaData infoToInfo(const nav_grid::NavGridInfo &info)
robot_nav_msgs::MapMetaData infoToInfo(const nav_grid::NavGridInfo &info)
{
nav_msgs::MapMetaData metadata;
robot_nav_msgs::MapMetaData metadata;
metadata.resolution = info.resolution;
metadata.width = info.width;
metadata.height = info.height;

View File

@@ -29,7 +29,7 @@ Some packages that implement this interface:
- tf2_eigen
- tf2_geometry_msgs
- tf2_kdl
- tf2_sensor_msgs
- tf2_robot_sensor_msgs
More documentation for the conversion interface is available on the <A HREF="http://wiki.ros.org/tf2/Tutorials/Migration/DataConversions">ROS Wiki</A>.

View File

@@ -11,7 +11,7 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(PACKAGES_DIR geometry_msgs std_msgs nav_core nav_core2 robot_nav_2d_utils pthread)
set(PACKAGES_DIR geometry_msgs robot_std_msgs nav_core nav_core2 robot_nav_2d_utils pthread)
find_package(Boost REQUIRED COMPONENTS filesystem system)

View File

@@ -12,7 +12,7 @@ Where the grid exists in the world is defined by six parameters.
* `frame_id` which is the TF frame the grid is defined relative to.
* `origin_x` and `origin_y` which define the offset in meters from the root of the TF frame to the minimum corner of the (0, 0) cell.
Together, these components make a [`nav_grid::NavGridInfo`](include/nav_grid/nav_grid_info.h) struct. It evolved from the [`nav_msgs::MapMetaData` message](http://docs.ros.org/melodic/api/nav_msgs/html/msg/MapMetaData.html) but without `map_load_time`, simplified origin geometry and the `frame_id` added. Note: for general efficiency of computation (particularly moving the grid while retaining some of the values) there is no rotation component to the origin. Each grid is locked to the orientation of its TF frame.
Together, these components make a [`nav_grid::NavGridInfo`](include/nav_grid/nav_grid_info.h) struct. It evolved from the [`robot_nav_msgs::MapMetaData` message](http://docs.ros.org/melodic/api/robot_nav_msgs/html/msg/MapMetaData.html) but without `map_load_time`, simplified origin geometry and the `frame_id` added. Note: for general efficiency of computation (particularly moving the grid while retaining some of the values) there is no rotation component to the origin. Each grid is locked to the orientation of its TF frame.
The default values are `width=0, height=0, resolution=1.0, frame_id="map", origin_x=0.0, origin_y=0.0`.

View File

@@ -42,7 +42,7 @@ namespace nav_grid
/**
* @struct NavGridInfo
* This class defines a way to discretize a finite section of the world into a grid.
* It contains similar information to the ROS msg nav_msgs/MapMetaData (aka the info field of nav_msgs/OccupancyGrid)
* It contains similar information to the ROS msg robot_nav_msgs/MapMetaData (aka the info field of robot_nav_msgs/OccupancyGrid)
* except the map_load_time is removed, the geometry is simplified from a Pose to xy coordinates, and the frame_id
* is added.
*/

View File

@@ -79,7 +79,7 @@ Ngược lại, sẽ build ở **Standalone CMake mode**.
### ROS Packages (khi build với Catkin):
- roscpp, rospy
- std_msgs, geometry_msgs, nav_msgs
- robot_std_msgs, geometry_msgs, robot_nav_msgs
- tf2, tf2_ros
- actionlib, dynamic_reconfigure

View File

@@ -65,7 +65,7 @@ add_library(move_base SHARED ${SOURCES} ${HEADERS})
# Standalone CMake mode: link all dependencies manually
set(PACKAGES_DIR
geometry_msgs
std_msgs
robot_std_msgs
move_base_core
nav_core
costmap_2d

View File

@@ -26,7 +26,7 @@
#include <costmap_2d/costmap_2d_robot.h>
#include <costmap_2d/costmap_2d.h>
#include <nav_msgs/GetPlan.h>
#include <robot_nav_msgs/GetPlan.h>
#include <robot_protocol_msgs/Order.h>
#include <robot/node_handle.h>

View File

@@ -18,8 +18,8 @@
#include <costmap_2d/static_layer.h>
#include <costmap_2d/voxel_layer.h>
#include <nav_msgs/OccupancyGrid.h>
#include <sensor_msgs/LaserScan.h>
#include <robot_nav_msgs/OccupancyGrid.h>
#include <robot_sensor_msgs/LaserScan.h>
move_base::MoveBase::MoveBase()
: initialized_(false),
@@ -187,7 +187,7 @@ void move_base::MoveBase::initialize(robot::TFListenerPtr tf)
boost::shared_ptr<costmap_2d::StaticLayer> static_layer = boost::dynamic_pointer_cast<costmap_2d::StaticLayer>(*layer);
if (!static_layer)
continue;
nav_msgs::OccupancyGrid *occupancy_grid = new nav_msgs::OccupancyGrid();
robot_nav_msgs::OccupancyGrid *occupancy_grid = new robot_nav_msgs::OccupancyGrid();
occupancy_grid->header.frame_id = "map";
occupancy_grid->header.stamp = robot::Time::now();
occupancy_grid->info.resolution = 0.05;
@@ -206,7 +206,7 @@ void move_base::MoveBase::initialize(robot::TFListenerPtr tf)
occupancy_grid->data[i] = costmap_2d::NO_INFORMATION;
}
if (occupancy_grid)
static_layer->dataCallBack<nav_msgs::OccupancyGrid>(*occupancy_grid, "map");
static_layer->dataCallBack<robot_nav_msgs::OccupancyGrid>(*occupancy_grid, "map");
}
}
catch (const std::exception &ex)
@@ -251,7 +251,7 @@ void move_base::MoveBase::initialize(robot::TFListenerPtr tf)
boost::shared_ptr<costmap_2d::VoxelLayer> obstacle_layer = boost::dynamic_pointer_cast<costmap_2d::VoxelLayer>(*layer);
if (!obstacle_layer)
continue;
sensor_msgs::LaserScan *laser_scan = new sensor_msgs::LaserScan();
robot_sensor_msgs::LaserScan *laser_scan = new robot_sensor_msgs::LaserScan();
laser_scan->header.frame_id = "laser";
laser_scan->header.stamp = robot::Time::now();
laser_scan->angle_min = -M_PI;
@@ -267,7 +267,7 @@ void move_base::MoveBase::initialize(robot::TFListenerPtr tf)
laser_scan->ranges[i] = 10.0;
}
if (laser_scan)
obstacle_layer->dataCallBack<sensor_msgs::LaserScan>(*laser_scan, "laser");
obstacle_layer->dataCallBack<robot_sensor_msgs::LaserScan>(*laser_scan, "laser");
}
}
catch (const std::exception &ex)
@@ -794,7 +794,7 @@ void move_base::MoveBase::setXyGoalTolerance(double xy_goal_tolerance)
// {
// }
// bool planService(nav_msgs::GetPlan::Request &req, nav_msgs::GetPlan::Response &resp)
// bool planService(robot_nav_msgs::GetPlan::Request &req, robot_nav_msgs::GetPlan::Response &resp)
// {
// }