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,