Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions distros/noetic/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Temporary controls for the pull-request build (.github/workflows/testpr.yaml).
#
# testpr.yaml caches the packages it builds per pull request, and rattler-build
# skips everything that is already in that cache. This file tells it what to
# throw away before building. Set it in your PR, and reset it to the defaults
# below before or right after merging.

# Ignore the PR build cache and rebuild everything, e.g. for a full rebuild PR
# that bumps the build number of all packages.
full_rebuild: false

# Packages to drop from the PR build cache. Needed when a package changes without
# a new build number, e.g. you fixed one of its patches in patch/: the cache
# still holds the old build, so the fix would never be built in this PR.
#
# Entries are ROS package names (underscores or dashes) or globs; both package
# name prefixes (ros2-<pkg>, and ros-<distro>-<pkg> of older builds) are matched, e.g.
#
# evict_cache:
# - rosidl_generator_py # one package: ros2-rosidl-generator-py-*.conda
# - std-msgs # dashes work too
# - "roboplan*" # a family of packages (quote globs)
#
# Remember that dependents are not rebuilt automatically: evict them as well if
# they must pick up the change.
evict_cache: []
84 changes: 84 additions & 0 deletions distros/noetic/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
krb5:
- 1.21
numpy:
- 2
assimp:
- 6.0.3
libprotobuf:
- 6.33.5
protobuf:
- 6.33.5
spdlog:
- 1.17
pugixml:
- '1.15'
libopencv:
- 4.13.0
libxml2:
- 2.14.*
graphviz:
- 14.*
# Mitigation for
# https://github.com/RoboStack/ros-jazzy/pull/126#issuecomment-3515455380
libcap:
- 2.77
fmt:
- 12.1
lua:
- 5.4
tbb:
- '2022'
tbb_devel:
- '2022'

# Workaround for https://github.com/RoboStack/ros-jazzy/pull/40#issuecomment-2782226697
cmake:
- 3.*

# ROS1 stuff
ogre:
- 1.10.12
setuptools:
- 69
pyqt:
- 5.15
pyqtwebengine:
- 5.15
pyqtchart:
- 5.15
tinyxml2:
- 11.0
gazebo:
- '11'

cdt_name: # [linux]
- conda # [linux]

python:
- 3.12.* *_cpython
python_impl:
- cpython

c_compiler:
- gcc # [linux]
- clang # [osx]
- vs2022 # [win]
c_compiler_version: # [unix]
- 13 # [linux]
- 18 # [osx]
c_stdlib:
- sysroot # [linux]
- macosx_deployment_target # [osx]
- vs # [win]
c_stdlib_version: # [unix]
- 2.17 # [linux]
- 10.13 # [osx and x86_64]
- 11.0 # [osx and arm64]
cxx_compiler:
- gxx # [linux]
- clangxx # [osx]
- vs2022 # [win]
cxx_compiler_version: # [unix]
- 13 # [linux]
- 18 # [osx]

6 changes: 6 additions & 0 deletions distros/noetic/distro.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Settings of ros-noetic that differ from the other distributions
# (everything else is shared, see the README).
channel_name: robostack-noetic
upload_to: [anaconda]
read_from: anaconda
rosdistro_sync: manual
14 changes: 14 additions & 0 deletions distros/noetic/files/ros-noetic-catkin/activate.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:: ros-noetic-catkin: run on environment activation (bld_catkin.bat copies it to etc/conda)
@if not defined CONDA_PREFIX goto:eof

@REM Don't do anything when we are in conda build.
@if defined SYS_PREFIX exit /b 0

@set "QT_PLUGIN_PATH=%CONDA_PREFIX%\Library\plugins"

@call "%CONDA_PREFIX%\Library\local_setup.bat"
@set PYTHONHOME=
@set "ROS_OS_OVERRIDE=conda:win64"
@set "ROS_ETC_DIR=%CONDA_PREFIX%\Library\etc\ros"
@set "AMENT_PREFIX_PATH=%CONDA_PREFIX%\Library"
@set "AMENT_PYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe"
25 changes: 25 additions & 0 deletions distros/noetic/files/ros-noetic-catkin/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# ros-noetic-catkin: run on environment activation (build_catkin.sh copies it to etc/conda)
# if [ -z "${CONDA_PREFIX}" ]; then
# exit 0;
# fi

# Not sure if this is necessary on UNIX?
# export QT_PLUGIN_PATH=$CONDA_PREFIX\plugins

