Compare commits

..

No commits in common. "dad2726eb178b2417b77f5a50f9388493250ccb8" and "92fedb1ee8b9e45f7e4fb14a262a95b96f55886d" have entirely different histories.

41 changed files with 97 additions and 97 deletions

View File

@ -65,9 +65,9 @@ odom_frame: $(arg tf_prefix)odom # Defaults to "odom" if unspeci
base_link_frame: $(arg tf_prefix)base_footprint # Defaults to "base_link" if unspecified base_link_frame: $(arg tf_prefix)base_footprint # Defaults to "base_link" if unspecified
world_frame: $(arg tf_prefix)odom # Defaults to the value of odom_frame if unspecified world_frame: $(arg tf_prefix)odom # Defaults to the value of odom_frame if unspecified
# The filter accepts an arbitrary number of inputs from each input message type (robot_nav_msgs/Odometry, # The filter accepts an arbitrary number of inputs from each input message type (nav_msgs/Odometry,
# geometry_msgs/PoseWithCovarianceStamped, geometry_msgs/TwistWithCovarianceStamped, # geometry_msgs/PoseWithCovarianceStamped, geometry_msgs/TwistWithCovarianceStamped,
# robot_sensor_msgs/Imu). To add an input, simply append the next number in the sequence to its "base" name, e.g., odom0, # sensor_msgs/Imu). To add an input, simply append the next number in the sequence to its "base" name, e.g., odom0,
# odom1, twist0, twist1, imu0, imu1, imu2, etc. The value should be the topic name. These parameters obviously have no # odom1, twist0, twist1, imu0, imu1, imu2, etc. The value should be the topic name. These parameters obviously have no
# default values, and must be specified. # default values, and must be specified.
odom0: odom odom0: odom

View File

@ -93,8 +93,8 @@ flowchart TB
Loc["<b>🌍 Localization</b><br/>━━━━━━━━━━━━━━━━<br/>📍 Pnkx Loc<br/>🗺️ Global Pose<br/>🔄 Pose Updates"] Loc["<b>🌍 Localization</b><br/>━━━━━━━━━━━━━━━━<br/>📍 Pnkx Loc<br/>🗺️ Global Pose<br/>🔄 Pose Updates"]
TF["<b>🔄 Transform System</b><br/>━━━━━━━━━━━━━━━━<br/>📐 tf3::BufferCore<br/>🌐 Coordinate Frames<br/>⏱️ Time Synchronization"] TF["<b>🔄 Transform System</b><br/>━━━━━━━━━━━━━━━━<br/>📐 tf3::BufferCore<br/>🌐 Coordinate Frames<br/>⏱️ Time Synchronization"]
Odom["<b>🚗 Odometry</b><br/>━━━━━━━━━━━━━━━━<br/>📍 robot_geometry_msgs::Odometry<br/>⚡ Robot Velocity<br/>📊 Position Tracking"] Odom["<b>🚗 Odometry</b><br/>━━━━━━━━━━━━━━━━<br/>📍 robot_geometry_msgs::Odometry<br/>⚡ Robot Velocity<br/>📊 Position Tracking"]
Laser["<b>📡 Laser Sensors</b><br/>━━━━━━━━━━━━━━━━<br/>🔍 robot_sensor_msgs::LaserScan<br/>🚫 Obstacle Detection<br/>📏 Distance Measurement"] Laser["<b>📡 Laser Sensors</b><br/>━━━━━━━━━━━━━━━━<br/>🔍 sensor_msgs::LaserScan<br/>🚫 Obstacle Detection<br/>📏 Distance Measurement"]
Map["<b>🗺️ Map Server</b><br/>━━━━━━━━━━━━━━━━<br/>📋 robot_nav_msgs::OccupancyGrid<br/>🏗️ Static Map<br/>📐 Map Metadata"] Map["<b>🗺️ Map Server</b><br/>━━━━━━━━━━━━━━━━<br/>📋 nav_msgs::OccupancyGrid<br/>🏗️ Static Map<br/>📐 Map Metadata"]
style DataSources fill:#FFF9C4,stroke:#F57F17,stroke-width:4px,color:#000 style DataSources fill:#FFF9C4,stroke:#F57F17,stroke-width:4px,color:#000
style Goal fill:#FFF59D,stroke:#F57F17,stroke-width:3px,font-size:12px style Goal fill:#FFF59D,stroke:#F57F17,stroke-width:3px,font-size:12px
style Loc fill:#FFF59D,stroke:#F57F17,stroke-width:3px,font-size:12px style Loc fill:#FFF59D,stroke:#F57F17,stroke-width:3px,font-size:12px

