How to use a service to make a snapshot?

asked 2019-06-12 10:19:22 -0500

Hello, i already make the python file for the server and client.

I am starting the camera in the server file at the begining, so it just starts one time only and keep up while the service is up too.

the client is a simple python file too which ask the server, it does not send any value to the service.

the server, in its callback handle function, take the picture with the camera and save it.

the problem is that everytime i make the rosrun pkg client.py, the server save only the FIRST image.

lets say i start the roscore, then the server, it starts saying the camera is up. then i run the client and the service does what is supposed to do with the commad _,frame=cam.read(). then at the secon rosrun of the cliente, the "frame" is the same as the before rosrun, and for that time and on the frame keeps been the first....

Why does this occurs? does services are not the proper why to solve this activity?

UBUNTU 16.04 KINETIC

edit retag flag offensive close merge delete