Skip to content

Commit

Permalink
Merge pull request #47 from ethz-asl/feature/mav_planning_msgs_removal
Browse files Browse the repository at this point in the history
Feature/mav planning msgs removal
  • Loading branch information
rikba authored Jan 29, 2021
2 parents 175d363 + f61bdef commit d9eeb14
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 23 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
catkin config --extend /opt/ros/melodic
```

Download package dependencies from [dependencies.rosinstall](install/dependencies.rosinstall).
Download package dependencies from [dependencies.rosinstall](install/dependencies.rosinstall).<br>
**Note**: If you have not setup [SSH keys in GitHub](https://help.github.com/en/enterprise/2.16/user/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) use [dependencies_https.rosinstall](install/dependencies_https.rosinstall).
```
cd ~/catkin_ws/src
wstool init
wstool set --git polygon_coverage_planning git@github.com:ethz-asl/polygon_coverage_planning.git -v v1.0.0
wstool set --git polygon_coverage_planning git@github.com:ethz-asl/polygon_coverage_planning.git -v v2.0.0
wstool update
wstool merge polygon_coverage_planning/install/dependencies.rosinstall
wstool update
Expand Down Expand Up @@ -67,7 +67,7 @@ The polygon can be set via
- RVIZ Polygon Tool as in the video above.

