test_client.cpp
Go to the documentation of this file.
00001 #include "ros/ros.h"
00002 #include "video_player/PlayVideoSrv.h"
00003 #include <cstdlib>
00004 
00005 int main(int argc, char **argv){
00006         
00007         ros::init(argc, argv, "NbrOfVideoToPlay");
00008         if (argc != 2){
00009                 ROS_INFO("usage: which video to play X");
00010                 return 1;
00011         }
00012 
00013         ros::NodeHandle n;
00014         ros::ServiceClient client = n.serviceClient<video_player::PlayVideoSrv>("/wheeled_robin/application/play_video");
00015         video_player::PlayVideoSrv srv;
00016         
00017         srv.request.videoPath = argv[1];
00018         if (client.call(srv)){
00019                 ROS_INFO("done playing");
00020         } else {
00021                 ROS_ERROR("Video not found");
00022                 return 1;
00023         }
00024 
00025         return 0;
00026 }


video_player
Author(s): Thomas Keplinger , Lukas Schwarz
autogenerated on Fri Aug 28 2015 13:21:06