Skip to content

Commit 86ebadc

Browse files
authored
Fixed bug with the calculation of fx values in intrinsic parameters (#9462)
1 parent 1146277 commit 86ebadc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

LibCarla/source/carla/ros2/publishers/CarlaCameraPublisher.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ bool CarlaCameraPublisher::WriteCameraInfo(int32_t seconds, uint32_t nanoseconds
2121

2222
const double cx = static_cast<double>(width) / 2.0;
2323
const double cy = static_cast<double>(height) / 2.0;
24-
const double fx = static_cast<double>(width) / (2.0 * std::tan(fov) * M_PI / 360.0);
24+
const double fx = static_cast<double>(width) / (2.0 * std::tan(fov * M_PI / 360.0));
2525
const double fy = fx;
2626

2727
_impl_camera_info->GetMessage()->height(height);

0 commit comments

Comments
 (0)