if [ "$CONDA_BUILD" = "1" -a "$target_platform" != "$build_platform" ]; then
# ignore sourcing
echo "Not activating ROS when cross-compiling";
else
source $CONDA_PREFIX/setup.sh
fi

case "$OSTYPE" in
darwin*) export ROS_OS_OVERRIDE="conda:osx";;
linux*) export ROS_OS_OVERRIDE="conda:linux";;
esac

export ROS_ETC_DIR=$CONDA_PREFIX/etc/ros
export AMENT_PREFIX_PATH=$CONDA_PREFIX

# Looks unnecessary for UNIX
# unset PYTHONHOME=
17 changes: 17 additions & 0 deletions distros/noetic/files/ros-noetic-catkin/deactivate.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:: ros-noetic-catkin: run on environment activation (bld_catkin.bat copies it to etc/conda)
@if not defined CONDA_PREFIX goto:eof

@set ROS_OS_OVERRIDE=
@set ROS_DISTRO=
@set ROS_ETC_DIR=
@set ROS_PACKAGE_PATH=
@set ROS_PYTHON_VERSION=
@set ROS_VERSION=
@set PYTHONHOME=
@set PYTHONPATH=
@set CMAKE_PREFIX_PATH=
@set AMENT_PREFIX_PATH=
@set COLCON_PREFIX_PATH=
@set QT_PLUGIN_PATH=
@set ROS_LOCALHOST_ONLY=
@set ament_python_executable=
20 changes: 20 additions & 0 deletions distros/noetic/files/ros-noetic-catkin/deactivate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# ros-noetic-catkin: run on environment activation (build_catkin.sh copies it to etc/conda)
if [ -z "${CONDA_PREFIX}" ]; then
exit 0
fi

unset ROS_DISTRO
unset ROS_ETC_DIR
unset ROS_PACKAGE_PATH
unset ROS_PYTHON_VERSION
unset CMAKE_PREFIX_PATH
unset AMENT_PREFIX_PATH
unset COLCON_PREFIX_PATH
unset ROS_VERSION
unset ROS_OS_OVERRIDE
# unset PYTHONPATH
# unset PYTHONHOME
# unset QT_PLUGIN_PATH
unset ROS_LOCALHOST_ONLY
unset ament_python_executable
unset RMW_IMPLEMENTATION
34 changes: 34 additions & 0 deletions distros/noetic/packages-ignore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
rmw_cyclonedds_cpp:
conda-forge: []
rmw_opensplice_cpp:
conda-forge: []
rmw_connext_cpp:
conda-forge: []
gmock_vendor:
conda-forge: []
gtest_vendor:
conda-forge: []
libyaml_vendor:
conda-forge: []
connext_cmake_module:
conda-forge: []
opensplice_cmake_module:
conda-forge: []
rosidl_typesupport_connext_c:
conda-forge: []
rosidl_typesupport_connext_cpp:
conda-forge: []
rosidl_typesupport_opensplice_cpp:
conda-forge: []
rosidl_typesupport_opensplice_c:
conda-forge: []
test_msgs:
conda-forge: []
rttest:
conda-forge: []
tlsf:
conda-forge: []
tlsf_cpp:
conda-forge: []
pendulum_control:
conda-forge: []
45 changes: 45 additions & 0 deletions distros/noetic/patch/ros-noetic-apriltag.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
diff --git a/python_build_flags.py b/python_build_flags.py
index f3f0e79..9c7a61e 100644
--- a/python_build_flags.py
+++ b/python_build_flags.py
@@ -2,6 +2,7 @@ from __future__ import print_function
import sysconfig
import re
import numpy as np
+import os
conf = sysconfig.get_config_vars()

print('CFLAGS', end=';')
@@ -18,10 +19,10 @@ print(' '.join(c_flags), end=';')


print('LINKER', end=';')
-print(conf.get('BLDSHARED', '').split()[0], end=';')
+print(os.getenv('CC'), end=';')

print('LDFLAGS', end=';')
-print(' '.join(conf.get('BLDSHARED', '').split()[1:]) + ' ' + conf.get('BLDLIBRARY', '') + ' ' + conf.get('LDFLAGS', ''), end=';')
+print(' '.join(conf.get('BLDSHARED', '').split()[1:]) + ' ' + conf.get('LDFLAGS', ''), end=';')

