Skip to content

Commit

Permalink
feat(ros2): add Gazebo Fortress and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nikAizuddin committed Aug 12, 2023
1 parent 130ef3e commit 5c0d06f
Show file tree
Hide file tree
Showing 54 changed files with 2,186 additions and 2 deletions.
15 changes: 15 additions & 0 deletions project/yocto/build/conf/local.conf
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,16 @@ DISTRO_FEATURES:append = " acl xattr pam selinux"
PREFERRED_PROVIDER_virtual/refpolicy = "refpolicy-targeted"
DEFAULT_ENFORCING = "enforcing"

#
# Required by OGRE
#
DISTRO_FEATURES:append = " x11 opengl"

#
# Required License Flags
#
LICENSE_FLAGS_ACCEPTED = "commercial_ffmpeg commercial_ffmpeg-native"

#
# Multiconfig build
#
Expand All @@ -340,6 +350,11 @@ BBMULTICONFIG = "\
rock64 \
"

#
# Preferred version for packages
#
PREFERRED_VERSION_ogre ?= "1.9.%"

# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
# track the version of this file when it was generated. This can safely be ignored if
# this doesn't mean anything to you.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BBCLASSEXTEND:append = " native nativesdk"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BBCLASSEXTEND:append = " nativesdk"
BBCLASSEXTEND:append = " native nativesdk"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BBCLASSEXTEND:append = " nativesdk"
BBCLASSEXTEND:append = " native nativesdk"
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
SUMMARY = "Dart Physics Engine"
DESCRIPTION = "${SUMMARY}"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=dded0ba36ab35cc5e5c2389f23e60084"

SRC_URI = "git://github.com/dartsim/dart;branch=v6.12.2;nobranch=1;protocol=https"
SRCREV = "1fe8fa2c53976d57003edb293b62eac747247d19"
S = "${WORKDIR}/git"

DEPENDS = " \
libtool \
libeigen \
libccd \
fcl \
assimp \
boost \
octomap \
bullet \
libtinyxml2 \
urdfdom \
ode \
"

inherit cmake pkgconfig

TARGET_CC_ARCH:append = " ${LDFLAGS}"

EXTRA_OECMAKE = "-DDART_VERBOSE=TRUE"

do_compile:append() {
sed -E -i "s,(-fmacro-prefix-map|-fdebug-prefix-map|--sysroot)=[^ ]*[[:space:]]+,,g" ${WORKDIR}/build/cmake/dart.pc
sed -E -i "s,${WORKDIR}/git,/usr/src/debug/dart-physics/6.12.2-r0,g" ${WORKDIR}/build/dart/config.hpp
}

FILES:${PN}:append = " \
/usr/share/dart \
/usr/share/dart/package.xml \
/usr/share/dart/cmake \
/usr/share/dart/cmake/dart_external-lodepngComponent.cmake \
/usr/share/dart/cmake/dart_external-odelcpsolverComponent.cmake \
/usr/share/dart/cmake/DARTFindEigen3.cmake \
/usr/share/dart/cmake/Findccd.cmake \
/usr/share/dart/cmake/DARTFindccd.cmake \
/usr/share/dart/cmake/Findfcl.cmake \
/usr/share/dart/cmake/DARTFindfcl.cmake \
/usr/share/dart/cmake/Findassimp.cmake \
/usr/share/dart/cmake/DARTFindassimp.cmake \
/usr/share/dart/cmake/DARTFindBoost.cmake \
/usr/share/dart/cmake/DARTFindoctomap.cmake \
/usr/share/dart/cmake/dart_dartComponent.cmake \
/usr/share/dart/cmake/DARTConfig.cmake \
/usr/share/dart/cmake/DARTConfigVersion.cmake \
/usr/share/dart/cmake/dart_dartTargets.cmake \
/usr/share/dart/cmake/dart_dartTargets-release.cmake \
/usr/share/dart/cmake/dart_external-lodepngTargets.cmake \
/usr/share/dart/cmake/dart_external-lodepngTargets-release.cmake \
/usr/share/dart/cmake/dart_external-odelcpsolverTargets.cmake \
/usr/share/dart/cmake/dart_external-odelcpsolverTargets-release.cmake \
"

