Skip to content

Commit

Permalink
Merge branch 'main' into fix/gaussian_noise_zero_stddev
Browse files Browse the repository at this point in the history
  • Loading branch information
mjcarroll authored Oct 23, 2023
2 parents 7323780 + b834d76 commit 1216651
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 37 deletions.
14 changes: 7 additions & 7 deletions .github/ci/packages.apt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/disabled_workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:

env:
PACKAGE: gz-sensors8
PACKAGE: gz-sensors9
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
Expand Down
26 changes: 13 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_sensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions examples/save_image/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
7 changes: 3 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
set (sources
BrownDistortionModel.cc
CameraSensorUtil.cc
Distortion.cc
EnvironmentalData.cc
GaussianNoiseModel.cc
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/CameraSensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/DepthCameraSensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions tutorials/thermal_camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1216651

Please sign in to comment.