00001 #!/usr/bin/env python 00002 ################################################################# 00003 ##\file 00004 # 00005 # \note 00006 # Copyright (c) 2012 \n 00007 # Cardiff University \n\n 00008 # 00009 ################################################################# 00010 # 00011 # \note 00012 # Project name: Multi-Role Shadow Robotic System for Independent Living 00013 # \note 00014 # ROS stack name: srs 00015 # \note 00016 # ROS package name: srs_environments 00017 # 00018 # \author 00019 # Author: Ze Ji, email: JiZ1@cf.ac.uk 00020 # 00021 # \date Date of creation: April 2012 00022 # 00023 # \brief 00024 # (a place that stores some parameters that can be used and shared by srs components.) 00025 # 00026 ################################################################# 00027 # 00028 # Redistribution and use in source and binary forms, with or without 00029 # modification, are permitted provided that the following conditions are met: 00030 # 00031 # - Redistributions of source code must retain the above copyright 00032 # notice, this list of conditions and the following disclaimer. \n 00033 # 00034 # - Redistributions in binary form must reproduce the above copyright 00035 # notice, this list of conditions and the following disclaimer in the 00036 # documentation and/or other materials provided with the distribution. \n 00037 # 00038 # This program is free software: you can redistribute it and/or modify 00039 # it under the terms of the GNU Lesser General Public License LGPL as 00040 # published by the Free Software Foundation, either version 3 of the 00041 # License, or (at your option) any later version. 00042 # 00043 # This program is distributed in the hope that it will be useful, 00044 # but WITHOUT ANY WARRANTY; without even the implied warranty of 00045 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00046 # GNU Lesser General Public License LGPL for more details. 00047 # 00048 # You should have received a copy of the GNU Lesser General Public 00049 # License LGPL along with this program. 00050 # If not, see <http://www.gnu.org/licenses/>. 00051 # 00052 ################################################################# 00053 00054 import roslib; 00055 00056 roslib.load_manifest('srs_environments') 00057 import sys 00058 import rospy 00059 00060 def get_params(): 00061 a = rospy.get_param("/project") 00062 print a 00063 f = rospy.get_param("/float") 00064 print f 00065 #d1 = rospy.get_param('/dictionary/a') 00066 #print d1 00067 #default_param = rospy.get_param('default_param', 'default_value') 00068 00069 # fetch a group (dictionary) of parameters 00070 d2 = rospy.get_param('/nav_params') 00071 a = d2['max_dis_linear_nav'] 00072 print a 00073 00074 if __name__ == "__main__": 00075 get_params()