BBCLASSEXTEND = "native nativesdk"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BBCLASSEXTEND:append = " native nativesdk"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BBCLASSEXTEND:append = " native nativesdk"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BBCLASSEXTEND:append = " native nativesdk"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- FreeImage/Source/OpenEXR/IlmImf/ImfAutoArray.h 2023-07-30 13:18:19.410360522 +0800
+++ FreeImage/Source/OpenEXR/IlmImf/ImfAutoArray.h 2023-07-30 13:18:38.363566957 +0800
@@ -44,6 +44,7 @@
//
//-----------------------------------------------------------------------------

+#include <cstring>
#include "OpenEXRConfig.h"

namespace Imf {
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
SUMMARY = "FreeImage"
DESCRIPTION = "${SUMMARY}"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://license-gplv2.txt;md5=1fbed70be9d970d3da399f33dae9cc51"

SRC_URI = " \
${SOURCEFORGE_MIRROR}/freeimage/FreeImage3154.zip \
file://0000-fix-memset-not-declared.patch \
"

SRC_URI[sha256sum] = "eb6361519d33131690a0e726b085a05825e5adf9fb72c752d8d39100e48dc829"
S = "${WORKDIR}/FreeImage"

TARGET_CC_ARCH:append = " ${LDFLAGS}"

do_configure() {
sed -i -e /^CC/d \
-e /^CXX\ /d \
-e /^AR/d \
-e /^INCDIR\ /d \
-e /^INSTALLDIR\ /d \
-e s:'-o root -g root'::g \
-e /ldconfig/d \
${S}/Makefile.gnu
}

do_compile() {
oe_runmake CXXFLAGS="-O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -std=c++03 -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src" -f ${S}/Makefile
}

do_install() {
install -d ${D}/${libdir}
install -d ${D}/${includedir}
oe_runmake INSTALLDIR="${D}/${libdir}" INCDIR="${D}/${includedir}" -f ${S}/Makefile install
}

do_stage() {
install -d ${STAGING_LIBDIR}
install -d ${STAGING_INCDIR}
oe_runmake INSTALLDIR="${STAGING_LIBDIR}" INCDIR="${STAGING_INCDIR}" install
}

FILES:${PN} = " \
${includedir} \
${libdir}/libfreeimage* \
"

FILES:${PN}-dev = ""

INSANE_SKIP:${PN}:append = " already-stripped dev-so"

BBCLASSEXTEND = "native nativesdk"
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
SUMMARY = "Gazebo CMake"
DESCRIPTION = "${SUMMARY}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2a461be67a1edf991251f85f3aadd1d0"

SRC_URI = "git://github.com/gazebosim/gz-cmake;branch=ign-cmake2;protocol=https"
SRCREV = "940e2b795eaa69df651031ceb430b5a025177c12"
S = "${WORKDIR}/git"

inherit cmake pkgconfig

EXTRA_OECMAKE = ""

FILES:${PN}:append = " \
/usr/share/ignition/* \
"

BBCLASSEXTEND = "native nativesdk"
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
SUMMARY = "Gazebo Common"
DESCRIPTION = "${SUMMARY}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2a461be67a1edf991251f85f3aadd1d0"

SRC_URI = "git://github.com/gazebosim/gz-common;branch=ign-common4;protocol=https"
SRCREV = "60b1fddf05ce020ba7cb79022fdf40be545eb789"
S = "${WORKDIR}/git"

DEPENDS = " \
freeimage \
util-linux \
libtinyxml2 \
ffmpeg \
gts \
gz-cmake2 \
gz-math6 \
gz-utils1 \
"

inherit cmake pkgconfig

EXTRA_OECMAKE = " \
-DFREEIMAGE_RUNS=FAILED_TO_RUN \
-DFREEIMAGE_RUNS__TRYRUN_OUTPUT='' \
"

FILES:${PN}:append = " \
/usr/share/ignition/ignition-common4/* \
"

BBCLASSEXTEND = "native nativesdk"
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
SUMMARY = "Gazebo Fuel Tools"
DESCRIPTION = "${SUMMARY}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2a461be67a1edf991251f85f3aadd1d0"

SRC_URI = "git://github.com/gazebosim/gz-fuel-tools;branch=ign-fuel-tools7;protocol=https"
SRCREV = "50a619642b0ce89f9fe78e49a65d6ded6059e047"
S = "${WORKDIR}/git"

DEPENDS = " \
libtinyxml2 \
jsoncpp \
libzip \
libyaml \
curl \
gz-cmake2 \
gz-common4 \
gz-math6 \
gz-msgs8 \
"

inherit cmake

EXTRA_OECMAKE = "-DPROTOBUF_PROTOC_EXECUTABLE=${WORKDIR}/recipe-sysroot-native/usr/bin/protoc"

FILES:${PN}:append = " \
/usr/share \
/usr/lib/ruby \
/usr/lib/ruby/ignition \
/usr/lib/ruby/ignition/cmdfuel7.rb \
/usr/share/gz \
/usr/share/ignition \
/usr/share/gz/gz1.completion.d \
/usr/share/gz/gz1.completion.d/fuel7.bash_completion.sh \
/usr/share/ignition/fuel7.yaml \
/usr/share/ignition/fuel_tools7 \
/usr/share/ignition/fuel_tools7/config.yaml \
"

BBCLASSEXTEND = "native nativesdk"
64 changes: 64 additions & 0 deletions project/yocto/layers/meta-user/recipes-ros2/gazebo/gz-gui6_git.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
SUMMARY = "Gazebo GUI"
DESCRIPTION = "${SUMMARY}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2a461be67a1edf991251f85f3aadd1d0"

SRC_URI = "git://github.com/gazebosim/gz-gui;branch=ign-gui6;protocol=https"
SRCREV = "f65395f734df81b22dcd10d68d2802b61d6b72bc"
S = "${WORKDIR}/git"

DEPENDS = " \
protobuf \
protobuf-native \
libtinyxml2 \
qtquickcontrols2 \
gz-cmake2 \
gz-math6 \
gz-common4 \
gz-plugin1 \
gz-transport11 \
gz-msgs8 \
gz-rendering6 \
"

inherit cmake pkgconfig cmake_qt5

EXTRA_OECMAKE:class-target = " \
-DPROTOBUF_PROTOC_EXECUTABLE=${WORKDIR}/recipe-sysroot-native/usr/bin/protoc \
"

FILES:${PN}:append = " \
/usr/share \
/usr/lib/ruby \
/usr/lib/ruby/ignition \
/usr/lib/ruby/ignition/cmdgui6.rb \
/usr/lib/ign-gui-6/plugins/libCameraFps.so \
/usr/lib/ign-gui-6/plugins/libCameraTracking.so \
/usr/lib/ign-gui-6/plugins/libGridConfig.so \
/usr/lib/ign-gui-6/plugins/libGrid3D.so \
/usr/lib/ign-gui-6/plugins/libImageDisplay.so \
/usr/lib/ign-gui-6/plugins/libInteractiveViewControl.so \
/usr/lib/ign-gui-6/plugins/libKeyPublisher.so \
/usr/lib/ign-gui-6/plugins/libTransportPlotting.so \
/usr/lib/ign-gui-6/plugins/libPublisher.so \
/usr/lib/ign-gui-6/plugins/libMarkerManager.so \
/usr/lib/ign-gui-6/plugins/libMinimalScene.so \
/usr/lib/ign-gui-6/plugins/libNavSatMap.so \
/usr/lib/ign-gui-6/plugins/libScene3D.so \
/usr/lib/ign-gui-6/plugins/libScreenshot.so \
/usr/lib/ign-gui-6/plugins/libShutdownButton.so \
/usr/lib/ign-gui-6/plugins/libTapeMeasure.so \
/usr/lib/ign-gui-6/plugins/libTeleop.so \
/usr/lib/ign-gui-6/plugins/libTopicEcho.so \
/usr/lib/ign-gui-6/plugins/libTopicViewer.so \
/usr/lib/ign-gui-6/plugins/libTransportSceneManager.so \
/usr/lib/ign-gui-6/plugins/libWorldControl.so \
/usr/lib/ign-gui-6/plugins/libWorldStats.so \
/usr/share/gz \
/usr/share/ignition \
/usr/share/gz/gz1.completion.d \
/usr/share/gz/gz1.completion.d/gui6.bash_completion.sh \
/usr/share/ignition/gui6.yaml \
"

BBCLASSEXTEND = "native nativesdk"
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
SUMMARY = "Gazebo Launcher"
DESCRIPTION = "${SUMMARY}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2a461be67a1edf991251f85f3aadd1d0"

SRC_URI = "git://github.com/gazebosim/gz-launch;branch=ign-launch5;protocol=https"
SRCREV = "894e2e2319617fbde652960b847e13436391ec9c"
S = "${WORKDIR}/git"

DEPENDS = " \
gz-cmake2 \
libtinyxml2 \
protobuf \
protobuf-native \
libwebsockets \
gz-common4 \
gz-utils1 \
gz-plugin1 \
gz-tools1 \
gz-transport11 \
gz-msgs8 \
gz-math6 \
gz-gui6 \
gz-sim6 \
"

inherit cmake pkgconfig cmake_qt5

EXTRA_OECMAKE:append:class-target = " \
-DBUILD_TESTING=OFF \
-DPROTOBUF_PROTOC_EXECUTABLE=${WORKDIR}/recipe-sysroot-native/usr/bin/protoc \
"

FILES:${PN}:append = " \
/usr/share \
/usr/lib/ruby \
/usr/lib/ign-launch-5/plugins/libignition-launch-joytotwist.so \
/usr/lib/ign-launch-5/plugins/libignition-launch-gazebogui.so \
/usr/lib/ign-launch-5/plugins/libignition-launch-gazebo-factory.so \
/usr/lib/ign-launch-5/plugins/libignition-launch-gazebo.so \
/usr/lib/ign-launch-5/plugins/libignition-launch-websocket-server.so \
/usr/lib/ign-launch-5/plugins/libignition-launch-joystick.so \
/usr/lib/ignition/launch5/ign-launch \
/usr/lib/ruby/ignition \
/usr/lib/ruby/ignition/cmdlaunch5.rb \
/usr/share/gz \
/usr/share/ignition \
/usr/share/gz/gz1.completion.d \
/usr/share/gz/gz1.completion.d/launch5.bash_completion.sh \
/usr/share/ignition/launch5.yaml \
/usr/share/ignition/ignition-launch5 \
/usr/share/ignition/ignition-launch5/configs \
/usr/share/ignition/ignition-launch5/configs/factory.ign \
/usr/share/ignition/ignition-launch5/configs/gazebo.ign \
/usr/share/ignition/ignition-launch5/configs/gazebo_plugins.ign \
/usr/share/ignition/ignition-launch5/configs/ls.ign \
/usr/share/ignition/ignition-launch5/configs/multi_factory.ign \
/usr/share/ignition/ignition-launch5/configs/plugins.ign \
/usr/share/ignition/ignition-launch5/configs/websocket.ign \
"

BBCLASSEXTEND = "native nativesdk"
Loading

0 comments on commit 5c0d06f

Please sign in to comment.