Skip to content

Commit 28fd076

Browse files
committed
refactor naming
1 parent 6e0d1cb commit 28fd076

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+285
-286
lines changed

README.md

+10-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Nav2 Complete Coverage
1+
# Open Navigation's Nav2 Complete Coverage
22

33
This package contains the Complete Coverage Task Server & auxiliary tools utilizing the [Fields2Cover](https://github.com/Fields2Cover/Fields2Cover) complete coverage planning system which includes a great deal of options in headland, swath, route, and final path planning. You can find more information about Fields2Cover (F2C) in its [ReadTheDocs Documentation](https://fields2cover.github.io/index.html). It can accept both GPS and Cartesian coordinates and publishes the field, headland, swaths, and route as separate topics in cartesian coordinates for debugging and visualization.
44

@@ -8,31 +8,31 @@ This capability was created by [Open Navigation LLC](https://www.opennav.org/) i
88

99
This server exposes all of the features of Fields2Cover as a Lifecycle-Component Nav2 Task Server like all others within the Nav2 Framework, so it should feel very familiar to those using Nav2 already. The server is split into modular stages with factories and enum types for all known options which can be easily expanded up over time scalably. It even could be expanded to include custom coverage capabilities separate of F2C if desired. This capability is split into 4 packages:
1010

11-
- `nav2_coverage`: Contains the main Nav2 Task Server.
11+
- `opennav_coverage`: Contains the main Nav2 Task Server.
1212

13-
- `nav2_coverage_msgs`: Contains the action definition for the Coverage Navigator, Coverage Planner. Also contains several useful message types for F2C.
13+
- `opennav_coverage_msgs`: Contains the action definition for the Coverage Navigator, Coverage Planner. Also contains several useful message types for F2C.
1414

15-
- `nav2_coverage_bt`: Contains the Behavior Tree Nodes and an example XML file using the Task Server to complete a simple coverage navigation task.
15+
- `opennav_coverage_bt`: Contains the Behavior Tree Nodes and an example XML file using the Task Server to complete a simple coverage navigation task.
1616

17-
- `nav2_coverage_navigator`: Contains the BT Navigator plugin exposing `NavigateCompleteCoverage` action server analog to `NavigateToPose` and `NavigateThroughPoses`.
17+
- `opennav_coverage_navigator`: Contains the BT Navigator plugin exposing `NavigateCompleteCoverage` action server analog to `NavigateToPose` and `NavigateThroughPoses`.
1818

1919
Fields2Cover is a living library with new features planned to be added (for example those discussed in a [Nav2 integration ticket](https://github.com/Fields2Cover/Fields2Cover/issues/73)). As such, as new F2C capabilities are created, they will be welcome for integration here. If you see anything missing, please let us know or submit a PR to expose it!
2020

2121
## Interfaces
2222

23-
The two main interfaces are `NavigateCompleteCoverage` and `ComputeCoveragePath`. The first is the action definition to request the BT Navigator's `CoverageNavigator` plugin to navigate usign a Complete Coverage task input. The latter is an analog to the `PlannerServer`'s action definition for computing Complete Coverage paths using the `nav2_coverage` action server. See `nav2_coverage_msgs` for complete details.
23+
The two main interfaces are `NavigateCompleteCoverage` and `ComputeCoveragePath`. The first is the action definition to request the BT Navigator's `CoverageNavigator` plugin to navigate usign a Complete Coverage task input. The latter is an analog to the `PlannerServer`'s action definition for computing Complete Coverage paths using the `opennav_coverage` action server. See `opennav_coverage_msgs` for complete details.
2424

2525
### ComputeCoveragePath
2626

2727
This contains `generate_headland`, `generate_route`, and `generate_path` about whether the coverage task should remove a set headland, generate route to order the coverage swaths, or compute a path connecting the ordered route swaths; respectively. You can learn more about these stages in F2C's documentation - particularly from the graphic on its [index page](https://fields2cover.github.io/index.html).
2828

2929
Each of the stages (including `generate_swaths`, which is always on) has its own `_mode` message in the action containing its potential parameters to specify a mode. If not modified, it uses the parameters set in the server at launch time or after dynamic reconfiguration. See the parameter information below or the message files for complete details.
3030

31-
Finally, it contains the polygon information. This can be represented either as GML files, with [an example in `nav2_coverage/test`](./nav2_coverage/test/test_field.xml), or as a polygon in the message itself. If using GML files, set `goal.use_gml_file = true`. If your GML file contains multiple fields, set the ID of which to use with `goal.gml_field_id = id`, whereas the number is its ordered position in the file.
31+
Finally, it contains the polygon information. This can be represented either as GML files, with [an example in `opennav_coverage/test`](./opennav_coverage/test/test_field.xml), or as a polygon in the message itself. If using GML files, set `goal.use_gml_file = true`. If your GML file contains multiple fields, set the ID of which to use with `goal.gml_field_id = id`, whereas the number is its ordered position in the file.
3232

3333
When setting the polygon (`goal.polygons`), this is a vector of polygons. If only considering a bounding field, only populate the first field shape. If there are internal voids, use subsequent polygons to indicate them. The coordinate type has `axis1` and `axis2` instead of X and Y as the server can process both GPS and cartesian coordinates. If specifying the polygon outside of GML files, you must specify the frame of reference of the polygon using the `goal.frame_id` field. This is not used for GML files as those should contain the frame within it.
3434

35-
The result returns a `result.nav_path` -- which is a `nav_msgs/Path` containing the coverage path requested **only if** all `generate_path` is `true`. This can be followed by a local trajectory planner or controller directly. This is what is used in the `nav2_coverage_bt` examples for basic coverage navigation. It also returns `result.coverage_path` which contains an ordered set of swaths and paths to connect them (if applicable settings enabled) which can be used for more task-specific navigation. For example, navigating with a tool down or enabled on swaths and raised in turns to connect to other swaths. A utility is provided in `nav2_coverage/utils.hpp` for iterating through this custom `coverage_path` for convenience.
35+
The result returns a `result.nav_path` -- which is a `nav_msgs/Path` containing the coverage path requested **only if** all `generate_path` is `true`. This can be followed by a local trajectory planner or controller directly. This is what is used in the `opennav_coverage_bt` examples for basic coverage navigation. It also returns `result.coverage_path` which contains an ordered set of swaths and paths to connect them (if applicable settings enabled) which can be used for more task-specific navigation. For example, navigating with a tool down or enabled on swaths and raised in turns to connect to other swaths. A utility is provided in `opennav_coverage/utils.hpp` for iterating through this custom `coverage_path` for convenience.
3636

3737
It also returns an error code, if any error occurred and the total planning time for metrics analysis.
3838

@@ -42,7 +42,7 @@ The Coverage Navigator calls the `ComputeCoveragePath` action within its BT XML.
4242

4343
It returns the error code from the BT's error code IDs if any error occurs. Otherwise, it returns live regular feedback on the robot's current position, navigation time elapsed, number of recoveries enacted, distance remaining in the path (if `nav_path` valid), and a rough ETA.
4444

45-
Navigator Plugins require **ROS 2 Iron or newer**. Otherwise, you may still use the Coverage Server in **Foxy or newer**, just don't compile the `nav2_coverage_navigator` package.
45+
Navigator Plugins require **ROS 2 Iron or newer**. Otherwise, you may still use the Coverage Server in **Foxy or newer**, just don't compile the `opennav_coverage_navigator` package.
4646

4747
Note: `NavigateCompleteCoverage` action message and `CoverageNavigator` are subject to API changes to continue to be most useful to users! The current API is relatively basic and will be adapted as more users adopt its use and need additional fields exposed to the application layer. If you need any adjustments, feel free to ask!
4848

@@ -108,7 +108,7 @@ All type string.
108108
| error_code_id | The complete coverage error code" | uint |
109109
| planning_time | The time to compute coverage plan | double |
110110
| nav_path | The coverage plan as a nav_msgs/Path to track directly | `nav_msgs/Path` |
111-
| coverage_path | The coverage plan as an ordered set of swaths and route connections | `nav2_coverage_msgs/PathComponents` |
111+
| coverage_path | The coverage plan as an ordered set of swaths and route connections | `opennav_coverage_msgs/PathComponents` |
112112

113113

114114
#### CoverageCancel Ports
@@ -149,9 +149,4 @@ If you use this work, please make sure to cite both Nav2 and Fields2Cover:
149149

150150
## Current Work
151151

152-
- Rename packages / repo? opennav_nav2? nav2_coverage_msgs? opennav_ prefix?
153-
- A couple of utilities for the BT nodes to iterate through the swath-turn combos (optional)
154-
155-
156-
157152
- Use setup with BT nodes / XML / Navigator. Simulator demo altogether. Demo video (in readme).

nav2_complete_coverage_msgs/msg/Coordinates.msg

-1
This file was deleted.

nav2_coverage/README.md

-3
This file was deleted.

nav2_coverage/CMakeLists.txt renamed to opennav_coverage/CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.5)
2-
project(nav2_coverage)
2+
project(opennav_coverage)
33

44
find_package(ament_cmake REQUIRED)
55
find_package(rclcpp REQUIRED)
@@ -14,7 +14,7 @@ find_package(nav_msgs REQUIRED)
1414
find_package(geometry_msgs REQUIRED)
1515
find_package(builtin_interfaces REQUIRED)
1616
find_package(tf2_ros REQUIRED)
17-
find_package(nav2_complete_coverage_msgs REQUIRED)
17+
find_package(opennav_coverage_msgs REQUIRED)
1818
find_package(Fields2Cover REQUIRED)
1919

2020
# potentially replace with nav2_common, nav2_package()
@@ -25,7 +25,7 @@ include_directories(
2525
include
2626
)
2727

28-
set(executable_name nav2_coverage)
28+
set(executable_name opennav_coverage)
2929
set(library_name ${executable_name}_core)
3030

3131
set(dependencies
@@ -41,7 +41,7 @@ set(dependencies
4141
geometry_msgs
4242
builtin_interfaces
4343
tf2_ros
44-
nav2_complete_coverage_msgs
44+
opennav_coverage_msgs
4545
)
4646

4747
add_library(${library_name} SHARED
@@ -69,7 +69,7 @@ ament_target_dependencies(${executable_name}
6969
${dependencies}
7070
)
7171

72-
rclcpp_components_register_nodes(${library_name} "nav2_coverage::CoverageServer")
72+
rclcpp_components_register_nodes(${library_name} "opennav_coverage::CoverageServer")
7373

7474
install(TARGETS ${library_name}
7575
ARCHIVE DESTINATION lib

opennav_coverage/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Open Navigation's Nav2 Complete Coverage Server
2+
3+
This package contains the coverage server

nav2_coverage/include/nav2_coverage/coverage_server.hpp renamed to opennav_coverage/include/opennav_coverage/coverage_server.hpp

+13-13
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef NAV2_COVERAGE__COVERAGE_SERVER_HPP_
16-
#define NAV2_COVERAGE__COVERAGE_SERVER_HPP_
15+
#ifndef OPENNAV_COVERAGE__COVERAGE_SERVER_HPP_
16+
#define OPENNAV_COVERAGE__COVERAGE_SERVER_HPP_
1717

1818
#include <vector>
1919
#include <memory>
@@ -24,16 +24,16 @@
2424
#include "nav2_util/lifecycle_node.hpp"
2525
#include "nav2_util/node_utils.hpp"
2626
#include "nav2_util/simple_action_server.hpp"
27-
#include "nav2_coverage/headland_generator.hpp"
28-
#include "nav2_coverage/swath_generator.hpp"
29-
#include "nav2_coverage/route_generator.hpp"
30-
#include "nav2_coverage/path_generator.hpp"
31-
#include "nav2_coverage/visualizer.hpp"
27+
#include "opennav_coverage/headland_generator.hpp"
28+
#include "opennav_coverage/swath_generator.hpp"
29+
#include "opennav_coverage/route_generator.hpp"
30+
#include "opennav_coverage/path_generator.hpp"
31+
#include "opennav_coverage/visualizer.hpp"
3232

33-
namespace nav2_coverage
33+
namespace opennav_coverage
3434
{
3535
/**
36-
* @class nav2_coverage::CoverageServer
36+
* @class opennav_coverage::CoverageServer
3737
* @brief An action server which implements highly reconfigurable complete
3838
* coverage planning using the Fields2Cover library
3939
*/
@@ -43,13 +43,13 @@ class CoverageServer : public nav2_util::LifecycleNode
4343
using ActionServer = nav2_util::SimpleActionServer<ComputeCoveragePath>;
4444

4545
/**
46-
* @brief A constructor for nav2_coverage::CoverageServer
46+
* @brief A constructor for opennav_coverage::CoverageServer
4747
* @param options Additional options to control creation of the node.
4848
*/
4949
explicit CoverageServer(const rclcpp::NodeOptions & options = rclcpp::NodeOptions());
5050

5151
/**
52-
* @brief A destructor for nav2_coverage::CoverageServer
52+
* @brief A destructor for opennav_coverage::CoverageServer
5353
*/
5454
~CoverageServer() = default;
5555

@@ -131,6 +131,6 @@ class CoverageServer : public nav2_util::LifecycleNode
131131
bool cartesian_frame_;
132132
};
133133

134-
} // namespace nav2_coverage
134+
} // namespace opennav_coverage
135135

136-
#endif // NAV2_COVERAGE__COVERAGE_SERVER_HPP_
136+
#endif // OPENNAV_COVERAGE__COVERAGE_SERVER_HPP_

nav2_coverage/include/nav2_coverage/headland_generator.hpp renamed to opennav_coverage/include/opennav_coverage/headland_generator.hpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef NAV2_COVERAGE__HEADLAND_GENERATOR_HPP_
16-
#define NAV2_COVERAGE__HEADLAND_GENERATOR_HPP_
15+
#ifndef OPENNAV_COVERAGE__HEADLAND_GENERATOR_HPP_
16+
#define OPENNAV_COVERAGE__HEADLAND_GENERATOR_HPP_
1717

1818
#include <vector>
1919
#include <string>
@@ -23,11 +23,11 @@
2323
#include "rclcpp/rclcpp.hpp"
2424
#include "nav2_util/lifecycle_node.hpp"
2525
#include "nav2_util/node_utils.hpp"
26-
#include "nav2_complete_coverage_msgs/msg/headland_mode.hpp"
27-
#include "nav2_coverage/utils.hpp"
28-
#include "nav2_coverage/types.hpp"
26+
#include "opennav_coverage_msgs/msg/headland_mode.hpp"
27+
#include "opennav_coverage/utils.hpp"
28+
#include "opennav_coverage/types.hpp"
2929

30-
namespace nav2_coverage
30+
namespace opennav_coverage
3131
{
3232

3333
/**
@@ -62,7 +62,7 @@ class HeadlandGenerator
6262
* @param settings Action request information
6363
*/
6464
Field generateHeadlands(
65-
const Field & field, const nav2_complete_coverage_msgs::msg::HeadlandMode & settings);
65+
const Field & field, const opennav_coverage_msgs::msg::HeadlandMode & settings);
6666

6767
/**
6868
* @brief Sets the mode manually of the Headland for dynamic parameters
@@ -104,6 +104,6 @@ class HeadlandGenerator
104104
rclcpp::Logger logger_{rclcpp::get_logger("HeadlandGenerator")};
105105
};
106106

107-
} // namespace nav2_coverage
107+
} // namespace opennav_coverage
108108

109-
#endif // NAV2_COVERAGE__HEADLAND_GENERATOR_HPP_
109+
#endif // OPENNAV_COVERAGE__HEADLAND_GENERATOR_HPP_

nav2_coverage/include/nav2_coverage/path_generator.hpp renamed to opennav_coverage/include/opennav_coverage/path_generator.hpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef NAV2_COVERAGE__PATH_GENERATOR_HPP_
16-
#define NAV2_COVERAGE__PATH_GENERATOR_HPP_
15+
#ifndef OPENNAV_COVERAGE__PATH_GENERATOR_HPP_
16+
#define OPENNAV_COVERAGE__PATH_GENERATOR_HPP_
1717

1818
#include <vector>
1919
#include <string>
@@ -24,12 +24,12 @@
2424
#include "rclcpp/rclcpp.hpp"
2525
#include "nav2_util/lifecycle_node.hpp"
2626
#include "nav2_util/node_utils.hpp"
27-
#include "nav2_complete_coverage_msgs/msg/path_mode.hpp"
28-
#include "nav2_coverage/utils.hpp"
29-
#include "nav2_coverage/types.hpp"
30-
#include "nav2_coverage/robot_params.hpp"
27+
#include "opennav_coverage_msgs/msg/path_mode.hpp"
28+
#include "opennav_coverage/utils.hpp"
29+
#include "opennav_coverage/types.hpp"
30+
#include "opennav_coverage/robot_params.hpp"
3131

32-
namespace nav2_coverage
32+
namespace opennav_coverage
3333
{
3434

3535
/**
@@ -74,7 +74,7 @@ class PathGenerator
7474
* @return Path complete path
7575
*/
7676
Path generatePath(
77-
const Swaths & swaths, const nav2_complete_coverage_msgs::msg::PathMode & settings);
77+
const Swaths & swaths, const opennav_coverage_msgs::msg::PathMode & settings);
7878

7979
/**
8080
* @brief Sets the mode manually of the paths for dynamic parameters
@@ -131,6 +131,6 @@ class PathGenerator
131131
rclcpp::Logger logger_{rclcpp::get_logger("SwathGenerator")};
132132
};
133133

134-
} // namespace nav2_coverage
134+
} // namespace opennav_coverage
135135

136-
#endif // NAV2_COVERAGE__PATH_GENERATOR_HPP_
136+
#endif // OPENNAV_COVERAGE__PATH_GENERATOR_HPP_

nav2_coverage/include/nav2_coverage/robot_params.hpp renamed to opennav_coverage/include/opennav_coverage/robot_params.hpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef NAV2_COVERAGE__ROBOT_PARAMS_HPP_
16-
#define NAV2_COVERAGE__ROBOT_PARAMS_HPP_
15+
#ifndef OPENNAV_COVERAGE__ROBOT_PARAMS_HPP_
16+
#define OPENNAV_COVERAGE__ROBOT_PARAMS_HPP_
1717

1818
#include <vector>
1919
#include <string>
@@ -23,10 +23,10 @@
2323
#include "rclcpp/rclcpp.hpp"
2424
#include "nav2_util/lifecycle_node.hpp"
2525
#include "nav2_util/node_utils.hpp"
26-
#include "nav2_coverage/utils.hpp"
27-
#include "nav2_coverage/types.hpp"
26+
#include "opennav_coverage/utils.hpp"
27+
#include "opennav_coverage/types.hpp"
2828

29-
namespace nav2_coverage
29+
namespace opennav_coverage
3030
{
3131

3232
/**
@@ -89,6 +89,6 @@ class RobotParams
8989
Robot robot_;
9090
};
9191

92-
} // namespace nav2_coverage
92+
} // namespace opennav_coverage
9393

94-
#endif // NAV2_COVERAGE__ROBOT_PARAMS_HPP_
94+
#endif // OPENNAV_COVERAGE__ROBOT_PARAMS_HPP_

nav2_coverage/include/nav2_coverage/route_generator.hpp renamed to opennav_coverage/include/opennav_coverage/route_generator.hpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef NAV2_COVERAGE__ROUTE_GENERATOR_HPP_
16-
#define NAV2_COVERAGE__ROUTE_GENERATOR_HPP_
15+
#ifndef OPENNAV_COVERAGE__ROUTE_GENERATOR_HPP_
16+
#define OPENNAV_COVERAGE__ROUTE_GENERATOR_HPP_
1717

1818
#include <vector>
1919
#include <string>
@@ -23,11 +23,11 @@
2323
#include "rclcpp/rclcpp.hpp"
2424
#include "nav2_util/lifecycle_node.hpp"
2525
#include "nav2_util/node_utils.hpp"
26-
#include "nav2_complete_coverage_msgs/msg/route_mode.hpp"
27-
#include "nav2_coverage/utils.hpp"
28-
#include "nav2_coverage/types.hpp"
26+
#include "opennav_coverage_msgs/msg/route_mode.hpp"
27+
#include "opennav_coverage/utils.hpp"
28+
#include "opennav_coverage/types.hpp"
2929

30-
namespace nav2_coverage
30+
namespace opennav_coverage
3131
{
3232

3333
/**
@@ -74,7 +74,7 @@ class RouteGenerator
7474
* @return Swaths ordered swaths
7575
*/
7676
Swaths generateRoute(
77-
const Swaths & swaths, const nav2_complete_coverage_msgs::msg::RouteMode & settings);
77+
const Swaths & swaths, const opennav_coverage_msgs::msg::RouteMode & settings);
7878

7979
/**
8080
* @brief Sets the mode manually of the Route for dynamic parameters
@@ -126,6 +126,6 @@ class RouteGenerator
126126
rclcpp::Logger logger_{rclcpp::get_logger("RouteGenerator")};
127127
};
128128

129-
} // namespace nav2_coverage
129+
} // namespace opennav_coverage
130130

131-
#endif // NAV2_COVERAGE__ROUTE_GENERATOR_HPP_
131+
#endif // OPENNAV_COVERAGE__ROUTE_GENERATOR_HPP_

0 commit comments

Comments
 (0)