Skip to content

Commit f90702d

Browse files
Add rosbridge_suite to osx and osx_arm64 (#108)
* Add rosbridge_suite to osx and osx_arm64 * Fixup patch * Update patch * Update ros-galactic-rviz-ogre-vendor.patch * Update ros-galactic-rviz-ogre-vendor.patch * Update ros-galactic-rviz-rendering.patch * Update testpr_environment.yml Co-authored-by: Tobias Fischer <info@tobiasfischer.info>
1 parent 1998272 commit f90702d

7 files changed

Lines changed: 54 additions & 68 deletions

.github/testpr_environment.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: base
22
channels:
33
- robostack
4+
- robostack-experimental
45
- conda-forge
56
dependencies:
6-
- python 3.7.*
7+
- python 3.9.*
78
- pip
89
- boa
910
- rospkg

patch/ros-galactic-rclpy.patch

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 9d0379d..53302d6 100644
2+
index 1481e6a..a2b19a3 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
55
@@ -14,6 +14,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
@@ -59,33 +59,35 @@ index 9d0379d..53302d6 100644
5959

6060
# Install library for actual use
6161
install(TARGETS ${_library_name}
62-
@@ -128,10 +114,15 @@ add_library(rclpy_common SHARED
62+
@@ -128,10 +114,17 @@ add_library(rclpy_common SHARED
6363
)
6464
target_link_libraries(rclpy_common PUBLIC
6565
pybind11::pybind11
6666
- ${PYTHON_LIBRARIES}
6767
rcl::rcl
6868
rmw::rmw
6969
)
70+
+
7071
+if(NOT APPLE)
7172
+ target_link_libraries(rclpy_common PUBLIC ${Python_LIBRARIES})
7273
+else()
7374
+ set_target_properties(rclpy_common PROPERTIES
7475
+ LINK_FLAGS "-undefined dynamic_lookup")
7576
+endif()
77+
+
7678
target_include_directories(rclpy_common PUBLIC
7779
src/rclpy_common/include
7880
)
79-
@@ -147,7 +138,7 @@ install(TARGETS rclpy_common
81+
@@ -147,7 +140,7 @@ install(TARGETS rclpy_common
8082
)
8183

8284
# Split from main extension and converted to pybind11
8385
-pybind11_add_module(_rclpy_pybind11 SHARED
8486
+add_library(_rclpy_pybind11 MODULE
85-
src/rclpy/_rclpy_action.cpp
8687
src/rclpy/_rclpy_handle.cpp
8788
src/rclpy/_rclpy_logging.cpp
88-
@@ -177,6 +168,10 @@ pybind11_add_module(_rclpy_pybind11 SHARED
89+
src/rclpy/_rclpy_pybind11.cpp
90+
@@ -178,6 +171,10 @@ pybind11_add_module(_rclpy_pybind11 SHARED
8991
src/rclpy/utils.cpp
9092
src/rclpy/wait_set.cpp
9193
)
@@ -96,7 +98,7 @@ index 9d0379d..53302d6 100644
9698
target_include_directories(_rclpy_pybind11 PRIVATE
9799
src/rclpy/
98100
)
99-
@@ -187,18 +182,24 @@ target_link_libraries(_rclpy_pybind11 PRIVATE
101+
@@ -188,18 +185,24 @@ target_link_libraries(_rclpy_pybind11 PRIVATE
100102
rclpy_common
101103
rcpputils::rcpputils
102104
rcutils::rcutils
@@ -122,7 +124,7 @@ index 9d0379d..53302d6 100644
122124
)
123125
configure_build_install_location(_rclpy_signal_handler)
124126
clean_windows_flags(_rclpy_signal_handler)
125-
@@ -300,6 +301,5 @@ if(BUILD_TESTING)
127+
@@ -301,6 +304,5 @@ if(BUILD_TESTING)
126128
endforeach()
127129
endif()
128130
endif()
Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index e92c59f2..9cfdbec5 100644
2+
index 034f3f2a..2c1b4c2d 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
55
@@ -83,6 +83,8 @@ if(FORCE_BUILD_VENDOR_PKG OR NOT assimp_FOUND OR "${assimp_VERSION}" VERSION_LES
@@ -12,10 +12,10 @@ index e92c59f2..9cfdbec5 100644
1212

1313
if(BUILD_TESTING)
1414
diff --git a/rviz_assimp_vendor-extras.cmake.in b/rviz_assimp_vendor-extras.cmake.in
15-
index 8e41fe66..67467f16 100644
15+
index d8ec4765..ad39a517 100644
1616
--- a/rviz_assimp_vendor-extras.cmake.in
1717
+++ b/rviz_assimp_vendor-extras.cmake.in
18-
@@ -4,30 +4,14 @@
18+
@@ -4,35 +4,13 @@
1919
# https://bugs.launchpad.net/ubuntu/+source/assimp/+bug/1869405
2020
set(ON 1)
2121

@@ -28,26 +28,31 @@ index 8e41fe66..67467f16 100644
2828
- message(STATUS "Setting assimp_DIR to: '${assimp_DIR}'")
2929
-endif()
3030
+set(ASSIMP_LIBRARIES assimp::assimp)
31+
+set(rviz_assimp_vendor_LIBRARIES "${ASSIMP_LIBRARIES}")
3132

3233
-find_package(assimp REQUIRED QUIET)
33-
+set(rviz_assimp_vendor_LIBRARIES "${ASSIMP_LIBRARIES}")
34+
+find_library(ASSIMP_LIB assimp)
35+
+get_filename_component(ASSIMP_LIBRARY_DIRS "${ASSIMP_LIB}" DIRECTORY)
3436

3537
-# workaround bug in Assimp 4.1.0 https://github.com/assimp/assimp/issues/1914
3638
-# Affecting Ubuntu package: libassimp-dev 4.1.0~dfsg-3, Brew: assimp 4.1.0
3739
-string(REPLACE "/lib/lib/" "/lib/" ASSIMP_LIBRARY_DIRS "${ASSIMP_LIBRARY_DIRS}")
3840
-string(REGEX REPLACE "/lib/include$" "/include" ASSIMP_INCLUDE_DIRS "${ASSIMP_INCLUDE_DIRS}")
39-
+find_library(ASSIMP_LIB assimp)
40-
+get_filename_component(ASSIMP_LIBRARY_DIRS "${ASSIMP_LIB}" DIRECTORY)
41-
42-
-set(rviz_assimp_vendor_LIBRARIES)
43-
-foreach(library IN LISTS ASSIMP_LIBRARIES)
44-
- message(STATUS "library: ${library}")
45-
- if(IS_ABSOLUTE "${library}")
46-
- list(APPEND rviz_assimp_vendor_LIBRARIES "${library}")
47-
- else()
48-
- find_library(library_abs ${library} PATHS "${ASSIMP_LIBRARY_DIRS}" NO_DEFAULT_PATH)
49-
- list(APPEND rviz_assimp_vendor_LIBRARIES "${library_abs}")
50-
- endif()
51-
-endforeach()
41+
-
42+
-# Fix for https://github.com/ros2/ros2/issues/1222
43+
-if(TARGET assimp::assimp AND "${assimp_VERSION}" VERSION_GREATER 5.0.1)
44+
- set(rviz_assimp_vendor_LIBRARIES assimp::assimp)
45+
-else()
46+
- set(rviz_assimp_vendor_LIBRARIES)
47+
- foreach(library IN LISTS ASSIMP_LIBRARIES)
48+
- message(STATUS "library: ${library}")
49+
- if(IS_ABSOLUTE "${library}")
50+
- list(APPEND rviz_assimp_vendor_LIBRARIES "${library}")
51+
- else()
52+
- find_library(library_abs ${library} PATHS "${ASSIMP_LIBRARY_DIRS}" NO_DEFAULT_PATH)
53+
- list(APPEND rviz_assimp_vendor_LIBRARIES "${library_abs}")
54+
- endif()
55+
- endforeach()
56+
-endif()
5257
set(rviz_assimp_vendor_LIBRARY_DIRS ${ASSIMP_LIBRARY_DIRS})
5358
set(rviz_assimp_vendor_INCLUDE_DIRS ${ASSIMP_INCLUDE_DIRS})

patch/ros-galactic-rviz-ogre-vendor.patch

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index faac7e1b..8b93592e 100644
2+
index 7a917af8..591cfbae 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
5-
@@ -204,28 +204,36 @@ macro(build_ogre)
6-
)
7-
endmacro()
5+
@@ -6,13 +6,8 @@ find_package(ament_cmake REQUIRED)
86

9-
-if(BUILDING_FREETYPE_LOCALLY)
10-
- build_freetype()
11-
-endif()
12-
-if(BUILDING_ZLIB_LOCALLY)
13-
- build_zlib()
7+
set(PACKAGE_VERSION "1.0.0")
8+
9+
-if(WIN32)
10+
- set(BUILDING_FREETYPE_LOCALLY ON)
11+
- set(BUILDING_ZLIB_LOCALLY ON)
12+
-else()
13+
- set(BUILDING_FREETYPE_LOCALLY OFF)
14+
- set(BUILDING_ZLIB_LOCALLY OFF)
1415
-endif()
15-
+set(RVIZ_OGRE_IS_VENDORBUILD OFF)
16+
+set(BUILDING_FREETYPE_LOCALLY OFF)
17+
+set(BUILDING_ZLIB_LOCALLY OFF)
18+
19+
if(WIN32 AND NOT ${CMAKE_VERBOSE_MAKEFILE})
20+
set(should_log ON) # prevent warnings in Windows CI
21+
@@ -217,20 +212,32 @@ if(BUILDING_ZLIB_LOCALLY)
22+
build_zlib()
23+
endif()
1624

1725
-build_ogre()
1826
+find_package(OGRE)
@@ -52,12 +60,10 @@ index faac7e1b..8b93592e 100644
5260
endif()
5361
- set(ENV_VAR_VALUE "opt/rviz_ogre_vendor/lib")
5462
endif()
55-
+
5663
ament_environment_hooks(env_hook/rviz_ogre_vendor_library_path.dsv.in)
5764

58-
if(BUILD_TESTING)
5965
diff --git a/rviz_ogre_vendor-extras.cmake.in b/rviz_ogre_vendor-extras.cmake.in
60-
index 0ab09b60..6365c570 100644
66+
index 786aff99..935ed247 100644
6167
--- a/rviz_ogre_vendor-extras.cmake.in
6268
+++ b/rviz_ogre_vendor-extras.cmake.in
6369
@@ -1,20 +1,26 @@

patch/ros-galactic-rviz-rendering.patch

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,3 @@
1-
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index a0e8c892..a05ef366 100644
3-
--- a/CMakeLists.txt
4-
+++ b/CMakeLists.txt
5-
@@ -121,6 +121,7 @@ ament_target_dependencies(rviz_rendering
6-
)
7-
ament_export_dependencies(
8-
rviz_ogre_vendor
9-
+ rviz_assimp_vendor
10-
eigen3_cmake_module
11-
Eigen3
12-
resource_retriever
13-
diff --git a/src/rviz_rendering/material_manager.cpp b/src/rviz_rendering/material_manager.cpp
14-
index 3866ae00..11eede92 100644
15-
--- a/src/rviz_rendering/material_manager.cpp
16-
+++ b/src/rviz_rendering/material_manager.cpp
17-
@@ -122,9 +122,9 @@ void MaterialManager::enableAlphaBlending(
18-
19-
void MaterialManager::createDefaultMaterials()
20-
{
21-
- auto material = Ogre::MaterialManager::getSingleton().create(
22-
+ auto retrieve_result = Ogre::MaterialManager::getSingleton().createOrRetrieve(
23-
"BaseWhiteNoLighting", "rviz_rendering");
24-
- material->setLightingEnabled(false);
25-
+ std::dynamic_pointer_cast<Ogre::Material>(retrieve_result.first)->setLightingEnabled(false);
26-
}
27-
28-
} // namespace rviz_rendering
291
diff --git a/src/rviz_rendering/render_system.cpp b/src/rviz_rendering/render_system.cpp
302
index 1765e804..eb426dd8 100644
313
--- a/src/rviz_rendering/render_system.cpp

vinca_osx.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ packages_select_by_deps:
4141
- joint-state-publisher
4242
- joint-trajectory-controller
4343
- xacro
44-
# - rosbridge_suite
44+
- rosbridge_suite
4545
# - rosbridge-msgs
4646
# - rosbridge-library
4747
# - robot-localization

vinca_osx_arm64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ packages_select_by_deps:
4343
- joint-state-publisher
4444
- joint-trajectory-controller
4545
- xacro
46-
# - rosbridge_suite
46+
- rosbridge_suite
4747
# - rosbridge-msgs
4848
# - rosbridge-library
4949
# - robot-localization

0 commit comments

Comments
 (0)