Skip to content

Commit

Permalink
Fixed issue in compiling rotors_gazebo_plugins package
Browse files Browse the repository at this point in the history
  • Loading branch information
gsilano committed Dec 17, 2019
1 parent 5504846 commit 13dd0f9
Show file tree
Hide file tree
Showing 92 changed files with 14,102 additions and 0 deletions.
566 changes: 566 additions & 0 deletions rotors_gazebo_plugins/CHANGELOG.rst

Large diffs are not rendered by default.

532 changes: 532 additions & 0 deletions rotors_gazebo_plugins/CMakeLists.txt

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions rotors_gazebo_plugins/autobackport/command.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

find . -type f -name "*.cpp" | xargs sed -i.bak -r -f autobackport/seds.txt
find . -type f -name "*.h" | xargs sed -i.bak -r -f autobackport/seds.txt
find . -type f -name "*.hpp" | xargs sed -i.bak -r -f autobackport/seds.txt

#sed -i.bak -r -f seds_cmake.txt ../CMakeLists.txt


15 changes: 15 additions & 0 deletions rotors_gazebo_plugins/autobackport/commandpre7.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
if [[ "$OSTYPE" == "darwin"* ]]; then
find . -type f -name "*.cpp" | xargs sed -i.bak -E -f autobackport/seds_pre7.txt
find . -type f -name "*.h" | xargs sed -i.bak -E -f autobackport/seds_pre7.txt
find . -type f -name "*.hpp" | xargs sed -i.bak -E -f autobackport/seds_pre7.txt
else
find . -type f -name "*.cpp" | xargs sed -i.bak -r -f autobackport/seds_pre7.txt
find . -type f -name "*.h" | xargs sed -i.bak -r -f autobackport/seds_pre7.txt
find . -type f -name "*.hpp" | xargs sed -i.bak -r -f autobackport/seds_pre7.txt
fi



#sed -i.bak -r -f seds_cmake.txt ../CMakeLists.txt


