diff --git a/examples/dave_demo_launch/CMakeLists.txt b/examples/dave_demo_launch/CMakeLists.txt
index 030bc4ab..f4fd25e5 100644
--- a/examples/dave_demo_launch/CMakeLists.txt
+++ b/examples/dave_demo_launch/CMakeLists.txt
@@ -1,42 +1,11 @@
cmake_minimum_required(VERSION 3.1.1)
project(dave_demo_launch)
-find_package(catkin REQUIRED)
-
-if(NOT "${CMAKE_VERSION}" VERSION_LESS "3.16")
- set(CMAKE_CXX_STANDARD 17)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
-else()
- add_compile_options(-std=c++11)
-endif()
find_package(catkin REQUIRED COMPONENTS)
-find_package(gazebo REQUIRED)
-find_package(roscpp REQUIRED)
-find_package(std_msgs REQUIRED)
-
-include_directories(${roscpp_INCLUDE_DIRS})
-include_directories(${std_msgs_INCLUDE_DIRS})
-include_directories(
- include
- ${catkin_INCLUDE_DIRS}
- ${GAZEBO_INCLUDE_DIRS}
-)
-link_directories(${GAZEBO_LIBRARY_DIRS})
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GAZEBO_CXX_FLAGS}")
-set(SENSOR_ROS_PLUGINS_LIST "")
-
-catkin_package(
- INCLUDE_DIRS
- LIBRARIES
- CATKIN_DEPENDS
- )
+catkin_package()
# for launch
install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
PATTERN "*~" EXCLUDE)
-
-# for Python scripts
-catkin_install_python(PROGRAMS
- DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
diff --git a/examples/dave_demo_launch/package.xml b/examples/dave_demo_launch/package.xml
index a9654a23..1baa4f77 100644
--- a/examples/dave_demo_launch/package.xml
+++ b/examples/dave_demo_launch/package.xml
@@ -5,7 +5,7 @@
The dave_demo_launch package contains launch files for DAVE project demos
dtd
Apache2
- dtd -->
+ dtd
catkin
diff --git a/gazebo/dave_gazebo_world_plugins/CMakeLists.txt b/gazebo/dave_gazebo_world_plugins/CMakeLists.txt
index 001a5088..2073a8e5 100644
--- a/gazebo/dave_gazebo_world_plugins/CMakeLists.txt
+++ b/gazebo/dave_gazebo_world_plugins/CMakeLists.txt
@@ -44,15 +44,19 @@ message(STATUS "GAZEBO_MSG_INCLUDE_DIRS = " ${GAZEBO_MSG_INCLUDE_DIRS})
file(GLOB msgs msgs/*.proto)
catkin_package(
- INCLUDE_DIRS
+ INCLUDE_DIRS
include
- ${CMAKE_CURRENT_BINARY_DIR} # for generated messages
+ # for generated Protobuf messages. Export parent dir (build/), so that
+ # the #include <*.pb.h> line has the package name, consistent between
+ # catkin config --install and --no-install.
+ ${CMAKE_CURRENT_BINARY_DIR}/..
${GAZEBO_MSG_INCLUDE_DIRS}
- LIBRARIES
+ LIBRARIES
+ dave_gazebo_world_plugins_msgs
dave_ocean_current_world_plugin
- CATKIN_DEPENDS
- gazebo_dev
- gazebo_msgs
+ CATKIN_DEPENDS
+ gazebo_dev
+ gazebo_msgs
gazebo_ros
roscpp
)
diff --git a/gazebo/dave_gazebo_world_plugins/src/bathymetry_world_plugin.cc b/gazebo/dave_gazebo_world_plugins/src/bathymetry_world_plugin.cc
index 0b8a4a5b..d06d6ee0 100644
--- a/gazebo/dave_gazebo_world_plugins/src/bathymetry_world_plugin.cc
+++ b/gazebo/dave_gazebo_world_plugins/src/bathymetry_world_plugin.cc
@@ -43,6 +43,7 @@ struct bathy_grid_t
{
std::string prefix;
int priority;
+ int tiles_to_keep;
// lower-left-hand-corner.
double anchor_lat;
@@ -91,6 +92,7 @@ namespace gazebo
bg->prefix = gridSDF->Get("prefix");
bg->priority = gridSDF->Get("priority");
+ bg->tiles_to_keep = gridSDF->Get("tiles_to_keep");
bg->anchor_lat = gridSDF->Get("anchor_lat");
bg->anchor_lon = gridSDF->Get("anchor_lon");
bg->spacing_lat = gridSDF->Get("spacing_lat");
@@ -434,7 +436,7 @@ namespace gazebo
}
// Perform delayed removal
- if (delayRemoveList.size() >= 1)
+ if (delayRemoveList.size() >= this->bathy_grids[nn]->tiles_to_keep)
{
std::string modelnamestr = delayRemoveList.front();
delayRemoveList.erase(delayRemoveList.begin());
diff --git a/gazebo/dave_gazebo_world_plugins/src/ocean_current_world_plugin.cc b/gazebo/dave_gazebo_world_plugins/src/ocean_current_world_plugin.cc
index 8fa228bf..cedf1234 100644
--- a/gazebo/dave_gazebo_world_plugins/src/ocean_current_world_plugin.cc
+++ b/gazebo/dave_gazebo_world_plugins/src/ocean_current_world_plugin.cc
@@ -319,18 +319,7 @@ void UnderwaterCurrentPlugin::LoadStratifiedCurrentDatabase()
transientCurrentParams->Get("databasefilePath");
else
{
- // Using boost:
- // boost::filesystem::path
- // concatPath(boost::filesystem::initial_path().parent_path());
- // concatPath +=
- // ("/uuv_ws/src/dave/models/dave_worlds/" +
- // "worlds/transientOceanCurrentDatabase.csv");
- // this->databaseFilePath = concatPath.generic_string();
- //
- // Use ros package path:
-
- this->databaseFilePath = ros::package::getPath("dave_worlds") +
- "/worlds/transientOceanCurrentDatabase.csv";
+ this->databaseFilePath = "transientOceanCurrentDatabase.csv";
}
GZ_ASSERT(!this->databaseFilePath.empty(),
@@ -350,8 +339,9 @@ void UnderwaterCurrentPlugin::LoadStratifiedCurrentDatabase()
csvFile.open(this->databaseFilePath);
if (!csvFile)
{
- this->databaseFilePath = ros::package::getPath("dave_worlds") +
- "/worlds/" + this->databaseFilePath;
+ common::SystemPaths *paths = common::SystemPaths::Instance();
+ this->databaseFilePath =
+ paths->FindFile(this->databaseFilePath, true);
csvFile.open(this->databaseFilePath);
}
GZ_ASSERT(csvFile, "Stratified Ocean database file does not exist");
@@ -539,8 +529,9 @@ void UnderwaterCurrentPlugin::LoadTidalOscillationDatabase()
csvFile.open(this->tidalFilePath);
if (!csvFile)
{
- this->tidalFilePath = ros::package::getPath("dave_worlds") +
- "/worlds/" + this->tidalFilePath;
+ common::SystemPaths *paths = common::SystemPaths::Instance();
+ this->tidalFilePath =
+ paths->FindFile(this->tidalFilePath, true);
csvFile.open(this->tidalFilePath);
}
GZ_ASSERT(csvFile, "Tidal Oscillation database file does not exist");
diff --git a/models/dave_object_models/CMakeLists.txt b/models/dave_object_models/CMakeLists.txt
index 86520d74..019f17a3 100644
--- a/models/dave_object_models/CMakeLists.txt
+++ b/models/dave_object_models/CMakeLists.txt
@@ -10,3 +10,8 @@ endif()
find_package(catkin REQUIRED COMPONENTS)
+catkin_package()
+
+install(DIRECTORY models
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+ PATTERN "*~" EXCLUDE)
diff --git a/models/dave_robot_models/CMakeLists.txt b/models/dave_robot_models/CMakeLists.txt
index 4cae1e4a..67e1ed8a 100644
--- a/models/dave_robot_models/CMakeLists.txt
+++ b/models/dave_robot_models/CMakeLists.txt
@@ -13,3 +13,8 @@ find_package(catkin REQUIRED COMPONENTS
uuv_sensor_ros_plugins
ds_sim)
+catkin_package()
+
+install(DIRECTORY models
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+ PATTERN "*~" EXCLUDE)
diff --git a/models/dave_sensor_models/CMakeLists.txt b/models/dave_sensor_models/CMakeLists.txt
index 12edb113..2df1f73e 100644
--- a/models/dave_sensor_models/CMakeLists.txt
+++ b/models/dave_sensor_models/CMakeLists.txt
@@ -13,3 +13,8 @@ find_package(catkin REQUIRED COMPONENTS
uuv_sensor_ros_plugins
ds_sim)
+catkin_package()
+
+install(DIRECTORY models
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+ PATTERN "*~" EXCLUDE)
diff --git a/models/dave_sensor_models/package.xml b/models/dave_sensor_models/package.xml
index f7237ddc..662b8396 100644
--- a/models/dave_sensor_models/package.xml
+++ b/models/dave_sensor_models/package.xml
@@ -9,7 +9,7 @@
catkin
- gazebo_ross
+ gazebo_ros
uuv_sensor_ros_plugins
ds_sim
diff --git a/models/dave_worlds/package.xml b/models/dave_worlds/package.xml
index f4a89b26..8eb7f465 100644
--- a/models/dave_worlds/package.xml
+++ b/models/dave_worlds/package.xml
@@ -14,6 +14,7 @@
ds_sim
+