View File

@ -6,16 +6,16 @@ Mô tả cấu trúc:
│ │ ├── include/ │ │ ├── include/
│ │ └── test/ │ │ └── test/
│ ├── CMakeLists.txt │ ├── CMakeLists.txt
│ ├── robot_nav_msgs/ │ ├── nav_msgs/
│ │ ├── include/ │ │ ├── include/
│ │ └── test/ │ │ └── test/
│ ├── CMakeLists.txt │ ├── CMakeLists.txt
│ ├── robot_sensor_msgs/ │ ├── sensor_msgs/
│ │ ├── cfg/ │ │ ├── cfg/
│ │ ├── include/ │ │ ├── include/
│ │ └── test/ │ │ └── test/
│ ├── CMakeLists.txt │ ├── CMakeLists.txt
│ ├── robot_std_msgs/ │ ├── std_msgs/
│ │ ├── include/ │ │ ├── include/
│ │ └── CMakeLists.txt │ │ └── CMakeLists.txt
│ └── CMakeLists.txt (root) │ └── CMakeLists.txt (root)

View File

@ -76,7 +76,7 @@ class ILocalizationSource {
**File:** `src/Navigations/Cores/move_base_core/include/move_base_core/map_provider.h` **File:** `src/Navigations/Cores/move_base_core/include/move_base_core/map_provider.h`
```cpp ```cpp
class IMapProvider { class IMapProvider {
virtual robot_nav_msgs::OccupancyGrid getMap() = 0; virtual nav_msgs::OccupancyGrid getMap() = 0;
virtual bool isMapAvailable() = 0; virtual bool isMapAvailable() = 0;
}; };
``` ```
@ -85,7 +85,7 @@ class IMapProvider {
**File:** `src/Navigations/Cores/move_base_core/include/move_base_core/sensor_source.h` **File:** `src/Navigations/Cores/move_base_core/include/move_base_core/sensor_source.h`
```cpp ```cpp
class ISensorSource { class ISensorSource {
virtual robot_sensor_msgs::LaserScan getLatestScan() = 0; virtual sensor_msgs::LaserScan getLatestScan() = 0;
virtual bool hasNewData() = 0; virtual bool hasNewData() = 0;
}; };
``` ```

View File

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

View File

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

View File

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

@ -1 +1 @@
Subproject commit d6512018efc5ef63d64a6aeb97ecaf89d83cbd80 Subproject commit 6d55c6c4beb86ae77c20cba3f26c6231a16912fa

@ -1 +1 @@
Subproject commit 9c84e64253fe959931cd456cf2eb164af9ee1c92 Subproject commit 92264eaffc3d2b0e75f0dd5b473f95a3de2d313b

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

@ -1 +1 @@
Subproject commit 41d47c9c9e7116d837c16930151eb58165039a5b Subproject commit 56ef1a8fc0ed7fcf6a612c1060bbc04e09f04669

@ -1 +1 @@
Subproject commit 4246453ae6598b75be664acef3e9fc276129a131 Subproject commit 2c3d7d586d1a664573b99f45d8521950d46db30a

@ -1 +1 @@
Subproject commit e4db1da907b8d77ac8b838d4a03e4e57a8c0eb6f Subproject commit 2987c1a481390e4d0bf08cf97aee3bc758d23ad1

@ -1 +1 @@
Subproject commit 1fefb2a389d397a467986f604c7747665f6cd289 Subproject commit a183d4bb7bdd1e6eb44be08911cc1a4e4590c4e4

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

View File

@ -10,7 +10,7 @@
#include <vector> #include <vector>
#include <memory> #include <memory>
#include <robot_std_msgs/Header.h> #include <std_msgs/Header.h>
#include <robot_nav_2d_msgs/Pose2DStamped.h> #include <robot_nav_2d_msgs/Pose2DStamped.h>
namespace robot_nav_2d_msgs namespace robot_nav_2d_msgs
@ -30,7 +30,7 @@ struct Path2D_
(void)_alloc; (void)_alloc;
} }
typedef ::robot_std_msgs::Header _header_type; typedef ::std_msgs::Header _header_type;
_header_type header; _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; 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 <vector>
#include <memory> #include <memory>
#include <robot_std_msgs/Header.h> #include <std_msgs/Header.h>
#include <robot_nav_2d_msgs/ComplexPolygon2D.h> #include <robot_nav_2d_msgs/ComplexPolygon2D.h>
#include <robot_std_msgs/ColorRGBA.h> #include <std_msgs/ColorRGBA.h>
namespace robot_nav_2d_msgs namespace robot_nav_2d_msgs
{ {
@ -35,13 +35,13 @@ struct Polygon2DCollection_
typedef ::robot_std_msgs::Header _header_type; typedef ::std_msgs::Header _header_type;
_header_type header; _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; 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; _polygons_type polygons;
typedef std::vector< ::robot_std_msgs::ColorRGBA , typename std::allocator_traits<ContainerAllocator>::template rebind_alloc< ::robot_std_msgs::ColorRGBA >> _colors_type; typedef std::vector< ::std_msgs::ColorRGBA , typename std::allocator_traits<ContainerAllocator>::template rebind_alloc< ::std_msgs::ColorRGBA >> _colors_type;
_colors_type colors; _colors_type colors;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -24,10 +24,10 @@
## Path Transformations ## Path Transformations
| to `robot_nav_2d_msgs` | from `robot_nav_2d_msgs` | | to `robot_nav_2d_msgs` | from `robot_nav_2d_msgs` |
| -- | -- | | -- | -- |
| `Path2D pathToPath(robot_nav_msgs::Path)` |`robot_nav_msgs::Path pathToPath(Path2D)` | `Path2D pathToPath(nav_msgs::Path)` |`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)` | `Path2D posesToPath2D(std::vector<robot_geometry_msgs::PoseStamped>)` | `nav_msgs::Path poses2DToPath(std::vector<robot_geometry_msgs::Pose2D>, std::string, robot::Time)`
Also, `robot_nav_msgs::Path posesToPath(std::vector<robot_geometry_msgs::PoseStamped>)` Also, `nav_msgs::Path posesToPath(std::vector<robot_geometry_msgs::PoseStamped>)`
## Polygon Transformations ## Polygon Transformations
| to `robot_nav_2d_msgs` | from `robot_nav_2d_msgs` | | to `robot_nav_2d_msgs` | from `robot_nav_2d_msgs` |
@ -42,7 +42,7 @@ Also, `robot_nav_msgs::Path posesToPath(std::vector<robot_geometry_msgs::PoseSta
| to `nav_grid` info | from `nav_grid` info | | to `nav_grid` info | from `nav_grid` info |
| -- | -- | | -- | -- |
|`nav_grid::NavGridInfo infoToInfo(robot_nav_msgs::MapMetaData, std::string)` | `robot_nav_msgs::MapMetaData infoToInfo(nav_grid::NavGridInfo)` |`nav_grid::NavGridInfo infoToInfo(nav_msgs::MapMetaData, std::string)` | `nav_msgs::MapMetaData infoToInfo(nav_grid::NavGridInfo)`
| to two dimensional pose | to three dimensional pose | | 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/Pose2DStamped.h>
#include <robot_nav_2d_msgs/NavGridInfo.h> #include <robot_nav_2d_msgs/NavGridInfo.h>
#include <robot_nav_2d_msgs/UIntBounds.h> #include <robot_nav_2d_msgs/UIntBounds.h>
#include <robot_nav_msgs/MapMetaData.h> #include <nav_msgs/MapMetaData.h>
#include <robot_nav_msgs/Path.h> #include <nav_msgs/Path.h>
#include <nav_grid/nav_grid.h> #include <nav_grid/nav_grid.h>
#include <nav_core2/bounds.h> #include <nav_core2/bounds.h>
// #include <tf/tf.h> // #include <tf/tf.h>
@ -76,12 +76,12 @@ namespace robot_nav_2d_utils
const ::std::string &frame, const robot::Time &stamp); const ::std::string &frame, const robot::Time &stamp);
// Path Transformations // Path Transformations
::robot_nav_2d_msgs::Path2D pathToPath(const robot_nav_msgs::Path &path); ::robot_nav_2d_msgs::Path2D pathToPath(const nav_msgs::Path &path);
robot_nav_msgs::Path posesToPath(const ::std::vector<::robot_geometry_msgs::PoseStamped> &poses); 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); ::robot_nav_2d_msgs::Path2D posesToPath2D(const ::std::vector<::robot_geometry_msgs::PoseStamped> &poses);
robot_nav_msgs::Path poses2DToPath(const ::std::vector<::robot_geometry_msgs::Pose2D> &poses, nav_msgs::Path poses2DToPath(const ::std::vector<::robot_geometry_msgs::Pose2D> &poses,
const ::std::string &frame, const robot::Time &stamp); const ::std::string &frame, const robot::Time &stamp);
robot_nav_msgs::Path pathToPath(const ::robot_nav_2d_msgs::Path2D &path2d); nav_msgs::Path pathToPath(const ::robot_nav_2d_msgs::Path2D &path2d);
// Polygon Transformations // Polygon Transformations
::robot_geometry_msgs::Polygon polygon2Dto3D(const ::robot_nav_2d_msgs::Polygon2D &polygon_2d); ::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); nav_grid::NavGridInfo fromMsg(const ::robot_nav_2d_msgs::NavGridInfo &msg);
::robot_geometry_msgs::Pose getOrigin3D(const nav_grid::NavGridInfo &info); ::robot_geometry_msgs::Pose getOrigin3D(const nav_grid::NavGridInfo &info);
::robot_geometry_msgs::Pose2D getOrigin2D(const nav_grid::NavGridInfo &info); ::robot_geometry_msgs::Pose2D getOrigin2D(const nav_grid::NavGridInfo &info);
nav_grid::NavGridInfo infoToInfo(const robot_nav_msgs::MapMetaData &metadata, const ::std::string &frame); nav_grid::NavGridInfo infoToInfo(const nav_msgs::MapMetaData &metadata, const ::std::string &frame);
robot_nav_msgs::MapMetaData infoToInfo(const nav_grid::NavGridInfo &info); nav_msgs::MapMetaData infoToInfo(const nav_grid::NavGridInfo &info);
// Bounds Transformations // Bounds Transformations
robot_nav_2d_msgs::UIntBounds toMsg(const nav_core2::UIntBounds &bounds); 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 #define ROBOT_NAV_2D_UTILS_ODOM_SUBSCRIBER_H
#include <robot_nav_2d_utils/conversions.h> #include <robot_nav_2d_utils/conversions.h>
#include <robot_nav_msgs/Odometry.h> #include <nav_msgs/Odometry.h>
#include <robot_nav_2d_msgs/Twist2DStamped.h> #include <robot_nav_2d_msgs/Twist2DStamped.h>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <string> #include <string>
@ -63,14 +63,14 @@ namespace robot_nav_2d_utils
{ {
std::string odom_topic; std::string odom_topic;
// nh.param("odom_topic", odom_topic, default_topic); // nh.param("odom_topic", odom_topic, default_topic);
// odom_sub_ = nh.subscribe<robot_nav_msgs::Odometry>(odom_topic, 1, boost::bind(&OdomSubscriber::odomCallback, this, _1)); // odom_sub_ = nh.subscribe<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::Twist2D getTwist() { return odom_vel_.velocity; }
inline robot_nav_2d_msgs::Twist2DStamped getTwistStamped() { return odom_vel_; } inline robot_nav_2d_msgs::Twist2DStamped getTwistStamped() { return odom_vel_; }
protected: protected:
void odomCallback(const robot_nav_msgs::Odometry::ConstPtr &msg) void odomCallback(const nav_msgs::Odometry::ConstPtr &msg)
{ {
std::cout << "odom received!" << std::endl; std::cout << "odom received!" << std::endl;
boost::mutex::scoped_lock lock(odom_mutex_); boost::mutex::scoped_lock lock(odom_mutex_);

View File

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

View File

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

View File

@ -29,7 +29,7 @@ Some packages that implement this interface:
- tf2_eigen - tf2_eigen
- tf2_geometry_msgs - tf2_geometry_msgs
- tf2_kdl - tf2_kdl
- tf2_robot_sensor_msgs - tf2_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>. 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) set(CMAKE_BUILD_TYPE Release)
endif() endif()
set(PACKAGES_DIR geometry_msgs robot_std_msgs nav_core nav_core2 robot_nav_2d_utils pthread) set(PACKAGES_DIR geometry_msgs std_msgs nav_core nav_core2 robot_nav_2d_utils pthread)
find_package(Boost REQUIRED COMPONENTS filesystem system) 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. * `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. * `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 [`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. 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.
The default values are `width=0, height=0, resolution=1.0, frame_id="map", origin_x=0.0, origin_y=0.0`. 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 * @struct NavGridInfo
* This class defines a way to discretize a finite section of the world into a grid. * This class defines a way to discretize a finite section of the world into a grid.
* It contains similar information to the ROS msg robot_nav_msgs/MapMetaData (aka the info field of robot_nav_msgs/OccupancyGrid) * It contains similar information to the ROS msg nav_msgs/MapMetaData (aka the info field of nav_msgs/OccupancyGrid)
* except the map_load_time is removed, the geometry is simplified from a Pose to xy coordinates, and the frame_id * except the map_load_time is removed, the geometry is simplified from a Pose to xy coordinates, and the frame_id
* is added. * is added.
*/ */

View File

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

View File

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

View File

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

View File

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