00001 """--------------------------------------------------------------------
00002 COPYRIGHT 2013 SEGWAY Inc.
00003
00004 Software License Agreement:
00005
00006 The software supplied herewith by Segway Inc. (the "Company") for its
00007 RMP Robotic Platforms is intended and supplied to you, the Company's
00008 customer, for use solely and exclusively with Segway products. The
00009 software is owned by the Company and/or its supplier, and is protected
00010 under applicable copyright laws. All rights are reserved. Any use in
00011 violation of the foregoing restrictions may subject the user to criminal
00012 sanctions under applicable laws, as well as to civil liability for the
00013 breach of the terms and conditions of this license. The Company may
00014 immediately terminate this Agreement upon your use of the software with
00015 any products that are not Segway products.
00016
00017 The software was written using Python programming language. Your use
00018 of the software is therefore subject to the terms and conditions of the
00019 OSI- approved open source license viewable at http://www.python.org/.
00020 You are solely responsible for ensuring your compliance with the Python
00021 open source license.
00022
00023 You shall indemnify, defend and hold the Company harmless from any claims,
00024 demands, liabilities or expenses, including reasonable attorneys fees, incurred
00025 by the Company as a result of any claim or proceeding against the Company
00026 arising out of or based upon:
00027
00028 (i) The combination, operation or use of the software by you with any hardware,
00029 products, programs or data not supplied or approved in writing by the Company,
00030 if such claim or proceeding would have been avoided but for such combination,
00031 operation or use.
00032
00033 (ii) The modification of the software by or on behalf of you
00034
00035 (iii) Your use of the software.
00036
00037 THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION. NO WARRANTIES,
00038 WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
00039 TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
00040 PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
00041 IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
00042 CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
00043
00044 \file rmp_config_params.py
00045
00046 \brief Defines the user configurable parameters for loading at
00047 runtime
00048
00049 \Platform: Cross-platform
00050 --------------------------------------------------------------------"""
00051 from python_ethernet_rmp.system_defines import *
00052 from python_ethernet_rmp.utils import *
00053
00054 """
00055 The default values uncomment this section and remove the one below
00056 to use the defaults
00057 """
00058 my_velocity_limit_mps = DEFAULT_MAXIMUM_VELOCITY_MPS
00059 my_accel_limit_mps2 = DEFAULT_MAXIMUM_ACCELERATION_MPS2
00060 my_decel_limit_mps2 = DEFAULT_MAXIMUM_DECELERATION_MPS2
00061 my_dtz_rate_mps2 = DEFAULT_MAXIMUM_DTZ_DECEL_RATE_MPS2
00062 my_coastdown_accel_mps2 = DEFAULT_COASTDOWN_ACCEL_MPS2
00063 my_yaw_rate_limit_rps = DEFAULT_MAXIMUM_YAW_RATE_RPS
00064 my_yaw_accel_limit_rps2 = DEFAULT_MAX_YAW_ACCEL_RPS2
00065 my_tire_diameter_m = DEFAULT_TIRE_DIAMETER_M
00066 my_wheel_base_length_m = DEFAULT_WHEEL_BASE_LENGTH_M
00067 my_wheel_track_width_m = DEFAULT_WHEEL_TRACK_WIDTH_M
00068 my_gear_ratio = DEFAULT_TRANSMISSION_RATIO
00069 my_config_bitmap = 1
00070 my_ip_address = DEFAULT_IP_ADDRESS
00071 my_port_num = DEFAULT_PORT_NUMBER
00072 my_subnet_mask = DEFAULT_SUBNET_MASK
00073 my_gateway = DEFAULT_GATEWAY
00074 my_user_defined_feedback_bitmap_1 = DEFAULT_USER_FB_1_BITMAP
00075 my_user_defined_feedback_bitmap_2 = DEFAULT_USER_FB_2_BITMAP
00076 my_user_defined_feedback_bitmap_3 = DEFAULT_USER_FB_3_BITMAP
00077 my_user_defined_feedback_bitmap_4 = DEFAULT_USER_FB_4_BITMAP
00078
00079 """
00080 Modify above not below, this section is populated with those values and should not be changed
00081 this variable is used in other files; size, order and contents matter
00082 """
00083 CONFIG_PARAMS = [
00084 [RMP_CFG_CMD_ID,RMP_CMD_SET_MAXIMUM_VELOCITY,convert_float_to_u32(my_velocity_limit_mps)],
00085 [RMP_CFG_CMD_ID,RMP_CMD_SET_MAXIMUM_ACCELERATION,convert_float_to_u32(my_accel_limit_mps2)],
00086 [RMP_CFG_CMD_ID,RMP_CMD_SET_MAXIMUM_DECELERATION,convert_float_to_u32(my_decel_limit_mps2)],
00087 [RMP_CFG_CMD_ID,RMP_CMD_SET_MAXIMUM_DTZ_DECEL_RATE,convert_float_to_u32(my_dtz_rate_mps2)],
00088 [RMP_CFG_CMD_ID,RMP_CMD_SET_COASTDOWN_ACCEL,convert_float_to_u32(my_coastdown_accel_mps2)],
00089 [RMP_CFG_CMD_ID,RMP_CMD_SET_MAXIMUM_TURN_RATE,convert_float_to_u32(my_yaw_rate_limit_rps)],
00090 [RMP_CFG_CMD_ID,RMP_CMD_SET_MAXIMUM_TURN_ACCEL,convert_float_to_u32(my_yaw_accel_limit_rps2)],
00091 [RMP_CFG_CMD_ID,RMP_CMD_SET_TIRE_DIAMETER,convert_float_to_u32(my_tire_diameter_m)],
00092 [RMP_CFG_CMD_ID,RMP_CMD_SET_WHEEL_BASE_LENGTH,convert_float_to_u32(my_wheel_base_length_m)],
00093 [RMP_CFG_CMD_ID,RMP_CMD_SET_WHEEL_TRACK_WIDTH,convert_float_to_u32(my_wheel_track_width_m)],
00094 [RMP_CFG_CMD_ID,RMP_CMD_SET_TRANSMISSION_RATIO,convert_float_to_u32(my_gear_ratio)],
00095 [RMP_CFG_CMD_ID,RMP_CMD_SET_INPUT_CONFIG_BITMAP,my_config_bitmap],
00096 [RMP_CFG_CMD_ID,RMP_CMD_SET_ETH_IP_ADDRESS,dottedQuadToNum(my_ip_address)],
00097 [RMP_CFG_CMD_ID,RMP_CMD_SET_ETH_PORT_NUMBER,my_port_num],
00098 [RMP_CFG_CMD_ID,RMP_CMD_SET_ETH_SUBNET_MASK,dottedQuadToNum(my_subnet_mask)],
00099 [RMP_CFG_CMD_ID,RMP_CMD_SET_ETH_GATEWAY,dottedQuadToNum(my_gateway)],
00100 [RMP_CFG_CMD_ID,RMP_CMD_SET_USER_FB_1_BITMAP,my_user_defined_feedback_bitmap_1],
00101 [RMP_CFG_CMD_ID,RMP_CMD_SET_USER_FB_2_BITMAP,my_user_defined_feedback_bitmap_2],
00102 [RMP_CFG_CMD_ID,RMP_CMD_SET_USER_FB_3_BITMAP,my_user_defined_feedback_bitmap_3],
00103 [RMP_CFG_CMD_ID,RMP_CMD_SET_USER_FB_4_BITMAP,my_user_defined_feedback_bitmap_4]]