Skip to content

Commit b52fef2

Browse files
committed
Fixed unsupported image format
Signed-off-by: William Lew <[email protected]>
1 parent 6e24146 commit b52fef2

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

test/integration/wide_angle_camera.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void imageCb(const msgs::Image &_msg)
4949
{
5050
mutex.lock();
5151
unsigned int imageSamples = _msg.width() * _msg.height();
52-
unsigned int imageBufferSize = imageSamples * sizeof(float);
52+
unsigned int imageBufferSize = _msg.step * _msg.height();
5353

5454
if (!imageBuffer)
5555
imageBuffer = new float[imageSamples];

test/worlds/wide_angle_camera_sensor.sdf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
<image>
9191
<width>256</width>
9292
<height>256</height>
93-
<format>R_FLOAT32</format>
9493
</image>
9594
<clip>
9695
<near>0.1</near>

0 commit comments

Comments
 (0)