env_model_disable_color.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 ###############################################################################
00003 # \file
00004 #
00005 # $Id:$
00006 #
00007 # Copyright (C) Brno University of Technology
00008 #
00009 # This file is part of software developed by dcgm-robotics@FIT group.
00010 # 
00011 # Author: Zdenek Materna (imaterna@fit.vutbr.cz)
00012 # Supervised by: Michal Spanel (spanel@fit.vutbr.cz)
00013 # Date: dd/mm/2012
00014 #
00015 # This file is free software: you can redistribute it and/or modify
00016 # it under the terms of the GNU Lesser General Public License as published by
00017 # the Free Software Foundation, either version 3 of the License, or
00018 # (at your option) any later version.
00019 # 
00020 # This file is distributed in the hope that it will be useful,
00021 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 # GNU Lesser General Public License for more details.
00024 # 
00025 # You should have received a copy of the GNU Lesser General Public License
00026 # along with this file.  If not, see <http://www.gnu.org/licenses/>.
00027 #
00028 import roslib; roslib.load_manifest('srs_user_tests')
00029 import rospy
00030 from srs_env_model.srv import UseInputColor
00031 
00032 
00033 def main():
00034     
00035     rospy.init_node('env_model_disable_color_node')
00036     
00037     s_dis_color = rospy.ServiceProxy("/but_env_model/server_use_input_color", UseInputColor)
00038     
00039     rospy.loginfo("Waiting for Environment Model...")
00040 
00041     rospy.wait_for_service("/but_env_model/server_use_input_color")
00042     
00043     rospy.sleep(2)
00044 
00045     rospy.loginfo("Disabling input color")
00046     
00047     try:
00048             
00049       s_dis_color(use_color = False)
00050             
00051     except Exception, e:
00052         
00053       rospy.logerr('Error on calling service: %s',str(e))
00054       
00055     rospy.loginfo("Finished!")
00056       
00057 
00058 if __name__ == '__main__':
00059   try:
00060     main()
00061   except rospy.ROSInterruptException: pass


srs_user_tests
Author(s): SRS team
autogenerated on Sun Jan 5 2014 12:14:04