The plan is generated via
- ROS [service](https://github.com/ethz-asl/mav_comm/blob/master/mav_planning_msgs/srv/PlannerService.srv) call 'rosservice call /coverage_planner/plan_path' or
- ROS [service](polygon_coverage_msgs/srv/PlannerService.srv) call 'rosservice call /coverage_planner/plan_path' or
- clicking start and goal points using the RVIZ clicked_point tool as in the video above.

### Euclidean Shortest Path Planning
Expand Down
2 changes: 1 addition & 1 deletion install/dependencies.rosinstall
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
- git: {local-name: catkin_simple, uri: 'git@github.com:catkin/catkin_simple.git', version: 0e62848b12da76c8cc58a1add42b4f894d1ac21e}
- git: {local-name: cgal_catkin, uri: 'git@github.com:ethz-asl/cgal_catkin.git', version: releases/CGAL-5.0.3}
- git: {local-name: polygon_coverage_planning, uri: 'git@github.com:ethz-asl/polygon_coverage_planning.git', version: v1.0.0}
- git: {local-name: polygon_coverage_planning, uri: 'git@github.com:ethz-asl/polygon_coverage_planning.git', version: v2.0.0}
2 changes: 1 addition & 1 deletion install/dependencies_https.rosinstall
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
- git: {local-name: catkin_simple, uri: 'https://github.com/catkin/catkin_simple.git', version: 0e62848b12da76c8cc58a1add42b4f894d1ac21e}
- git: {local-name: cgal_catkin, uri: 'https://github.com/ethz-asl/cgal_catkin.git', version: releases/CGAL-5.0.3}
- git: {local-name: polygon_coverage_planning, uri: 'https://github.com/ethz-asl/polygon_coverage_planning.git', version: v1.0.0}
- git: {local-name: polygon_coverage_planning, uri: 'https://github.com/ethz-asl/polygon_coverage_planning.git', version: v2.0.0}
10 changes: 5 additions & 5 deletions install/prepare-jenkins-slave.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ ROS_VERSION=`rosversion -d`
echo "ROS version: ${ROS_VERSION}"

# Build dependencies.
sudo apt install -y python-wstool python-catkin-tools
sudo apt-get install -y python-wstool python-catkin-tools

# Package dependencies.
echo "Installing MAV_COMM dependencies."
sudo apt install -y ros-${ROS_VERSION}-mav-msgs ros-${ROS_VERSION}-mav-planning-msgs
sudo apt-get install -y ros-${ROS_VERSION}-mav-msgs
echo "Installing CGAL dependencies."
sudo apt install -y libgmp-dev libmpfr-dev
sudo apt-get install -y libgmp-dev libmpfr-dev
echo "Installing MONO dependencies."
sudo apt install -y mono-devel
sudo apt-get install -y mono-devel
echo "Installig GLOG dependencices."
sudo apt install -y libgoogle-glog
sudo apt-get install -y libgoogle-glog-dev
2 changes: 1 addition & 1 deletion polygon_coverage_benchmark/test/benchmark-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <ros/ros.h>
#include <yaml-cpp/yaml.h>

#include <mav_planning_msgs/PolygonWithHoles.h>
#include <polygon_coverage_msgs/PolygonWithHoles.h>

#include <polygon_coverage_geometry/cgal_definitions.h>
#include <polygon_coverage_planners/cost_functions/path_cost_functions.h>
Expand Down
1 change: 1 addition & 0 deletions polygon_coverage_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<depend>message_runtime</depend>
<depend>geometry_msgs</depend>
<depend>std_msgs</depend>
<depend>trajectory_msgs</depend>
<depend>xmlrpcpp</depend>
<depend>polygon_coverage_geometry</depend>
</package>
8 changes: 8 additions & 0 deletions polygon_coverage_msgs/srv/PlannerService.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#request fields
geometry_msgs/PoseStamped start_pose #start pose for the planner
geometry_msgs/PoseStamped goal_pose #start pose for the planner
---
# True on success, false on planning failure
bool success
# Either contains a polynomial trajectory:
trajectory_msgs/MultiDOFJointTrajectory sampled_plan
2 changes: 1 addition & 1 deletion polygon_coverage_ros/cfg/polygons/example_l.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A mav_planning_msgs/PolygonWithHoles.msg to describe a rectangle.
# A polygon_coverage_msgs/PolygonWithHoles.msg to describe a rectangle.
polygon:
header:
seq: 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A mav_planning_msgs/PolygonWithHoles.msg to describe a typical BCD cell.
# A polygon_coverage_msgs/PolygonWithHoles.msg to describe a typical BCD cell.
polygon:
header:
seq: 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A mav_planning_msgs/PolygonWithHoles.msg to describe a forest.
# A polygon_coverage_msgs/PolygonWithHoles.msg to describe a forest.
# The planner always picks the largest z as the fixed altitude it plans in.
polygon:
header:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A mav_planning_msgs/PolygonWithHoles.msg to describe a forest.
# A polygon_coverage_msgs/PolygonWithHoles.msg to describe a forest.
# The planner always picks the largest z as the fixed altitude it plans in.
polygon:
header:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A mav_planning_msgs/PolygonWithHoles.msg to describe a forest.
# A polygon_coverage_msgs/PolygonWithHoles.msg to describe a forest.
# The planner always picks the largest z as the fixed altitude it plans in.
polygon:
header:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A mav_planning_msgs/PolygonWithHoles.msg to describe a simple environment that
# A polygon_coverage_msgs/PolygonWithHoles.msg to describe a simple environment that
# resambles the ERL arena in Piombino.
polygon:
header:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <polygon_coverage_planners/sensor_models/sensor_model_base.h>

#include <geometry_msgs/PointStamped.h>
#include <mav_planning_msgs/PlannerService.h>
#include <polygon_coverage_msgs/PlannerService.h>
#include <ros/ros.h>
#include <std_srvs/Empty.h>
#include <visualization_msgs/MarkerArray.h>
Expand Down Expand Up @@ -98,8 +98,9 @@ class PolygonPlannerBase {
void clickPolygonCallback(
const polygon_coverage_msgs::PolygonWithHolesStamped& msg);
// Solves the planning problem from start to goal.
bool planPathCallback(mav_planning_msgs::PlannerService::Request& request,
mav_planning_msgs::PlannerService::Response& response);
bool planPathCallback(
polygon_coverage_msgs::PlannerService::Request& request,
polygon_coverage_msgs::PlannerService::Response& response);
bool publishAllCallback(std_srvs::Empty::Request& request,
std_srvs::Empty::Response& response);
bool publishVisualizationCallback(std_srvs::Empty::Request& request,
Expand Down
1 change: 0 additions & 1 deletion polygon_coverage_ros/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

<depend>roscpp</depend>

<depend>mav_planning_msgs</depend>
<depend>nav_msgs</depend>
<depend>mav_msgs</depend>
<depend>geometry_msgs</depend>
Expand Down
4 changes: 2 additions & 2 deletions polygon_coverage_ros/src/polygon_planner_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ bool PolygonPlannerBase::setPolygonCallback(
}

bool PolygonPlannerBase::planPathCallback(
mav_planning_msgs::PlannerService::Request& request,
mav_planning_msgs::PlannerService::Response& response) {
polygon_coverage_msgs::PlannerService::Request& request,
polygon_coverage_msgs::PlannerService::Response& response) {
planning_complete_ = false;
if (!polygon_.has_value()) {
ROS_WARN("Polygon not set. Cannot plan path.");
Expand Down

0 comments on commit d9eeb14

Please sign in to comment.