Getting a single image of a camera for visualization/documentation purposes

Dear all,

I am spawning debugging points around a vehicle and would like to take single images from the 4 sides (i.e. rear, left, right, front) to document the position of those points.

What I’ve tried:

  • Spawning a camera behind the vehicle, call listen(), then move the camera to the 3 remaining positions using set_transform(), but I’ve run into the problem of syncing the movement and sensor_tick, as sometimes the camera is moved before taking an image, sometimes it’s taking two images of the same position.

  • Spawning 4 cameras, one in each position. Problem: only receiving a single image of each sensor.

Is there maybe a much simpler way to document the surroundings of a vehicle?
Can I maybe design the function fun passed to listen( fun ) to stop the image stream after taking one image?

Thank you very much!

Do you mean that the images doesn’t update and remain in the first image? I encountered the same problem and searching for the solution

No, my problem was that I actually want a single frame and after that I’d like the camera to stop retrieving images!
By now I’ve fixed that issue, but it seems like you have a different problem :slight_smile:

Have you checked your synchrony settings?

I’m not very clear about the synchrony settings, can you provide some suggestion? Thanks a lot!

I’m not an expert, the documentation gives a good overview :slight_smile:
As I understand, if your simulation runs in synchronous mode, the server waits for a tick to further the simulation to the next time step. As the camera is client sided, it keeps taking images, but of the same time step, as the server is stopped until the next tick.

This could potentially be your problem.

Thanks a lot or your help again! I would try to find solution according to the situation you mentioned