print('EXT_SUFFIX', end=';')
ext_suffix = '.so'

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b57915b..fa6336a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,8 +48,12 @@ add_library(${PROJECT_NAME} ${APRILTAG_SRCS} ${COMMON_SRC} ${TAG_FILES})
if (MSVC)
# FindThreads will not find pthread.h with MSVC
# winmm is necessary for __imp_timeGetTime
- find_library(PTHREAD_LIBRARIES NAMES pthreads)
- target_link_libraries(${PROJECT_NAME} ${PTHREAD_LIBRARIES} winmm)
+ find_library(PTHREAD_LIBRARIES NAMES pthreads pthread pthreadVC3 pthreadVC2)
+ if (PTHREAD_LIBRARIES)
+ target_link_libraries(${PROJECT_NAME} ${PTHREAD_LIBRARIES} winmm)
+ else()
+ message(FATAL_ERROR "Could not find a pthreads library on Windows")
+ endif()
else()
find_package(Threads REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC Threads::Threads m)
28 changes: 28 additions & 0 deletions distros/noetic/patch/ros-noetic-apriltag.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf57352..84b62d7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -161,23 +161,3 @@ execute_process(COMMAND python3 -m site --user-site OUTPUT_VARIABLE PY_DEST)
string(STRIP ${PY_DEST} PY_DEST)
install(FILES ${PROJECT_BINARY_DIR}/apriltag${PY_EXT_SUFFIX} DESTINATION ${PY_DEST})
endif (NOT Python3_NOT_FOUND AND NOT Numpy_NOT_FOUND AND PYTHONLIBS_FOUND AND BUILD_PYTHON_WRAPPER)
-
-
-# Examples
-# apriltag_demo
-add_executable(apriltag_demo example/apriltag_demo.c)
-target_link_libraries(apriltag_demo apriltag)
-
-# opencv_demo
-find_package(OpenCV COMPONENTS core imgproc videoio highgui QUIET)
-if(OpenCV_FOUND)
- add_executable(opencv_demo example/opencv_demo.cc)
- target_link_libraries(opencv_demo apriltag ${OpenCV_LIBRARIES})
- set_target_properties(opencv_demo PROPERTIES CXX_STANDARD 11)
- install(TARGETS opencv_demo RUNTIME DESTINATION bin)
-else()
- message(WARNING "OpenCV not found: Not building demo")
-endif(OpenCV_FOUND)
-
-# install example programs
-install(TARGETS apriltag_demo RUNTIME DESTINATION bin)
39 changes: 39 additions & 0 deletions distros/noetic/patch/ros-noetic-aruco-ros.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d8b818..d313db7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,7 +21,7 @@ generate_dynamic_reconfigure_options(
cfg/ArucoThreshold.cfg
)

-add_compile_options(-std=c++11)
+add_compile_options(-std=c++14)

catkin_package(
INCLUDE_DIRS include
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d8b818..e2c5e99 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8.3)
project(aruco_ros)

-find_package(OpenCV REQUIRED)
+find_package(OpenCV REQUIRED COMPONENTS core imgproc calib3d)

find_package(catkin REQUIRED COMPONENTS
cv_bridge
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d8b818..2738144 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,7 +35,7 @@ include_directories(
${OpenCV_INCLUDE_DIRS}
)
add_library(aruco_ros_utils src/aruco_ros_utils.cpp)
- target_link_libraries(aruco_ros_utils ${catkin_LIBRARIES})
+ target_link_libraries(aruco_ros_utils ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})

add_executable(single src/simple_single.cpp
src/aruco_ros_utils.cpp)
16 changes: 16 additions & 0 deletions distros/noetic/patch/ros-noetic-baldor.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/src/baldor/__init__.py b/src/baldor/__init__.py
index f42da9d..1245834 100644
--- a/src/baldor/__init__.py
+++ b/src/baldor/__init__.py
@@ -9,9 +9,9 @@ import numpy as np
X_AXIS = np.array([1., 0., 0.], dtype=np.float64)
Y_AXIS = np.array([0., 1., 0.], dtype=np.float64)
Z_AXIS = np.array([0., 0., 1.], dtype=np.float64)
-_MAX_FLOAT = np.maximum_sctype(np.float)
+_MAX_FLOAT = np.maximum_sctype(np.float64)
# epsilon for testing whether a number is close to zero
-_FLOAT_EPS = np.finfo(np.float).eps
+_FLOAT_EPS = np.finfo(np.float64).eps
_EPS = np.finfo(float).eps * 4.0
# axis sequences for Euler angles
_NEXT_AXIS = [1, 2, 0, 1]
Loading
Loading