Hi,

 I'm currently working on creating an omnidirectional camera for use in
Gazebo 0.7; however I'm having a little bit of trouble setting the
camera rotation. The way I'm acquiring an omnidirectional image, is to
make 4 passes with a 90 degree field of view, these will later be cube
mapped on to a sphere to simulate the distortion of a real
omnidirectional camera (one which uses a hyperbolic mirror). However the
camera does not rotate as I would expect, the following code is used for
the image acquisition:

  for(j = 0; j < 4; j++) {
    dst = data->image + len * j;
    this->camera->Update();
    src = this->camera->GetImageData() + (height - 1) * len;
    for (i = 0; i < height; i++, src -= len, dst += len) {
      memcpy(dst, src, len);
      dst += len * 3;
    }
    pose = this->camera->GetPose();
    pose.rot.z += M_PI / 2;
    this->camera->SetPose(pose);
  }

 Which produces output like this:
http://www.mikeasoft.com/~mike/omnicam.png

 As you can see I'm attempting to rotate the camera by PI/2 for each
section of the image, however the resulting images are clearly not
rotated by this amount. When I turn the whole robot about its Z axis the
different sections of the image rotate at different speeds, the first
(front) image rotates as normal, but all the others are incorrect.

 Can anyone give me a clue as to what I might be doing wrong?

Cheers,
 Mike.

 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Playerstage-gazebo mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo

Reply via email to