Hello,
I would want to call a service using python. Currently this command line is working :
rosservice call /camera/start_capture
but I can't figure out how to do the same thing with python. I already tried this without succes :
rospy.ServiceProxy('/camera/start_capture',True)
Any idea ?
Matt
Originally posted by mattMGN on ROS Answers with karma: 78 on 2017-06-02
Post score: 2
Original comments
Comment by yzheng0310 on 2017-06-02:
Hi, the second argument in SeriveProxy should be your service class associated with the name '/camera/start_capture'
Comment by googooroom on 2021-08-11:
from command line, use rosservice info /camera/start_capture to find the service type
from the service type, find out the input/output of this service
when call this using python:
thisService = rospy.ServiceProxy('/camera/start_capture', type)
result = thisService(input) #input is to trigger the server, result is the output/acknowledgement from server.