Skip to content
Snippets Groups Projects
Commit 772b6368 authored by Tommy Persson's avatar Tommy Persson
Browse files

bagserver/client

parent e85e9295
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python
import rospy
import time
from lrs_srvs.srv import *
def start_recording(ns, uuid, topics):
try:
client = rospy.ServiceProxy(ns + "bag_start_recording", BSStartRecording)
resp = client(uuid, topics)
except rospy.ServiceException, e:
print "Service call failed: %s"%e
exit (1)
return resp
def stop_recording(ns, uuid):
try:
client = rospy.ServiceProxy(ns + "bag_stop_recording", BSStopRecording)
resp = client(uuid)
except rospy.ServiceException, e:
print "Service call failed: %s"%e
exit (1)
return resp
if __name__ == '__main__':
rospy.init_node('bagclient', anonymous=True)
ns = rospy.get_namespace ()
rospy.loginfo ("NAMESPACE: %s", ns)
uuid = "qwertyyu"
topics = ["/tf", "/uav0/pose"]
start_recording(ns, uuid, topics)
time.sleep(10)
stop_recording(ns, uuid)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment