vision sensor geometry

Typically: "How do I... ", "How can I... " questions
Post Reply
nickstu
Posts: 15
Joined: 26 Aug 2013, 09:01

vision sensor geometry

Post by nickstu »

Hello. I would like to know the geometry of the vision sensor object. Does it have a size, and what is its base point (meaning: if I ask vrep for the velocity of the vision sensor, what point of the vision sensor are we talking about?).
The reason I ask this is because I think that its base point does not coincide with the focus point of the camera. I'm developing a visual servoing simulation, and I ask V-Rep for the velocity (linear and angular) of the vision sensor:
1) if I move the vision sensor with a purely linear motion I get the expected results
2) if I move the vision sensor with a both linear and angular motion I get a slight error. Also the error is compensated if I assume that the base point of the vision sensor is not the focus point of the camera but is 5 millimeters away from it.

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: vision sensor geometry

Post by coppelia »

Hello,

when you select a vision sensor, you will see a reference frame in red-green-blue that represents the vision sensor origin, and also its "pin hole" (i.e. where the image is concentrated into one point).
What is probably happening in your case:
  • you get the position of the vision sensor
  • the vision sensor moves (e.g. because the mobile platform it is attached to moves)
  • the vision sensor reads an image
Above is the default and correct way of handling a simulation step: there is an actuation phase, followed by a sensing phase.

Have a look at how the main script is organized in those two phases. You can of course also read out your vision sensor in the actuation phase, in that case, you will have to handle the vision sensor explicitely. Or, you could read-out the vision sensor position/orientation in the sensing phase: for that to happen, you need to flag the child script as Execute in the sensing phase.

Cheers

Cheers

Post Reply