From 19a88e89849c3d78bd4b7edab754084d86933d05 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Tue, 17 Oct 2023 14:51:02 -0700 Subject: [PATCH 1/2] Fix unresolved external symbols on Windows (#392) --------- Signed-off-by: Ian Chen --- src/CMakeLists.txt | 7 +++---- src/CameraSensor.cc | 4 ++-- src/DepthCameraSensor.cc | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 23e52bb0..842cd4ed 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,5 @@ set (sources BrownDistortionModel.cc - CameraSensorUtil.cc Distortion.cc EnvironmentalData.cc GaussianNoiseModel.cc @@ -59,7 +58,7 @@ target_link_libraries(${rendering_target} gz-rendering${GZ_RENDERING_VER}::gz-rendering${GZ_RENDERING_VER} ) -set(camera_sources CameraSensor.cc) +set(camera_sources CameraSensor.cc CameraSensorUtil.cc) gz_add_component(camera SOURCES ${camera_sources} DEPENDS_ON_COMPONENTS rendering @@ -76,7 +75,7 @@ target_link_libraries(${camera_target} gz-transport${GZ_TRANSPORT_VER}::gz-transport${GZ_TRANSPORT_VER} ) -set(depth_camera_sources DepthCameraSensor.cc) +set(depth_camera_sources DepthCameraSensor.cc CameraSensorUtil.cc) gz_add_component(depth_camera SOURCES ${depth_camera_sources} DEPENDS_ON_COMPONENTS camera @@ -165,7 +164,7 @@ gz_add_component(force_torque SOURCES ${force_torque_sources} GET_TARGET_NAME fo set(navsat_sources NavSatSensor.cc) gz_add_component(navsat SOURCES ${navsat_sources} GET_TARGET_NAME navsat_target) -set(rgbd_camera_sources RgbdCameraSensor.cc) +set(rgbd_camera_sources RgbdCameraSensor.cc CameraSensorUtil.cc) gz_add_component(rgbd_camera SOURCES ${rgbd_camera_sources} DEPENDS_ON_COMPONENTS camera diff --git a/src/CameraSensor.cc b/src/CameraSensor.cc index 0b231067..36e5a040 100644 --- a/src/CameraSensor.cc +++ b/src/CameraSensor.cc @@ -259,7 +259,7 @@ bool CameraSensor::CreateCamera() double cx = cameraSdf->LensIntrinsicsCx(); double cy = cameraSdf->LensIntrinsicsCy(); double s = cameraSdf->LensIntrinsicsSkew(); - auto projectionMatrix = buildProjectionMatrix( + auto projectionMatrix = gz::sensors::buildProjectionMatrix( this->dataPtr->camera->ImageWidth(), this->dataPtr->camera->ImageHeight(), fx, fy, cx, cy, s, @@ -313,7 +313,7 @@ bool CameraSensor::CreateCamera() double cy = cameraSdf->LensProjectionCy(); double s = 0; - auto projectionMatrix = buildProjectionMatrix( + auto projectionMatrix = gz::sensors::buildProjectionMatrix( this->dataPtr->camera->ImageWidth(), this->dataPtr->camera->ImageHeight(), fx, fy, cx, cy, s, diff --git a/src/DepthCameraSensor.cc b/src/DepthCameraSensor.cc index 590bba79..49295bf3 100644 --- a/src/DepthCameraSensor.cc +++ b/src/DepthCameraSensor.cc @@ -405,7 +405,7 @@ bool DepthCameraSensor::CreateCamera() double cx = cameraSdf->LensIntrinsicsCx(); double cy = cameraSdf->LensIntrinsicsCy(); double s = cameraSdf->LensIntrinsicsSkew(); - auto projectionMatrix = buildProjectionMatrix( + auto projectionMatrix = gz::sensors::buildProjectionMatrix( this->dataPtr->depthCamera->ImageWidth(), this->dataPtr->depthCamera->ImageHeight(), fx, fy, cx, cy, s, this->dataPtr->depthCamera->NearClipPlane(), @@ -446,7 +446,7 @@ bool DepthCameraSensor::CreateCamera() double cy = cameraSdf->LensProjectionCy(); double s = 0; - auto projectionMatrix = buildProjectionMatrix( + auto projectionMatrix = gz::sensors::buildProjectionMatrix( this->dataPtr->depthCamera->ImageWidth(), this->dataPtr->depthCamera->ImageHeight(), fx, fy, cx, cy, s, From b834d760cd87dbe8b25c417572a492de64bdecda Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Tue, 17 Oct 2023 17:43:37 -0500 Subject: [PATCH 2/2] Bumps in ionic : ci_matching_branch/bump_ionic_gz-sensors9 (#399) Signed-off-by: Addisu Z. Taddese Co-authored-by: Ian Chen --- .github/ci/packages.apt | 14 +++++++------- .github/disabled_workflows/macos.yml | 2 +- CMakeLists.txt | 26 +++++++++++++------------- examples/custom_sensor/CMakeLists.txt | 2 +- examples/save_image/CMakeLists.txt | 6 +++--- tutorials/thermal_camera.md | 8 ++++---- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt index 79196914..a1a45e29 100644 --- a/.github/ci/packages.apt +++ b/.github/ci/packages.apt @@ -1,9 +1,9 @@ -libgz-cmake3-dev -libgz-common5-dev -libgz-math7-dev -libgz-msgs10-dev -libgz-rendering8-dev +libgz-cmake4-dev +libgz-common6-dev +libgz-math8-dev +libgz-msgs11-dev +libgz-rendering9-dev libgz-tools2-dev -libgz-transport13-dev -libsdformat14-dev +libgz-transport14-dev +libsdformat15-dev xvfb diff --git a/.github/disabled_workflows/macos.yml b/.github/disabled_workflows/macos.yml index 2b2353f2..1c2b6d6b 100644 --- a/.github/disabled_workflows/macos.yml +++ b/.github/disabled_workflows/macos.yml @@ -6,7 +6,7 @@ jobs: build: env: - PACKAGE: gz-sensors8 + PACKAGE: gz-sensors9 runs-on: macos-latest steps: - uses: actions/checkout@v3 diff --git a/CMakeLists.txt b/CMakeLists.txt index 113b8735..4c82c166 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ project(gz-sensors9 VERSION 9.0.0) #============================================================================ # Find gz-cmake #============================================================================ -find_package(gz-cmake3 REQUIRED) +find_package(gz-cmake4 REQUIRED) #============================================================================ # Configure the project @@ -44,20 +44,20 @@ gz_find_package(GzProtobuf #-------------------------------------- # Find gz-math -gz_find_package(gz-math7 REQUIRED) -set(GZ_MATH_VER ${gz-math7_VERSION_MAJOR}) +gz_find_package(gz-math8 REQUIRED) +set(GZ_MATH_VER ${gz-math8_VERSION_MAJOR}) #-------------------------------------- # Find gz-common -gz_find_package(gz-common5 +gz_find_package(gz-common6 COMPONENTS profiler REQUIRED) -set(GZ_COMMON_VER ${gz-common5_VERSION_MAJOR}) +set(GZ_COMMON_VER ${gz-common6_VERSION_MAJOR}) #-------------------------------------- # Find gz-transport -gz_find_package(gz-transport13 REQUIRED) -set(GZ_TRANSPORT_VER ${gz-transport13_VERSION_MAJOR}) +gz_find_package(gz-transport14 REQUIRED) +set(GZ_TRANSPORT_VER ${gz-transport14_VERSION_MAJOR}) #-------------------------------------- # Find gz-rendering @@ -67,8 +67,8 @@ if ((NOT ${CMAKE_VERSION} VERSION_LESS 3.11) AND (NOT OpenGL_GL_PREFERENCE)) set(OpenGL_GL_PREFERENCE "GLVND") endif() -gz_find_package(gz-rendering8 REQUIRED OPTIONAL_COMPONENTS ogre ogre2) -set(GZ_RENDERING_VER ${gz-rendering8_VERSION_MAJOR}) +gz_find_package(gz-rendering9 REQUIRED OPTIONAL_COMPONENTS ogre ogre2) +set(GZ_RENDERING_VER ${gz-rendering9_VERSION_MAJOR}) if (TARGET gz-rendering${GZ_RENDERING_VER}::ogre) set(HAVE_OGRE TRUE) @@ -82,13 +82,13 @@ endif() #-------------------------------------- # Find gz-msgs -gz_find_package(gz-msgs10 REQUIRED) -set(GZ_MSGS_VER ${gz-msgs10_VERSION_MAJOR}) +gz_find_package(gz-msgs11 REQUIRED) +set(GZ_MSGS_VER ${gz-msgs11_VERSION_MAJOR}) #-------------------------------------- # Find SDFormat -gz_find_package(sdformat14 REQUIRED) -set(SDF_VER ${sdformat14_VERSION_MAJOR}) +gz_find_package(sdformat15 REQUIRED) +set(SDF_VER ${sdformat15_VERSION_MAJOR}) #-------------------------------------- # Find Eigen3 diff --git a/examples/custom_sensor/CMakeLists.txt b/examples/custom_sensor/CMakeLists.txt index bef7c936..ebb79cdb 100644 --- a/examples/custom_sensor/CMakeLists.txt +++ b/examples/custom_sensor/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) project(odometer) -find_package(gz-cmake3 REQUIRED) +find_package(gz-cmake4 REQUIRED) find_package(gz-sensors9 REQUIRED) add_library(${PROJECT_NAME} SHARED Odometer.cc) diff --git a/examples/save_image/CMakeLists.txt b/examples/save_image/CMakeLists.txt index d49376f1..8208c85d 100644 --- a/examples/save_image/CMakeLists.txt +++ b/examples/save_image/CMakeLists.txt @@ -2,13 +2,13 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR) project(gz-sensors-camera-demo) # Find the Gazebo Libraries used directly by the example -find_package(gz-rendering8 REQUIRED OPTIONAL_COMPONENTS ogre ogre2) +find_package(gz-rendering9 REQUIRED OPTIONAL_COMPONENTS ogre ogre2) find_package(gz-sensors9 REQUIRED COMPONENTS rendering camera) -if (TARGET gz-rendering8::ogre) +if (TARGET gz-rendering9::ogre) add_definitions(-DWITH_OGRE) endif() -if (TARGET gz-rendering8::ogre2) +if (TARGET gz-rendering9::ogre2) add_definitions(-DWITH_OGRE2) endif() diff --git a/tutorials/thermal_camera.md b/tutorials/thermal_camera.md index 481dd380..dbe0b603 100644 --- a/tutorials/thermal_camera.md +++ b/tutorials/thermal_camera.md @@ -353,12 +353,12 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR) project(image-listener) # Find the Gazebo Libraries used directly by the example -find_package(gz-msgs10 REQUIRED) -find_package(gz-transport13 REQUIRED) +find_package(gz-msgs11 REQUIRED) +find_package(gz-transport14 REQUIRED) add_executable(${PROJECT_NAME} main.cpp) -target_link_libraries(${PROJECT_NAME} PUBLIC gz-msgs10 gz-transport13) -target_include_directories(${PROJECT_NAME} PUBLIC ${gz_msgs10_INCLUDE_DIRS}) +target_link_libraries(${PROJECT_NAME} PUBLIC gz-msgs11 gz-transport14) +target_include_directories(${PROJECT_NAME} PUBLIC ${gz_msgs11_INCLUDE_DIRS}) ``` Although most of the code above is described in the comments, let's go over the key points again: