From 69ddb79519168da73a8b30a21ff462a54f5b348a Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 20 Jan 2022 20:24:26 -0500 Subject: [PATCH 1/4] removed sandisland_test from CMakeLists.txt --- vrx_gazebo/CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vrx_gazebo/CMakeLists.txt b/vrx_gazebo/CMakeLists.txt index e7457df05..46ad8462b 100644 --- a/vrx_gazebo/CMakeLists.txt +++ b/vrx_gazebo/CMakeLists.txt @@ -394,13 +394,13 @@ install(DIRECTORY include/ install(PROGRAMS scripts/spawn_wamv.bash DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) -if(CATKIN_ENABLE_TESTING) - find_package(rostest REQUIRED) - add_rostest_gtest(sandisland_test - test/sandisland.test - test/sandisland.cc) - target_link_libraries(sandisland_test ${catkin_LIBRARIES}) -endif() +#if(CATKIN_ENABLE_TESTING) +# find_package(rostest REQUIRED) +# add_rostest_gtest(sandisland_test +# test/sandisland.test +# test/sandisland.cc) +# target_link_libraries(sandisland_test ${catkin_LIBRARIES}) +#endif() # Python Scripts catkin_install_python(PROGRAMS From d65186a487e074d67ac91e445a5b9f92bfe42a91 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 24 Jan 2022 20:14:53 -0500 Subject: [PATCH 2/4] potential fix for wildlife encounter animal poses --- vrx_gazebo/CMakeLists.txt | 14 +++++++------- vrx_gazebo/src/wildlife_scoring_plugin.cc | 6 ++++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/vrx_gazebo/CMakeLists.txt b/vrx_gazebo/CMakeLists.txt index 46ad8462b..e7457df05 100644 --- a/vrx_gazebo/CMakeLists.txt +++ b/vrx_gazebo/CMakeLists.txt @@ -394,13 +394,13 @@ install(DIRECTORY include/ install(PROGRAMS scripts/spawn_wamv.bash DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) -#if(CATKIN_ENABLE_TESTING) -# find_package(rostest REQUIRED) -# add_rostest_gtest(sandisland_test -# test/sandisland.test -# test/sandisland.cc) -# target_link_libraries(sandisland_test ${catkin_LIBRARIES}) -#endif() +if(CATKIN_ENABLE_TESTING) + find_package(rostest REQUIRED) + add_rostest_gtest(sandisland_test + test/sandisland.test + test/sandisland.cc) + target_link_libraries(sandisland_test ${catkin_LIBRARIES}) +endif() # Python Scripts catkin_install_python(PROGRAMS diff --git a/vrx_gazebo/src/wildlife_scoring_plugin.cc b/vrx_gazebo/src/wildlife_scoring_plugin.cc index 6a5a443d0..e32eb6b39 100644 --- a/vrx_gazebo/src/wildlife_scoring_plugin.cc +++ b/vrx_gazebo/src/wildlife_scoring_plugin.cc @@ -461,12 +461,14 @@ void WildlifeScoringPlugin::PublishAnimalLocations() // Conversion from Gazebo Cartesian coordinates to spherical. #if GAZEBO_MAJOR_VERSION >= 8 const ignition::math::Pose3d pose = buoy.link->WorldPose(); + const ignition::math::Vector3d position = this->world->SphericalCoords()->GlobalFromLocal(pose.Pos()); const ignition::math::Vector3d latlon = - this->world->SphericalCoords()->SphericalFromLocal(pose.Pos()); + this->world->SphericalCoords()->SphericalFromLocal(position); #else const ignition::math::Pose3d pose = buoy.link->GetWorldPose().Ign(); + const ignition::math::Vector3d position = this->world->GetSphericalCoordinates()->GlobalFromLocal(pose.Pos()); const ignition::math::Vector3d latlon = - this->world->GetSphericalCoordinates()->SphericalFromLocal(pose.Pos()); + this->world->GetSphericalCoordinates()->SphericalFromLocal(position); #endif const ignition::math::Quaternion orientation = pose.Rot(); From 4959cf4b016718911c6063f086d26eb8451efd2f Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 25 Jan 2022 10:42:01 -0500 Subject: [PATCH 3/4] corrected line that was too long for linter --- vrx_gazebo/src/wildlife_scoring_plugin.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vrx_gazebo/src/wildlife_scoring_plugin.cc b/vrx_gazebo/src/wildlife_scoring_plugin.cc index e32eb6b39..d73357742 100644 --- a/vrx_gazebo/src/wildlife_scoring_plugin.cc +++ b/vrx_gazebo/src/wildlife_scoring_plugin.cc @@ -461,12 +461,14 @@ void WildlifeScoringPlugin::PublishAnimalLocations() // Conversion from Gazebo Cartesian coordinates to spherical. #if GAZEBO_MAJOR_VERSION >= 8 const ignition::math::Pose3d pose = buoy.link->WorldPose(); - const ignition::math::Vector3d position = this->world->SphericalCoords()->GlobalFromLocal(pose.Pos()); + const ignition::math::Vector3d position = + this->world->SphericalCoords()->GlobalFromLocal(pose.Pos()); const ignition::math::Vector3d latlon = this->world->SphericalCoords()->SphericalFromLocal(position); #else const ignition::math::Pose3d pose = buoy.link->GetWorldPose().Ign(); - const ignition::math::Vector3d position = this->world->GetSphericalCoordinates()->GlobalFromLocal(pose.Pos()); + const ignition::math::Vector3d position = + this->world->GetSphericalCoordinates()->GlobalFromLocal(pose.Pos()); const ignition::math::Vector3d latlon = this->world->GetSphericalCoordinates()->SphericalFromLocal(position); #endif From 6694bf95f156f7a875e8d07ebcab06de101eb06c Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 25 Jan 2022 11:46:37 -0500 Subject: [PATCH 4/4] fixed whitespace issue --- vrx_gazebo/src/wildlife_scoring_plugin.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vrx_gazebo/src/wildlife_scoring_plugin.cc b/vrx_gazebo/src/wildlife_scoring_plugin.cc index d73357742..98de623b8 100644 --- a/vrx_gazebo/src/wildlife_scoring_plugin.cc +++ b/vrx_gazebo/src/wildlife_scoring_plugin.cc @@ -461,13 +461,13 @@ void WildlifeScoringPlugin::PublishAnimalLocations() // Conversion from Gazebo Cartesian coordinates to spherical. #if GAZEBO_MAJOR_VERSION >= 8 const ignition::math::Pose3d pose = buoy.link->WorldPose(); - const ignition::math::Vector3d position = + const ignition::math::Vector3d position = this->world->SphericalCoords()->GlobalFromLocal(pose.Pos()); const ignition::math::Vector3d latlon = this->world->SphericalCoords()->SphericalFromLocal(position); #else const ignition::math::Pose3d pose = buoy.link->GetWorldPose().Ign(); - const ignition::math::Vector3d position = + const ignition::math::Vector3d position = this->world->GetSphericalCoordinates()->GlobalFromLocal(pose.Pos()); const ignition::math::Vector3d latlon = this->world->GetSphericalCoordinates()->SphericalFromLocal(position);