69 changes: 69 additions & 0 deletions rotors_gazebo_plugins/autobackport/seds.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# ignition math namespaces
s/( |^|<|\()ignition::math::Vector3d/\1math::Vector3/g
s/( |^|<|\()ignition::math::Pose3d/\1math::Pose/g
s/( |^|<|\()ignition::math::clamp/\1math::clamp/g
s/( |^|<|\()ignition::math::Quaterniond/\1math::Quaternion/g
s/( |^|<|\()octoignition::math::Vector3d/\octomath::Vector3/g
s/( |^|<|\()ignition::ignition::math::Vector3d/\1ignition::math::Vector3d/g

#removals
s/event::Events::DisconnectWorldUpdateBegin\(.*\)\;//g

# includes
s/(#include +)"ignition\/math\/Vector3.hh"/\1"gazebo\/math\/Vector3.hh"/g

# pointer casting
#Gazebo pre 7 s/std::dynamic_pointer_cast</boost::dynamic_pointer_cast</g

#vector members
s/([^q](->|\.))X(\(\))/\1x/g
s/([^q](->|\.))Y(\(\))/\1y/g
s/([^q](->|\.))Z(\(\))/\1z/g
s/([^q](->|\.))W(\(\))/\1w/g
s/([^q](->|\.))Rot(\(\))/\1rot/g
s/([^q](->|\.))Pos(\(\))/\1pos/g

#[^q] is for the one time we modify a quaternion that we don't want to change

#special function calls (manually added)
s/(->|\.)Physics(\()/\1GetPhysicsEngine\2/g
s/(->|\.)Gravity(\()/\1GetPhysicsEngine\(\)->GetGravity\2/g
s/(->|\.)EntityByName(\(.*name)/\1GetByName\2/g
s/(->|\.)EntityByName(\(.*id)/\1GetEntity\2/g
s/(->|\.)Position(\(0)/\1GetAngle(0).Radian(/g

#function calls! (automatically generated)
#s/(->|\.)Altitude(\()/\1GetAltitude\2/g
s/(->|\.)AvgFPS(\()/\1GetAvgFPS\2/g
s/(->|\.)Camera(\()/\1GetCamera\2/g
s/(->|\.)CoG(\()/\1GetCoG\2/g
s/(->|\.)GlobalAxis(\()/\1GetGlobalAxis\2/g
s/(->|\.)HFOV(\()/\1GetHFOV\2/g
s/(->|\.)ImageData(\()/\1GetImageData\2/g
s/(->|\.)ImageDepth(\()/\1GetImageDepth\2/g
s/(->|\.)ImageFormat(\()/\1GetImageFormat\2/g
s/(->|\.)ImageHeight(\()/\1GetImageHeight\2/g
s/(->|\.)ImageWidth(\()/\1GetImageWidth\2/g
s/(->|\.)Inverse(\()/\1GetInverse\2/g
s/(->|\.)LaserShape(\()/\1GetLaserShape\2/g
s/(->|\.)LastMeasurementTime(\()/\1GetLastMeasurementTime\2/g
s/(->|\.)LastRenderWallTime(\()/\1GetLastRenderWallTime\2/g
#s/(->|\.)Latitude(\()/\1GetLatitude\2/g
s/(->|\.)Length(\()/\1GetLength\2/g
s/(->|\.)Link(\()/\1GetLink\2/g
#s/(->|\.)Longitude(\()/\1GetLongitude\2/g
s/(->|\.)ParentName(\()/\1GetParentName\2/g
s/(->|\.)Range(\()/\1GetRange\2/g
s/(->|\.)RangeMax(\()/\1GetRangeMax\2/g
s/(->|\.)RangeMin(\()/\1GetRangeMin\2/g
s/(->|\.)RelativeAngularVel(\()/\1GetRelativeAngularVel\2/g
s/(->|\.)RelativeLinearAccel(\()/\1GetRelativeLinearAccel\2/g
s/(->|\.)RelativeLinearVel(\()/\1GetRelativeLinearVel\2/g
s/(->|\.)RenderRate(\()/\1GetRenderRate\2/g
s/(->|\.)SimTime(\()/\1GetSimTime\2/g
#s/(->|\.)SetPosition(\()/\1SetAngle\2/g
s/(->|\.)WorldAngularVel(\()/\1GetWorldAngularVel\2/g
s/(->|\.)WorldCoGPose(\()/\1GetWorldCoGPose\2/g
s/(->|\.)WorldLinearVel(\()/\1GetWorldLinearVel\2/g
s/(->|\.)WorldName(\()/\1GetWorldName\2/g
s/(->|\.)WorldPose(\()/\1GetWorldPose\2/g
69 changes: 69 additions & 0 deletions rotors_gazebo_plugins/autobackport/seds_pre7.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# ignition math namespaces
s/( |^|<|\()ignition::math::Vector3d/\1math::Vector3/g
s/( |^|<|\()ignition::math::Pose3d/\1math::Pose/g
s/( |^|<|\()ignition::math::clamp/\1math::clamp/g
s/( |^|<|\()ignition::math::Quaterniond/\1math::Quaternion/g
s/( |^|<|\()octoignition::math::Vector3d/\octomath::Vector3/g
s/( |^|<|\()ignition::ignition::math::Vector3d/\1ignition::math::Vector3d/g

#removals
s/event::Events::DisconnectWorldUpdateBegin\(.*\)\;//g

# includes
s/(#include +)"ignition\/math\/Vector3.hh"/\1"gazebo\/math\/Vector3.hh"/g

# pointer casting
s/std::dynamic_pointer_cast</boost::dynamic_pointer_cast</g

#vector members
s/([^q](->|\.))X(\(\))/\1x/g
s/([^q](->|\.))Y(\(\))/\1y/g
s/([^q](->|\.))Z(\(\))/\1z/g
s/([^q](->|\.))W(\(\))/\1w/g
s/([^q](->|\.))Rot(\(\))/\1rot/g
s/([^q](->|\.))Pos(\(\))/\1pos/g

#[^q] is for the one time we modify a quaternion that we don't want to change

#special function calls (manually added)
s/(->|\.)Physics(\()/\1GetPhysicsEngine\2/g
s/(->|\.)Gravity(\()/\1GetPhysicsEngine\(\)->GetGravity\2/g
s/(->|\.)EntityByName(\(.*name)/\1GetByName\2/g
s/(->|\.)EntityByName(\(.*id)/\1GetEntity\2/g
s/(->|\.)Position(\(0)/\1GetAngle(0).Radian(/g

#function calls! (automatically generated)
s/(->|\.)Altitude(\()/\1GetAltitude\2/g
s/(->|\.)AvgFPS(\()/\1GetAvgFPS\2/g
s/(->|\.)Camera(\()/\1GetCamera\2/g
s/(->|\.)CoG(\()/\1GetCoG\2/g
s/(->|\.)GlobalAxis(\()/\1GetGlobalAxis\2/g
s/(->|\.)HFOV(\()/\1GetHFOV\2/g
s/(->|\.)ImageData(\()/\1GetImageData\2/g
s/(->|\.)ImageDepth(\()/\1GetImageDepth\2/g
s/(->|\.)ImageFormat(\()/\1GetImageFormat\2/g
s/(->|\.)ImageHeight(\()/\1GetImageHeight\2/g
s/(->|\.)ImageWidth(\()/\1GetImageWidth\2/g
s/(->|\.)Inverse(\()/\1GetInverse\2/g
s/(->|\.)LaserShape(\()/\1GetLaserShape\2/g
s/(->|\.)LastMeasurementTime(\()/\1GetLastMeasurementTime\2/g
s/(->|\.)LastRenderWallTime(\()/\1GetLastRenderWallTime\2/g
s/(->|\.)Latitude(\()/\1GetLatitude\2/g
s/(->|\.)Length(\()/\1GetLength\2/g
s/(->|\.)Link(\()/\1GetLink\2/g
s/(->|\.)Longitude(\()/\1GetLongitude\2/g
s/(->|\.)ParentName(\()/\1GetParentName\2/g
s/(->|\.)Range(\()/\1GetRange\2/g
s/(->|\.)RangeMax(\()/\1GetRangeMax\2/g
s/(->|\.)RangeMin(\()/\1GetRangeMin\2/g
s/(->|\.)RelativeAngularVel(\()/\1GetRelativeAngularVel\2/g
s/(->|\.)RelativeLinearAccel(\()/\1GetRelativeLinearAccel\2/g
s/(->|\.)RelativeLinearVel(\()/\1GetRelativeLinearVel\2/g
s/(->|\.)RenderRate(\()/\1GetRenderRate\2/g
s/(->|\.)SimTime(\()/\1GetSimTime\2/g
s/(->|\.)SetPosition(\()/\1SetAngle\2/g
s/(->|\.)WorldAngularVel(\()/\1GetWorldAngularVel\2/g
s/(->|\.)WorldCoGPose(\()/\1GetWorldCoGPose\2/g
s/(->|\.)WorldLinearVel(\()/\1GetWorldLinearVel\2/g
s/(->|\.)WorldName(\()/\1GetWorldName\2/g
s/(->|\.)WorldPose(\()/\1GetWorldPose\2/g
81 changes: 81 additions & 0 deletions rotors_gazebo_plugins/cmake/FindEigen.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
###############################################################################
#
# CMake script for finding the Eigen library.
#
# http://eigen.tuxfamily.org/index.php?title=Main_Page
#
# Copyright (c) 2006, 2007 Montel Laurent, <[email protected]>
# Copyright (c) 2008, 2009 Gael Guennebaud, <[email protected]>
# Copyright (c) 2009 Benoit Jacob <[email protected]>
# Redistribution and use is allowed according to the terms of the 2-clause BSD
# license.
#
#
# Input variables:
#
# - Eigen_ROOT_DIR (optional): When specified, header files and libraries
# will be searched for in `${Eigen_ROOT_DIR}/include` and
# `${Eigen_ROOT_DIR}/libs` respectively, and the default CMake search order
# will be ignored. When unspecified, the default CMake search order is used.
# This variable can be specified either as a CMake or environment variable.
# If both are set, preference is given to the CMake variable.
# Use this variable for finding packages installed in a nonstandard location,
# or for enforcing that one of multiple package installations is picked up.
#
# Cache variables (not intended to be used in CMakeLists.txt files)
#
# - Eigen_INCLUDE_DIR: Absolute path to package headers.
#
#
# Output variables:
#
# - Eigen_FOUND: Boolean that indicates if the package was found
# - Eigen_INCLUDE_DIRS: Paths to the necessary header files
# - Eigen_VERSION: Version of Eigen library found
# - Eigen_DEFINITIONS: Definitions to be passed on behalf of eigen
#
#
# Example usage:
#
# # Passing the version means Eigen_FOUND will only be TRUE if a
# # version >= the provided version is found.
# find_package(Eigen 3.1.2)
# if(NOT Eigen_FOUND)
# # Error handling
# endif()
# ...
# add_definitions(${Eigen_DEFINITIONS})
# ...
# include_directories(${Eigen_INCLUDE_DIRS} ...)
#
###############################################################################

find_package(PkgConfig)
pkg_check_modules(PC_EIGEN eigen3)
set(EIGEN_DEFINITIONS ${PC_EIGEN_CFLAGS_OTHER})


find_path(EIGEN_INCLUDE_DIR Eigen/Core
HINTS ${PC_EIGEN_INCLUDEDIR} ${PC_EIGEN_INCLUDE_DIRS}
"${Eigen_ROOT_DIR}" "$ENV{EIGEN_ROOT_DIR}"
"${EIGEN_ROOT}" "$ENV{EIGEN_ROOT}" # Backwards Compatibility
PATHS "$ENV{PROGRAMFILES}/Eigen" "$ENV{PROGRAMW6432}/Eigen"
"$ENV{PROGRAMFILES}/Eigen 3.0.0" "$ENV{PROGRAMW6432}/Eigen 3.0.0"
PATH_SUFFIXES eigen3 include/eigen3 include)

set(EIGEN_INCLUDE_DIRS ${EIGEN_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Eigen DEFAULT_MSG EIGEN_INCLUDE_DIR)

mark_as_advanced(EIGEN_INCLUDE_DIR)

if(EIGEN_FOUND)
message(STATUS "Eigen found (include: ${EIGEN_INCLUDE_DIRS})")
endif(EIGEN_FOUND)


set(Eigen_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS})
set(Eigen_FOUND ${EIGEN_FOUND})
set(Eigen_VERSION ${EIGEN_VERSION})
set(Eigen_DEFINITIONS ${EIGEN_DEFINITIONS})
Loading

0 comments on commit 13dd0f9

Please sign in to comment.