file_path
stringlengths
21
224
content
stringlengths
0
80.8M
renanmb/Omniverse_legged_robotics/URDF-Descriptions/KodlabPenn/kodlab_gazebo-master/minitaur_description/sdf/minitaur_sensor/minitaur_sensor.sdf
<?xml version='1.0'?> <!-- MIT License (modified) Copyright (c) 2018 The Trustees of the University of Pennsylvania Authors: Vasileios Vasilopoulos <[email protected]> Permission is hereby granted, free of charge, to any person obtaining a copy of this **file** (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --> <sdf version='1.6'> <model name='minitaur_constrained'> <link name='base_chassis_link_dummy'> <pose frame=''>0 0 0 0 -0 0</pose> <inertial> <pose frame=''>0 -0.001049 -0.005375 0 -0 0</pose> <mass>4.956</mass> <inertia> <ixx>0.0612569</ixx> <ixy>-2.18416e-20</ixy> <ixz>-5.76859e-20</ixz> <iyy>0.175533</iyy> <iyz>-6.82484e-05</iyz> <izz>0.225818</izz> </inertia> </inertial> <collision name='base_chassis_link_dummy_collision'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <box> <size>0.33 0.1855 0.08</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_collision_1'> <pose frame=''>0 0.1 -0.014 0 -0 0</pose> <geometry> <box> <size>0.17 0.1 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_collision_2'> <pose frame=''>0 -0.1 -0.014 0 -0 0</pose> <geometry> <box> <size>0.17 0.1 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__base_chassis_link_collision_3'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <box> <size>0.33 0.1855 0.08</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__base_chassis_link_collision_4'> <pose frame=''>0 0.1 -0.014 0 -0 0</pose> <geometry> <box> <size>0.17 0.1 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__base_chassis_link_collision_5'> <pose frame=''>0 -0.1 -0.014 0 -0 0</pose> <geometry> <box> <size>0.17 0.1 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__chassis_left_collision_6'> <pose frame=''>0.2375 0.0775 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__chassis_left_collision_7'> <pose frame=''>-0.2375 0.0775 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__chassis_right_collision_8'> <pose frame=''>0.2375 -0.0775 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__chassis_right_collision_9'> <pose frame=''>-0.2375 -0.0775 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__frame1_collision_10'> <pose frame=''>0.0175 -0.154 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.468 0.012 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__frame2_collision_11'> <pose frame=''>0.0175 0.154 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.468 0.012 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__frame3_collision_12'> <pose frame=''>-0.0175 -0.099 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.468 0.012 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__frame4_collision_13'> <pose frame=''>-0.0175 0.099 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.468 0.012 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__motor_back_leftL_bracket_link_collision_14'> <pose frame=''>-0.2375 0.174 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__motor_back_rightR_bracket_link_collision_15'> <pose frame=''>-0.2375 -0.174 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__motor_front_leftL_bracket_link_collision_16'> <pose frame=''>0.2375 0.174 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <collision name='base_chassis_link_dummy_fixed_joint_lump__motor_front_rightR_bracket_link_collision_17'> <pose frame=''>0.2375 -0.174 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <visual name='base_chassis_link_dummy_visual'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <box> <size>0.33 0.1855 0.08</size> </box> </geometry> <material> <script> <name>Gazebo/FlatBlack</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_visual_1'> <pose frame=''>0 0.1 -0.014 0 -0 0</pose> <geometry> <box> <size>0.17 0.1 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/FlatBlack</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_visual_2'> <pose frame=''>0 -0.1 -0.014 0 -0 0</pose> <geometry> <box> <size>0.17 0.1 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/FlatBlack</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__base_chassis_link_visual_3'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <box> <size>0.33 0.1855 0.08</size> </box> </geometry> <material> <script> <name>Gazebo/FlatBlack</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__base_chassis_link_visual_4'> <pose frame=''>0 0.1 -0.014 0 -0 0</pose> <geometry> <box> <size>0.17 0.1 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/FlatBlack</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__base_chassis_link_visual_5'> <pose frame=''>0 -0.1 -0.014 0 -0 0</pose> <geometry> <box> <size>0.17 0.1 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/FlatBlack</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__chassis_left_visual_6'> <pose frame=''>0.2375 0.0775 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/Black</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__chassis_left_visual_7'> <pose frame=''>-0.2375 0.0775 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/Black</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__chassis_right_visual_8'> <pose frame=''>0.2375 -0.0775 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/Black</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__chassis_right_visual_9'> <pose frame=''>-0.2375 -0.0775 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/Black</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__frame1_visual_10'> <pose frame=''>0.0175 -0.154 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.468 0.012 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__frame2_visual_11'> <pose frame=''>0.0175 0.154 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.468 0.012 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__frame3_visual_12'> <pose frame=''>-0.0175 -0.099 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.468 0.012 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__frame4_visual_13'> <pose frame=''>-0.0175 0.099 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.468 0.012 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__motor_back_leftL_bracket_link_visual_14'> <pose frame=''>-0.2375 0.174 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/Black</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__motor_back_rightR_bracket_link_visual_15'> <pose frame=''>-0.2375 -0.174 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/Black</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__motor_front_leftL_bracket_link_visual_16'> <pose frame=''>0.2375 0.174 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/Black</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='base_chassis_link_dummy_fixed_joint_lump__motor_front_rightR_bracket_link_visual_17'> <pose frame=''>0.2375 -0.174 -0.0185 0 -0 0</pose> <geometry> <box> <size>0.068 0.032 0.05</size> </box> </geometry> <material> <script> <name>Gazebo/Black</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <velocity_decay/> <velocity_decay/> <velocity_decay/> <velocity_decay/> <velocity_decay/> <velocity_decay/> <velocity_decay/> <velocity_decay/> <velocity_decay/> <velocity_decay/> <velocity_decay/> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <link name='motor_front_leftR_link'> <pose frame=''>0.2375 0.099 -0.0185 1.57075 1.57075 0</pose> <inertial> <pose frame=''>0 0.0075 -0.002417 0 -0 0</pose> <mass>0.3</mass> <inertia> <ixx>0.000245875</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.000126333</iyy> <iyz>2.71857e-05</iyz> <izz>0.000344223</izz> </inertia> </inertial> <collision name='motor_front_leftR_link_collision'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <cylinder> <length>0.021</length> <radius>0.0425</radius> </cylinder> </geometry> </collision> <collision name='motor_front_leftR_link_fixed_joint_lump__upper_leg_front_leftR_link_collision_1'> <pose frame=''>0 0.045 -0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <visual name='motor_front_leftR_link_visual'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <mesh> <scale>100 100 100</scale> <uri>model://minitaur_constrained/../../meshes/tmotor3.dae</uri> </mesh> </geometry> </visual> <visual name='motor_front_leftR_link_fixed_joint_lump__upper_leg_front_leftR_link_visual_1'> <pose frame=''>0 0.045 -0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='1' type='revolute'> <child>motor_front_leftR_link</child> <parent>base_chassis_link_dummy</parent> <axis> <xyz>4.6e-05 -1 0</xyz> <limit> <lower>-1e+16</lower> <upper>1e+16</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> </joint> <link name='lower_leg_front_leftR_link'> <pose frame=''>0.332499 0.122002 -0.018496 -3.14159 -0.523343 -3.14159</pose> <inertial> <pose frame=''>0 0 0.1 0 -0 0</pose> <mass>0.05</mass> <inertia> <ixx>0.00032459</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.00032637</iyy> <iyz>0</iyz> <izz>2.178e-06</izz> </inertia> </inertial> <collision name='lower_leg_front_leftR_link_collision'> <pose frame=''>0 0 0.1 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.2</size> </box> </geometry> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> <ode/> </friction> <contact> <ode> <kp>3000</kp> <kd>100</kd> </ode> <bullet> <kp>3000</kp> <kd>100</kd> <split_impulse>1</split_impulse> <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold> </bullet> </contact> </surface> </collision> <visual name='lower_leg_front_leftR_link_visual'> <pose frame=''>0 0 0.1 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.2</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='9' type='universal'> <child>lower_leg_front_leftR_link</child> <parent>motor_front_leftR_link</parent> <axis> <xyz>-0 1 -0</xyz> <limit> <lower>-2.000</lower> <upper>1.000</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> <axis2> <xyz>1 0 0</xyz> <limit> <lower>-0.05</lower> <upper>0.05</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis2> </joint> <link name='motor_back_leftR_link'> <pose frame=''>-0.2375 0.099 -0.0185 1.57075 1.57075 0</pose> <inertial> <pose frame=''>0 0.0075 -0.002417 0 -0 0</pose> <mass>0.3</mass> <inertia> <ixx>0.000245875</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.000126333</iyy> <iyz>2.71857e-05</iyz> <izz>0.000344223</izz> </inertia> </inertial> <collision name='motor_back_leftR_link_collision'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <cylinder> <length>0.021</length> <radius>0.0425</radius> </cylinder> </geometry> </collision> <collision name='motor_back_leftR_link_fixed_joint_lump__upper_leg_back_leftR_link_collision_1'> <pose frame=''>0 0.045 -0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <visual name='motor_back_leftR_link_visual'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <mesh> <scale>100 100 100</scale> <uri>model://minitaur_constrained/../../meshes/tmotor3.dae</uri> </mesh> </geometry> </visual> <visual name='motor_back_leftR_link_fixed_joint_lump__upper_leg_back_leftR_link_visual_1'> <pose frame=''>0 0.045 -0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='3' type='revolute'> <child>motor_back_leftR_link</child> <parent>base_chassis_link_dummy</parent> <axis> <xyz>4.6e-05 -1 0</xyz> <limit> <lower>-1e+16</lower> <upper>1e+16</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> </joint> <link name='lower_leg_back_leftR_link'> <pose frame=''>-0.142501 0.122002 -0.018496 -3.14159 -0.523343 -3.14159</pose> <inertial> <pose frame=''>0 0 0.1 0 -0 0</pose> <mass>0.05</mass> <inertia> <ixx>0.00032459</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.00032637</iyy> <iyz>0</iyz> <izz>2.178e-06</izz> </inertia> </inertial> <collision name='lower_leg_back_leftR_link_collision'> <pose frame=''>0 0 0.1 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.2</size> </box> </geometry> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> <ode/> </friction> <contact> <ode> <kp>3000</kp> <kd>100</kd> </ode> <bullet> <kp>3000</kp> <kd>100</kd> <split_impulse>1</split_impulse> <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold> </bullet> </contact> </surface> </collision> <visual name='lower_leg_back_leftR_link_visual'> <pose frame=''>0 0 0.1 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.2</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='11' type='universal'> <child>lower_leg_back_leftR_link</child> <parent>motor_back_leftR_link</parent> <axis> <xyz>-0 1 -0</xyz> <limit> <lower>-2.000</lower> <upper>1.000</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> <axis2> <xyz>1 0 0</xyz> <limit> <lower>-0.05</lower> <upper>0.05</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis2> </joint> <link name='motor_front_rightL_link'> <pose frame=''>0.2375 -0.099 -0.0185 1.57075 1.57075 0</pose> <inertial> <pose frame=''>0 0.0075 0.002417 0 -0 0</pose> <mass>0.3</mass> <inertia> <ixx>0.000245875</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.000126333</iyy> <iyz>-2.71893e-05</iyz> <izz>0.000344223</izz> </inertia> </inertial> <collision name='motor_front_rightL_link_collision'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <cylinder> <length>0.021</length> <radius>0.0425</radius> </cylinder> </geometry> </collision> <collision name='motor_front_rightL_link_fixed_joint_lump__upper_leg_front_rightL_link_collision_1'> <pose frame=''>0 0.045 0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <visual name='motor_front_rightL_link_visual'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <mesh> <scale>100 100 100</scale> <uri>model://minitaur_constrained/../../meshes/tmotor3.dae</uri> </mesh> </geometry> </visual> <visual name='motor_front_rightL_link_fixed_joint_lump__upper_leg_front_rightL_link_visual_1'> <pose frame=''>0 0.045 0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='4' type='revolute'> <child>motor_front_rightL_link</child> <parent>base_chassis_link_dummy</parent> <axis> <xyz>-4.6e-05 1 -0</xyz> <limit> <lower>-1e+16</lower> <upper>1e+16</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> </joint> <link name='lower_leg_front_rightL_link'> <pose frame=''>0.332501 -0.121998 -0.018496 -3.14159 -0.523343 -3.14159</pose> <inertial> <pose frame=''>0 0 0.1 0 -0 0</pose> <mass>0.05</mass> <inertia> <ixx>0.00032459</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.00032637</iyy> <iyz>0</iyz> <izz>2.178e-06</izz> </inertia> </inertial> <collision name='lower_leg_front_rightL_link_collision'> <pose frame=''>0 0 0.1 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.2</size> </box> </geometry> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> <ode/> </friction> <contact> <ode> <kp>3000</kp> <kd>100</kd> </ode> <bullet> <kp>3000</kp> <kd>100</kd> <split_impulse>1</split_impulse> <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold> </bullet> </contact> </surface> </collision> <visual name='lower_leg_front_rightL_link_visual'> <pose frame=''>0 0 0.1 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.2</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='12' type='universal'> <child>lower_leg_front_rightL_link</child> <parent>motor_front_rightL_link</parent> <axis> <xyz>0 -1 0</xyz> <limit> <lower>-1.000</lower> <upper>2.000</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> <axis2> <xyz>-1 0 0</xyz> <limit> <lower>-0.05</lower> <upper>0.05</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis2> </joint> <link name='motor_back_rightL_link'> <pose frame=''>-0.2375 -0.099 -0.0185 1.57075 1.57075 0</pose> <inertial> <pose frame=''>0 0.0075 0.002417 0 -0 0</pose> <mass>0.3</mass> <inertia> <ixx>0.000245875</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.000126333</iyy> <iyz>-2.71893e-05</iyz> <izz>0.000344223</izz> </inertia> </inertial> <collision name='motor_back_rightL_link_collision'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <cylinder> <length>0.021</length> <radius>0.0425</radius> </cylinder> </geometry> </collision> <collision name='motor_back_rightL_link_fixed_joint_lump__upper_leg_back_rightL_link_collision_1'> <pose frame=''>0 0.045 0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <visual name='motor_back_rightL_link_visual'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <mesh> <scale>100 100 100</scale> <uri>model://minitaur_constrained/../../meshes/tmotor3.dae</uri> </mesh> </geometry> </visual> <visual name='motor_back_rightL_link_fixed_joint_lump__upper_leg_back_rightL_link_visual_1'> <pose frame=''>0 0.045 0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='6' type='revolute'> <child>motor_back_rightL_link</child> <parent>base_chassis_link_dummy</parent> <axis> <xyz>-4.6e-05 1 -0</xyz> <limit> <lower>-1e+16</lower> <upper>1e+16</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> </joint> <link name='lower_leg_back_rightL_link'> <pose frame=''>-0.142499 -0.121998 -0.018496 -3.14159 -0.523343 -3.14159</pose> <inertial> <pose frame=''>0 0 0.1 0 -0 0</pose> <mass>0.05</mass> <inertia> <ixx>0.00032459</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.00032637</iyy> <iyz>0</iyz> <izz>2.178e-06</izz> </inertia> </inertial> <collision name='lower_leg_back_rightL_link_collision'> <pose frame=''>0 0 0.1 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.2</size> </box> </geometry> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> <ode/> </friction> <contact> <ode> <kp>3000</kp> <kd>100</kd> </ode> <bullet> <kp>3000</kp> <kd>100</kd> <split_impulse>1</split_impulse> <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold> </bullet> </contact> </surface> </collision> <visual name='lower_leg_back_rightL_link_visual'> <pose frame=''>0 0 0.1 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.2</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='14' type='universal'> <child>lower_leg_back_rightL_link</child> <parent>motor_back_rightL_link</parent> <axis> <xyz>0 -1 0</xyz> <limit> <lower>-1.000</lower> <upper>2.000</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> <axis2> <xyz>-1 0 0</xyz> <limit> <lower>-0.05</lower> <upper>0.05</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis2> </joint> <link name='motor_back_leftL_link'> <pose frame=''>-0.2375 0.154 -0.0185 1.57075 -1.57075 0</pose> <inertial> <pose frame=''>0 0.0075 0.002417 0 -0 0</pose> <mass>0.3</mass> <inertia> <ixx>0.000245875</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.000126333</iyy> <iyz>-2.71893e-05</iyz> <izz>0.000344223</izz> </inertia> </inertial> <collision name='motor_back_leftL_link_collision'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <cylinder> <length>0.021</length> <radius>0.0425</radius> </cylinder> </geometry> </collision> <collision name='motor_back_leftL_link_fixed_joint_lump__upper_leg_back_leftL_link_collision_1'> <pose frame=''>0 0.045 0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <visual name='motor_back_leftL_link_visual'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <mesh> <scale>100 100 100</scale> <uri>model://minitaur_constrained/../../meshes/tmotor3.dae</uri> </mesh> </geometry> </visual> <visual name='motor_back_leftL_link_fixed_joint_lump__upper_leg_back_leftL_link_visual_1'> <pose frame=''>0 0.045 0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='2' type='revolute'> <child>motor_back_leftL_link</child> <parent>base_chassis_link_dummy</parent> <axis> <xyz>4.6e-05 1 -0</xyz> <limit> <lower>-1e+16</lower> <upper>1e+16</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> </joint> <link name='lower_leg_back_leftL_link'> <pose frame=''>-0.332501 0.131002 -0.018496 -3.14159 0.523343 3.14159</pose> <inertial> <pose frame=''>0 0 0.144667 0 -0 0</pose> <mass>0.06</mass> <inertia> <ixx>0.000477723</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.000479503</iyy> <iyz>0</iyz> <izz>2.7178e-05</izz> </inertia> </inertial> <collision name='lower_leg_back_leftL_link_collision'> <pose frame=''>0 0 0.11 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.22</size> </box> </geometry> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> <ode/> </friction> <contact> <ode> <kp>3000</kp> <kd>100</kd> </ode> <bullet> <kp>3000</kp> <kd>100</kd> <split_impulse>1</split_impulse> <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold> </bullet> </contact> </surface> </collision> <collision name='toe1_collision'> <pose frame=''>0 0 0.22 0 -0 0</pose> <geometry> <sphere> <radius>0.015</radius> </sphere> </geometry> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>1.0</coefficient> </torsional> <ode> <mu>10.0</mu> <mu2>10.0</mu2> </ode> <bullet> <rolling_friction>1.0</rolling_friction> <friction2>1.0</friction2> </bullet> </friction> <contact> <ode> <kp>300000</kp> <kd>1000</kd> </ode> <bullet> <kp>300000</kp> <kd>1000</kd> <split_impulse>1</split_impulse> <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold> </bullet> </contact> </surface> </collision> <sensor name="toe1_contact" type="contact"> <plugin name="toe1_plugin" filename="libcontact.so"/> <contact> <collision>toe1_collision</collision> </contact> </sensor> <visual name='lower_leg_back_leftL_link_visual'> <pose frame=''>0 0 0.11 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.22</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='lower_leg_back_leftL_link_fixed_joint_lump__toe2_visual_1'> <pose frame=''>0 0 0.22 0 -0 0</pose> <geometry> <sphere> <radius>0.015</radius> </sphere> </geometry> <material> <script> <name>Gazebo/Black</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <velocity_decay/> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='10' type='universal'> <child>lower_leg_back_leftL_link</child> <parent>motor_back_leftL_link</parent> <axis> <xyz>-0 -1 0</xyz> <limit> <lower>-2.000</lower> <upper>1.000</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> <axis2> <xyz>-1 0 0</xyz> <limit> <lower>-0.05</lower> <upper>0.05</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis2> </joint> <link name='motor_back_rightR_link'> <pose frame=''>-0.2375 -0.154 -0.0185 1.57075 -1.57075 0</pose> <inertial> <pose frame=''>0 0.0075 -0.002417 0 -0 0</pose> <mass>0.3</mass> <inertia> <ixx>0.000245875</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.000126333</iyy> <iyz>2.71857e-05</iyz> <izz>0.000344223</izz> </inertia> </inertial> <collision name='motor_back_rightR_link_collision'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <cylinder> <length>0.021</length> <radius>0.0425</radius> </cylinder> </geometry> </collision> <collision name='motor_back_rightR_link_fixed_joint_lump__upper_leg_back_rightR_link_collision_1'> <pose frame=''>0 0.045 -0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <visual name='motor_back_rightR_link_visual'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <mesh> <scale>100 100 100</scale> <uri>model://minitaur_constrained/../../meshes/tmotor3.dae</uri> </mesh> </geometry> </visual> <visual name='motor_back_rightR_link_fixed_joint_lump__upper_leg_back_rightR_link_visual_1'> <pose frame=''>0 0.045 -0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='7' type='revolute'> <child>motor_back_rightR_link</child> <parent>base_chassis_link_dummy</parent> <axis> <xyz>-4.6e-05 -1 0</xyz> <limit> <lower>-1e+16</lower> <upper>1e+16</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> </joint> <link name='lower_leg_back_rightR_link'> <pose frame=''>-0.332499 -0.130998 -0.018496 -3.14159 0.523343 3.14159</pose> <inertial> <pose frame=''>0 0 0.144667 0 -0 0</pose> <mass>0.06</mass> <inertia> <ixx>0.000477723</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.000479503</iyy> <iyz>0</iyz> <izz>2.7178e-05</izz> </inertia> </inertial> <collision name='lower_leg_back_rightR_link_collision'> <pose frame=''>0 0 0.11 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.22</size> </box> </geometry> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> <ode/> </friction> <contact> <ode> <kp>3000</kp> <kd>100</kd> </ode> <bullet> <kp>3000</kp> <kd>100</kd> <split_impulse>1</split_impulse> <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold> </bullet> </contact> </surface> </collision> <collision name='toe3_collision'> <pose frame=''>0 0 0.22 0 -0 0</pose> <geometry> <sphere> <radius>0.015</radius> </sphere> </geometry> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>1.0</coefficient> </torsional> <ode> <mu>10.0</mu> <mu2>10.0</mu2> </ode> <bullet> <rolling_friction>1.0</rolling_friction> <friction2>1.0</friction2> </bullet> </friction> <contact> <ode> <kp>300000</kp> <kd>1000</kd> </ode> <bullet> <kp>300000</kp> <kd>1000</kd> <split_impulse>1</split_impulse> <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold> </bullet> </contact> </surface> </collision> <sensor name="toe3_contact" type="contact"> <plugin name="toe3_plugin" filename="libcontact.so"/> <contact> <collision>toe3_collision</collision> </contact> </sensor> <visual name='lower_leg_back_rightR_link_visual'> <pose frame=''>0 0 0.11 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.22</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='lower_leg_back_rightR_link_fixed_joint_lump__toe7_visual_1'> <pose frame=''>0 0 0.22 0 -0 0</pose> <geometry> <sphere> <radius>0.015</radius> </sphere> </geometry> <material> <script> <name>Gazebo/Black</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <velocity_decay/> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='15' type='universal'> <child>lower_leg_back_rightR_link</child> <parent>motor_back_rightR_link</parent> <axis> <xyz>0 1 -0</xyz> <limit> <lower>-1.000</lower> <upper>2.000</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> <axis2> <xyz>1 0 0</xyz> <limit> <lower>-0.05</lower> <upper>0.05</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis2> </joint> <link name='motor_front_leftL_link'> <pose frame=''>0.2375 0.154 -0.0185 1.57075 -1.57075 0</pose> <inertial> <pose frame=''>0 0.0075 0.002417 0 -0 0</pose> <mass>0.3</mass> <inertia> <ixx>0.000245875</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.000126333</iyy> <iyz>-2.71893e-05</iyz> <izz>0.000344223</izz> </inertia> </inertial> <collision name='motor_front_leftL_link_collision'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <cylinder> <length>0.021</length> <radius>0.0425</radius> </cylinder> </geometry> </collision> <collision name='motor_front_leftL_link_fixed_joint_lump__upper_leg_front_leftL_link_collision_1'> <pose frame=''>0 0.045 0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <visual name='motor_front_leftL_link_visual'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <mesh> <scale>100 100 100</scale> <uri>model://minitaur_constrained/../../meshes/tmotor3.dae</uri> </mesh> </geometry> </visual> <visual name='motor_front_leftL_link_fixed_joint_lump__upper_leg_front_leftL_link_visual_1'> <pose frame=''>0 0.045 0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='0' type='revolute'> <child>motor_front_leftL_link</child> <parent>base_chassis_link_dummy</parent> <axis> <xyz>4.6e-05 1 -0</xyz> <limit> <lower>-1e+16</lower> <upper>1e+16</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> </joint> <link name='lower_leg_front_leftL_link'> <pose frame=''>0.142499 0.131002 -0.018496 -3.14159 0.523343 3.14159</pose> <inertial> <pose frame=''>0 0 0.144667 0 -0 0</pose> <mass>0.06</mass> <inertia> <ixx>0.000477723</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.000479503</iyy> <iyz>0</iyz> <izz>2.7178e-05</izz> </inertia> </inertial> <collision name='lower_leg_front_leftL_link_collision'> <pose frame=''>0 0 0.11 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.22</size> </box> </geometry> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> <ode/> </friction> <contact> <ode> <kp>3000</kp> <kd>100</kd> </ode> <bullet> <kp>3000</kp> <kd>100</kd> <split_impulse>1</split_impulse> <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold> </bullet> </contact> </surface> </collision> <collision name='toe0_collision'> <pose frame=''>0 0 0.22 0 -0 0</pose> <geometry> <sphere> <radius>0.015</radius> </sphere> </geometry> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>1.0</coefficient> </torsional> <ode> <mu>10.0</mu> <mu2>10.0</mu2> </ode> <bullet> <rolling_friction>1.0</rolling_friction> <friction2>1.0</friction2> </bullet> </friction> <contact> <ode> <kp>300000</kp> <kd>1000</kd> </ode> <bullet> <kp>300000</kp> <kd>1000</kd> <split_impulse>1</split_impulse> <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold> </bullet> </contact> </surface> </collision> <sensor name="toe0_contact" type="contact"> <plugin name="toe0_plugin" filename="libcontact.so"/> <contact> <collision>toe0_collision</collision> </contact> </sensor> <visual name='lower_leg_front_leftL_link_visual'> <pose frame=''>0 0 0.11 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.22</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='lower_leg_front_leftL_link_fixed_joint_lump__toe0_visual_1'> <pose frame=''>0 0 0.22 0 -0 0</pose> <geometry> <sphere> <radius>0.015</radius> </sphere> </geometry> <material> <script> <name>Gazebo/Black</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <velocity_decay/> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='8' type='universal'> <child>lower_leg_front_leftL_link</child> <parent>motor_front_leftL_link</parent> <axis> <xyz>-0 -1 0</xyz> <limit> <lower>-2.000</lower> <upper>1.000</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> <axis2> <xyz>-1 0 0</xyz> <limit> <lower>-0.05</lower> <upper>0.05</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis2> </joint> <link name='motor_front_rightR_link'> <pose frame=''>0.2375 -0.154 -0.0185 1.57075 -1.57075 0</pose> <inertial> <pose frame=''>0 0.0075 -0.002417 0 -0 0</pose> <mass>0.3</mass> <inertia> <ixx>0.000245875</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.000126333</iyy> <iyz>2.71857e-05</iyz> <izz>0.000344223</izz> </inertia> </inertial> <collision name='motor_front_rightR_link_collision'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <cylinder> <length>0.021</length> <radius>0.0425</radius> </cylinder> </geometry> </collision> <collision name='motor_front_rightR_link_fixed_joint_lump__upper_leg_front_rightR_link_collision_1'> <pose frame=''>0 0.045 -0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <surface> <contact> <ode/> </contact> <friction> <ode/> </friction> </surface> </collision> <visual name='motor_front_rightR_link_visual'> <pose frame=''>0 0 0 0 -0 0</pose> <geometry> <mesh> <scale>100 100 100</scale> <uri>model://minitaur_constrained/../../meshes/tmotor3.dae</uri> </mesh> </geometry> </visual> <visual name='motor_front_rightR_link_fixed_joint_lump__upper_leg_front_rightR_link_visual_1'> <pose frame=''>0 0.045 -0.0145 -1.57075 0 0</pose> <geometry> <box> <size>0.039 0.008 0.1</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='5' type='revolute'> <child>motor_front_rightR_link</child> <parent>base_chassis_link_dummy</parent> <axis> <xyz>-4.6e-05 -1 0</xyz> <limit> <lower>-1e+16</lower> <upper>1e+16</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> </joint> <link name='lower_leg_front_rightR_link'> <pose frame=''>0.142501 -0.130998 -0.018496 -3.14159 0.523343 3.14159</pose> <inertial> <pose frame=''>0 0 0.144667 0 -0 0</pose> <mass>0.06</mass> <inertia> <ixx>0.000477723</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.000479503</iyy> <iyz>0</iyz> <izz>2.7178e-05</izz> </inertia> </inertial> <collision name='lower_leg_front_rightR_link_collision'> <pose frame=''>0 0 0.11 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.22</size> </box> </geometry> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> <ode/> </friction> <contact> <ode> <kp>3000</kp> <kd>100</kd> </ode> <bullet> <kp>3000</kp> <kd>100</kd> <split_impulse>1</split_impulse> <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold> </bullet> </contact> </surface> </collision> <collision name='toe2_collision'> <pose frame=''>0 0 0.22 0 -0 0</pose> <geometry> <sphere> <radius>0.015</radius> </sphere> </geometry> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>1.0</coefficient> </torsional> <ode> <mu>10.0</mu> <mu2>10.0</mu2> </ode> <bullet> <rolling_friction>1.0</rolling_friction> <friction2>1.0</friction2> </bullet> </friction> <contact> <ode> <kp>300000</kp> <kd>1000</kd> </ode> <bullet> <kp>300000</kp> <kd>1000</kd> <split_impulse>1</split_impulse> <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold> </bullet> </contact> </surface> </collision> <sensor name="toe2_contact" type="contact"> <plugin name="toe2_plugin" filename="libcontact.so"/> <contact> <collision>toe2_collision</collision> </contact> </sensor> <visual name='lower_leg_front_rightR_link_visual'> <pose frame=''>0 0 0.11 0 -0 0</pose> <geometry> <box> <size>0.017 0.009 0.22</size> </box> </geometry> <material> <script> <name>Gazebo/Grey</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <visual name='lower_leg_front_rightR_link_fixed_joint_lump__toe5_visual_1'> <pose frame=''>0 0 0.22 0 -0 0</pose> <geometry> <sphere> <radius>0.015</radius> </sphere> </geometry> <material> <script> <name>Gazebo/Black</name> <uri>file://media/materials/scripts/gazebo.material</uri> </script> </material> </visual> <velocity_decay/> <gravity>1</gravity> <velocity_decay/> <self_collide>0</self_collide> </link> <joint name='13' type='universal'> <child>lower_leg_front_rightR_link</child> <parent>motor_front_rightR_link</parent> <axis> <xyz>0 1 -0</xyz> <limit> <lower>-1.000</lower> <upper>2.000</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis> <axis2> <xyz>1 0 0</xyz> <limit> <lower>-0.05</lower> <upper>0.05</upper> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> </dynamics> <use_parent_model_frame>1</use_parent_model_frame> </axis2> </joint> <joint name='constraint_back_left' type='revolute'> <parent>lower_leg_back_leftL_link</parent> <child>lower_leg_back_leftR_link</child> <pose frame=''>0 0 0.19 0 -0 0</pose> <axis> <xyz>0 1 0</xyz> <use_parent_model_frame>0</use_parent_model_frame> <limit> <lower>-1.79769e+308</lower> <upper>1.79769e+308</upper> <effort>-1</effort> <velocity>-1</velocity> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> <damping>0</damping> </dynamics> </axis> <physics> <ode> <limit> <cfm>0</cfm> <erp>0.2</erp> </limit> <suspension> <cfm>0</cfm> <erp>0.2</erp> </suspension> </ode> </physics> </joint> <joint name='constraint_back_right' type='revolute'> <parent>lower_leg_back_rightR_link</parent> <child>lower_leg_back_rightL_link</child> <pose frame=''>0 0 0.19 0 -0 0</pose> <axis> <xyz>-0 -1 -0</xyz> <use_parent_model_frame>0</use_parent_model_frame> <limit> <lower>-1.79769e+308</lower> <upper>1.79769e+308</upper> <effort>-1</effort> <velocity>-1</velocity> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> <damping>0</damping> </dynamics> </axis> <physics> <ode> <limit> <cfm>0</cfm> <erp>0.2</erp> </limit> <suspension> <cfm>0</cfm> <erp>0.2</erp> </suspension> </ode> </physics> </joint> <joint name='constraint_front_left' type='revolute'> <parent>lower_leg_front_leftL_link</parent> <child>lower_leg_front_leftR_link</child> <pose frame=''>0 0 0.19 0 -0 0</pose> <axis> <xyz>0 1 0</xyz> <use_parent_model_frame>0</use_parent_model_frame> <limit> <lower>-1.79769e+308</lower> <upper>1.79769e+308</upper> <effort>-1</effort> <velocity>-1</velocity> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> <damping>0</damping> </dynamics> </axis> <physics> <ode> <limit> <cfm>0</cfm> <erp>0.2</erp> </limit> <suspension> <cfm>0</cfm> <erp>0.2</erp> </suspension> </ode> </physics> </joint> <joint name='constraint_front_right' type='revolute'> <parent>lower_leg_front_rightR_link</parent> <child>lower_leg_front_rightL_link</child> <pose frame=''>0 0 0.19 0 -0 0</pose> <axis> <xyz>-0 -1 -0</xyz> <use_parent_model_frame>0</use_parent_model_frame> <limit> <lower>-1.79769e+308</lower> <upper>1.79769e+308</upper> <effort>-1</effort> <velocity>-1</velocity> </limit> <dynamics> <spring_reference>0</spring_reference> <spring_stiffness>0</spring_stiffness> <damping>0</damping> </dynamics> </axis> <physics> <ode> <limit> <cfm>0</cfm> <erp>0.2</erp> </limit> <suspension> <cfm>0</cfm> <erp>0.2</erp> </suspension> </ode> </physics> </joint> <static>0</static> <plugin name='gazebo_ros_control' filename='libgazebo_ros_control.so'> <robotNamespace>/minitaur_constrained</robotNamespace> </plugin> <include> <uri>model://sensor_head</uri> <pose>0 0 0.04 0 0 0</pose> </include> <joint name="sensor_head_joint" type="fixed"> <child>sensor_head::base</child> <parent>base_chassis_link_dummy</parent> </joint> </model> </sdf>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/KodlabPenn/kodlab_gazebo-master/minitaur_description/sdf/minitaur_sensor/model.config
<!-- MIT License (modified) Copyright (c) 2018 The Trustees of the University of Pennsylvania Authors: Vasileios Vasilopoulos <[email protected]> Permission is hereby granted, free of charge, to any person obtaining a copy of this **file** (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --> <?xml version="1.0" ?> <model> <name>minitaur_sensor</name> <version>1.0</version> <sdf version="1.6">minitaur_sensor.sdf</sdf> <author> <name>Vasileios Vasilopoulos</name> <email>[email protected]</email> </author> <description>Minitaur with sensor head</description> </model>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/KodlabPenn/kodlab_gazebo-master/minitaur_description/urdf/minitaur.urdf
<?xml version="1.0" ?> <!-- =================================================================================== --> <!-- | This document was autogenerated by xacro from minitaur.urdf.xacro | --> <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | --> <!-- =================================================================================== --> <!-- ======================================================================= --> <!--LICENSE: --> <!--Copyright (c) 2017, Erwin Coumans --> <!--Google Inc. --> <!--All rights reserved. --> <!-- --> <!--Redistribution and use in source and binary forms, with or without --> <!--modification, are permitted provided that the following conditions are --> <!--met: --> <!-- --> <!--1. Redistributions or derived work must retain this copyright notice, --> <!-- this list of conditions and the following disclaimer. --> <!-- --> <!--2. Redistributions in binary form must reproduce the above copyright --> <!-- notice, this list of conditions and the following disclaimer in the --> <!-- documentation and/or other materials provided with the distribution. --> <!-- --> <!--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS --> <!--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,--> <!--THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR --> <!--PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR --> <!--CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, --> <!--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, --> <!--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --> <!--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --> <!--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --> <!--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --> <!--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <!-- --> <!-- Converted to xacro by Tom Jacobs <[email protected]> --> <robot name="minitaur" xmlns:xacro="http://www.ros.org/wiki/xacro"> <!-- Define parameters --> <!-- 7.18kg minitaur total weight - 0.016*4 - 0.10*8 - 0.25*8 - 0.05*8 - 0.05*8 = 3.516 --> <!-- * 4 frames --> <!-- * 8 motor modules --> <!-- * 8 motors --> <!-- * 8 upper legs --> <!-- * 8 lower legs --> <!-- Define materials --> <material name="black"> <color rgba="0.3 0.3 0.3 1"/> </material> <material name="grey"> <color rgba="0.5 0.5 0.5 1"/> </material> <material name="frameGrey"> <color rgba="0.55 0.55 0.55 1"/> </material> <material name="legGrey"> <color rgba="0.65 0.65 0.75 1"/> </material> <material name="motor"> <color rgba="0.2 0.2 0.2 1"/> </material> <!-- Body --> <link name="base_chassis_link"> <visual> <geometry> <box size="0.33 0.1855 0.08"/> </geometry> <material name="black"/> </visual> <visual> <origin rpy="0 0 0" xyz="0 0.10 -0.014"/> <geometry> <box size="0.17 0.1 0.05"/> </geometry> <material name="black"/> </visual> <visual> <origin rpy="0 0 0" xyz="0 -0.10 -0.014"/> <geometry> <box size="0.17 0.1 0.05"/> </geometry> <material name="black"/> </visual> <collision> <geometry> <box size="0.33 0.1855 0.08"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="0 0.10 -0.014"/> <geometry> <box size="0.17 0.1 0.05"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="0 -0.10 -0.014"/> <geometry> <box size="0.17 0.1 0.05"/> </geometry> </collision> <inertial> <mass value="3.516"/> <!-- https://en.wikipedia.org/wiki/List_of_moments_of_inertia Solid Cuboid --> <inertia ixx="0.01195740325" ixy="0.0" ixz="0.0" iyy="0.0337829" iyz="0.0" izz="0.04198990325"/> </inertial> </link> <!-- Frame --> <link name="frame1"> <visual> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> <material name="frameGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="0.16"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="frame1_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame1"/> <origin rpy="0 0 0" xyz=".2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <link name="frame2"> <visual> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> <material name="frameGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="0.16"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="frame2_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame2"/> <origin rpy="0 0 0" xyz=".2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <link name="frame3"> <visual> <origin rpy="0 0 0" xyz="0.22 0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> <material name="frameGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="0.22 0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="0.16"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="frame3_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame3"/> <origin rpy="0 0 0" xyz="-.2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <link name="frame4"> <visual> <origin rpy="0 0 0" xyz="0.22 -0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> <material name="frameGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="0.22 -0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="0.16"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="frame4" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame4"/> <origin rpy="0 0 0" xyz="-.2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- Inside motor module boxes --> <link name="chassis_right"> <visual> <origin rpy="0 0 0" xyz=".2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> <material name="motor"/> </visual> <visual> <origin rpy="0 0 0" xyz="-.2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> <material name="motor"/> </visual> <collision> <origin rpy="0 0 0" xyz=".2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="-.2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <mass value="0.2"/> <inertia ixx=".004147" ixy=".0" ixz=".0" iyy=".040913" iyz=".0" izz=".041840"/> </inertial> </link> <joint name="chassis_right_center" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="chassis_right"/> <origin rpy="0 0 0" xyz="0 -.1265 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <link name="chassis_left"> <visual> <origin rpy="0 0 0" xyz=".2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> <material name="motor"/> </visual> <visual> <origin rpy="0 0 0" xyz="-.2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> <material name="motor"/> </visual> <collision> <origin rpy="0 0 0" xyz=".2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="-.2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <mass value="0.2"/> <inertia ixx=".004147" ixy=".0" ixz=".0" iyy=".040913" iyz=".0" izz=".041840"/> </inertial> </link> <joint name="chassis_left_center" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="chassis_left"/> <origin rpy="0 0 0" xyz="0 .1265 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- Outside motor module boxes --> <link name="motor_front_rightR_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> <material name="motor"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="0.1"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="motor_front_rightR_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_front_rightR_bracket_link"/> <origin rpy="0 0 0" xyz=".2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <link name="motor_front_leftL_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> <material name="motor"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="0.1"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="motor_front_leftL_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_front_leftL_bracket_link"/> <origin rpy="0 0 0" xyz=".2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <link name="motor_back_rightR_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> <material name="motor"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="0.1"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="motor_back_rightR_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_back_rightR_bracket_link"/> <origin rpy="0 0 0" xyz="-.2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <link name="motor_back_leftL_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> <material name="motor"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="0.1"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="motor_back_leftL_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_back_leftL_bracket_link"/> <origin rpy="0 0 0" xyz="-.2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- Define our motor macro --> <!-- Motors --> <link name="motor_front_rightR_link"> <visual> <geometry> <mesh filename="package://minitaur_description/meshes/tmotor3.obj" scale="1.0 1.0 1.0"/> </geometry> <material name="motor"/> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="5" type="continuous"> <axis xyz="0 0 1"/> <parent link="motor_front_rightR_bracket_link"/> <child link="motor_front_rightR_link"/> <origin rpy="1.57075 0 0" xyz="0 0 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="motor_front_rightL_link"> <visual> <geometry> <mesh filename="package://minitaur_description/meshes/tmotor3.obj" scale="1.0 1.0 1.0"/> </geometry> <material name="motor"/> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="4" type="continuous"> <axis xyz="0 0 -1"/> <parent link="chassis_right"/> <child link="motor_front_rightL_link"/> <origin rpy="1.57075 0 0" xyz=".2375 .0275 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="motor_front_leftL_link"> <visual> <geometry> <mesh filename="package://minitaur_description/meshes/tmotor3.obj" scale="1.0 1.0 1.0"/> </geometry> <material name="motor"/> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="0" type="continuous"> <axis xyz="0 0 -1"/> <parent link="motor_front_leftL_bracket_link"/> <child link="motor_front_leftL_link"/> <origin rpy="1.57075 0 0" xyz="0 0 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="motor_front_leftR_link"> <visual> <geometry> <mesh filename="package://minitaur_description/meshes/tmotor3.obj" scale="1.0 1.0 1.0"/> </geometry> <material name="motor"/> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="1" type="continuous"> <axis xyz="0 0 1"/> <parent link="chassis_left"/> <child link="motor_front_leftR_link"/> <origin rpy="1.57075 0 0" xyz=".2375 -.0275 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="motor_back_rightR_link"> <visual> <geometry> <mesh filename="package://minitaur_description/meshes/tmotor3.obj" scale="1.0 1.0 1.0"/> </geometry> <material name="motor"/> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="7" type="continuous"> <axis xyz="0 0 1"/> <parent link="motor_back_rightR_bracket_link"/> <child link="motor_back_rightR_link"/> <origin rpy="1.57075 0 0" xyz="0 0 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="motor_back_rightL_link"> <visual> <geometry> <mesh filename="package://minitaur_description/meshes/tmotor3.obj" scale="1.0 1.0 1.0"/> </geometry> <material name="motor"/> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="6" type="continuous"> <axis xyz="0 0 -1"/> <parent link="chassis_right"/> <child link="motor_back_rightL_link"/> <origin rpy="1.57075 0 0" xyz="-.2375 .0275 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="motor_back_leftL_link"> <visual> <geometry> <mesh filename="package://minitaur_description/meshes/tmotor3.obj" scale="1.0 1.0 1.0"/> </geometry> <material name="motor"/> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="2" type="continuous"> <axis xyz="0 0 -1"/> <parent link="motor_back_leftL_bracket_link"/> <child link="motor_back_leftL_link"/> <origin rpy="1.57075 0 0" xyz="0 0 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="motor_back_leftR_link"> <visual> <geometry> <mesh filename="package://minitaur_description/meshes/tmotor3.obj" scale="1.0 1.0 1.0"/> </geometry> <material name="motor"/> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="3" type="continuous"> <axis xyz="0 0 1"/> <parent link="chassis_left"/> <child link="motor_back_leftR_link"/> <origin rpy="1.57075 0 0" xyz="-.2375 -.0275 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Define our upper leg macro --> <!-- Define our lower leg macro --> <!-- Legs --> <link name="upper_leg_front_rightR_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> <material name="legGrey"/> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <joint name="hip_front_rightR_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_front_rightR_link"/> <child link="upper_leg_front_rightR_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="upper_leg_front_rightL_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> <material name="legGrey"/> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <joint name="motor_front_rightL_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_front_rightL_link"/> <child link="upper_leg_front_rightL_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 .0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="upper_leg_front_leftR_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> <material name="legGrey"/> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <joint name="hip_front_leftR_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_front_leftR_link"/> <child link="upper_leg_front_leftR_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="upper_leg_front_leftL_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> <material name="legGrey"/> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <joint name="motor_front_leftL_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_front_leftL_link"/> <child link="upper_leg_front_leftL_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 .0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="upper_leg_back_rightR_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> <material name="legGrey"/> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <joint name="hip_back_rightR_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_back_rightR_link"/> <child link="upper_leg_back_rightR_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="upper_leg_back_rightL_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> <material name="legGrey"/> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <joint name="motor_back_rightL_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_back_rightL_link"/> <child link="upper_leg_back_rightL_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 .0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="upper_leg_back_leftR_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> <material name="legGrey"/> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <joint name="hip_back_leftR_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_back_leftR_link"/> <child link="upper_leg_back_leftR_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="upper_leg_back_leftL_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> <material name="legGrey"/> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <joint name="motor_back_leftL_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_back_leftL_link"/> <child link="upper_leg_back_leftL_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 .0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Lower legs and flexy knee joints --> <link name="lower_leg_front_leftL_link"> <contact> <friction_anchor/> <stiffness value="3000.0"/> <damping value="100.0"/> <spinning_friction value=".05"/> <lateral_friction value="1"/> </contact> <visual> <origin rpy="0 0 0" xyz="0 0 0.124"/> <geometry> <box size="0.017 0.009 0.248"/> </geometry> <material name="legGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.124"/> <geometry> <box size="0.017 0.009 0.248"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.124"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <joint name="8" type="continuous"> <axis xyz="0 -1 0"/> <parent link="upper_leg_front_leftL_link"/> <child link="lower_leg_front_leftL_link"/> <origin rpy="0 0 0" xyz="0 -0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Toe --> <link name="toe0"> <contact> <friction_anchor/> <stiffness value="30000.0"/> <damping value="1000.0"/> <spinning_friction value="0.3"/> <lateral_friction value="0.7"/> </contact> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> <material name="black"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> </collision> <inertial> <mass value="0.01"/> <inertia ixx="0.000025" ixy="0" ixz="0" iyy="0.000025" iyz="0" izz="0.000025"/> </inertial> </link> <joint name="toe0" type="fixed"> <parent link="lower_leg_front_leftL_link"/> <child link="toe0"/> <origin xyz="0 0 0.248"/> <dynamics damping="0.0" friction="0.0"/> </joint> <link name="lower_leg_front_leftR_link"> <contact> <friction_anchor/> <stiffness value="3000.0"/> <damping value="100.0"/> <spinning_friction value=".05"/> <lateral_friction value="1"/> </contact> <visual> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> <material name="legGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.1"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <joint name="9" type="continuous"> <axis xyz="0 1 0"/> <parent link="upper_leg_front_leftR_link"/> <child link="lower_leg_front_leftR_link"/> <origin rpy="0 0 0" xyz="0 0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="lower_leg_back_leftL_link"> <contact> <friction_anchor/> <stiffness value="3000.0"/> <damping value="100.0"/> <spinning_friction value=".05"/> <lateral_friction value="1"/> </contact> <visual> <origin rpy="0 0 0" xyz="0 0 0.124"/> <geometry> <box size="0.017 0.009 0.248"/> </geometry> <material name="legGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.124"/> <geometry> <box size="0.017 0.009 0.248"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.124"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <joint name="10" type="continuous"> <axis xyz="0 -1 0"/> <parent link="upper_leg_back_leftL_link"/> <child link="lower_leg_back_leftL_link"/> <origin rpy="0 0 0" xyz="0 -0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Toe --> <link name="toe2"> <contact> <friction_anchor/> <stiffness value="30000.0"/> <damping value="1000.0"/> <spinning_friction value="0.3"/> <lateral_friction value="0.7"/> </contact> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> <material name="black"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> </collision> <inertial> <mass value="0.01"/> <inertia ixx="0.000025" ixy="0" ixz="0" iyy="0.000025" iyz="0" izz="0.000025"/> </inertial> </link> <joint name="toe2" type="fixed"> <parent link="lower_leg_back_leftL_link"/> <child link="toe2"/> <origin xyz="0 0 0.248"/> <dynamics damping="0.0" friction="0.0"/> </joint> <link name="lower_leg_back_leftR_link"> <contact> <friction_anchor/> <stiffness value="3000.0"/> <damping value="100.0"/> <spinning_friction value=".05"/> <lateral_friction value="1"/> </contact> <visual> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> <material name="legGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.1"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <joint name="11" type="continuous"> <axis xyz="0 1 0"/> <parent link="upper_leg_back_leftR_link"/> <child link="lower_leg_back_leftR_link"/> <origin rpy="0 0 0" xyz="0 0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="lower_leg_front_rightL_link"> <contact> <friction_anchor/> <stiffness value="3000.0"/> <damping value="100.0"/> <spinning_friction value=".05"/> <lateral_friction value="1"/> </contact> <visual> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> <material name="legGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.1"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <joint name="12" type="continuous"> <axis xyz="0 -1 0"/> <parent link="upper_leg_front_rightL_link"/> <child link="lower_leg_front_rightL_link"/> <origin rpy="0 0 0" xyz="0 -0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="lower_leg_front_rightR_link"> <contact> <friction_anchor/> <stiffness value="3000.0"/> <damping value="100.0"/> <spinning_friction value=".05"/> <lateral_friction value="1"/> </contact> <visual> <origin rpy="0 0 0" xyz="0 0 0.124"/> <geometry> <box size="0.017 0.009 0.248"/> </geometry> <material name="legGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.124"/> <geometry> <box size="0.017 0.009 0.248"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.124"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <joint name="13" type="continuous"> <axis xyz="0 1 0"/> <parent link="upper_leg_front_rightR_link"/> <child link="lower_leg_front_rightR_link"/> <origin rpy="0 0 0" xyz="0 0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Toe --> <link name="toe5"> <contact> <friction_anchor/> <stiffness value="30000.0"/> <damping value="1000.0"/> <spinning_friction value="0.3"/> <lateral_friction value="0.7"/> </contact> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> <material name="black"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> </collision> <inertial> <mass value="0.01"/> <inertia ixx="0.000025" ixy="0" ixz="0" iyy="0.000025" iyz="0" izz="0.000025"/> </inertial> </link> <joint name="toe5" type="fixed"> <parent link="lower_leg_front_rightR_link"/> <child link="toe5"/> <origin xyz="0 0 0.248"/> <dynamics damping="0.0" friction="0.0"/> </joint> <link name="lower_leg_back_rightL_link"> <contact> <friction_anchor/> <stiffness value="3000.0"/> <damping value="100.0"/> <spinning_friction value=".05"/> <lateral_friction value="1"/> </contact> <visual> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> <material name="legGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.1"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <joint name="14" type="continuous"> <axis xyz="0 -1 0"/> <parent link="upper_leg_back_rightL_link"/> <child link="lower_leg_back_rightL_link"/> <origin rpy="0 0 0" xyz="0 -0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <link name="lower_leg_back_rightR_link"> <contact> <friction_anchor/> <stiffness value="3000.0"/> <damping value="100.0"/> <spinning_friction value=".05"/> <lateral_friction value="1"/> </contact> <visual> <origin rpy="0 0 0" xyz="0 0 0.124"/> <geometry> <box size="0.017 0.009 0.248"/> </geometry> <material name="legGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.124"/> <geometry> <box size="0.017 0.009 0.248"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.124"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <joint name="15" type="continuous"> <axis xyz="0 1 0"/> <parent link="upper_leg_back_rightR_link"/> <child link="lower_leg_back_rightR_link"/> <origin rpy="0 0 0" xyz="0 0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Toe --> <link name="toe7"> <contact> <friction_anchor/> <stiffness value="30000.0"/> <damping value="1000.0"/> <spinning_friction value="0.3"/> <lateral_friction value="0.7"/> </contact> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> <material name="black"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> </collision> <inertial> <mass value="0.01"/> <inertia ixx="0.000025" ixy="0" ixz="0" iyy="0.000025" iyz="0" izz="0.000025"/> </inertial> </link> <joint name="toe7" type="fixed"> <parent link="lower_leg_back_rightR_link"/> <child link="toe7"/> <origin xyz="0 0 0.248"/> <dynamics damping="0.0" friction="0.0"/> </joint> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/KodlabPenn/kodlab_gazebo-master/minitaur_description/urdf/minitaur.urdf.xacro
<?xml version="1.0" ?> <!-- ======================================================================= --> <!--LICENSE: --> <!--Copyright (c) 2017, Erwin Coumans --> <!--Google Inc. --> <!--All rights reserved. --> <!-- --> <!--Redistribution and use in source and binary forms, with or without --> <!--modification, are permitted provided that the following conditions are --> <!--met: --> <!-- --> <!--1. Redistributions or derived work must retain this copyright notice, --> <!-- this list of conditions and the following disclaimer. --> <!-- --> <!--2. Redistributions in binary form must reproduce the above copyright --> <!-- notice, this list of conditions and the following disclaimer in the --> <!-- documentation and/or other materials provided with the distribution. --> <!-- --> <!--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS --> <!--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,--> <!--THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR --> <!--PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR --> <!--CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, --> <!--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, --> <!--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --> <!--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --> <!--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --> <!--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --> <!--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <!-- --> <!-- Converted to xacro by Tom Jacobs <[email protected]> --> <robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="minitaur"> <!-- Define parameters --> <xacro:property name="bodyLength" value="0.33"/> <xacro:property name="bodyWidth" value="0.1855"/> <xacro:property name="bodyHeight" value="0.08"/> <xacro:property name="bodySideLength" value="0.17"/> <xacro:property name="bodySideWidth" value="0.10"/> <xacro:property name="bodySideHeight" value="0.05"/> <xacro:property name="bodyMass" value="3.516"/> <!-- 7.18kg minitaur total weight - 0.016*4 - 0.10*8 - 0.25*8 - 0.05*8 - 0.05*8 = 3.516 --> <xacro:property name="frameMass" value="0.16"/> <!-- * 4 frames --> <xacro:property name="motorModuleMass" value="0.10"/> <!-- * 8 motor modules --> <xacro:property name="motorMass" value="0.25"/> <!-- * 8 motors --> <xacro:property name="upperLegMass" value="0.05"/> <!-- * 8 upper legs --> <xacro:property name="lowerLegMass" value="0.05"/> <!-- * 8 lower legs --> <xacro:property name="toeMass" value="0.01"/> <xacro:property name="chassisLength" value="0.34"/> <xacro:property name="chassisWidth" value="0.01"/> <xacro:property name="chassisHeight" value="0.04"/> <xacro:property name="motorLength" value="0.021"/> <xacro:property name="motorRadius" value="0.0425"/> <xacro:property name="upperLegWidth" value="0.039"/> <xacro:property name="upperLegHeight" value="0.008"/> <xacro:property name="upperLegLength" value="0.1"/> <xacro:property name="lowerLegWidth" value="0.017"/> <xacro:property name="lowerLegHeight" value="0.009"/> <xacro:property name="lowerLegLength" value="0.2"/> <xacro:property name="lowerLegLengthToe" value="0.248"/> <xacro:property name="toeRadius" value="0.015"/> <xacro:property name="toeStiffness" value="30000.0"/> <xacro:property name="toeDamping" value="1000.0"/> <xacro:property name="toeSpinningFriction" value="0.3"/> <xacro:property name="toeLateralFriction" value="0.7"/> <!-- Define materials --> <material name="black"> <color rgba="0.3 0.3 0.3 1"/> </material> <material name="grey"> <color rgba="0.5 0.5 0.5 1"/> </material> <material name="frameGrey"> <color rgba="0.55 0.55 0.55 1"/> </material> <material name="legGrey"> <color rgba="0.65 0.65 0.75 1"/> </material> <material name="motor"> <color rgba="0.2 0.2 0.2 1"/> </material> <!-- Body --> <link name="base_chassis_link"> <visual> <geometry> <box size="${bodyLength} ${bodyWidth} ${bodyHeight}"/> </geometry> <material name="black"/> </visual> <visual> <origin rpy="0 0 0" xyz="0 0.10 -0.014"/> <geometry> <box size="${bodySideLength} ${bodySideWidth} ${bodySideHeight}"/> </geometry> <material name="black"/> </visual> <visual> <origin rpy="0 0 0" xyz="0 -0.10 -0.014"/> <geometry> <box size="${bodySideLength} ${bodySideWidth} ${bodySideHeight}"/> </geometry> <material name="black"/> </visual> <collision> <geometry> <box size="${bodyLength} ${bodyWidth} ${bodyHeight}"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="0 0.10 -0.014"/> <geometry> <box size="${bodySideLength} ${bodySideWidth} ${bodySideHeight}"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="0 -0.10 -0.014"/> <geometry> <box size="${bodySideLength} ${bodySideWidth} ${bodySideHeight}"/> </geometry> </collision> <inertial> <mass value="${bodyMass}"/> <!-- https://en.wikipedia.org/wiki/List_of_moments_of_inertia Solid Cuboid --> <inertia ixx="${bodyMass*(bodyWidth*bodyWidth + bodyHeight*bodyHeight)/12}" ixy="0.0" ixz="0.0" iyy="${bodyMass*(bodyLength*bodyLength + bodyHeight*bodyHeight)/12}" iyz="0.0" izz="${bodyMass*(bodyLength*bodyLength + bodyWidth*bodyWidth)/12}"/> </inertial> </link> <!-- Frame --> <link name="frame1"> <visual> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> <material name="frameGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="${frameMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="frame1_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame1"/> <origin rpy="0 0 0" xyz=".2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <link name="frame2"> <visual> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> <material name="frameGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="${frameMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="frame2_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame2"/> <origin rpy="0 0 0" xyz=".2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <link name="frame3"> <visual> <origin rpy="0 0 0" xyz="0.22 0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> <material name="frameGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="0.22 0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="${frameMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="frame3_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame3"/> <origin rpy="0 0 0" xyz="-.2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <link name="frame4"> <visual> <origin rpy="0 0 0" xyz="0.22 -0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> <material name="frameGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="0.22 -0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="${frameMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="frame4" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame4"/> <origin rpy="0 0 0" xyz="-.2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- Inside motor module boxes --> <link name="chassis_right"> <visual> <origin rpy="0 0 0" xyz=".2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> <material name="motor"/> </visual> <visual> <origin rpy="0 0 0" xyz="-.2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> <material name="motor"/> </visual> <collision> <origin rpy="0 0 0" xyz=".2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="-.2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <mass value="${motorModuleMass*2}"/> <inertia ixx=".004147" ixy=".0" ixz=".0" iyy=".040913" iyz=".0" izz=".041840"/> </inertial> </link> <joint name="chassis_right_center" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="chassis_right"/> <origin rpy="0 0 0" xyz="0 -.1265 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <link name="chassis_left"> <visual> <origin rpy="0 0 0" xyz=".2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> <material name="motor"/> </visual> <visual> <origin rpy="0 0 0" xyz="-.2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> <material name="motor"/> </visual> <collision> <origin rpy="0 0 0" xyz=".2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="-.2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <mass value="${motorModuleMass*2}"/> <inertia ixx=".004147" ixy=".0" ixz=".0" iyy=".040913" iyz=".0" izz=".041840"/> </inertial> </link> <joint name="chassis_left_center" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="chassis_left"/> <origin rpy="0 0 0" xyz="0 .1265 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- Outside motor module boxes --> <link name="motor_front_rightR_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> <material name="motor"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="${motorModuleMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="motor_front_rightR_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_front_rightR_bracket_link"/> <origin rpy="0 0 0" xyz=".2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <link name="motor_front_leftL_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> <material name="motor"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="${motorModuleMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="motor_front_leftL_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_front_leftL_bracket_link"/> <origin rpy="0 0 0" xyz=".2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <link name="motor_back_rightR_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> <material name="motor"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="${motorModuleMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="motor_back_rightR_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_back_rightR_bracket_link"/> <origin rpy="0 0 0" xyz="-.2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <link name="motor_back_leftL_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> <material name="motor"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="${motorModuleMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="motor_back_leftL_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_back_leftL_bracket_link"/> <origin rpy="0 0 0" xyz="-.2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- Define our motor macro --> <xacro:macro name="motor" params="jointNumber location side LR originRPY originXYZ chassis axis"> <link name="motor_${location}_${side}${LR}_link"> <visual> <geometry> <mesh filename="package://minitaur_description/meshes/tmotor3.obj" scale="1.0 1.0 1.0"/> </geometry> <material name="motor"/> </visual> <collision> <geometry> <cylinder length="${motorLength}" radius="${motorRadius}"/> </geometry> </collision> <inertial> <mass value="${motorMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <joint name="${jointNumber}" type="continuous"> <axis xyz="${axis}"/> <parent link="${chassis}"/> <child link="motor_${location}_${side}${LR}_link"/> <origin rpy="${originRPY}" xyz="${originXYZ}"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> </xacro:macro> <!-- Motors --> <xacro:motor jointNumber="5" location="front" side="right" LR="R" originRPY="1.57075 0 0" originXYZ="0 0 0" chassis="motor_front_rightR_bracket_link" axis="0 0 1"/> <xacro:motor jointNumber="4" location="front" side="right" LR="L" originRPY="1.57075 0 0" originXYZ=".2375 .0275 0" chassis="chassis_right" axis="0 0 -1"/> <xacro:motor jointNumber="0" location="front" side="left" LR="L" originRPY="1.57075 0 0" originXYZ="0 0 0" chassis="motor_front_leftL_bracket_link" axis="0 0 -1"/> <xacro:motor jointNumber="1" location="front" side="left" LR="R" originRPY="1.57075 0 0" originXYZ=".2375 -.0275 0" chassis="chassis_left" axis="0 0 1"/> <xacro:motor jointNumber="7" location="back" side="right" LR="R" originRPY="1.57075 0 0" originXYZ="0 0 0" chassis="motor_back_rightR_bracket_link" axis="0 0 1"/> <xacro:motor jointNumber="6" location="back" side="right" LR="L" originRPY="1.57075 0 0" originXYZ="-.2375 .0275 0" chassis="chassis_right" axis="0 0 -1"/> <xacro:motor jointNumber="2" location="back" side="left" LR="L" originRPY="1.57075 0 0" originXYZ="0 0 0" chassis="motor_back_leftL_bracket_link" axis="0 0 -1"/> <xacro:motor jointNumber="3" location="back" side="left" LR="R" originRPY="1.57075 0 0" originXYZ="-.2375 -.0275 0" chassis="chassis_left" axis="0 0 1"/> <!-- Define our upper leg macro --> <xacro:macro name="upperLeg" params="location hip xyz"> <link name="upper_leg_${location}_link"> <visual> <geometry> <box size="${upperLegWidth} ${upperLegHeight} ${upperLegLength}"/> </geometry> <material name="legGrey"/> </visual> <collision> <geometry> <box size="${upperLegWidth} ${upperLegHeight} ${upperLegLength}"/> </geometry> </collision> <inertial> <mass value="${upperLegMass}"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <joint name="${hip}_${location}_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_${location}_link"/> <child link="upper_leg_${location}_link"/> <origin rpy="-1.57075 0 0" xyz="${xyz}"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> </xacro:macro> <!-- Define our lower leg macro --> <xacro:macro name="lowerLeg" params="jointNumber location lowerLegLengthIn toeSuffix toe flipped"> <link name="lower_leg_${location}_link"> <contact> <friction_anchor/> <stiffness value="3000.0"/> <damping value="100.0"/> <spinning_friction value=".05"/> <lateral_friction value="1"/> </contact> <visual> <origin rpy="0 0 0" xyz="0 0 ${0.5*lowerLegLengthIn}"/> <geometry> <box size="${lowerLegWidth} ${lowerLegHeight} ${lowerLegLengthIn}"/> </geometry> <material name="legGrey"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 ${0.5*lowerLegLengthIn}"/> <geometry> <box size="${lowerLegWidth} ${lowerLegHeight} ${lowerLegLengthIn}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 ${0.5*lowerLegLengthIn}"/> <mass value="${lowerLegMass}"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <joint name="${jointNumber}" type="continuous"> <axis xyz="0 ${flipped} 0"/> <parent link="upper_leg_${location}_link"/> <child link="lower_leg_${location}_link"/> <origin rpy="0 0 0" xyz="0 ${0.0085 * flipped} ${0.5*upperLegLength}"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <xacro:if value="${toe}"> <!-- Toe --> <link name="toe${toeSuffix}"> <contact> <friction_anchor/> <stiffness value="${toeStiffness}"/> <damping value="${toeDamping}"/> <spinning_friction value="${toeSpinningFriction}"/> <lateral_friction value="${toeLateralFriction}"/> </contact> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="${toeRadius}"/> </geometry> <material name="black"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="${toeRadius}"/> </geometry> </collision> <inertial> <mass value="${toeMass}"/> <inertia ixx="0.000025" ixy="0" ixz="0" iyy="0.000025" iyz="0" izz="0.000025" /> </inertial> </link> <joint name="toe${toeSuffix}" type="fixed"> <parent link="lower_leg_${location}_link"/> <child link="toe${toeSuffix}"/> <origin xyz="0 0 ${lowerLegLengthIn}"/> <dynamics damping="0.0" friction="0.0"/> </joint> </xacro:if> </xacro:macro> <!-- Legs --> <xacro:upperLeg location="front_rightR" hip="hip" xyz="0 .045 -.0145"/> <xacro:upperLeg location="front_rightL" hip="motor" xyz="0 .045 .0145"/> <xacro:upperLeg location="front_leftR" hip="hip" xyz="0 .045 -.0145"/> <xacro:upperLeg location="front_leftL" hip="motor" xyz="0 .045 .0145"/> <xacro:upperLeg location="back_rightR" hip="hip" xyz="0 .045 -.0145"/> <xacro:upperLeg location="back_rightL" hip="motor" xyz="0 .045 .0145"/> <xacro:upperLeg location="back_leftR" hip="hip" xyz="0 .045 -.0145"/> <xacro:upperLeg location="back_leftL" hip="motor" xyz="0 .045 .0145"/> <!-- Lower legs and flexy knee joints --> <xacro:lowerLeg jointNumber="8" toeSuffix="0" toe="true" lowerLegLengthIn="${lowerLegLengthToe}" location="front_leftL" flipped="-1"/> <xacro:lowerLeg jointNumber="9" toeSuffix="1" toe="false" lowerLegLengthIn="${lowerLegLength}" location="front_leftR" flipped="1"/> <xacro:lowerLeg jointNumber="10" toeSuffix="2" toe="true" lowerLegLengthIn="${lowerLegLengthToe}" location="back_leftL" flipped="-1"/> <xacro:lowerLeg jointNumber="11" toeSuffix="3" toe="false" lowerLegLengthIn="${lowerLegLength}" location="back_leftR" flipped="1"/> <xacro:lowerLeg jointNumber="12" toeSuffix="4" toe="false" lowerLegLengthIn="${lowerLegLength}" location="front_rightL" flipped="-1"/> <xacro:lowerLeg jointNumber="13" toeSuffix="5" toe="true" lowerLegLengthIn="${lowerLegLengthToe}" location="front_rightR" flipped="1"/> <xacro:lowerLeg jointNumber="14" toeSuffix="6" toe="false" lowerLegLengthIn="${lowerLegLength}" location="back_rightL" flipped="-1"/> <xacro:lowerLeg jointNumber="15" toeSuffix="7" toe="true" lowerLegLengthIn="${lowerLegLengthToe}" location="back_rightR" flipped="1"/> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/KodlabPenn/kodlab_gazebo-master/minitaur_description/urdf/xacro.py
#! /usr/bin/env python # Copyright (c) 2013, Willow Garage, Inc. # Copyright (c) 2014, Open Source Robotics Foundation, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of the Open Source Robotics Foundation, Inc. # nor the names of its contributors may be used to endorse or promote # products derived from this software without specific prior # written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # Author: Stuart Glaser # Maintainer: William Woodall <[email protected]> from __future__ import print_function import getopt import glob import os import re import string import sys import xml from xml.dom.minidom import parse try: _basestr = basestring except NameError: _basestr = str # Dictionary of subtitution args substitution_args_context = {} class XacroException(Exception): pass def isnumber(x): return hasattr(x, '__int__') # Better pretty printing of xml # Taken from http://ronrothman.com/public/leftbraned/xml-dom-minidom-toprettyxml-and-silly-whitespace/ def fixed_writexml(self, writer, indent="", addindent="", newl=""): # indent = current indentation # addindent = indentation to add to higher levels # newl = newline string writer.write(indent + "<" + self.tagName) attrs = self._get_attributes() a_names = list(attrs.keys()) a_names.sort() for a_name in a_names: writer.write(" %s=\"" % a_name) xml.dom.minidom._write_data(writer, attrs[a_name].value) writer.write("\"") if self.childNodes: if len(self.childNodes) == 1 \ and self.childNodes[0].nodeType == xml.dom.minidom.Node.TEXT_NODE: writer.write(">") self.childNodes[0].writexml(writer, "", "", "") writer.write("</%s>%s" % (self.tagName, newl)) return writer.write(">%s" % (newl)) for node in self.childNodes: # skip whitespace-only text nodes if node.nodeType == xml.dom.minidom.Node.TEXT_NODE and \ not node.data.strip(): continue node.writexml(writer, indent + addindent, addindent, newl) writer.write("%s</%s>%s" % (indent, self.tagName, newl)) else: writer.write("/>%s" % (newl)) # replace minidom's function with ours xml.dom.minidom.Element.writexml = fixed_writexml class Table: def __init__(self, parent=None): self.parent = parent self.table = {} def __getitem__(self, key): if key in self.table: return self.table[key] elif self.parent: return self.parent[key] else: raise KeyError(key) def __setitem__(self, key, value): self.table[key] = value def __contains__(self, key): return \ key in self.table or \ (self.parent and key in self.parent) class QuickLexer(object): def __init__(self, **res): self.str = "" self.top = None self.res = [] for k, v in res.items(): self.__setattr__(k, len(self.res)) self.res.append(v) def lex(self, str): self.str = str self.top = None self.next() def peek(self): return self.top def next(self): result = self.top self.top = None for i in range(len(self.res)): m = re.match(self.res[i], self.str) if m: self.top = (i, m.group(0)) self.str = self.str[m.end():] break return result def first_child_element(elt): c = elt.firstChild while c: if c.nodeType == xml.dom.Node.ELEMENT_NODE: return c c = c.nextSibling return None def next_sibling_element(elt): c = elt.nextSibling while c: if c.nodeType == xml.dom.Node.ELEMENT_NODE: return c c = c.nextSibling return None # Pre-order traversal of the elements def next_element(elt): child = first_child_element(elt) if child: return child while elt and elt.nodeType == xml.dom.Node.ELEMENT_NODE: next = next_sibling_element(elt) if next: return next elt = elt.parentNode return None # Pre-order traversal of all the nodes def next_node(node): if node.firstChild: return node.firstChild while node: if node.nextSibling: return node.nextSibling node = node.parentNode return None def child_nodes(elt): c = elt.firstChild while c: yield c c = c.nextSibling all_includes = [] # Deprecated message for <include> tags that don't have <xacro:include> prepended: deprecated_include_msg = """DEPRECATED IN HYDRO: The <include> tag should be prepended with 'xacro' if that is the intended use of it, such as <xacro:include ...>. Use the following script to fix incorrect xacro includes: sed -i 's/<include/<xacro:include/g' `find . -iname *.xacro`""" include_no_matches_msg = """Include tag filename spec \"{}\" matched no files.""" ## @throws XacroException if a parsing error occurs with an included document def process_includes(doc, base_dir): namespaces = {} previous = doc.documentElement elt = next_element(previous) while elt: # Xacro should not use plain 'include' tags but only namespaced ones. Causes conflicts with # other XML elements including Gazebo's <gazebo> extensions is_include = False if elt.tagName == 'xacro:include' or elt.tagName == 'include': is_include = True # Temporary fix for ROS Hydro and the xacro include scope problem if elt.tagName == 'include': # check if there is any element within the <include> tag. mostly we are concerned # with Gazebo's <uri> element, but it could be anything. also, make sure the child # nodes aren't just a single Text node, which is still considered a deprecated # instance if elt.childNodes and not (len(elt.childNodes) == 1 and elt.childNodes[0].nodeType == elt.TEXT_NODE): # this is not intended to be a xacro element, so we can ignore it is_include = False else: # throw a deprecated warning print(deprecated_include_msg, file=sys.stderr) # Process current element depending on previous conditions if is_include: filename_spec = eval_text(elt.getAttribute('filename'), {}) if not os.path.isabs(filename_spec): filename_spec = os.path.join(base_dir, filename_spec) if re.search('[*[?]+', filename_spec): # Globbing behaviour filenames = sorted(glob.glob(filename_spec)) if len(filenames) == 0: print(include_no_matches_msg.format(filename_spec), file=sys.stderr) else: # Default behaviour filenames = [filename_spec] for filename in filenames: global all_includes all_includes.append(filename) try: with open(filename) as f: try: included = parse(f) except Exception as e: raise XacroException( "included file \"%s\" generated an error during XML parsing: %s" % (filename, str(e))) except IOError as e: raise XacroException("included file \"%s\" could not be opened: %s" % (filename, str(e))) # Replaces the include tag with the elements of the included file for c in child_nodes(included.documentElement): elt.parentNode.insertBefore(c.cloneNode(deep=True), elt) # Grabs all the declared namespaces of the included document for name, value in included.documentElement.attributes.items(): if name.startswith('xmlns:'): namespaces[name] = value elt.parentNode.removeChild(elt) elt = None else: previous = elt elt = next_element(previous) # Makes sure the final document declares all the namespaces of the included documents. for k, v in namespaces.items(): doc.documentElement.setAttribute(k, v) # Returns a dictionary: { macro_name => macro_xml_block } def grab_macros(doc): macros = {} previous = doc.documentElement elt = next_element(previous) while elt: if elt.tagName == 'macro' or elt.tagName == 'xacro:macro': name = elt.getAttribute('name') macros[name] = elt macros['xacro:' + name] = elt elt.parentNode.removeChild(elt) elt = None else: previous = elt elt = next_element(previous) return macros # Returns a Table of the properties def grab_properties(doc): table = Table() previous = doc.documentElement elt = next_element(previous) while elt: if elt.tagName == 'property' or elt.tagName == 'xacro:property': name = elt.getAttribute('name') value = None if elt.hasAttribute('value'): value = elt.getAttribute('value') else: name = '**' + name value = elt # debug bad = string.whitespace + "${}" has_bad = False for b in bad: if b in name: has_bad = True break if has_bad: sys.stderr.write('Property names may not have whitespace, ' + '"{", "}", or "$" : "' + name + '"') else: table[name] = value elt.parentNode.removeChild(elt) elt = None else: previous = elt elt = next_element(previous) return table def eat_ignore(lex): while lex.peek() and lex.peek()[0] == lex.IGNORE: lex.next() def eval_lit(lex, symbols): eat_ignore(lex) if lex.peek()[0] == lex.NUMBER: return float(lex.next()[1]) if lex.peek()[0] == lex.SYMBOL: try: key = lex.next()[1] value = symbols[key] except KeyError as ex: raise XacroException("Property wasn't defined: %s" % str(ex)) if not (isnumber(value) or isinstance(value, _basestr)): if value is None: raise XacroException("Property %s recursively used" % key) raise XacroException("WTF2") try: return int(value) except: try: return float(value) except: # prevent infinite recursion symbols[key] = None result = eval_text(value, symbols) # restore old entry symbols[key] = value return result raise XacroException("Bad literal") def eval_factor(lex, symbols): eat_ignore(lex) neg = 1 if lex.peek()[1] == '-': lex.next() neg = -1 if lex.peek()[0] in [lex.NUMBER, lex.SYMBOL]: return neg * eval_lit(lex, symbols) if lex.peek()[0] == lex.LPAREN: lex.next() eat_ignore(lex) result = eval_expr(lex, symbols) eat_ignore(lex) if lex.next()[0] != lex.RPAREN: raise XacroException("Unmatched left paren") eat_ignore(lex) return neg * result raise XacroException("Misplaced operator") def eval_term(lex, symbols): eat_ignore(lex) result = 0 if lex.peek()[0] in [lex.NUMBER, lex.SYMBOL, lex.LPAREN] \ or lex.peek()[1] == '-': result = eval_factor(lex, symbols) eat_ignore(lex) while lex.peek() and lex.peek()[1] in ['*', '/']: op = lex.next()[1] n = eval_factor(lex, symbols) if op == '*': result = float(result) * float(n) elif op == '/': result = float(result) / float(n) else: raise XacroException("WTF") eat_ignore(lex) return result def eval_expr(lex, symbols): eat_ignore(lex) op = None if lex.peek()[0] == lex.OP: op = lex.next()[1] if not op in ['+', '-']: raise XacroException("Invalid operation. Must be '+' or '-'") result = eval_term(lex, symbols) if op == '-': result = -float(result) eat_ignore(lex) while lex.peek() and lex.peek()[1] in ['+', '-']: op = lex.next()[1] n = eval_term(lex, symbols) if op == '+': result = float(result) + float(n) if op == '-': result = float(result) - float(n) eat_ignore(lex) return result def eval_text(text, symbols): def handle_expr(s): lex = QuickLexer(IGNORE=r"\s+", NUMBER=r"(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?", SYMBOL=r"[a-zA-Z_]\w*", OP=r"[\+\-\*/^]", LPAREN=r"\(", RPAREN=r"\)") lex.lex(s) return eval_expr(lex, symbols) def handle_extension(s): return ("$(%s)" % s) results = [] lex = QuickLexer(DOLLAR_DOLLAR_BRACE=r"\$\$+\{", EXPR=r"\$\{[^\}]*\}", EXTENSION=r"\$\([^\)]*\)", TEXT=r"([^\$]|\$[^{(]|\$$)+") lex.lex(text) while lex.peek(): if lex.peek()[0] == lex.EXPR: results.append(handle_expr(lex.next()[1][2:-1])) elif lex.peek()[0] == lex.EXTENSION: results.append(handle_extension(lex.next()[1][2:-1])) elif lex.peek()[0] == lex.TEXT: results.append(lex.next()[1]) elif lex.peek()[0] == lex.DOLLAR_DOLLAR_BRACE: results.append(lex.next()[1][1:]) return ''.join(map(str, results)) # Expands macros, replaces properties, and evaluates expressions def eval_all(root, macros, symbols): # Evaluates the attributes for the root node for at in root.attributes.items(): result = eval_text(at[1], symbols) root.setAttribute(at[0], result) previous = root node = next_node(previous) while node: if node.nodeType == xml.dom.Node.ELEMENT_NODE: if node.tagName in macros: body = macros[node.tagName].cloneNode(deep=True) params = body.getAttribute('params').split() # Parse default values for any parameters defaultmap = {} for param in params[:]: splitParam = param.split(':=') if len(splitParam) == 2: defaultmap[splitParam[0]] = splitParam[1] params.remove(param) params.append(splitParam[0]) elif len(splitParam) != 1: raise XacroException("Invalid parameter definition") # Expands the macro scoped = Table(symbols) for name, value in node.attributes.items(): if not name in params: raise XacroException("Invalid parameter \"%s\" while expanding macro \"%s\"" % (str(name), str(node.tagName))) params.remove(name) scoped[name] = eval_text(value, symbols) # Pulls out the block arguments, in order cloned = node.cloneNode(deep=True) eval_all(cloned, macros, symbols) block = cloned.firstChild for param in params[:]: if param[0] == '*': while block and block.nodeType != xml.dom.Node.ELEMENT_NODE: block = block.nextSibling if not block: raise XacroException("Not enough blocks while evaluating macro %s" % str(node.tagName)) params.remove(param) scoped[param] = block block = block.nextSibling # Try to load defaults for any remaining non-block parameters for param in params[:]: if param[0] != '*' and param in defaultmap: scoped[param] = defaultmap[param] params.remove(param) if params: raise XacroException("Parameters [%s] were not set for macro %s" % (",".join(params), str(node.tagName))) eval_all(body, macros, scoped) # Replaces the macro node with the expansion for e in list(child_nodes(body)): # Ew node.parentNode.insertBefore(e, node) node.parentNode.removeChild(node) node = None elif node.tagName == 'arg' or node.tagName == 'xacro:arg': name = node.getAttribute('name') if not name: raise XacroException("Argument name missing") default = node.getAttribute('default') if default and name not in substitution_args_context['arg']: substitution_args_context['arg'][name] = default node.parentNode.removeChild(node) node = None elif node.tagName == 'insert_block' or node.tagName == 'xacro:insert_block': name = node.getAttribute('name') if ("**" + name) in symbols: # Multi-block block = symbols['**' + name] for e in list(child_nodes(block)): node.parentNode.insertBefore(e.cloneNode(deep=True), node) node.parentNode.removeChild(node) elif ("*" + name) in symbols: # Single block block = symbols['*' + name] node.parentNode.insertBefore(block.cloneNode(deep=True), node) node.parentNode.removeChild(node) else: raise XacroException("Block \"%s\" was never declared" % name) node = None elif node.tagName in ['if', 'xacro:if', 'unless', 'xacro:unless']: value = eval_text(node.getAttribute('value'), symbols) try: if value == 'true': keep = True elif value == 'false': keep = False else: keep = float(value) except ValueError: raise XacroException("Xacro conditional evaluated to \"%s\". Acceptable evaluations are one of [\"1\",\"true\",\"0\",\"false\"]" % value) if node.tagName in ['unless', 'xacro:unless']: keep = not keep if keep: for e in list(child_nodes(node)): node.parentNode.insertBefore(e.cloneNode(deep=True), node) node.parentNode.removeChild(node) else: # Evals the attributes for at in node.attributes.items(): result = eval_text(at[1], symbols) node.setAttribute(at[0], result) previous = node elif node.nodeType == xml.dom.Node.TEXT_NODE: node.data = eval_text(node.data, symbols) previous = node else: previous = node node = next_node(previous) return macros # Expands everything except includes def eval_self_contained(doc): macros = grab_macros(doc) symbols = grab_properties(doc) eval_all(doc.documentElement, macros, symbols) def print_usage(exit_code=0): print("Usage: %s [-o <output>] <input>" % 'xacro.py') print(" %s --deps Prints dependencies" % 'xacro.py') print(" %s --includes Only evalutes includes" % 'xacro.py') sys.exit(exit_code) def set_substitution_args_context(context={}): substitution_args_context['arg'] = context def open_output(output_filename): if output_filename is None: return sys.stdout else: return open(output_filename, 'w') def main(): try: opts, args = getopt.gnu_getopt(sys.argv[1:], "ho:", ['deps', 'includes']) except getopt.GetoptError as err: print(str(err)) print_usage(2) just_deps = False just_includes = False output_filename = None for o, a in opts: if o == '-h': print_usage(0) elif o == '-o': output_filename = a elif o == '--deps': just_deps = True elif o == '--includes': just_includes = True if len(args) < 1: print("No input given") print_usage(2) # Process substitution args # set_substitution_args_context(load_mappings(sys.argv)) set_substitution_args_context((sys.argv)) f = open(args[0]) doc = None try: doc = parse(f) except xml.parsers.expat.ExpatError: sys.stderr.write("Expat parsing error. Check that:\n") sys.stderr.write(" - Your XML is correctly formed\n") sys.stderr.write(" - You have the xacro xmlns declaration: " + "xmlns:xacro=\"http://www.ros.org/wiki/xacro\"\n") sys.stderr.write("\n") raise finally: f.close() process_includes(doc, os.path.dirname(args[0])) if just_deps: for inc in all_includes: sys.stdout.write(inc + " ") sys.stdout.write("\n") elif just_includes: doc.writexml(open_output(output_filename)) print() else: eval_self_contained(doc) banner = [xml.dom.minidom.Comment(c) for c in [" %s " % ('=' * 83), " | This document was autogenerated by xacro from %-30s | " % args[0], " | EDITING THIS FILE BY HAND IS NOT RECOMMENDED %-30s | " % "", " %s " % ('=' * 83)]] first = doc.firstChild for comment in banner: doc.insertBefore(comment, first) open_output(output_filename).write(doc.toprettyxml(indent=' ')) print() if __name__ == '__main__': main()
renanmb/Omniverse_legged_robotics/URDF-Descriptions/KodlabPenn/kodlab_gazebo-master/minitaur_description/urdf/minitaur_gazebo.urdf.xacro
<?xml version="1.0" ?> <!-- ======================================================================= --> <!--LICENSE: --> <!--Copyright (c) 2017, Erwin Coumans --> <!--Google Inc. --> <!--All rights reserved. --> <!-- --> <!--Redistribution and use in source and binary forms, with or without --> <!--modification, are permitted provided that the following conditions are --> <!--met: --> <!-- --> <!--1. Redistributions or derived work must retain this copyright notice, --> <!-- this list of conditions and the following disclaimer. --> <!-- --> <!--2. Redistributions in binary form must reproduce the above copyright --> <!-- notice, this list of conditions and the following disclaimer in the --> <!-- documentation and/or other materials provided with the distribution. --> <!-- --> <!--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS --> <!--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,--> <!--THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR --> <!--PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR --> <!--CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, --> <!--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, --> <!--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --> <!--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --> <!--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --> <!--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --> <!--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <!-- --> <!-- Converted to xacro by Tom Jacobs and Vasileios Vasilopoulos --> <!-- <[email protected]>, <[email protected]> --> <robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="minitaur"> <!-- Define parameters --> <xacro:property name="bodyLength" value="0.33"/> <xacro:property name="bodyWidth" value="0.1855"/> <xacro:property name="bodyHeight" value="0.08"/> <xacro:property name="bodySideLength" value="0.17"/> <xacro:property name="bodySideWidth" value="0.10"/> <xacro:property name="bodySideHeight" value="0.05"/> <xacro:property name="bodyMass" value="3.516"/> <!-- 7.18kg minitaur total weight - 0.016*4 - 0.10*8 - 0.25*8 - 0.05*8 - 0.05*8 = 3.516 --> <xacro:property name="frameMass" value="0.16"/> <!-- * 4 frames --> <xacro:property name="motorModuleMass" value="0.10"/> <!-- * 8 motor modules --> <xacro:property name="motorMass" value="0.25"/> <!-- * 8 motors --> <xacro:property name="upperLegMass" value="0.05"/> <!-- * 8 upper legs --> <xacro:property name="lowerLegMass" value="0.05"/> <!-- * 8 lower legs --> <xacro:property name="toeMass" value="0.01"/> <xacro:property name="chassisLength" value="0.34"/> <xacro:property name="chassisWidth" value="0.01"/> <xacro:property name="chassisHeight" value="0.04"/> <xacro:property name="motorLength" value="0.021"/> <xacro:property name="motorRadius" value="0.0425"/> <xacro:property name="upperLegWidth" value="0.039"/> <xacro:property name="upperLegHeight" value="0.008"/> <xacro:property name="upperLegLength" value="0.1"/> <xacro:property name="lowerLegWidth" value="0.017"/> <xacro:property name="lowerLegHeight" value="0.009"/> <xacro:property name="lowerLegLength" value="0.2"/> <xacro:property name="lowerLegLengthToe" value="0.22"/> <xacro:property name="toeRadius" value="0.015"/> <xacro:property name="toeStiffness" value="300000.0"/> <xacro:property name="toeDamping" value="1000.0"/> <xacro:property name="toeSpinningFriction" value="1.0"/> <xacro:property name="toeLateralFriction" value="1.0"/> <!-- LINK: Body dummy --> <link name="base_chassis_link_dummy"> <visual> <geometry> <box size="${bodyLength} ${bodyWidth} ${bodyHeight}"/> </geometry> </visual> <visual> <origin rpy="0 0 0" xyz="0 0.10 -0.014"/> <geometry> <box size="${bodySideLength} ${bodySideWidth} ${bodySideHeight}"/> </geometry> </visual> <visual> <origin rpy="0 0 0" xyz="0 -0.10 -0.014"/> <geometry> <box size="${bodySideLength} ${bodySideWidth} ${bodySideHeight}"/> </geometry> </visual> <collision> <geometry> <box size="${bodyLength} ${bodyWidth} ${bodyHeight}"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="0 0.10 -0.014"/> <geometry> <box size="${bodySideLength} ${bodySideWidth} ${bodySideHeight}"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="0 -0.10 -0.014"/> <geometry> <box size="${bodySideLength} ${bodySideWidth} ${bodySideHeight}"/> </geometry> </collision> </link> <gazebo reference="base_chassis_link_dummy"> <material>Gazebo/FlatBlack</material> </gazebo> <!-- LINK: Body --> <link name="base_chassis_link"> <visual> <geometry> <box size="${bodyLength} ${bodyWidth} ${bodyHeight}"/> </geometry> </visual> <visual> <origin rpy="0 0 0" xyz="0 0.10 -0.014"/> <geometry> <box size="${bodySideLength} ${bodySideWidth} ${bodySideHeight}"/> </geometry> </visual> <visual> <origin rpy="0 0 0" xyz="0 -0.10 -0.014"/> <geometry> <box size="${bodySideLength} ${bodySideWidth} ${bodySideHeight}"/> </geometry> </visual> <collision> <geometry> <box size="${bodyLength} ${bodyWidth} ${bodyHeight}"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="0 0.10 -0.014"/> <geometry> <box size="${bodySideLength} ${bodySideWidth} ${bodySideHeight}"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="0 -0.10 -0.014"/> <geometry> <box size="${bodySideLength} ${bodySideWidth} ${bodySideHeight}"/> </geometry> </collision> <inertial> <mass value="${bodyMass}"/> <origin xyz="0 0 0" rpy="0 0 0"/> <!-- https://en.wikipedia.org/wiki/List_of_moments_of_inertia Solid Cuboid --> <inertia ixx="${bodyMass*(bodyWidth*bodyWidth + bodyHeight*bodyHeight)/12}" ixy="0.0" ixz="0.0" iyy="${bodyMass*(bodyLength*bodyLength + bodyHeight*bodyHeight)/12}" iyz="0.0" izz="${bodyMass*(bodyLength*bodyLength + bodyWidth*bodyWidth)/12}"/> </inertial> </link> <gazebo reference="base_chassis_link"> <material>Gazebo/FlatBlack</material> </gazebo> <!-- JOINT: body to body dummy --> <joint name="dummy_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link_dummy"/> <child link="base_chassis_link"/> <origin rpy="0 0 0" xyz="0 0 0"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: frame1 --> <link name="frame1"> <visual> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="${frameMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="frame1"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: frame1 to body --> <joint name="frame1_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame1"/> <origin rpy="0 0 0" xyz=".2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: frame2 --> <link name="frame2"> <visual> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="${frameMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="frame2"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: frame2 to body --> <joint name="frame2_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame2"/> <origin rpy="0 0 0" xyz=".2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: frame3 --> <link name="frame3"> <visual> <origin rpy="0 0 0" xyz="0.22 0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0.22 0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="${frameMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="frame3"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: frame3 to body --> <joint name="frame3_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame3"/> <origin rpy="0 0 0" xyz="-.2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: frame4 --> <link name="frame4"> <visual> <origin rpy="0 0 0" xyz="0.22 -0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0.22 -0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="${frameMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="frame4"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: frame4 to body --> <joint name="frame4" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame4"/> <origin rpy="0 0 0" xyz="-.2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- Inside motor module boxes --> <!-- LINK: chassis_right --> <link name="chassis_right"> <visual> <origin rpy="0 0 0" xyz=".2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </visual> <visual> <origin rpy="0 0 0" xyz="-.2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz=".2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="-.2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <mass value="${motorModuleMass*2}"/> <inertia ixx=".004147" ixy=".0" ixz=".0" iyy=".040913" iyz=".0" izz=".041840"/> </inertial> </link> <gazebo reference="chassis_right"> <material>Gazebo/Black</material> </gazebo> <!-- JOINT: chassis_right_center to body --> <joint name="chassis_right_center" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="chassis_right"/> <origin rpy="0 0 0" xyz="0 -.1265 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: chassis_left --> <link name="chassis_left"> <visual> <origin rpy="0 0 0" xyz=".2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </visual> <visual> <origin rpy="0 0 0" xyz="-.2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz=".2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="-.2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <mass value="${motorModuleMass*2}"/> <inertia ixx=".004147" ixy=".0" ixz=".0" iyy=".040913" iyz=".0" izz=".041840"/> </inertial> </link> <gazebo reference="chassis_left"> <material>Gazebo/Black</material> </gazebo> <!-- JOINT: chassis_left_center to body --> <joint name="chassis_left_center" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="chassis_left"/> <origin rpy="0 0 0" xyz="0 .1265 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- Outside motor module boxes --> <!-- LINK: motor_front_rightR_bracket_link --> <link name="motor_front_rightR_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="${motorModuleMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="motor_front_rightR_bracket_link"> <material>Gazebo/Black</material> </gazebo> <!-- JOINT: motor_front_rightR_bracket_link to body --> <joint name="motor_front_rightR_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_front_rightR_bracket_link"/> <origin rpy="0 0 0" xyz=".2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: motor_front_leftL_bracket_link --> <link name="motor_front_leftL_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="${motorModuleMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="motor_front_leftL_bracket_link"> <material>Gazebo/Black</material> </gazebo> <!-- JOINT: motor_front_leftL_bracket_joint to body --> <joint name="motor_front_leftL_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_front_leftL_bracket_link"/> <origin rpy="0 0 0" xyz=".2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: motor_back_rightR_bracket_link --> <link name="motor_back_rightR_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="${motorModuleMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="motor_back_rightR_bracket_link"> <material>Gazebo/Black</material> </gazebo> <!-- JOINT: motor_back_rightR_bracket_joint to body --> <joint name="motor_back_rightR_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_back_rightR_bracket_link"/> <origin rpy="0 0 0" xyz="-.2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: motor_back_leftL_bracket_link --> <link name="motor_back_leftL_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="${motorModuleMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="motor_back_leftL_bracket_link"> <material>Gazebo/Black</material> </gazebo> <!-- JOINT: motor_back_leftL_bracket_joint to body --> <joint name="motor_back_leftL_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_back_leftL_bracket_link"/> <origin rpy="0 0 0" xyz="-.2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- Define our motor macro --> <xacro:macro name="motor" params="jointNumber location side LR originRPY originXYZ chassis axis"> <!-- LINK: motor_${location}_${side}${LR}_link --> <link name="motor_${location}_${side}${LR}_link"> <visual> <geometry> <mesh filename="model://minitaur_constrained/../../meshes/tmotor3.dae" scale="100 100 100"/> </geometry> </visual> <collision> <geometry> <cylinder length="${motorLength}" radius="${motorRadius}"/> </geometry> </collision> <inertial> <mass value="${motorMass}"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <!-- JOINT: motor_${location}_${side}${LR}_link to ${chassis} --> <joint name="${jointNumber}" type="continuous"> <axis xyz="${axis}"/> <parent link="${chassis}"/> <child link="motor_${location}_${side}${LR}_link"/> <origin rpy="${originRPY}" xyz="${originXYZ}"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Transmission elements required for Gazebo --> <transmission name="transmission_${jointNumber}"> <type>transmission_interface/SimpleTransmission</type> <joint name="${jointNumber}"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="motor_${jointNumber}"> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> </xacro:macro> <!-- Motors --> <xacro:motor jointNumber="5" location="front" side="right" LR="R" originRPY="1.57075 -1.57075 0" originXYZ="0 0 0" chassis="motor_front_rightR_bracket_link" axis="0 0 1"/> <xacro:motor jointNumber="4" location="front" side="right" LR="L" originRPY="1.57075 1.57075 0" originXYZ=".2375 .0275 0" chassis="chassis_right" axis="0 0 -1"/> <xacro:motor jointNumber="0" location="front" side="left" LR="L" originRPY="1.57075 -1.57075 0" originXYZ="0 0 0" chassis="motor_front_leftL_bracket_link" axis="0 0 -1"/> <xacro:motor jointNumber="1" location="front" side="left" LR="R" originRPY="1.57075 1.57075 0" originXYZ=".2375 -.0275 0" chassis="chassis_left" axis="0 0 1"/> <xacro:motor jointNumber="7" location="back" side="right" LR="R" originRPY="1.57075 -1.57075 0" originXYZ="0 0 0" chassis="motor_back_rightR_bracket_link" axis="0 0 1"/> <xacro:motor jointNumber="6" location="back" side="right" LR="L" originRPY="1.57075 1.57075 0" originXYZ="-.2375 .0275 0" chassis="chassis_right" axis="0 0 -1"/> <xacro:motor jointNumber="2" location="back" side="left" LR="L" originRPY="1.57075 -1.57075 0" originXYZ="0 0 0" chassis="motor_back_leftL_bracket_link" axis="0 0 -1"/> <xacro:motor jointNumber="3" location="back" side="left" LR="R" originRPY="1.57075 1.57075 0" originXYZ="-.2375 -.0275 0" chassis="chassis_left" axis="0 0 1"/> <!-- Define our upper leg macro --> <xacro:macro name="upperLeg" params="location hip xyz"> <!-- LINK: upper_leg_${location}_link --> <link name="upper_leg_${location}_link"> <visual> <geometry> <box size="${upperLegWidth} ${upperLegHeight} ${upperLegLength}"/> </geometry> </visual> <collision> <geometry> <box size="${upperLegWidth} ${upperLegHeight} ${upperLegLength}"/> </geometry> </collision> <inertial> <mass value="${upperLegMass}"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <gazebo reference="upper_leg_${location}_link"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: ${hip}_${location}_link to motor_${location}_link --> <joint name="${hip}_${location}_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_${location}_link"/> <child link="upper_leg_${location}_link"/> <origin rpy="-1.57075 0 0" xyz="${xyz}"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> </xacro:macro> <!-- Define our lower leg macro --> <xacro:macro name="lowerLeg" params="jointNumber location lowerLegLengthIn toeSuffix toe flipped left"> <!-- LINK: lower_leg_${location}_link --> <link name="lower_leg_${location}_link"> <visual> <origin rpy="0 0 0" xyz="0 0 ${0.5*lowerLegLengthIn}"/> <geometry> <box size="${lowerLegWidth} ${lowerLegHeight} ${lowerLegLengthIn}"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 ${0.5*lowerLegLengthIn}"/> <geometry> <box size="${lowerLegWidth} ${lowerLegHeight} ${lowerLegLengthIn}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 ${0.5*lowerLegLengthIn}"/> <mass value="${lowerLegMass}"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <gazebo reference="lower_leg_${location}_link"> <material>Gazebo/Grey</material> <collision> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> </friction> <contact> <ode> <kp>3000.0</kp> <kd>100.0</kd> </ode> <bullet> <kp>3000.0</kp> <kd>100.0</kd> </bullet> </contact> </surface> </collision> </gazebo> <!-- JOINT: lower_leg_${location}_link to upper_leg_${location}_link --> <joint name="${jointNumber}" type="continuous"> <axis xyz="0 ${flipped} 0"/> <parent link="upper_leg_${location}_link"/> <child link="lower_leg_${location}_link"/> <xacro:if value="${left}"> <origin rpy="0 ${-4.189*flipped} 0" xyz="0 ${0.0085 * flipped} ${0.5*upperLegLength}"/> </xacro:if> <xacro:unless value="${left}"> <origin rpy="0 ${4.189*flipped} 0" xyz="0 ${0.0085 * flipped} ${0.5*upperLegLength}"/> </xacro:unless> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <xacro:if value="${toe}"> <!-- Toe --> <!-- LINK: toe${toeSuffix} --> <link name="toe${toeSuffix}"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="${toeRadius}"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="${toeRadius}"/> </geometry> </collision> <inertial> <mass value="${toeMass}"/> <inertia ixx="0.000025" ixy="0" ixz="0" iyy="0.000025" iyz="0" izz="0.000025" /> </inertial> </link> <gazebo reference="toe${toeSuffix}"> <material>Gazebo/Black</material> <collision> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>${toeSpinningFriction}</coefficient> </torsional> <ode> <mu>${toeLateralFriction}</mu> <mu2>${toeLateralFriction}</mu2> </ode> <bullet> <rolling_friction>${toeSpinningFriction}</rolling_friction> <friction2>${toeLateralFriction}</friction2> </bullet> </friction> <contact> <ode> <kp>${toeStiffness}</kp> <kd>${toeDamping}</kd> </ode> <bullet> <kp>${toeStiffness}</kp> <kd>${toeDamping}</kd> </bullet> </contact> </surface> </collision> </gazebo> <!-- JOINT: toe${toeSuffix} to lower_leg_${location}_link --> <joint name="toe${toeSuffix}" type="fixed"> <parent link="lower_leg_${location}_link"/> <child link="toe${toeSuffix}"/> <origin xyz="0 0 ${lowerLegLengthIn}"/> <dynamics damping="0.0" friction="0.0"/> </joint> </xacro:if> </xacro:macro> <!-- Legs --> <xacro:upperLeg location="front_rightR" hip="hip" xyz="0 .045 -.0145"/> <xacro:upperLeg location="front_rightL" hip="motor" xyz="0 .045 .0145"/> <xacro:upperLeg location="front_leftR" hip="hip" xyz="0 .045 -.0145"/> <xacro:upperLeg location="front_leftL" hip="motor" xyz="0 .045 .0145"/> <xacro:upperLeg location="back_rightR" hip="hip" xyz="0 .045 -.0145"/> <xacro:upperLeg location="back_rightL" hip="motor" xyz="0 .045 .0145"/> <xacro:upperLeg location="back_leftR" hip="hip" xyz="0 .045 -.0145"/> <xacro:upperLeg location="back_leftL" hip="motor" xyz="0 .045 .0145"/> <!-- Lower legs and flexy knee joints --> <xacro:lowerLeg jointNumber="8" toeSuffix="0" toe="true" lowerLegLengthIn="${lowerLegLengthToe}" location="front_leftL" flipped="-1" left="true"/> <xacro:lowerLeg jointNumber="9" toeSuffix="1" toe="false" lowerLegLengthIn="${lowerLegLength}" location="front_leftR" flipped="1" left="true"/> <xacro:lowerLeg jointNumber="10" toeSuffix="2" toe="true" lowerLegLengthIn="${lowerLegLengthToe}" location="back_leftL" flipped="-1" left="true"/> <xacro:lowerLeg jointNumber="11" toeSuffix="3" toe="false" lowerLegLengthIn="${lowerLegLength}" location="back_leftR" flipped="1" left="true"/> <xacro:lowerLeg jointNumber="12" toeSuffix="4" toe="false" lowerLegLengthIn="${lowerLegLength}" location="front_rightL" flipped="-1" left="false"/> <xacro:lowerLeg jointNumber="13" toeSuffix="5" toe="true" lowerLegLengthIn="${lowerLegLengthToe}" location="front_rightR" flipped="1" left="false"/> <xacro:lowerLeg jointNumber="14" toeSuffix="6" toe="false" lowerLegLengthIn="${lowerLegLength}" location="back_rightL" flipped="-1" left="false"/> <xacro:lowerLeg jointNumber="15" toeSuffix="7" toe="true" lowerLegLengthIn="${lowerLegLengthToe}" location="back_rightR" flipped="1" left="false"/> <!-- Add ros_control plugin --> <gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <robotNamespace>/minitaur</robotNamespace> </plugin> </gazebo> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/KodlabPenn/kodlab_gazebo-master/minitaur_description/urdf/minitaur_gazebo.urdf
<?xml version="1.0" ?> <!-- =================================================================================== --> <!-- | This document was autogenerated by xacro from minitaur_gazebo.urdf.xacro | --> <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | --> <!-- =================================================================================== --> <!-- ======================================================================= --> <!--LICENSE: --> <!--Copyright (c) 2017, Erwin Coumans --> <!--Google Inc. --> <!--All rights reserved. --> <!-- --> <!--Redistribution and use in source and binary forms, with or without --> <!--modification, are permitted provided that the following conditions are --> <!--met: --> <!-- --> <!--1. Redistributions or derived work must retain this copyright notice, --> <!-- this list of conditions and the following disclaimer. --> <!-- --> <!--2. Redistributions in binary form must reproduce the above copyright --> <!-- notice, this list of conditions and the following disclaimer in the --> <!-- documentation and/or other materials provided with the distribution. --> <!-- --> <!--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS --> <!--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,--> <!--THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR --> <!--PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR --> <!--CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, --> <!--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, --> <!--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --> <!--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --> <!--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --> <!--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --> <!--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <!-- --> <!-- Converted to xacro by Tom Jacobs and Vasileios Vasilopoulos --> <!-- <[email protected]>, <[email protected]> --> <robot name="minitaur" xmlns:xacro="http://www.ros.org/wiki/xacro"> <!-- Define parameters --> <!-- 7.18kg minitaur total weight - 0.016*4 - 0.10*8 - 0.25*8 - 0.05*8 - 0.05*8 = 3.516 --> <!-- * 4 frames --> <!-- * 8 motor modules --> <!-- * 8 motors --> <!-- * 8 upper legs --> <!-- * 8 lower legs --> <!-- LINK: Body dummy --> <link name="base_chassis_link_dummy"> <visual> <geometry> <box size="0.33 0.1855 0.08"/> </geometry> </visual> <visual> <origin rpy="0 0 0" xyz="0 0.10 -0.014"/> <geometry> <box size="0.17 0.1 0.05"/> </geometry> </visual> <visual> <origin rpy="0 0 0" xyz="0 -0.10 -0.014"/> <geometry> <box size="0.17 0.1 0.05"/> </geometry> </visual> <collision> <geometry> <box size="0.33 0.1855 0.08"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="0 0.10 -0.014"/> <geometry> <box size="0.17 0.1 0.05"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="0 -0.10 -0.014"/> <geometry> <box size="0.17 0.1 0.05"/> </geometry> </collision> </link> <gazebo reference="base_chassis_link_dummy"> <material>Gazebo/FlatBlack</material> </gazebo> <!-- LINK: Body --> <link name="base_chassis_link"> <visual> <geometry> <box size="0.33 0.1855 0.08"/> </geometry> </visual> <visual> <origin rpy="0 0 0" xyz="0 0.10 -0.014"/> <geometry> <box size="0.17 0.1 0.05"/> </geometry> </visual> <visual> <origin rpy="0 0 0" xyz="0 -0.10 -0.014"/> <geometry> <box size="0.17 0.1 0.05"/> </geometry> </visual> <collision> <geometry> <box size="0.33 0.1855 0.08"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="0 0.10 -0.014"/> <geometry> <box size="0.17 0.1 0.05"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="0 -0.10 -0.014"/> <geometry> <box size="0.17 0.1 0.05"/> </geometry> </collision> <inertial> <mass value="3.516"/> <origin rpy="0 0 0" xyz="0 0 0"/> <!-- https://en.wikipedia.org/wiki/List_of_moments_of_inertia Solid Cuboid --> <inertia ixx="0.01195740325" ixy="0.0" ixz="0.0" iyy="0.0337829" iyz="0.0" izz="0.04198990325"/> </inertial> </link> <gazebo reference="base_chassis_link"> <material>Gazebo/FlatBlack</material> </gazebo> <!-- JOINT: body to body dummy --> <joint name="dummy_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link_dummy"/> <child link="base_chassis_link"/> <origin rpy="0 0 0" xyz="0 0 0"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: frame1 --> <link name="frame1"> <visual> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="0.16"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="frame1"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: frame1 to body --> <joint name="frame1_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame1"/> <origin rpy="0 0 0" xyz=".2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: frame2 --> <link name="frame2"> <visual> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="-0.22 0 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="0.16"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="frame2"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: frame2 to body --> <joint name="frame2_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame2"/> <origin rpy="0 0 0" xyz=".2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: frame3 --> <link name="frame3"> <visual> <origin rpy="0 0 0" xyz="0.22 0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0.22 0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="0.16"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="frame3"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: frame3 to body --> <joint name="frame3_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame3"/> <origin rpy="0 0 0" xyz="-.2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: frame4 --> <link name="frame4"> <visual> <origin rpy="0 0 0" xyz="0.22 -0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0.22 -0.055 0"/> <geometry> <box size="0.468 .012 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="0.16"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="frame4"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: frame4 to body --> <joint name="frame4" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="frame4"/> <origin rpy="0 0 0" xyz="-.2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- Inside motor module boxes --> <!-- LINK: chassis_right --> <link name="chassis_right"> <visual> <origin rpy="0 0 0" xyz=".2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </visual> <visual> <origin rpy="0 0 0" xyz="-.2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz=".2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="-.2375 .049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <mass value="0.2"/> <inertia ixx=".004147" ixy=".0" ixz=".0" iyy=".040913" iyz=".0" izz=".041840"/> </inertial> </link> <gazebo reference="chassis_right"> <material>Gazebo/Black</material> </gazebo> <!-- JOINT: chassis_right_center to body --> <joint name="chassis_right_center" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="chassis_right"/> <origin rpy="0 0 0" xyz="0 -.1265 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: chassis_left --> <link name="chassis_left"> <visual> <origin rpy="0 0 0" xyz=".2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </visual> <visual> <origin rpy="0 0 0" xyz="-.2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz=".2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <collision> <origin rpy="0 0 0" xyz="-.2375 -.049 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <mass value="0.2"/> <inertia ixx=".004147" ixy=".0" ixz=".0" iyy=".040913" iyz=".0" izz=".041840"/> </inertial> </link> <gazebo reference="chassis_left"> <material>Gazebo/Black</material> </gazebo> <!-- JOINT: chassis_left_center to body --> <joint name="chassis_left_center" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="chassis_left"/> <origin rpy="0 0 0" xyz="0 .1265 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- Outside motor module boxes --> <!-- LINK: motor_front_rightR_bracket_link --> <link name="motor_front_rightR_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="0.1"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="motor_front_rightR_bracket_link"> <material>Gazebo/Black</material> </gazebo> <!-- JOINT: motor_front_rightR_bracket_link to body --> <joint name="motor_front_rightR_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_front_rightR_bracket_link"/> <origin rpy="0 0 0" xyz=".2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: motor_front_leftL_bracket_link --> <link name="motor_front_leftL_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="0.1"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="motor_front_leftL_bracket_link"> <material>Gazebo/Black</material> </gazebo> <!-- JOINT: motor_front_leftL_bracket_joint to body --> <joint name="motor_front_leftL_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_front_leftL_bracket_link"/> <origin rpy="0 0 0" xyz=".2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: motor_back_rightR_bracket_link --> <link name="motor_back_rightR_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 -0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 -0.03 0"/> <mass value="0.1"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="motor_back_rightR_bracket_link"> <material>Gazebo/Black</material> </gazebo> <!-- JOINT: motor_back_rightR_bracket_joint to body --> <joint name="motor_back_rightR_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_back_rightR_bracket_link"/> <origin rpy="0 0 0" xyz="-.2375 -0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- LINK: motor_back_leftL_bracket_link --> <link name="motor_back_leftL_bracket_link"> <visual> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size="0.068 .032 .050"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0.02 0"/> <geometry> <box size=".068 .032 .050"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0.02 0"/> <mass value="0.1"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <gazebo reference="motor_back_leftL_bracket_link"> <material>Gazebo/Black</material> </gazebo> <!-- JOINT: motor_back_leftL_bracket_joint to body --> <joint name="motor_back_leftL_bracket_joint" type="fixed"> <axis xyz="0 0 1"/> <parent link="base_chassis_link"/> <child link="motor_back_leftL_bracket_link"/> <origin rpy="0 0 0" xyz="-.2375 0.154 -.0185"/> <limit effort="100" velocity="100"/> <joint_properties damping=".0" friction=".0"/> </joint> <!-- Define our motor macro --> <!-- Motors --> <!-- LINK: motor_${location}_${side}${LR}_link --> <link name="motor_front_rightR_link"> <visual> <geometry> <mesh filename="model://minitaur_constrained/../../meshes/tmotor3.dae" scale="100 100 100"/> </geometry> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <!-- JOINT: motor_${location}_${side}${LR}_link to ${chassis} --> <joint name="5" type="continuous"> <axis xyz="0 0 1"/> <parent link="motor_front_rightR_bracket_link"/> <child link="motor_front_rightR_link"/> <origin rpy="1.57075 -1.57075 0" xyz="0 0 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Transmission elements required for Gazebo --> <transmission name="transmission_5"> <type>transmission_interface/SimpleTransmission</type> <joint name="5"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="motor_5"> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <!-- LINK: motor_${location}_${side}${LR}_link --> <link name="motor_front_rightL_link"> <visual> <geometry> <mesh filename="model://minitaur_constrained/../../meshes/tmotor3.dae" scale="100 100 100"/> </geometry> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <!-- JOINT: motor_${location}_${side}${LR}_link to ${chassis} --> <joint name="4" type="continuous"> <axis xyz="0 0 -1"/> <parent link="chassis_right"/> <child link="motor_front_rightL_link"/> <origin rpy="1.57075 1.57075 0" xyz=".2375 .0275 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Transmission elements required for Gazebo --> <transmission name="transmission_4"> <type>transmission_interface/SimpleTransmission</type> <joint name="4"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="motor_4"> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <!-- LINK: motor_${location}_${side}${LR}_link --> <link name="motor_front_leftL_link"> <visual> <geometry> <mesh filename="model://minitaur_constrained/../../meshes/tmotor3.dae" scale="100 100 100"/> </geometry> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <!-- JOINT: motor_${location}_${side}${LR}_link to ${chassis} --> <joint name="0" type="continuous"> <axis xyz="0 0 -1"/> <parent link="motor_front_leftL_bracket_link"/> <child link="motor_front_leftL_link"/> <origin rpy="1.57075 -1.57075 0" xyz="0 0 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Transmission elements required for Gazebo --> <transmission name="transmission_0"> <type>transmission_interface/SimpleTransmission</type> <joint name="0"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="motor_0"> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <!-- LINK: motor_${location}_${side}${LR}_link --> <link name="motor_front_leftR_link"> <visual> <geometry> <mesh filename="model://minitaur_constrained/../../meshes/tmotor3.dae" scale="100 100 100"/> </geometry> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <!-- JOINT: motor_${location}_${side}${LR}_link to ${chassis} --> <joint name="1" type="continuous"> <axis xyz="0 0 1"/> <parent link="chassis_left"/> <child link="motor_front_leftR_link"/> <origin rpy="1.57075 1.57075 0" xyz=".2375 -.0275 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Transmission elements required for Gazebo --> <transmission name="transmission_1"> <type>transmission_interface/SimpleTransmission</type> <joint name="1"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="motor_1"> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <!-- LINK: motor_${location}_${side}${LR}_link --> <link name="motor_back_rightR_link"> <visual> <geometry> <mesh filename="model://minitaur_constrained/../../meshes/tmotor3.dae" scale="100 100 100"/> </geometry> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <!-- JOINT: motor_${location}_${side}${LR}_link to ${chassis} --> <joint name="7" type="continuous"> <axis xyz="0 0 1"/> <parent link="motor_back_rightR_bracket_link"/> <child link="motor_back_rightR_link"/> <origin rpy="1.57075 -1.57075 0" xyz="0 0 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Transmission elements required for Gazebo --> <transmission name="transmission_7"> <type>transmission_interface/SimpleTransmission</type> <joint name="7"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="motor_7"> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <!-- LINK: motor_${location}_${side}${LR}_link --> <link name="motor_back_rightL_link"> <visual> <geometry> <mesh filename="model://minitaur_constrained/../../meshes/tmotor3.dae" scale="100 100 100"/> </geometry> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <!-- JOINT: motor_${location}_${side}${LR}_link to ${chassis} --> <joint name="6" type="continuous"> <axis xyz="0 0 -1"/> <parent link="chassis_right"/> <child link="motor_back_rightL_link"/> <origin rpy="1.57075 1.57075 0" xyz="-.2375 .0275 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Transmission elements required for Gazebo --> <transmission name="transmission_6"> <type>transmission_interface/SimpleTransmission</type> <joint name="6"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="motor_6"> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <!-- LINK: motor_${location}_${side}${LR}_link --> <link name="motor_back_leftL_link"> <visual> <geometry> <mesh filename="model://minitaur_constrained/../../meshes/tmotor3.dae" scale="100 100 100"/> </geometry> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <!-- JOINT: motor_${location}_${side}${LR}_link to ${chassis} --> <joint name="2" type="continuous"> <axis xyz="0 0 -1"/> <parent link="motor_back_leftL_bracket_link"/> <child link="motor_back_leftL_link"/> <origin rpy="1.57075 -1.57075 0" xyz="0 0 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Transmission elements required for Gazebo --> <transmission name="transmission_2"> <type>transmission_interface/SimpleTransmission</type> <joint name="2"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="motor_2"> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <!-- LINK: motor_${location}_${side}${LR}_link --> <link name="motor_back_leftR_link"> <visual> <geometry> <mesh filename="model://minitaur_constrained/../../meshes/tmotor3.dae" scale="100 100 100"/> </geometry> </visual> <collision> <geometry> <cylinder length="0.021" radius="0.0425"/> </geometry> </collision> <inertial> <mass value="0.25"/> <inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/> </inertial> </link> <!-- JOINT: motor_${location}_${side}${LR}_link to ${chassis} --> <joint name="3" type="continuous"> <axis xyz="0 0 1"/> <parent link="chassis_left"/> <child link="motor_back_leftR_link"/> <origin rpy="1.57075 1.57075 0" xyz="-.2375 -.0275 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Transmission elements required for Gazebo --> <transmission name="transmission_3"> <type>transmission_interface/SimpleTransmission</type> <joint name="3"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="motor_3"> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <!-- Define our upper leg macro --> <!-- Define our lower leg macro --> <!-- Legs --> <!-- LINK: upper_leg_${location}_link --> <link name="upper_leg_front_rightR_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <gazebo reference="upper_leg_front_rightR_link"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: ${hip}_${location}_link to motor_${location}_link --> <joint name="hip_front_rightR_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_front_rightR_link"/> <child link="upper_leg_front_rightR_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- LINK: upper_leg_${location}_link --> <link name="upper_leg_front_rightL_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <gazebo reference="upper_leg_front_rightL_link"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: ${hip}_${location}_link to motor_${location}_link --> <joint name="motor_front_rightL_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_front_rightL_link"/> <child link="upper_leg_front_rightL_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 .0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- LINK: upper_leg_${location}_link --> <link name="upper_leg_front_leftR_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <gazebo reference="upper_leg_front_leftR_link"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: ${hip}_${location}_link to motor_${location}_link --> <joint name="hip_front_leftR_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_front_leftR_link"/> <child link="upper_leg_front_leftR_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- LINK: upper_leg_${location}_link --> <link name="upper_leg_front_leftL_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <gazebo reference="upper_leg_front_leftL_link"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: ${hip}_${location}_link to motor_${location}_link --> <joint name="motor_front_leftL_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_front_leftL_link"/> <child link="upper_leg_front_leftL_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 .0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- LINK: upper_leg_${location}_link --> <link name="upper_leg_back_rightR_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <gazebo reference="upper_leg_back_rightR_link"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: ${hip}_${location}_link to motor_${location}_link --> <joint name="hip_back_rightR_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_back_rightR_link"/> <child link="upper_leg_back_rightR_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- LINK: upper_leg_${location}_link --> <link name="upper_leg_back_rightL_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <gazebo reference="upper_leg_back_rightL_link"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: ${hip}_${location}_link to motor_${location}_link --> <joint name="motor_back_rightL_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_back_rightL_link"/> <child link="upper_leg_back_rightL_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 .0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- LINK: upper_leg_${location}_link --> <link name="upper_leg_back_leftR_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <gazebo reference="upper_leg_back_leftR_link"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: ${hip}_${location}_link to motor_${location}_link --> <joint name="hip_back_leftR_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_back_leftR_link"/> <child link="upper_leg_back_leftR_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- LINK: upper_leg_${location}_link --> <link name="upper_leg_back_leftL_link"> <visual> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </visual> <collision> <geometry> <box size="0.039 0.008 0.1"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/> </inertial> </link> <gazebo reference="upper_leg_back_leftL_link"> <material>Gazebo/Grey</material> </gazebo> <!-- JOINT: ${hip}_${location}_link to motor_${location}_link --> <joint name="motor_back_leftL_link" type="fixed"> <axis xyz="0 0 1"/> <parent link="motor_back_leftL_link"/> <child link="upper_leg_back_leftL_link"/> <origin rpy="-1.57075 0 0" xyz="0 .045 .0145"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Lower legs and flexy knee joints --> <!-- LINK: lower_leg_${location}_link --> <link name="lower_leg_front_leftL_link"> <visual> <origin rpy="0 0 0" xyz="0 0 0.11"/> <geometry> <box size="0.017 0.009 0.22"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.11"/> <geometry> <box size="0.017 0.009 0.22"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.11"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <gazebo reference="lower_leg_front_leftL_link"> <material>Gazebo/Grey</material> <collision> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> </friction> <contact> <ode> <kp>3000.0</kp> <kd>100.0</kd> </ode> <bullet> <kp>3000.0</kp> <kd>100.0</kd> </bullet> </contact> </surface> </collision> </gazebo> <!-- JOINT: lower_leg_${location}_link to upper_leg_${location}_link --> <joint name="8" type="continuous"> <axis xyz="0 -1 0"/> <parent link="upper_leg_front_leftL_link"/> <child link="lower_leg_front_leftL_link"/> <origin rpy="0 4.189 0" xyz="0 -0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Toe --> <!-- LINK: toe${toeSuffix} --> <link name="toe0"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> </collision> <inertial> <mass value="0.01"/> <inertia ixx="0.000025" ixy="0" ixz="0" iyy="0.000025" iyz="0" izz="0.000025"/> </inertial> </link> <gazebo reference="toe0"> <material>Gazebo/Black</material> <collision> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>1.0</coefficient> </torsional> <ode> <mu>1.0</mu> <mu2>1.0</mu2> </ode> <bullet> <rolling_friction>1.0</rolling_friction> <friction2>1.0</friction2> </bullet> </friction> <contact> <ode> <kp>300000.0</kp> <kd>1000.0</kd> </ode> <bullet> <kp>300000.0</kp> <kd>1000.0</kd> </bullet> </contact> </surface> </collision> </gazebo> <!-- JOINT: toe${toeSuffix} to lower_leg_${location}_link --> <joint name="toe0" type="fixed"> <parent link="lower_leg_front_leftL_link"/> <child link="toe0"/> <origin xyz="0 0 0.22"/> <dynamics damping="0.0" friction="0.0"/> </joint> <!-- LINK: lower_leg_${location}_link --> <link name="lower_leg_front_leftR_link"> <visual> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.1"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <gazebo reference="lower_leg_front_leftR_link"> <material>Gazebo/Grey</material> <collision> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> </friction> <contact> <ode> <kp>3000.0</kp> <kd>100.0</kd> </ode> <bullet> <kp>3000.0</kp> <kd>100.0</kd> </bullet> </contact> </surface> </collision> </gazebo> <!-- JOINT: lower_leg_${location}_link to upper_leg_${location}_link --> <joint name="9" type="continuous"> <axis xyz="0 1 0"/> <parent link="upper_leg_front_leftR_link"/> <child link="lower_leg_front_leftR_link"/> <origin rpy="0 -4.189 0" xyz="0 0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- LINK: lower_leg_${location}_link --> <link name="lower_leg_back_leftL_link"> <visual> <origin rpy="0 0 0" xyz="0 0 0.11"/> <geometry> <box size="0.017 0.009 0.22"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.11"/> <geometry> <box size="0.017 0.009 0.22"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.11"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <gazebo reference="lower_leg_back_leftL_link"> <material>Gazebo/Grey</material> <collision> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> </friction> <contact> <ode> <kp>3000.0</kp> <kd>100.0</kd> </ode> <bullet> <kp>3000.0</kp> <kd>100.0</kd> </bullet> </contact> </surface> </collision> </gazebo> <!-- JOINT: lower_leg_${location}_link to upper_leg_${location}_link --> <joint name="10" type="continuous"> <axis xyz="0 -1 0"/> <parent link="upper_leg_back_leftL_link"/> <child link="lower_leg_back_leftL_link"/> <origin rpy="0 4.189 0" xyz="0 -0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Toe --> <!-- LINK: toe${toeSuffix} --> <link name="toe2"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> </collision> <inertial> <mass value="0.01"/> <inertia ixx="0.000025" ixy="0" ixz="0" iyy="0.000025" iyz="0" izz="0.000025"/> </inertial> </link> <gazebo reference="toe2"> <material>Gazebo/Black</material> <collision> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>1.0</coefficient> </torsional> <ode> <mu>1.0</mu> <mu2>1.0</mu2> </ode> <bullet> <rolling_friction>1.0</rolling_friction> <friction2>1.0</friction2> </bullet> </friction> <contact> <ode> <kp>300000.0</kp> <kd>1000.0</kd> </ode> <bullet> <kp>300000.0</kp> <kd>1000.0</kd> </bullet> </contact> </surface> </collision> </gazebo> <!-- JOINT: toe${toeSuffix} to lower_leg_${location}_link --> <joint name="toe2" type="fixed"> <parent link="lower_leg_back_leftL_link"/> <child link="toe2"/> <origin xyz="0 0 0.22"/> <dynamics damping="0.0" friction="0.0"/> </joint> <!-- LINK: lower_leg_${location}_link --> <link name="lower_leg_back_leftR_link"> <visual> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.1"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <gazebo reference="lower_leg_back_leftR_link"> <material>Gazebo/Grey</material> <collision> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> </friction> <contact> <ode> <kp>3000.0</kp> <kd>100.0</kd> </ode> <bullet> <kp>3000.0</kp> <kd>100.0</kd> </bullet> </contact> </surface> </collision> </gazebo> <!-- JOINT: lower_leg_${location}_link to upper_leg_${location}_link --> <joint name="11" type="continuous"> <axis xyz="0 1 0"/> <parent link="upper_leg_back_leftR_link"/> <child link="lower_leg_back_leftR_link"/> <origin rpy="0 -4.189 0" xyz="0 0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- LINK: lower_leg_${location}_link --> <link name="lower_leg_front_rightL_link"> <visual> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.1"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <gazebo reference="lower_leg_front_rightL_link"> <material>Gazebo/Grey</material> <collision> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> </friction> <contact> <ode> <kp>3000.0</kp> <kd>100.0</kd> </ode> <bullet> <kp>3000.0</kp> <kd>100.0</kd> </bullet> </contact> </surface> </collision> </gazebo> <!-- JOINT: lower_leg_${location}_link to upper_leg_${location}_link --> <joint name="12" type="continuous"> <axis xyz="0 -1 0"/> <parent link="upper_leg_front_rightL_link"/> <child link="lower_leg_front_rightL_link"/> <origin rpy="0 -4.189 0" xyz="0 -0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- LINK: lower_leg_${location}_link --> <link name="lower_leg_front_rightR_link"> <visual> <origin rpy="0 0 0" xyz="0 0 0.11"/> <geometry> <box size="0.017 0.009 0.22"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.11"/> <geometry> <box size="0.017 0.009 0.22"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.11"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <gazebo reference="lower_leg_front_rightR_link"> <material>Gazebo/Grey</material> <collision> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> </friction> <contact> <ode> <kp>3000.0</kp> <kd>100.0</kd> </ode> <bullet> <kp>3000.0</kp> <kd>100.0</kd> </bullet> </contact> </surface> </collision> </gazebo> <!-- JOINT: lower_leg_${location}_link to upper_leg_${location}_link --> <joint name="13" type="continuous"> <axis xyz="0 1 0"/> <parent link="upper_leg_front_rightR_link"/> <child link="lower_leg_front_rightR_link"/> <origin rpy="0 4.189 0" xyz="0 0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Toe --> <!-- LINK: toe${toeSuffix} --> <link name="toe5"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> </collision> <inertial> <mass value="0.01"/> <inertia ixx="0.000025" ixy="0" ixz="0" iyy="0.000025" iyz="0" izz="0.000025"/> </inertial> </link> <gazebo reference="toe5"> <material>Gazebo/Black</material> <collision> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>1.0</coefficient> </torsional> <ode> <mu>1.0</mu> <mu2>1.0</mu2> </ode> <bullet> <rolling_friction>1.0</rolling_friction> <friction2>1.0</friction2> </bullet> </friction> <contact> <ode> <kp>300000.0</kp> <kd>1000.0</kd> </ode> <bullet> <kp>300000.0</kp> <kd>1000.0</kd> </bullet> </contact> </surface> </collision> </gazebo> <!-- JOINT: toe${toeSuffix} to lower_leg_${location}_link --> <joint name="toe5" type="fixed"> <parent link="lower_leg_front_rightR_link"/> <child link="toe5"/> <origin xyz="0 0 0.22"/> <dynamics damping="0.0" friction="0.0"/> </joint> <!-- LINK: lower_leg_${location}_link --> <link name="lower_leg_back_rightL_link"> <visual> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.1"/> <geometry> <box size="0.017 0.009 0.2"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.1"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <gazebo reference="lower_leg_back_rightL_link"> <material>Gazebo/Grey</material> <collision> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> </friction> <contact> <ode> <kp>3000.0</kp> <kd>100.0</kd> </ode> <bullet> <kp>3000.0</kp> <kd>100.0</kd> </bullet> </contact> </surface> </collision> </gazebo> <!-- JOINT: lower_leg_${location}_link to upper_leg_${location}_link --> <joint name="14" type="continuous"> <axis xyz="0 -1 0"/> <parent link="upper_leg_back_rightL_link"/> <child link="lower_leg_back_rightL_link"/> <origin rpy="0 -4.189 0" xyz="0 -0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- LINK: lower_leg_${location}_link --> <link name="lower_leg_back_rightR_link"> <visual> <origin rpy="0 0 0" xyz="0 0 0.11"/> <geometry> <box size="0.017 0.009 0.22"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0.11"/> <geometry> <box size="0.017 0.009 0.22"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0 0 0.11"/> <mass value="0.05"/> <inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/> </inertial> </link> <gazebo reference="lower_leg_back_rightR_link"> <material>Gazebo/Grey</material> <collision> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>0.05</coefficient> </torsional> <bullet> <rolling_friction>0.05</rolling_friction> </bullet> </friction> <contact> <ode> <kp>3000.0</kp> <kd>100.0</kd> </ode> <bullet> <kp>3000.0</kp> <kd>100.0</kd> </bullet> </contact> </surface> </collision> </gazebo> <!-- JOINT: lower_leg_${location}_link to upper_leg_${location}_link --> <joint name="15" type="continuous"> <axis xyz="0 1 0"/> <parent link="upper_leg_back_rightR_link"/> <child link="lower_leg_back_rightR_link"/> <origin rpy="0 4.189 0" xyz="0 0.0085 0.05"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint> <!-- Toe --> <!-- LINK: toe${toeSuffix} --> <link name="toe7"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.015"/> </geometry> </collision> <inertial> <mass value="0.01"/> <inertia ixx="0.000025" ixy="0" ixz="0" iyy="0.000025" iyz="0" izz="0.000025"/> </inertial> </link> <gazebo reference="toe7"> <material>Gazebo/Black</material> <collision> <surface> <bounce> <restitution_coefficient>0</restitution_coefficient> <threshold>1e+06</threshold> </bounce> <friction> <torsional> <coefficient>1.0</coefficient> </torsional> <ode> <mu>1.0</mu> <mu2>1.0</mu2> </ode> <bullet> <rolling_friction>1.0</rolling_friction> <friction2>1.0</friction2> </bullet> </friction> <contact> <ode> <kp>300000.0</kp> <kd>1000.0</kd> </ode> <bullet> <kp>300000.0</kp> <kd>1000.0</kd> </bullet> </contact> </surface> </collision> </gazebo> <!-- JOINT: toe${toeSuffix} to lower_leg_${location}_link --> <joint name="toe7" type="fixed"> <parent link="lower_leg_back_rightR_link"/> <child link="toe7"/> <origin xyz="0 0 0.22"/> <dynamics damping="0.0" friction="0.0"/> </joint> <!-- Add ros_control plugin --> <gazebo> <plugin filename="libgazebo_ros_control.so" name="gazebo_ros_control"> <robotNamespace>/minitaur</robotNamespace> </plugin> </gazebo> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/README.md
# Spot ROS Driver ![CP Spot](cp_spot.jpg) ## Prerequisites You should be using ROS noetic. ROS melodic can also be used but may require modifications to build correctly. You must install the Boston Dynamics SDK on any machine that will run the driver. ``` pip3 install bosdyn-client bosdyn-mission bosdyn-api bosdyn-core ``` ## Quick start ### Installing the packages Go to the source directory of your ROS workspace and clone this repository with ```bash git clone [email protected]:heuristicus/spot_ros.git ``` Then, initialise the submodule for the wrapper we use to interact with the Boston Dynamics SDK ```bash cd spot_ros git submodule init git submodule update ``` Then, install the python package containing the wrapper ```bash pip3 install -e spot_wrapper ``` Build the ROS packages ```bash catkin build spot_driver spot_viz ``` Finally, remember to source your workspace. ### Connecting to the robot To test functionality, it's easiest to connect to the robot via wifi. For actual operation it is recommended to connect to the robot directly through payload ports for higher bandwidth. Connect to the robot's wifi network, usually found at SSID `spot-BD-xxxxxxxx`. The password for the network is found in the robot's battery compartment. Once connected, verify that you can ping the robot with `ping 192.168.80.3`. Start a roscore on your machine with `roscore`. Run the driver with the username and password for the robot, again found in the battery compartment ```bash roslaunch spot_driver driver.launch username:=user password:=[your-password] hostname:=192.168.80.3 ``` You can then view and control the robot from the rviz interface by running ```bash roslaunch spot_viz view_robot.launch ``` ## Documentation More detailed documentation can be found [here](https://heuristicus.github.io/spot_ros) # MoveIt simulation of Spot's arm Can be found [here](https://github.com/estherRay/Spot-Arm).
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_description/CHANGELOG.rst
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Changelog for package spot_description ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Forthcoming ----------- 1.0.0 (2023-04-07) ------------------ * update maintainer * adressed layout review comments * moved urdf * updated urdf to include arm * add correct joint for front rail, should be directly between first screws. Rear rail is based on that * remove inorder flag * Use the velodyne_description package for the actual sensor mesh, use the cage as a separate entity. Add an accessories.launch file to automatically bring up the velodyne if needed * Include the license file in the individual ROS packages * Added optional pack and standard velodyne mount * fix joint limits typo * add install instructions * Added base_link (rep-0105) * Updated URDF to include mount points, and deps for install * Made the driver not automatically claim a body lease and e stop. Allows you to monitor without having control. Disconnect doesn't exit very gracefully. Need to wait on sitting success * Added SPOT_URDF_EXTRAS environment variable for extending the robot * Initial commit * Contributors: Chris Iverach-Brereton, Dave Niewinski, Juan Miguel Jimeno, Mario Gini, Michal Staniaszek, Wolf Vollprecht, maubrunn
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_description/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3) project(spot_description) find_package(catkin REQUIRED COMPONENTS) catkin_package() include_directories( ${catkin_INCLUDE_DIRS} ) install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) install(DIRECTORY urdf DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) install(DIRECTORY meshes DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_description/package.xml
<?xml version="1.0"?> <package format="2"> <name>spot_description</name> <version>1.0.0</version> <description>The spot_description package</description> <maintainer email="[email protected]">Michal Staniaszek</maintainer> <license>BSD</license> <buildtool_depend>catkin</buildtool_depend> <exec_depend>robot_state_publisher</exec_depend> <exec_depend>urdf</exec_depend> <exec_depend>velodyne_description</exec_depend> <exec_depend>xacro</exec_depend> <export> </export> </package>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_description/launch/description.launch
<launch> <param name="robot_description" command="$(find xacro)/xacro $(find spot_description)/urdf/spot.urdf.xacro" /> <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" /> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_description/urdf/spot.urdf.xacro
<?xml version="1.0" ?> <robot name="spot" xmlns:xacro="http://www.ros.org/wiki/xacro"> <link name="body"> <visual> <geometry> <mesh filename="package://spot_description/meshes/body.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/body_collision.stl" /> </geometry> </collision> </link> <link name="base_link"/> <joint name="base_link_joint" type="fixed"> <origin xyz="0 0 0" rpy="0 0 0" /> <parent link="body" /> <child link="base_link" /> </joint> <link name="front_rail"/> <joint name="front_rail_joint" type="fixed"> <origin xyz="0.223 0 0.0805" rpy="0 0 0" /> <parent link="body" /> <child link="front_rail" /> </joint> <link name="real_front_rail"/> <joint name="real_front_rail_joint" type="fixed"> <origin xyz="0.2075 0 0.0805" rpy="0 0 0" /> <parent link="body" /> <child link="real_front_rail" /> </joint> <link name="rear_rail"/> <joint name="rear_rail_joint" type="fixed"> <origin xyz="-0.223 0 0.0805" rpy="0 0 0" /> <parent link="body" /> <child link="rear_rail" /> </joint> <link name="real_rear_rail"/> <joint name="real_rear_rail_joint" type="fixed"> <origin xyz="-0.415 0 0" rpy="0 0 0" /> <parent link="real_front_rail" /> <child link="real_rear_rail" /> </joint> <link name="front_left_hip"> <visual> <geometry> <mesh filename="package://spot_description/meshes/front_left_hip.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/front_left_hip_collision.stl" /> </geometry> </collision> </link> <joint name="front_left_hip_x" type="revolute"> <origin xyz="0.29785 0.05500 0.00000" rpy="0 0 0" /> <axis xyz="1 0 0" /> <parent link="body" /> <child link="front_left_hip" /> <limit effort="1000" velocity="1000.00" lower="-0.78539816339744827899" upper="0.78539816339744827899" /> </joint> <link name="front_left_upper_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/front_left_upper_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/front_left_upper_leg_collision.stl" /> </geometry> </collision> </link> <joint name="front_left_hip_y" type="revolute"> <origin xyz="0.0 0.110945 0.0" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="front_left_hip" /> <child link="front_left_upper_leg" /> <limit effort="1000" velocity="1000.00" lower="-0.89884456477707963539" upper="2.2951079663725435509" /> </joint> <link name="front_left_lower_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/front_left_lower_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/front_left_lower_leg_collision.stl" /> </geometry> </collision> </link> <joint name="front_left_knee" type="revolute"> <origin xyz="0.025 0.000 -0.3205" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="front_left_upper_leg" /> <child link="front_left_lower_leg" /> <limit effort="1000" velocity="1000.00" lower="-2.7929" upper="-0.254801" /> </joint> <link name="front_right_hip"> <visual> <geometry> <mesh filename="package://spot_description/meshes/front_right_hip.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/front_right_hip_collision.stl" /> </geometry> </collision> </link> <joint name="front_right_hip_x" type="revolute"> <origin xyz="0.29785 -0.05500 0.00000" rpy="0 0 0" /> <axis xyz="1 0 0" /> <parent link="body" /> <child link="front_right_hip" /> <limit effort="1000" velocity="1000.00" lower="-0.78539816339744827899" upper="0.78539816339744827899" /> </joint> <link name="front_right_upper_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/front_right_upper_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/front_right_upper_leg_collision.stl" /> </geometry> </collision> </link> <joint name="front_right_hip_y" type="revolute"> <origin xyz="0.0 -0.110945 0.0" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="front_right_hip" /> <child link="front_right_upper_leg" /> <limit effort="1000" velocity="1000.00" lower="-0.89884456477707963539" upper="2.2951079663725435509" /> </joint> <link name="front_right_lower_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/front_right_lower_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/front_right_lower_leg_collision.stl" /> </geometry> </collision> </link> <joint name="front_right_knee" type="revolute"> <origin xyz="0.025 0.000 -0.3205" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="front_right_upper_leg" /> <child link="front_right_lower_leg" /> <limit effort="1000" velocity="1000.00" lower="-2.7929" upper="-0.247563" /> </joint> <link name="rear_left_hip"> <visual> <geometry> <mesh filename="package://spot_description/meshes/rear_left_hip.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/rear_left_hip_collision.stl" /> </geometry> </collision> </link> <joint name="rear_left_hip_x" type="revolute"> <origin xyz="-0.29785 0.05500 0.00000" rpy="0 0 0" /> <axis xyz="1 0 0" /> <parent link="body" /> <child link="rear_left_hip" /> <limit effort="1000" velocity="1000.00" lower="-0.78539816339744827899" upper="0.78539816339744827899" /> </joint> <link name="rear_left_upper_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/rear_left_upper_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/rear_left_upper_leg_collision.stl" /> </geometry> </collision> </link> <joint name="rear_left_hip_y" type="revolute"> <origin xyz="0.0 0.110945 0.0" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="rear_left_hip" /> <child link="rear_left_upper_leg" /> <limit effort="1000" velocity="1000.00" lower="-0.89884456477707963539" upper="2.2951079663725435509" /> </joint> <link name="rear_left_lower_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/rear_left_lower_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/rear_left_lower_leg_collision.stl" /> </geometry> </collision> </link> <joint name="rear_left_knee" type="revolute"> <origin xyz="0.025 0.000 -0.3205" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="rear_left_upper_leg" /> <child link="rear_left_lower_leg" /> <limit effort="1000" velocity="1000.00" lower="-2.7929" upper="-0.267153" /> </joint> <link name="rear_right_hip"> <visual> <geometry> <mesh filename="package://spot_description/meshes/rear_right_hip.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/rear_right_hip_collision.stl" /> </geometry> </collision> </link> <joint name="rear_right_hip_x" type="revolute"> <origin xyz="-0.29785 -0.05500 0.00000" rpy="0 0 0" /> <axis xyz="1 0 0" /> <parent link="body" /> <child link="rear_right_hip" /> <limit effort="1000" velocity="1000.00" lower="-0.78539816339744827899" upper="0.78539816339744827899" /> </joint> <link name="rear_right_upper_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/rear_right_upper_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/rear_right_upper_leg_collision.stl" /> </geometry> </collision> </link> <joint name="rear_right_hip_y" type="revolute"> <origin xyz="0.0 -0.110945 0.0" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="rear_right_hip" /> <child link="rear_right_upper_leg" /> <limit effort="1000" velocity="1000.00" lower="-0.89884456477707963539" upper="2.2951079663725435509" /> </joint> <link name="rear_right_lower_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/rear_right_lower_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/rear_right_lower_leg_collision.stl" /> </geometry> </collision> </link> <joint name="rear_right_knee" type="revolute"> <origin xyz="0.025 0.000 -0.3205" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="rear_right_upper_leg" /> <child link="rear_right_lower_leg" /> <limit effort="1000" velocity="1000.00" lower="-2.7929" upper="-0.257725" /> </joint> <!-- Standard accessories. --> <xacro:include filename="$(find spot_description)/urdf/accessories.urdf.xacro" /> <!-- Optional custom includes. --> <xacro:include filename="$(optenv SPOT_URDF_EXTRAS empty.urdf)" /> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_description/urdf/spot_arm.xacro
<?xml version="1.0" ?> <robot name="spot_arm" xmlns:xacro="http://www.ros.org/wiki/xacro"> <material name="silver"> <color rgba="0.700 0.700 0.700 1.000"/> </material> <link name="base_arm_link"> <inertial> <origin rpy="0 0 0" xyz="1.2371844231029972e-17 0.0 0.0325"/> <mass value="5.770791545379091"/> <inertia ixx="0.007226" ixy="-0.0" ixz="0.0" iyy="0.007226" iyz="0.0" izz="0.010387"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://spot_description/meshes/arm/base_link.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="silver"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://spot_description/meshes/arm/base_link.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> </link> <link name="link4"> <inertial> <origin rpy="0 0 0" xyz="-0.00911464892336129 0.12606054498393937 5.551115123125783e-17"/> <mass value="10.95245995004642"/> <inertia ixx="0.066789" ixy="0.011971" ixz="-0.0" iyy="0.014993" iyz="0.0" izz="0.071949"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0.001 -0.4505 -0.0475"/> <geometry> <mesh filename="package://spot_description/meshes/arm/link4.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="silver"/> </visual> <collision> <origin rpy="0 0 0" xyz="0.001 -0.4505 -0.0475"/> <geometry> <mesh filename="package://spot_description/meshes/arm/link4.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> </link> <link name="gripper"> <inertial> <origin rpy="0 0 0" xyz="-8.366123908053191e-08 0.07051371901138614 0.017123167388316526"/> <mass value="5.9780007036604434"/> <inertia ixx="0.01723" ixy="0.0" ixz="0.0" iyy="0.00734" iyz="-0.003871" izz="0.0153"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0.0085 -0.77959 -0.0475"/> <geometry> <mesh filename="package://spot_description/meshes/arm/gripper.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="silver"/> </visual> <collision> <origin rpy="0 0 0" xyz="0.0085 -0.77959 -0.0475"/> <geometry> <mesh filename="package://spot_description/meshes/arm/gripper.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> </link> <link name="finger"> <inertial> <origin rpy="0 0 0" xyz="0.8635899028063472 0.09862056591557622 0.00850232975194119"/> <mass value="1.71236178687828"/> <inertia ixx="0.002129" ixy="0.0" ixz="-0.0" iyy="0.001681" iyz="0.000162" izz="0.003403"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0.87709 -0.823505 -0.0185"/> <geometry> <mesh filename="package://spot_description/meshes/arm/finger.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="silver"/> </visual> <collision> <origin rpy="0 0 0" xyz="0.87709 -0.823505 -0.0185"/> <geometry> <mesh filename="package://spot_description/meshes/arm/finger.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> </link> <link name="link2"> <inertial> <origin rpy="0 0 0" xyz="-0.0163095589512068 0.17540914221218962 0.0"/> <mass value="12.658281999999998"/> <inertia ixx="0.12979" ixy="0.002625" ixz="0.0" iyy="0.01004" iyz="0.0" izz="0.129493"/> </inertial> <visual> <origin rpy="0 0 0" xyz="-0.015 -0.0 -0.115"/> <geometry> <mesh filename="package://spot_description/meshes/arm/link2.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="silver"/> </visual> <collision> <origin rpy="0 0 0" xyz="-0.015 -0.0 -0.115"/> <geometry> <mesh filename="package://spot_description/meshes/arm/link2.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> </link> <link name="link1"> <inertial> <origin rpy="0 0 0" xyz="0.05071972800114364 -1.0308563411658574e-17 0.04676911608650795"/> <mass value="6.925827706354272"/> <inertia ixx="0.01241" ixy="-0.0" ixz="-0.001047" iyy="0.010387" iyz="0.0" izz="0.012306"/> </inertial> <visual> <origin rpy="0 0 0" xyz="-0.0 -0.0 -0.065"/> <geometry> <mesh filename="package://spot_description/meshes/arm/link1.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="silver"/> </visual> <collision> <origin rpy="0 0 0" xyz="-0.0 -0.0 -0.065"/> <geometry> <mesh filename="package://spot_description/meshes/arm/link1.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> </link> <link name="wrist"> <inertial> <origin rpy="0 0 0" xyz="0.03954999709763633 0.03472006124891969 4.209155544249166e-08"/> <mass value="3.2278801394086396"/> <inertia ixx="0.00339" ixy="-2.1e-05" ixz="0.0" iyy="0.002242" iyz="-0.0" izz="0.003439"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0.0485 -0.69859 -0.0475"/> <geometry> <mesh filename="package://spot_description/meshes/arm/wrist.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="silver"/> </visual> <collision> <origin rpy="0 0 0" xyz="0.0485 -0.69859 -0.0475"/> <geometry> <mesh filename="package://spot_description/meshes/arm/wrist.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> </link> <link name="link3"> <inertial> <origin rpy="0 0 0" xyz="-0.015621881612358529 0.06665620790957599 -0.058074231003688394"/> <mass value="7.368455487741179"/> <inertia ixx="0.018073" ixy="0.000915" ixz="-0.00101" iyy="0.011789" iyz="0.003728" izz="0.01667"/> </inertial> <visual> <origin rpy="0 0 0" xyz="-0.017 -0.3125 -0.115"/> <geometry> <mesh filename="package://spot_description/meshes/arm/link3.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="silver"/> </visual> <collision> <origin rpy="0 0 0" xyz="-0.017 -0.3125 -0.115"/> <geometry> <mesh filename="package://spot_description/meshes/arm/link3.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> </link> <joint name="base_arm_joint" type="fixed"> <origin xyz="0.29 0 0.08" rpy="0 0 0" /> <parent link="body" /> <child link="base_arm_link" /> </joint> <joint name="arm_joint1" type="revolute"> <origin rpy="0 0 0" xyz="0.0 0.0 0.065"/> <parent link="base_arm_link"/> <child link="link1"/> <axis xyz="0.0 0.0 1.0"/> <limit effort="100" lower="-3.141593" upper="2.617994" velocity="100"/> </joint> <joint name="arm_joint2" type="revolute"> <origin rpy="0 0 0" xyz="0.015 0.0 0.05"/> <parent link="link1"/> <child link="link2"/> <axis xyz="-1.0 0.0 0.0"/> <limit effort="100" lower="-3.665191" upper="0.0" velocity="100"/> </joint> <joint name="arm_joint3" type="revolute"> <origin rpy="0 0 0" xyz="0.002 0.3125 0.0"/> <parent link="link2"/> <child link="link3"/> <axis xyz="1.0 0.0 0.0"/> <limit effort="100" lower="0.0" upper="2.96706" velocity="100"/> </joint> <joint name="arm_joint4" type="revolute"> <origin rpy="0 0 0" xyz="-0.018 0.138 -0.0675"/> <parent link="link3"/> <child link="link4"/> <axis xyz="0.0 1.0 0.0"/> <limit effort="100" lower="-2.879793" upper="2.879793" velocity="100"/> </joint> <joint name="arm_joint5" type="revolute"> <origin rpy="0 0 0" xyz="-0.0475 0.24809 0.0"/> <parent link="link4"/> <child link="wrist"/> <axis xyz="1.0 0.0 0.0"/> <limit effort="100" lower="-1.570796" upper="1.570796" velocity="100"/> </joint> <joint name="arm_joint6" type="revolute"> <origin rpy="0 0 0" xyz="0.04 0.081 0.0"/> <parent link="wrist"/> <child link="gripper"/> <axis xyz="-0.0 1.0 0.0"/> <limit effort="100" lower="-2.96706" upper="2.96706" velocity="100"/> </joint> <joint name="arm_gripper" type="revolute"> <origin rpy="0 0 0" xyz="-0.86859 0.043915 -0.029"/> <parent link="gripper"/> <child link="finger"/> <axis xyz="1.0 -0.0 0.0"/> <limit effort="100" lower="-1.396263" upper="0.349066" velocity="100"/> </joint> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_description/urdf/empty.urdf
<robot> <!-- This file is a placeholder which is included by default from spot.urdf.xacro. If a robot is being customized and requires additional URDF, set the SPOT_URDF_EXTRAS environment variable to the full path of the file you would like included. --> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_description/urdf/accessories.urdf.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:if value="$(optenv SPOT_PACK 0)"> <joint name="pack_mount_joint" type="fixed"> <parent link="base_link"/> <child link="pack_mount"/> <origin xyz="-0.019986 0 0.093662" rpy="0 0 0"/> </joint> <link name="pack_mount"> <visual> <geometry> <mesh filename="package://spot_description/meshes/pack_top.dae"/> </geometry> </visual> <visual> <geometry> <mesh filename="package://spot_description/meshes/pack_body.dae"/> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/pack_body.dae"/> </geometry> </collision> </link> </xacro:if> <xacro:if value="$(optenv SPOT_LIDAR_MOUNT 0)"> <joint name="lidar_mount_joint" type="fixed"> <parent link="pack_mount"/> <child link="lidar_mount"/> <origin xyz="0.015 0 0.149285" rpy="0 0 0"/> </joint> <link name="lidar_mount"> <visual> <geometry> <mesh filename="package://spot_description/meshes/lidar_mount.dae"/> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/lidar_mount_collision.stl"/> </geometry> </collision> </link> <xacro:if value="$(optenv SPOT_VELODYNE 0)"> <!-- Use the Velodyne macro for the actual sensor --> <xacro:include filename="$(find velodyne_description)/urdf/VLP-16.urdf.xacro" /> <xacro:VLP-16 parent="lidar_mount"> <origin xyz="$(optenv SPOT_VELODYNE_XYZ 0 0 0)" rpy="$(optenv SPOT_VELODYNE_RPY 0 0 0)" /> </xacro:VLP-16> <!-- Add the protective cage --> <link name="velodyne_cage"> <visual> <geometry> <mesh filename="package://spot_description/meshes/velodyne_cage.stl" scale="0.001 0.001 0.001" /> </geometry> <origin xyz="0 0 0" rpy="0 0 0" /> <material name="black" /> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/velodyne_cage.stl" scale="0.001 0.001 0.001" /> </geometry> <origin xyz="0 0 0" rpy="0 0 0" /> </collision> </link> <joint name="velodyne_cage_joint" type="fixed"> <parent link="lidar_mount" /> <child link="velodyne_cage" /> <origin xyz="$(optenv SPOT_VELODYNE_XYZ 0 0 0)" rpy="$(optenv SPOT_VELODYNE_RPY 0 0 0)" /> </joint> </xacro:if> </xacro:if> <xacro:if value="$(optenv SPOT_ARM 0)"> <xacro:include filename="$(find spot_description)/urdf/spot_arm.xacro" /> </xacro:if> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_msgs/CHANGELOG.rst
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Changelog for package spot_msgs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Forthcoming ----------- 1.0.0 (2023-04-07) ------------------ * update maintainer * add actionserver for docking/undocking * updates after testing picking and placing on real spot - added some useful arguments to msg definitions * updates from testing on real robot * implemented grasp service * changed to fix sized arrays * changed hand pose msg * service for getting dock state * Create HandPose.srv * Update CMakeLists.txt * New msg for arm force trajectory * Update CMakeLists.txt * add posed_stand service which can be used to pose the body This also adds a check to the async_idle which prevents the idle stand command from activating while there is a command which has a non-None id. This should prevent commands from getting interrupted by that stand * add terrain state to foot state, publish tf of foot position rt body * Advanced motion tab, obstacle and terrain params added to driver and panel Move more advanced motion settings into the adv. motion tab to not clutter the basic motion. The settings there (ground friction, gait, swing height, grated surface mode) are I suspect relatively rarely used. Obstacle params message added, which allows the settings for the obstacle avoidance to be published from the driver. These are as usual empty by default since the SDK does not provide details. Currently the only modification allowed is to the obstacle padding. Terrain params message added, which allows setting of the ground friction and grated surfaces mode. Terrain and obstacle params are in the mobility params message published by the driver. Rviz panel allows interaction with the terrain and obstacle params. Comboboxes are now initialised by using a map generated from the constants in the ros messages, to try and make sure the ordering is correct. The map is also useful for constants which are non-consecutive like in the locomotion, for some reason the 9th value is unused but the 10th is. * velocity and body controls are in different tabs, add swing height and gait control add checks to ensure only valid values for locomotion and swing height are sent to the mobility params * allow velocity limits to be set in the driver launch and load them on start Also updats the mobility params message to store the velocity limits If the limits change, the rviz panel is updated with the latest values * Service to open the gripper at a given angle * Added messages for the arm * add Dock.srv * add spot dock and undock service * use int8 instead of uint8, we want to have negative rotations too * add actionserver to set body pose * can require trajectory commands to reach goal precisely Add precise_positioning field to the trajectory goal. Setting to true will make the wrapper consider only STATUS_AT_GOAL status to mean that the robot is at the goal. Setting to false will replicate previous behaviour where STATUS_NEAR_GOAL also means that the robot is at the goal. Vary feedback messages from the driver depending on whether the precise positioning field was set. * Include the license file in the individual ROS packages * Add service call to set maximum velocity, use synchro trajectory command The service call receives a twist message and sets the mobility params vel_lim max_vel to the linear x and y, and angular z values in the message. This velocity limit affects anything that moves the robot around, such as the trajectory command and velocity command. The service call adds a srv to spot_msgs Output exception string when power_on command fails Fix minor typo in behavior_fault function name Populate state_description in the estop state message Minor cosmetic changes to srv imports and some comments for readability * Add trajectory command interface (`#25 <https://github.com/heuristicus/spot_ros/issues/25>`_) * [spot_driver] add trajectory_cmd() method to spot_wrapper * [spot_driver] rename _last_motion_command to _last_trajectory_command * [spot_driver] rename _last_motion_command_time to _last_velocity_command_time * [spot_driver] fix trajectory_cmd * [spot_driver] fix options of trajectory_cmd() * [spot_msgs] add Trajectory.srv * [spot_driver] add trajectory service server * [spot_ros] add frame_id checking to trajectory_cmd * [spot_driver] fix bugs * [spot_driver] fix bugs in trajectory_cmd * convert trajectory command to an actionserver * [spot_ros] fix merge commit * [spot_driver] allow STATUS_NEAR_GOAL to be recognized as at_goal * [spot_driver] add handling for 0 duration Co-authored-by: Michal Staniaszek <[email protected]> Co-authored-by: Dave Niewinski <[email protected]> * Added service for clearing behavior faults (`#34 <https://github.com/heuristicus/spot_ros/issues/34>`_) * [spot_msgs] add descriptions to SetLocomotion.srv * [spot_msgs] remove unused field of mobility params message * [spot_msgs] add MobilityParams.msg * [spot_msgs] fix type error of SetLocomotion.srv * [spot_msgs] add SetLocomotion.srv * support graphnav navigate-to * Properly implemented checking the status of commands. Added a feedback message * Fixed all the little mistakes from the last commit * Added messages for the remainder of the robot status * Added messages and brought metrics and leases into ros * Contributors: Chris Iverach-Brereton, Dave Niewinski, Esther, Kei Okada, Koki Shinjo, Michal Staniaszek, Michel Heinemann, Naoto Tsukamoto, SpotCOREAI, maubrunn, nfilliol
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_msgs/CMakeLists.txt
cmake_minimum_required(VERSION 3.0.2) project(spot_msgs) find_package(catkin REQUIRED COMPONENTS geometry_msgs nav_msgs sensor_msgs std_msgs actionlib actionlib_msgs message_generation ) add_message_files( FILES BatteryStateArray.msg BehaviorFault.msg EStopStateArray.msg FootStateArray.msg LeaseArray.msg LeaseOwner.msg Metrics.msg MobilityParams.msg SystemFault.msg WiFiState.msg BatteryState.msg BehaviorFaultState.msg EStopState.msg Feedback.msg FootState.msg Lease.msg LeaseResource.msg PowerState.msg SystemFaultState.msg DockState.msg ObstacleParams.msg TerrainParams.msg TerrainState.msg ) add_service_files( FILES ListGraph.srv SetLocomotion.srv SetSwingHeight.srv SetVelocity.srv ClearBehaviorFault.srv ArmJointMovement.srv ConstrainedArmJointMovement.srv GripperAngleMove.srv ArmForceTrajectory.srv HandPose.srv SetObstacleParams.srv SetTerrainParams.srv PosedStand.srv Dock.srv GetDockState.srv Grasp3d.srv ) add_action_files( FILES Dock.action NavigateTo.action PoseBody.action Trajectory.action ) generate_messages( DEPENDENCIES std_msgs geometry_msgs actionlib_msgs ) catkin_package( CATKIN_DEPENDS message_runtime actionlib ) include_directories( ${catkin_INCLUDE_DIRS} )
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_msgs/package.xml
<?xml version="1.0"?> <package format="2"> <name>spot_msgs</name> <version>1.0.0</version> <description>The spot_msgs package</description> <maintainer email="[email protected]">Michal Staniaszek</maintainer> <license>BSD</license> <buildtool_depend>catkin</buildtool_depend> <build_depend>actionlib</build_depend> <build_depend>actionlib_msgs</build_depend> <build_depend>geometry_msgs</build_depend> <build_depend>nav_msgs</build_depend> <build_depend>sensor_msgs</build_depend> <build_depend>std_msgs</build_depend> <exec_depend>actionlib</exec_depend> <exec_depend>geometry_msgs</exec_depend> <exec_depend>nav_msgs</exec_depend> <exec_depend>sensor_msgs</exec_depend> <exec_depend>std_msgs</exec_depend> <build_depend>message_generation</build_depend> <exec_depend>message_runtime</exec_depend> <export> </export> </package>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_viz/CHANGELOG.rst
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Changelog for package spot_viz ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Forthcoming ----------- 1.0.0 (2023-04-07) ------------------ * docking, self-right and roll over buttons start disabled * update maintainer * connect up buttons, fix undock call, fix dock actionserver name * add buttons for docking, self-right, and roll over * body tab now sets posed stand * update rviz config panel arrangement, estop states now shown in panel The release estop button is now only enabled if the software estop is on * correct ordering of ui component setup, must be before subscribers * sit and stand button state depends on whether the robot is powered or not * tab shown on startup should be basic motion tab, minor fixes * sit, stand and self right disabled when motion disabled, ui has button for allow motion The stop button in the ui will now call the locked stop. Stop button is disabled and has its text changed when motion is not allowed * Advanced motion tab, obstacle and terrain params added to driver and panel Move more advanced motion settings into the adv. motion tab to not clutter the basic motion. The settings there (ground friction, gait, swing height, grated surface mode) are I suspect relatively rarely used. Obstacle params message added, which allows the settings for the obstacle avoidance to be published from the driver. These are as usual empty by default since the SDK does not provide details. Currently the only modification allowed is to the obstacle padding. Terrain params message added, which allows setting of the ground friction and grated surfaces mode. Terrain and obstacle params are in the mobility params message published by the driver. Rviz panel allows interaction with the terrain and obstacle params. Comboboxes are now initialised by using a map generated from the constants in the ros messages, to try and make sure the ordering is correct. The map is also useful for constants which are non-consecutive like in the locomotion, for some reason the 9th value is unused but the 10th is. * velocity and body controls are in different tabs, add swing height and gait control add checks to ensure only valid values for locomotion and swing height are sent to the mobility params * panel now looks at battery and power state and displays information * allow velocity limits to be set in the driver launch and load them on start Also updats the mobility params message to store the velocity limits If the limits change, the rviz panel is updated with the latest values * enable estop buttons only when we have the lease, release button state is dependent on estop state * add stop action button to rviz panel, clearer estop button names * add estop buttons to spot panel * add topic go_to_pose which can be used to move the robot with the trajectory command * adjust velocity limit and body height range, explicitly specify upper and lower limits for labels Trying to adjust body height, the limit appears to be something around 0.15 or so. I think this might be because we are not using the stance command, but the body control params for mobility * rename max_velocity to velocity_limit, now also limits velocity when moving backwards * Only update the state of the buttons based on the lease feedback; if we successfully get/release a lease, disable that button only and wait for the subscriber to enable whatever's needed. This prevents a possible issue where the UI flashes * Squashed commit of the following: commit 0cc926539660598bf7ef2a8407d51a3583ca29c9 Author: Chris Iverach-Brereton <[email protected]> Date: Fri Aug 13 11:49:21 2021 -0400 Change the default camera to use gpe as the fixed frame; the keeps the robot visible on-screen at all times; using odom the robot can appear off-screen too easily commit 667e26f63ad9df414c4bd7f02eea57d03e2785d3 Author: Chris Iverach-Brereton <[email protected]> Date: Fri Aug 13 11:45:16 2021 -0400 Add a subscriber to the spot panel to monitor the lease status, correctly setting the button states if we call the service e.g. before launching rviz * Simple rviz panel for interaction with spot Can use the panel to claim and release the lease, power on and off, sit down and stand up, and set the body pose. To add, go to panels>add new panel and select SpotControlPanel in spot_viz * can set maximum velocity in the rviz panel * Simple rviz panel for interaction with spot Can use the panel to claim and release the lease, power on and off, sit down and stand up, and set the body pose. To add, go to panels>add new panel and select SpotControlPanel in spot_viz * Include the license file in the individual ROS packages * add install instructions * Updated PC topics * Lots of little fixes. Body positioning logic is broken * removed unnecessary interactive marker * Basic motion. Lots to clean up * Got depth images working * Initial commit * Contributors: Chris Iverach-Brereton, Dave Niewinski, Michal Staniaszek, Wolf Vollprecht
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_viz/plugin_description.xml
<library path="lib/libspot_viz"> <class name="spot_viz/SpotControlPanel" type="spot_viz::ControlPanel" base_class_type="rviz::Panel"> <description> A panel for controlling the Boston Dynamics Spot robot with the Clearpath driver </description> </class> </library>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_viz/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3) project(spot_viz) find_package(catkin REQUIRED COMPONENTS rviz spot_msgs) catkin_package() set(CMAKE_AUTOMOC ON) if(rviz_QT_VERSION VERSION_LESS "5") message(STATUS "Using Qt4 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}") find_package(Qt4 ${rviz_QT_VERSION} EXACT REQUIRED QtCore QtGui) include(${QT_USE_FILE}) else() message(STATUS "Using Qt5 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}") find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets UiTools) set(QT_LIBRARIES Qt5::Widgets Qt5::UiTools) endif() include_directories( ${catkin_INCLUDE_DIRS} ) set(SRC_FILES src/spot_panel.cpp ) add_library(${PROJECT_NAME} ${SRC_FILES}) target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} ${catkin_LIBRARIES}) install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} ) install(DIRECTORY rviz DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) install(FILES plugin_description.xml DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_viz/package.xml
<?xml version="1.0"?> <package format="2"> <name>spot_viz</name> <version>1.0.0</version> <description>The spot_viz package</description> <maintainer email="[email protected]">Michal Staniaszek</maintainer> <license>BSD</license> <buildtool_depend>catkin</buildtool_depend> <build_depend>qtbase5-dev</build_depend> <build_depend>rviz</build_depend> <build_depend>spot_msgs</build_depend> <exec_depend>libqt5-core</exec_depend> <exec_depend>libqt5-gui</exec_depend> <exec_depend>libqt5-widgets</exec_depend> <exec_depend>spot_msgs</exec_depend> <exec_depend>joint_state_publisher</exec_depend> <exec_depend>joint_state_publisher_gui</exec_depend> <exec_depend>rviz</exec_depend> <export> <rviz plugin="${prefix}/plugin_description.xml"/> </export> </package>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_viz/launch/view_robot.launch
<launch> <node name="rviz" pkg="rviz" type="rviz" args="-d $(find spot_viz)/rviz/robot.rviz" /> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_viz/launch/view_model.launch
<launch> <include file="$(find spot_description)/launch/description.launch"/> <node name="joint_state_publisher_gui" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" /> <node name="rviz" pkg="rviz" type="rviz" args="-d $(find spot_viz)/rviz/model.rviz" /> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_viz/rviz/robot.rviz
Panels: - Class: rviz/Displays Help Height: 0 Name: Displays Property Tree Widget: Expanded: - /Global Options1 - /Status1 Splitter Ratio: 0.5 Tree Height: 802 - Class: rviz/Selection Name: Selection - Class: rviz/Tool Properties Expanded: - /2D Pose Estimate1 - /2D Nav Goal1 - /Publish Point1 Name: Tool Properties Splitter Ratio: 0.5886790156364441 - Class: rviz/Views Expanded: - /Current View1 Name: Views Splitter Ratio: 0.5 - Class: rviz/Time Experimental: false Name: Time SyncMode: 0 SyncSource: FrontLeftDepthCloud - Class: spot_viz/SpotControlPanel Name: SpotControlPanel Preferences: PromptSaveOnExit: true Toolbars: toolButtonStyle: 2 Visualization Manager: Class: "" Displays: - Alpha: 0.5 Cell Size: 1 Class: rviz/Grid Color: 160; 160; 164 Enabled: true Line Style: Line Width: 0.029999999329447746 Value: Lines Name: Grid Normal Cell Count: 0 Offset: X: 0 Y: 0 Z: 0 Plane: XY Plane Cell Count: 10 Reference Frame: <Fixed Frame> Value: true - Alpha: 1 Class: rviz/RobotModel Collision Enabled: false Enabled: true Links: All Links Enabled: true Expand Joint Details: false Expand Link Details: false Expand Tree: false Link Tree Style: Links in Alphabetic Order base_link: Alpha: 1 Show Axes: false Show Trail: false body: Alpha: 1 Show Axes: false Show Trail: false Value: true bottom_screws_center: Alpha: 1 Show Axes: false Show Trail: false camera_bottom_screw_frame: Alpha: 1 Show Axes: false Show Trail: false camera_link: Alpha: 1 Show Axes: false Show Trail: false Value: true front_left_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true front_left_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true front_left_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true front_rail: Alpha: 1 Show Axes: false Show Trail: false front_right_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true front_right_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true front_right_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true frontier_mount: Alpha: 1 Show Axes: false Show Trail: false Value: true os_sensor: Alpha: 1 Show Axes: false Show Trail: false Value: true realsense_parent: Alpha: 1 Show Axes: false Show Trail: false rear_left_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_left_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_left_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_rail: Alpha: 1 Show Axes: false Show Trail: false rear_right_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_right_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_right_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true Name: RobotModel Robot Description: robot_description TF Prefix: "" Update Interval: 0 Value: true Visual Enabled: true - Class: rviz/TF Enabled: true Frame Timeout: 15 Frames: All Enabled: true back: Value: true back_fisheye: Value: true base_link: Value: true body: Value: true bottom_screws_center: Value: true camera_bottom_screw_frame: Value: true camera_link: Value: true flat_body: Value: true front_left_hip: Value: true front_left_lower_leg: Value: true front_left_upper_leg: Value: true front_rail: Value: true front_right_hip: Value: true front_right_lower_leg: Value: true front_right_upper_leg: Value: true frontier_mount: Value: true frontleft: Value: true frontleft_fisheye: Value: true frontright: Value: true frontright_fisheye: Value: true gpe: Value: true head: Value: true left: Value: true left_fisheye: Value: true odom: Value: true os_sensor: Value: true realsense_parent: Value: true rear_left_hip: Value: true rear_left_lower_leg: Value: true rear_left_upper_leg: Value: true rear_rail: Value: true rear_right_hip: Value: true rear_right_lower_leg: Value: true rear_right_upper_leg: Value: true right: Value: true right_fisheye: Value: true vision: Value: true Marker Alpha: 1 Marker Scale: 0.25 Name: TF Show Arrows: true Show Axes: true Show Names: true Tree: odom: body: base_link: {} flat_body: {} front_left_hip: front_left_upper_leg: front_left_lower_leg: {} front_rail: frontier_mount: bottom_screws_center: {} os_sensor: {} realsense_parent: camera_bottom_screw_frame: camera_link: {} front_right_hip: front_right_upper_leg: front_right_lower_leg: {} head: back: back_fisheye: {} frontleft: frontleft_fisheye: {} frontright: frontright_fisheye: {} left: left_fisheye: {} right: right_fisheye: {} rear_left_hip: rear_left_upper_leg: rear_left_lower_leg: {} rear_rail: {} rear_right_hip: rear_right_upper_leg: rear_right_lower_leg: {} vision: {} gpe: {} Update Interval: 0 Value: true - Class: rviz/Group Displays: - Alpha: 1 Auto Size: Auto Size Factor: 1 Value: true Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 1.5422112941741943 Min Value: -13.729979515075684 Value: true Axis: Z Channel Name: intensity Class: rviz/DepthCloud Color: 255; 255; 255 Color Image Topic: "" Color Transformer: AxisColor Color Transport Hint: raw Decay Time: 0 Depth Map Topic: /spot/depth/frontleft/image Depth Map Transport Hint: raw Enabled: true Invert Rainbow: false Max Color: 255; 255; 255 Min Color: 0; 0; 0 Name: FrontLeftDepthCloud Occlusion Compensation: Occlusion Time-Out: 30 Value: false Position Transformer: XYZ Queue Size: 5 Selectable: true Size (Pixels): 3 Style: Flat Squares Topic Filter: true Use Fixed Frame: true Use rainbow: true Value: true - Alpha: 1 Auto Size: Auto Size Factor: 1 Value: true Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 2.3710060119628906 Min Value: -6.938358306884766 Value: true Axis: Z Channel Name: intensity Class: rviz/DepthCloud Color: 255; 255; 255 Color Image Topic: "" Color Transformer: AxisColor Color Transport Hint: raw Decay Time: 0 Depth Map Topic: /spot/depth/frontright/image Depth Map Transport Hint: raw Enabled: true Invert Rainbow: false Max Color: 255; 255; 255 Min Color: 0; 0; 0 Name: FrontRightDepthCloud Occlusion Compensation: Occlusion Time-Out: 30 Value: false Position Transformer: XYZ Queue Size: 5 Selectable: true Size (Pixels): 3 Style: Flat Squares Topic Filter: true Use Fixed Frame: true Use rainbow: true Value: true - Alpha: 1 Auto Size: Auto Size Factor: 1 Value: true Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 1.8236514329910278 Min Value: -2.351337194442749 Value: true Axis: Z Channel Name: intensity Class: rviz/DepthCloud Color: 255; 255; 255 Color Image Topic: "" Color Transformer: AxisColor Color Transport Hint: raw Decay Time: 0 Depth Map Topic: /spot/depth/left/image Depth Map Transport Hint: raw Enabled: true Invert Rainbow: false Max Color: 255; 255; 255 Min Color: 0; 0; 0 Name: LeftDepthCloud Occlusion Compensation: Occlusion Time-Out: 30 Value: false Position Transformer: XYZ Queue Size: 5 Selectable: true Size (Pixels): 3 Style: Flat Squares Topic Filter: true Use Fixed Frame: true Use rainbow: true Value: true - Alpha: 1 Auto Size: Auto Size Factor: 1 Value: true Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 2.603226661682129 Min Value: -3.571293830871582 Value: true Axis: Z Channel Name: intensity Class: rviz/DepthCloud Color: 255; 255; 255 Color Image Topic: "" Color Transformer: AxisColor Color Transport Hint: raw Decay Time: 0 Depth Map Topic: /spot/depth/right/image Depth Map Transport Hint: raw Enabled: true Invert Rainbow: false Max Color: 255; 255; 255 Min Color: 0; 0; 0 Name: RightDepthCloud Occlusion Compensation: Occlusion Time-Out: 30 Value: false Position Transformer: XYZ Queue Size: 5 Selectable: true Size (Pixels): 3 Style: Flat Squares Topic Filter: true Use Fixed Frame: true Use rainbow: true Value: true - Alpha: 1 Auto Size: Auto Size Factor: 1 Value: true Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 1.576756477355957 Min Value: -2.3970136642456055 Value: true Axis: Z Channel Name: intensity Class: rviz/DepthCloud Color: 255; 255; 255 Color Image Topic: "" Color Transformer: AxisColor Color Transport Hint: raw Decay Time: 0 Depth Map Topic: /spot/depth/back/image Depth Map Transport Hint: raw Enabled: true Invert Rainbow: false Max Color: 255; 255; 255 Min Color: 0; 0; 0 Name: RearDepthCloud Occlusion Compensation: Occlusion Time-Out: 30 Value: false Position Transformer: XYZ Queue Size: 5 Selectable: true Size (Pixels): 3 Style: Flat Squares Topic Filter: true Use Fixed Frame: true Use rainbow: true Value: true Enabled: true Name: DepthClouds - Class: rviz/InteractiveMarkers Enable Transparency: true Enabled: false Name: InteractiveMarkers Show Axes: false Show Descriptions: true Show Visual Aids: false Update Topic: /twist_marker_server/update Value: false - Class: rviz/TF Enabled: false Frame Timeout: 15 Frames: All Enabled: true Marker Alpha: 1 Marker Scale: 1 Name: TF Show Arrows: true Show Axes: true Show Names: true Tree: {} Update Interval: 0 Value: false Enabled: true Global Options: Background Color: 48; 48; 48 Default Light: true Fixed Frame: gpe Frame Rate: 30 Name: root Tools: - Class: rviz/Interact Hide Inactive Objects: true - Class: rviz/MoveCamera - Class: rviz/Select - Class: rviz/FocusCamera - Class: rviz/Measure - Class: rviz/SetInitialPose Theta std deviation: 0.2617993950843811 Topic: /initialpose X std deviation: 0.5 Y std deviation: 0.5 - Class: rviz/SetGoal Topic: /spot/go_to_pose - Class: rviz/PublishPoint Single click: true Topic: /clicked_point Value: true Views: Current: Class: rviz/Orbit Distance: 10 Enable Stereo Rendering: Stereo Eye Separation: 0.05999999865889549 Stereo Focal Distance: 1 Swap Stereo Eyes: false Value: false Field of View: 0.7853981852531433 Focal Point: X: 0 Y: 0 Z: 0 Focal Shape Fixed Size: false Focal Shape Size: 0.05000000074505806 Invert Z Axis: false Name: Current View Near Clip Distance: 0.009999999776482582 Pitch: 0.7853981852531433 Target Frame: <Fixed Frame> Yaw: 0.7853981852531433 Saved: ~ Window Geometry: Displays: collapsed: false Height: 1016 Hide Left Dock: false Hide Right Dock: false QMainWindow State: 000000ff00000000fd0000000400000000000001680000035ffc0200000011fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d0000035f000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e006700000002300000018e0000000000000000fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb0000000a0049006d00610067006501000002f4000000ca0000000000000000fb0000000a0049006d00610067006501000002f4000000ca0000000000000000fb0000000a0049006d006100670065000000013f000000660000000000000000fb0000000a0049006d0061006700650000000164000000940000000000000000fb0000000a0049006d00610067006500000001a3000000e80000000000000000fc00000227000001970000000000fffffffa000000000100000002fb0000000a0049006d0061006700650000000000ffffffff0000000000000000fb0000000a0049006d0061006700650000000000000002ad000000000000000000000001000001b80000035ffc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fc0000003d0000035f000002b70100001cfa000000000100000002fb0000002000530070006f00740043006f006e00740072006f006c00500061006e0065006c0100000000ffffffff000001b800fffffffb0000000a0056006900650077007301000005c8000001b80000010000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000078000000039fc0100000002fb0000000800540069006d0065010000000000000780000002eb00fffffffb0000000800540069006d00650100000000000004500000000000000000000004540000035f00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 Selection: collapsed: false SpotControlPanel: collapsed: false Time: collapsed: false Tool Properties: collapsed: false Views: collapsed: false Width: 1920 X: 0 Y: 27
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_viz/rviz/model.rviz
Panels: - Class: rviz/Displays Help Height: 78 Name: Displays Property Tree Widget: Expanded: ~ Splitter Ratio: 0.5 Tree Height: 843 - Class: rviz/Selection Name: Selection - Class: rviz/Tool Properties Expanded: ~ Name: Tool Properties Splitter Ratio: 0.588679016 Toolbars: toolButtonStyle: 2 Visualization Manager: Class: "" Displays: - Alpha: 0.5 Cell Size: 1 Class: rviz/Grid Color: 160; 160; 164 Enabled: true Line Style: Line Width: 0.0299999993 Value: Lines Name: Grid Normal Cell Count: 0 Offset: X: 0 Y: 0 Z: 0 Plane: XY Plane Cell Count: 10 Reference Frame: <Fixed Frame> Value: true - Alpha: 1 Class: rviz/RobotModel Collision Enabled: false Enabled: true Links: All Links Enabled: true Expand Joint Details: false Expand Link Details: false Expand Tree: false Link Tree Style: Links in Alphabetic Order body: Alpha: 1 Show Axes: false Show Trail: false Value: true front_left_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true front_left_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true front_left_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true front_right_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true front_right_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true front_right_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_left_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_left_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_left_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_right_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_right_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_right_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true Name: RobotModel Robot Description: robot_description TF Prefix: "" Update Interval: 0 Value: true Visual Enabled: true - Class: rviz/TF Enabled: true Frame Timeout: 15 Frames: All Enabled: true body: Value: true front_left_hip: Value: true front_left_lower_leg: Value: true front_left_upper_leg: Value: true front_right_hip: Value: true front_right_lower_leg: Value: true front_right_upper_leg: Value: true rear_left_hip: Value: true rear_left_lower_leg: Value: true rear_left_upper_leg: Value: true rear_right_hip: Value: true rear_right_lower_leg: Value: true rear_right_upper_leg: Value: true Marker Scale: 0.5 Name: TF Show Arrows: true Show Axes: true Show Names: true Tree: body: front_left_hip: front_left_upper_leg: front_left_lower_leg: {} front_right_hip: front_right_upper_leg: front_right_lower_leg: {} rear_left_hip: rear_left_upper_leg: rear_left_lower_leg: {} rear_right_hip: rear_right_upper_leg: rear_right_lower_leg: {} Update Interval: 0 Value: true Enabled: true Global Options: Background Color: 48; 48; 48 Default Light: true Fixed Frame: body Frame Rate: 30 Name: root Tools: - Class: rviz/MoveCamera Value: true Views: Current: Class: rviz/Orbit Distance: 2.17706323 Enable Stereo Rendering: Stereo Eye Separation: 0.0599999987 Stereo Focal Distance: 1 Swap Stereo Eyes: false Value: false Focal Point: X: -0.00677506765 Y: -0.0620601736 Z: -0.0469833091 Focal Shape Fixed Size: true Focal Shape Size: 0.0500000007 Invert Z Axis: false Name: Current View Near Clip Distance: 0.00999999978 Pitch: 0.680397511 Target Frame: <Fixed Frame> Value: Orbit (rviz) Yaw: 4.65039492 Saved: ~ Window Geometry: Displays: collapsed: false Height: 1056 Hide Left Dock: false Hide Right Dock: false QMainWindow State: 000000ff00000000fd00000004000000000000016a000003dafc0200000005fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006100fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c0061007900730100000028000003da000000d700ffffff000000010000010f0000023cfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a0056006900650077007301000000280000023c0000000000000000fb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004a00000003efc0100000002fb0000000800540069006d00650000000000000004a00000000000000000fb0000000800540069006d00650100000000000004500000000000000000000005cf000003da00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 Selection: collapsed: false Tool Properties: collapsed: false Width: 1855 X: 65 Y: 24
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_viz/src/spot_panel.hpp
#ifndef SPOT_CONTROL_PANEL_H #define SPOT_CONTROL_PANEL_H #ifndef Q_MOC_RUN # include <ros/ros.h> # include <rviz/panel.h> #endif #include <map> #include <QPushButton> #include <QLabel> #include <QDoubleSpinBox> #include <QComboBox> #include <std_msgs/Bool.h> #include <spot_msgs/EStopStateArray.h> #include <spot_msgs/MobilityParams.h> #include <spot_msgs/TerrainParams.h> #include <spot_msgs/SetSwingHeight.h> #include <spot_msgs/LeaseArray.h> #include <spot_msgs/SetLocomotion.h> #include <spot_msgs/BatteryStateArray.h> #include <spot_msgs/PowerState.h> namespace spot_viz { class ControlPanel : public rviz::Panel { Q_OBJECT public: ControlPanel(QWidget *parent=0); virtual void save(rviz::Config config) const; virtual void load(const rviz::Config &config); private Q_SLOTS: void sit(); void stand(); void claimLease(); void releaseLease(); void powerOn(); void powerOff(); void sendBodyPose(); void sendNeutralBodyPose(); void setMaxVel(); void gentleStop(); void hardStop(); void releaseStop(); void stop(); void setGait(); void setSwingHeight(); void setTerrainParams(); void setObstacleParams(); void allowMotion(); void rollOverRight(); void rollOverLeft(); void selfRight(); void dock(); void undock(); private: // These maps allow us to set up the comboboxes for selections in the order // of the enum, and ensure that the correct value is sent when the user wants to set it // We can also use them to ensure that non-consecutive values are also correctly handled const std::map<uint, std::string> gaitMap = { {spot_msgs::SetLocomotion::Request::HINT_UNKNOWN, "Unknown"}, {spot_msgs::SetLocomotion::Request::HINT_TROT, "Trot"}, {spot_msgs::SetLocomotion::Request::HINT_SPEED_SELECT_TROT, "Speed sel trot"}, {spot_msgs::SetLocomotion::Request::HINT_CRAWL, "Crawl"}, {spot_msgs::SetLocomotion::Request::HINT_AMBLE, "Amble"}, {spot_msgs::SetLocomotion::Request::HINT_SPEED_SELECT_AMBLE, "Speed sel amble"}, {spot_msgs::SetLocomotion::Request::HINT_AUTO, "Auto"}, {spot_msgs::SetLocomotion::Request::HINT_JOG, "Jog"}, {spot_msgs::SetLocomotion::Request::HINT_HOP, "Hop"}, {spot_msgs::SetLocomotion::Request::HINT_SPEED_SELECT_CRAWL, "Speed sel crawl"} }; const std::map<uint, std::string> swingHeightMap = { {spot_msgs::SetSwingHeight::Request::SWING_HEIGHT_UNKNOWN, "Unknown"}, {spot_msgs::SetSwingHeight::Request::SWING_HEIGHT_LOW, "Low"}, {spot_msgs::SetSwingHeight::Request::SWING_HEIGHT_MEDIUM, "Medium"}, {spot_msgs::SetSwingHeight::Request::SWING_HEIGHT_HIGH, "High"} }; const std::map<uint, std::string> gratedSurfacesMap = { {spot_msgs::TerrainParams::GRATED_SURFACES_MODE_UNKNOWN, "Unknown"}, {spot_msgs::TerrainParams::GRATED_SURFACES_MODE_OFF, "Off"}, {spot_msgs::TerrainParams::GRATED_SURFACES_MODE_ON, "On"}, {spot_msgs::TerrainParams::GRATED_SURFACES_MODE_AUTO, "Auto"} }; void setupComboBoxes(); void setupStopButtons(); void setupSpinBoxes(); void setControlButtons(); void toggleBodyPoseButtons(); bool callTriggerService(ros::ServiceClient service, std::string serviceName); template <typename T> bool callCustomTriggerService(ros::ServiceClient service, std::string serviceName, T serviceRequest); void updateLabelTextWithLimit(QLabel* label, double limit_lower, double limit_upper); void leaseCallback(const spot_msgs::LeaseArray::ConstPtr &leases); void estopCallback(const spot_msgs::EStopStateArray::ConstPtr &estops); void mobilityParamsCallback(const spot_msgs::MobilityParams::ConstPtr &params); void batteryCallback(const spot_msgs::BatteryStateArray::ConstPtr &battery); void powerCallback(const spot_msgs::PowerState::ConstPtr &power); void motionAllowedCallback(const std_msgs::Bool &motion_allowed); ros::NodeHandle nh_; ros::ServiceClient sitService_; ros::ServiceClient standService_; ros::ServiceClient claimLeaseService_; ros::ServiceClient releaseLeaseService_; ros::ServiceClient powerOnService_; ros::ServiceClient powerOffService_; ros::ServiceClient maxVelocityService_; ros::ServiceClient hardStopService_; ros::ServiceClient gentleStopService_; ros::ServiceClient releaseStopService_; ros::ServiceClient stopService_; ros::ServiceClient gaitService_; ros::ServiceClient swingHeightService_; ros::ServiceClient terrainParamsService_; ros::ServiceClient obstacleParamsService_; ros::ServiceClient allowMotionService_; ros::ServiceClient bodyPoseService_; ros::ServiceClient dockService_; ros::ServiceClient undockService_; ros::ServiceClient selfRightService_; ros::ServiceClient rollOverLeftService_; ros::ServiceClient rollOverRightService_; ros::Subscriber leaseSub_; ros::Subscriber estopSub_; ros::Subscriber mobilityParamsSub_; ros::Subscriber batterySub_; ros::Subscriber powerSub_; ros::Subscriber motionAllowedSub_; QPushButton* claimLeaseButton; QPushButton* releaseLeaseButton; QPushButton* powerOnButton; QPushButton* powerOffButton; QPushButton* setBodyPoseButton; QPushButton* setBodyNeutralButton; QPushButton* sitButton; QPushButton* standButton; QPushButton* setMaxVelButton; QPushButton* hardStopButton; QPushButton* gentleStopButton; QPushButton* releaseStopButton; QPushButton* stopButton; QPushButton* setGaitButton; QPushButton* setSwingHeightButton; QPushButton* setObstaclePaddingButton; QPushButton* setGratedSurfacesButton; QPushButton* setFrictionButton; QPushButton* allowMotionButton; QPushButton* dockButton; QPushButton* undockButton; QPushButton* selfRightButton; QPushButton* rollOverLeftButton; QPushButton* rollOverRightButton; QLabel* linearXLabel; QLabel* linearYLabel; QLabel* angularZLabel; QLabel* statusLabel; QLabel* bodyHeightLabel; QLabel* rollLabel; QLabel* pitchLabel; QLabel* yawLabel; QLabel* estimatedRuntimeLabel; QLabel* batteryStateLabel; QLabel* motorStateLabel; QLabel* batteryTempLabel; QLabel* estopLabel; QComboBox* gaitComboBox; QComboBox* swingHeightComboBox; QComboBox* gratedSurfacesComboBox; QSpinBox* dockFiducialSpin; QDoubleSpinBox* linearXSpin; QDoubleSpinBox* linearYSpin; QDoubleSpinBox* angularZSpin; QDoubleSpinBox* bodyHeightSpin; QDoubleSpinBox* rollSpin; QDoubleSpinBox* pitchSpin; QDoubleSpinBox* yawSpin; QDoubleSpinBox* frictionSpin; QDoubleSpinBox* obstaclePaddingSpin; spot_msgs::MobilityParams _lastMobilityParams; bool haveLease; bool isEStopped; bool motionAllowed; }; } // end namespace spot_viz #endif // SPOT_CONTROL_PANEL_H
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_viz/src/spot_panel.cpp
#include "spot_panel.hpp" #include <algorithm> #include <cmath> #include <QFile> #include <QUiLoader> #include <QVBoxLayout> #include <ros/package.h> #include <std_srvs/Trigger.h> #include <std_srvs/SetBool.h> #include <geometry_msgs/Pose.h> #include <geometry_msgs/Twist.h> #include <QDoubleValidator> #include <QStandardItemModel> #include <tf/transform_datatypes.h> #include <spot_msgs/SetVelocity.h> #include <spot_msgs/LeaseArray.h> #include <spot_msgs/EStopState.h> #include <spot_msgs/SetObstacleParams.h> #include <spot_msgs/SetTerrainParams.h> #include <spot_msgs/PosedStand.h> #include <spot_msgs/Dock.h> #include <string.h> namespace spot_viz { ControlPanel::ControlPanel(QWidget *parent) { std::string packagePath = ros::package::getPath("spot_viz") + "/resource/spot_control.ui"; ROS_INFO("Getting ui file from package path %s", packagePath.c_str()); QFile file(packagePath.c_str()); file.open(QIODevice::ReadOnly); QUiLoader loader; QWidget* ui = loader.load(&file, parent); file.close(); QVBoxLayout* topLayout = new QVBoxLayout(); this->setLayout(topLayout); topLayout->addWidget(ui); haveLease = false; motionAllowed = false; sitService_ = nh_.serviceClient<std_srvs::Trigger>("/spot/sit"); standService_ = nh_.serviceClient<std_srvs::Trigger>("/spot/stand"); claimLeaseService_ = nh_.serviceClient<std_srvs::Trigger>("/spot/claim"); releaseLeaseService_ = nh_.serviceClient<std_srvs::Trigger>("/spot/release"); powerOnService_ = nh_.serviceClient<std_srvs::Trigger>("/spot/power_on"); powerOffService_ = nh_.serviceClient<std_srvs::Trigger>("spot/power_off"); maxVelocityService_ = nh_.serviceClient<spot_msgs::SetVelocity>("/spot/velocity_limit"); hardStopService_ = nh_.serviceClient<std_srvs::Trigger>("/spot/estop/hard"); gentleStopService_ = nh_.serviceClient<std_srvs::Trigger>("/spot/estop/gentle"); releaseStopService_ = nh_.serviceClient<std_srvs::Trigger>("/spot/estop/release"); stopService_ = nh_.serviceClient<std_srvs::Trigger>("/spot/stop"); gaitService_ = nh_.serviceClient<spot_msgs::SetLocomotion>("/spot/locomotion_mode"); swingHeightService_ = nh_.serviceClient<spot_msgs::SetSwingHeight>("/spot/swing_height"); terrainParamsService_ = nh_.serviceClient<spot_msgs::SetTerrainParams>("/spot/terrain_params"); obstacleParamsService_ = nh_.serviceClient<spot_msgs::SetObstacleParams>("/spot/obstacle_params"); allowMotionService_ = nh_.serviceClient<std_srvs::SetBool>("/spot/allow_motion"); bodyPoseService_ = nh_.serviceClient<spot_msgs::PosedStand>("/spot/posed_stand"); dockService_ = nh_.serviceClient<spot_msgs::Dock>("/spot/dock"); undockService_ = nh_.serviceClient<std_srvs::Trigger>("/spot/undock"); selfRightService_ = nh_.serviceClient<std_srvs::Trigger>("/spot/self_right"); rollOverRightService_ = nh_.serviceClient<std_srvs::Trigger>("/spot/roll_over_right"); rollOverLeftService_ = nh_.serviceClient<std_srvs::Trigger>("/spot/roll_over_left"); claimLeaseButton = this->findChild<QPushButton*>("claimLeaseButton"); releaseLeaseButton = this->findChild<QPushButton*>("releaseLeaseButton"); powerOnButton = this->findChild<QPushButton*>("powerOnButton"); powerOffButton = this->findChild<QPushButton*>("powerOffButton"); standButton = this->findChild<QPushButton*>("standButton"); sitButton = this->findChild<QPushButton*>("sitButton"); setBodyPoseButton = this->findChild<QPushButton*>("setBodyPoseButton"); setBodyNeutralButton = this->findChild<QPushButton*>("setBodyNeutralButton"); setMaxVelButton = this->findChild<QPushButton*>("setMaxVelButton"); setGaitButton = this->findChild<QPushButton*>("setGaitButton"); setSwingHeightButton = this->findChild<QPushButton*>("setSwingHeightButton"); setObstaclePaddingButton = this->findChild<QPushButton*>("setObstaclePaddingButton"); setGratedSurfacesButton = this->findChild<QPushButton*>("setGratedSurfacesButton"); setFrictionButton = this->findChild<QPushButton*>("setFrictionButton"); allowMotionButton = this->findChild<QPushButton*>("allowMotionButton"); dockButton = this->findChild<QPushButton*>("dockButton"); undockButton = this->findChild<QPushButton*>("undockButton"); selfRightButton = this->findChild<QPushButton*>("selfRightButton"); rollOverLeftButton = this->findChild<QPushButton*>("rollOverLeftButton"); rollOverRightButton = this->findChild<QPushButton*>("rollOverRightButton"); statusLabel = this->findChild<QLabel*>("statusLabel"); estimatedRuntimeLabel = this->findChild<QLabel*>("estimatedRuntimeLabel"); batteryStateLabel = this->findChild<QLabel*>("batteryStateLabel"); motorStateLabel = this->findChild<QLabel*>("motorStateLabel"); batteryTempLabel = this->findChild<QLabel*>("batteryTempLabel"); estopLabel = this->findChild<QLabel*>("estopLabel"); gaitComboBox = this->findChild<QComboBox*>("gaitComboBox"); swingHeightComboBox = this->findChild<QComboBox*>("swingHeightComboBox"); gratedSurfacesComboBox = this->findChild<QComboBox*>("gratedSurfacesComboBox"); obstaclePaddingSpin = this->findChild<QDoubleSpinBox*>("obstaclePaddingSpin"); frictionSpin = this->findChild<QDoubleSpinBox*>("frictionSpin"); dockFiducialSpin = this->findChild<QSpinBox*>("dockFiducialSpin"); setupComboBoxes(); setupStopButtons(); setupSpinBoxes(); // Subscribe to things after everything is set up to avoid crashes when things aren't initialised leaseSub_ = nh_.subscribe("/spot/status/leases", 1, &ControlPanel::leaseCallback, this); estopSub_ = nh_.subscribe("/spot/status/estop", 1, &ControlPanel::estopCallback, this); mobilityParamsSub_ = nh_.subscribe("/spot/status/mobility_params", 1, &ControlPanel::mobilityParamsCallback, this); batterySub_ = nh_.subscribe("/spot/status/battery_states", 1, &ControlPanel::batteryCallback, this); powerSub_ = nh_.subscribe("/spot/status/power_state", 1, &ControlPanel::powerCallback, this); motionAllowedSub_ = nh_.subscribe("/spot/status/motion_allowed", 1, &ControlPanel::motionAllowedCallback, this); connect(claimLeaseButton, SIGNAL(clicked()), this, SLOT(claimLease())); connect(releaseLeaseButton, SIGNAL(clicked()), this, SLOT(releaseLease())); connect(powerOnButton, SIGNAL(clicked()), this, SLOT(powerOn())); connect(powerOffButton, SIGNAL(clicked()), this, SLOT(powerOff())); connect(sitButton, SIGNAL(clicked()), this, SLOT(sit())); connect(standButton, SIGNAL(clicked()), this, SLOT(stand())); connect(setBodyPoseButton, SIGNAL(clicked()), this, SLOT(sendBodyPose())); connect(setBodyNeutralButton, SIGNAL(clicked()), this, SLOT(sendNeutralBodyPose())); connect(setMaxVelButton, SIGNAL(clicked()), this, SLOT(setMaxVel())); connect(releaseStopButton, SIGNAL(clicked()), this, SLOT(releaseStop())); connect(hardStopButton, SIGNAL(clicked()), this, SLOT(hardStop())); connect(gentleStopButton, SIGNAL(clicked()), this, SLOT(gentleStop())); connect(stopButton, SIGNAL(clicked()), this, SLOT(stop())); connect(setGaitButton, SIGNAL(clicked()), this, SLOT(setGait())); connect(setSwingHeightButton, SIGNAL(clicked()), this, SLOT(setSwingHeight())); connect(setObstaclePaddingButton, SIGNAL(clicked()), this, SLOT(setObstacleParams())); connect(setGratedSurfacesButton, SIGNAL(clicked()), this, SLOT(setTerrainParams())); connect(setFrictionButton, SIGNAL(clicked()), this, SLOT(setTerrainParams())); connect(allowMotionButton, SIGNAL(clicked()), this, SLOT(allowMotion())); connect(dockButton, SIGNAL(clicked()), this, SLOT(dock())); connect(undockButton, SIGNAL(clicked()), this, SLOT(undock())); connect(selfRightButton, SIGNAL(clicked()), this, SLOT(selfRight())); connect(rollOverLeftButton, SIGNAL(clicked()), this, SLOT(rollOverLeft())); connect(rollOverRightButton, SIGNAL(clicked()), this, SLOT(rollOverRight())); } void ControlPanel::setupStopButtons() { stopButton = this->findChild<QPushButton*>("stopButton"); QPalette pal = stopButton->palette(); pal.setColor(QPalette::Button, QColor(255, 165, 0)); stopButton->setAutoFillBackground(true); stopButton->setPalette(pal); stopButton->update(); gentleStopButton = this->findChild<QPushButton*>("gentleStopButton"); pal = gentleStopButton->palette(); pal.setColor(QPalette::Button, QColor(255, 0, 255)); gentleStopButton->setAutoFillBackground(true); gentleStopButton->setPalette(pal); gentleStopButton->update(); hardStopButton = this->findChild<QPushButton*>("hardStopButton"); hardStopButton->setText(QString::fromUtf8("\u26A0 Kill Motors")); pal = hardStopButton->palette(); pal.setColor(QPalette::Button, QColor(255, 0, 0)); hardStopButton->setAutoFillBackground(true); hardStopButton->setPalette(pal); hardStopButton->update(); releaseStopButton = this->findChild<QPushButton*>("releaseStopButton"); pal = releaseStopButton->palette(); pal.setColor(QPalette::Button, QColor(0, 255, 0)); releaseStopButton->setAutoFillBackground(true); releaseStopButton->setPalette(pal); releaseStopButton->update(); } void ControlPanel::setupComboBoxes() { // Iterate over the map for this combobox and add items. By default items in the // map are in ascending order by key for (const auto& item : gaitMap) { gaitComboBox->addItem(QString(item.second.c_str())); } // Disable the unknown entry in the combobox so that it cannot be selected and sent to the service QStandardItemModel* model = qobject_cast<QStandardItemModel *>(gaitComboBox->model()); QStandardItem* item = model->item(0); item->setFlags(item->flags() & ~Qt::ItemIsEnabled); for (const auto& item : swingHeightMap) { swingHeightComboBox->addItem(QString(item.second.c_str())); } model = qobject_cast<QStandardItemModel *>(swingHeightComboBox->model()); item = model->item(0); item->setFlags(item->flags() & ~Qt::ItemIsEnabled); for (const auto& item : gratedSurfacesMap) { gratedSurfacesComboBox->addItem(QString(item.second.c_str())); } model = qobject_cast<QStandardItemModel *>(gratedSurfacesComboBox->model()); item = model->item(0); item->setFlags(item->flags() & ~Qt::ItemIsEnabled); } void ControlPanel::setupSpinBoxes() { double linearVelocityLimit = 2; linearXSpin = this->findChild<QDoubleSpinBox*>("linearXSpin"); linearXLabel = this->findChild<QLabel*>("linearXLabel"); updateLabelTextWithLimit(linearXLabel, 0, linearVelocityLimit); linearXSpin->setMaximum(linearVelocityLimit); linearXSpin->setMinimum(0); linearYSpin = this->findChild<QDoubleSpinBox*>("linearYSpin"); linearYLabel = this->findChild<QLabel*>("linearYLabel"); updateLabelTextWithLimit(linearYLabel, 0, linearVelocityLimit); linearYSpin->setMaximum(linearVelocityLimit); linearYSpin->setMinimum(0); angularZSpin = this->findChild<QDoubleSpinBox*>("angularZSpin"); angularZLabel = this->findChild<QLabel*>("angularZLabel"); updateLabelTextWithLimit(angularZLabel, 0, linearVelocityLimit); angularZSpin->setMaximum(linearVelocityLimit); angularZSpin->setMinimum(0); double bodyHeightLimit = 0.15; bodyHeightSpin = this->findChild<QDoubleSpinBox*>("bodyHeightSpin"); bodyHeightLabel = this->findChild<QLabel*>("bodyHeightLabel"); updateLabelTextWithLimit(bodyHeightLabel, -bodyHeightLimit, bodyHeightLimit); bodyHeightSpin->setMaximum(bodyHeightLimit); bodyHeightSpin->setMinimum(-bodyHeightLimit); double rollLimit = 20; rollSpin = this->findChild<QDoubleSpinBox*>("rollSpin"); rollLabel = this->findChild<QLabel*>("rollLabel"); updateLabelTextWithLimit(rollLabel, -rollLimit, rollLimit); rollSpin->setMaximum(rollLimit); rollSpin->setMinimum(-rollLimit); double pitchLimit = 30; pitchSpin = this->findChild<QDoubleSpinBox*>("pitchSpin"); pitchLabel = this->findChild<QLabel*>("pitchLabel"); updateLabelTextWithLimit(pitchLabel, -pitchLimit, pitchLimit); pitchSpin->setMaximum(pitchLimit); pitchSpin->setMinimum(-pitchLimit); double yawLimit = 30; yawSpin = this->findChild<QDoubleSpinBox*>("yawSpin"); yawLabel = this->findChild<QLabel*>("yawLabel"); updateLabelTextWithLimit(yawLabel, -yawLimit, yawLimit); yawSpin->setMaximum(yawLimit); yawSpin->setMinimum(-yawLimit); } void ControlPanel::updateLabelTextWithLimit(QLabel* label, double limit_lower, double limit_upper) { int precision = 1; // Kind of hacky but default to_string returns 6 digit precision which is unnecessary std::string limit_lower_value = std::to_string(limit_lower).substr(0, std::to_string(limit_lower).find(".") + precision + 1); std::string limit_upper_value = std::to_string(limit_upper).substr(0, std::to_string(limit_upper).find(".") + precision + 1); std::string limit_range = " [" + limit_lower_value + ", " + limit_upper_value + "]"; std::string current_text = label->text().toStdString(); label->setText(QString((current_text + limit_range).c_str())); } void ControlPanel::setControlButtons() { claimLeaseButton->setEnabled(!haveLease); releaseLeaseButton->setEnabled(haveLease); powerOnButton->setEnabled(haveLease); powerOffButton->setEnabled(haveLease); sitButton->setEnabled(haveLease); standButton->setEnabled(haveLease); setBodyPoseButton->setEnabled(haveLease); setBodyNeutralButton->setEnabled(haveLease); setMaxVelButton->setEnabled(haveLease); releaseStopButton->setEnabled(haveLease && isEStopped); hardStopButton->setEnabled(haveLease); gentleStopButton->setEnabled(haveLease); stopButton->setEnabled(haveLease); setGaitButton->setEnabled(haveLease); setSwingHeightButton->setEnabled(haveLease); setObstaclePaddingButton->setEnabled(haveLease); setFrictionButton->setEnabled(haveLease); setGratedSurfacesButton->setEnabled(haveLease); allowMotionButton->setEnabled(haveLease); dockButton->setEnabled(haveLease); undockButton->setEnabled(haveLease); selfRightButton->setEnabled(haveLease); rollOverLeftButton->setEnabled(haveLease); rollOverRightButton->setEnabled(haveLease); } /** * @brief Call a ros std_msgs/Trigger service * * Modifies the status label text depending on the result * * @param service Service to call * @param serviceName Name of the service to use in labels * @return true if successfully called * @return false otherwise */ bool ControlPanel::callTriggerService(ros::ServiceClient service, std::string serviceName) { std_srvs::Trigger req; return callCustomTriggerService(service, serviceName, req); } template <typename T> /** * @brief Call an arbitrary service which has a response type of bool, str * * Modifies the status label text depending on the result * * @param service Service to call * @param serviceName Name of the service to use in labels * @param serviceRequest Request to make to the service * @return true if successfully called * @return false otherwise */ bool ControlPanel::callCustomTriggerService(ros::ServiceClient service, std::string serviceName, T serviceRequest) { std::string labelText = "Calling " + serviceName + " service"; statusLabel->setText(QString(labelText.c_str())); if (service.call(serviceRequest)) { if (serviceRequest.response.success) { labelText = "Successfully called " + serviceName + " service"; statusLabel->setText(QString(labelText.c_str())); return true; } else { labelText = serviceName + " service failed: " + serviceRequest.response.message; statusLabel->setText(QString(labelText.c_str())); return false; } } else { labelText = "Failed to call " + serviceName + " service" + serviceRequest.response.message; statusLabel->setText(QString(labelText.c_str())); return false; } } /** * @brief Check held leases and enable or disable buttons accordingly * * check to see if the body is already owned by the ROS node * the resource will be "body" and the lease_owner.client_name will begin with "ros_spot" * if the claim exists, treat this as a successful click of the Claim button * if the claim does not exist, treat this as a click of the Release button * * @param leases */ void ControlPanel::leaseCallback(const spot_msgs::LeaseArray::ConstPtr &leases) { bool msg_has_lease = false; for (int i=leases->resources.size()-1; i>=0; i--) { const spot_msgs::LeaseResource &resource = leases->resources[i]; bool right_resource = resource.resource.compare("body") == 0; bool owned_by_ros = resource.lease_owner.client_name.compare(0, 8, "ros_spot") == 0; if (right_resource && owned_by_ros) { msg_has_lease = true; } } if (msg_has_lease != haveLease) { haveLease = msg_has_lease; setControlButtons(); } } /** * @brief Check estop state and disable control buttons if estopped * * @param estops */ void ControlPanel::estopCallback(const spot_msgs::EStopStateArray::ConstPtr &estops) { bool softwareEstopped = false; bool estopped = false; std::string estopString("E-stops:"); for (const auto& estop : estops->estop_states) { // Can't release hardware estops from the sdk bool stopped = false; if (estop.state == spot_msgs::EStopState::STATE_ESTOPPED) { if (estop.type == spot_msgs::EStopState::TYPE_SOFTWARE) { softwareEstopped = true; } stopped = true; } std::string stoppedStr(stopped ? "On" : "Off"); if (estop.name == "hardware_estop") { estopString += " hardware: " + stoppedStr; } else if (estop.name == "payload_estop") { estopString += " payload: " + stoppedStr; } else if (estop.name == "software_estop") { estopString += " software: " + stoppedStr; } else { estopString += " " + estop.name + ": " + stoppedStr; } } estopLabel->setText(QString(estopString.c_str())); if (softwareEstopped != isEStopped) { isEStopped = softwareEstopped; setControlButtons(); } } void ControlPanel::mobilityParamsCallback(const spot_msgs::MobilityParams::ConstPtr &params) { if (*params == _lastMobilityParams) { // If we don't check this, the user will never be able to modify values since they will constantly reset return; } linearXSpin->setValue(params->velocity_limit.linear.x); linearYSpin->setValue(params->velocity_limit.linear.y); angularZSpin->setValue(params->velocity_limit.angular.z); // Set the combo box values depending on whether there is a nonzero value coming from the params. If there isn't, // set the value based on what it is when using the controller if (params->locomotion_hint > 0) { gaitComboBox->setCurrentIndex(gaitComboBox->findText(gaitMap.at(params->locomotion_hint).c_str())); } else { gaitComboBox->setCurrentIndex(gaitComboBox->findText(gaitMap.at(spot_msgs::SetLocomotion::Request::HINT_AUTO).c_str())); } if (params->swing_height > 0) { swingHeightComboBox->setCurrentIndex(swingHeightComboBox->findText(swingHeightMap.at(params->swing_height).c_str())); } else { swingHeightComboBox->setCurrentIndex(swingHeightComboBox->findText(swingHeightMap.at(spot_msgs::SetSwingHeight::Request::SWING_HEIGHT_MEDIUM).c_str())); } if (params->terrain_params.grated_surfaces_mode > 0) { gratedSurfacesComboBox->setCurrentIndex(gratedSurfacesComboBox->findText(gratedSurfacesMap.at(params->terrain_params.grated_surfaces_mode).c_str())); } else { gratedSurfacesComboBox->setCurrentIndex(gratedSurfacesComboBox->findText(gratedSurfacesMap.at(spot_msgs::TerrainParams::GRATED_SURFACES_MODE_AUTO).c_str())); } _lastMobilityParams = *params; } void ControlPanel::batteryCallback(const spot_msgs::BatteryStateArray::ConstPtr &battery) { spot_msgs::BatteryState battState = battery->battery_states[0]; std::string estRuntime = "Estimated runtime: " + std::to_string(battState.estimated_runtime.sec/60) + " min"; estimatedRuntimeLabel->setText(QString(estRuntime.c_str())); auto temps = battState.temperatures; if (!temps.empty()) { auto minmax = std::minmax_element(temps.begin(), temps.end()); float total = std::accumulate(temps.begin(), temps.end(), 0); // Don't care about float values here int tempMin = *minmax.first; int tempMax = *minmax.second; int tempAvg = total / temps.size(); std::string battTemp = "Battery temp: min " + std::to_string(tempMin) + ", max " + std::to_string(tempMax) + ", avg " + std::to_string(tempAvg); batteryTempLabel->setText(QString(battTemp.c_str())); } else { batteryTempLabel->setText(QString("Battery temp: No battery")); } std::string status; switch (battState.status) { case spot_msgs::BatteryState::STATUS_UNKNOWN: status = "Unknown"; break; case spot_msgs::BatteryState::STATUS_MISSING: status = "Missing"; break; case spot_msgs::BatteryState::STATUS_CHARGING: status = "Charging"; break; case spot_msgs::BatteryState::STATUS_DISCHARGING: status = "Discharging"; break; case spot_msgs::BatteryState::STATUS_BOOTING: status = "Booting"; break; default: status = "Invalid"; break; } std::string battStatusStr; if (battState.status == spot_msgs::BatteryState::STATUS_CHARGING || battState.status == spot_msgs::BatteryState::STATUS_DISCHARGING) { // TODO: use std::format in c++20 rather than this nastiness std::stringstream stream; stream << std::fixed << std::setprecision(0) << battState.charge_percentage; std::string pct = stream.str() + "%"; stream.str(""); stream.clear(); stream << std::fixed << std::setprecision(1) << battState.voltage; std::string volt = stream.str() + "V"; stream.str(""); stream.clear(); stream << battState.current; std::string amp = stream.str() + "A"; battStatusStr = "Battery state: " + status + ", " + pct + ", " + volt + ", " + amp; } else { battStatusStr = "Battery state: " + status; } batteryStateLabel->setText(QString(battStatusStr.c_str())); } void ControlPanel::powerCallback(const spot_msgs::PowerState::ConstPtr &power) { std::string state; switch (power->motor_power_state) { case spot_msgs::PowerState::STATE_POWERING_ON: state = "Powering on"; powerOnButton->setEnabled(false); break; case spot_msgs::PowerState::STATE_POWERING_OFF: state = "Powering off"; powerOffButton->setEnabled(false); sitButton->setEnabled(false); standButton->setEnabled(false); break; case spot_msgs::PowerState::STATE_ON: state = "On"; powerOnButton->setEnabled(false); powerOffButton->setEnabled(true); sitButton->setEnabled(true); standButton->setEnabled(true); break; case spot_msgs::PowerState::STATE_OFF: state = "Off"; powerOnButton->setEnabled(true && haveLease); powerOffButton->setEnabled(false); sitButton->setEnabled(false); standButton->setEnabled(false); break; case spot_msgs::PowerState::STATE_ERROR: state = "Error"; break; case spot_msgs::PowerState::STATE_UNKNOWN: state = "Unknown"; break; default: "Invalid"; } std::string motorState = "Motor state: " + state; motorStateLabel->setText(QString(motorState.c_str())); } void ControlPanel::motionAllowedCallback(const std_msgs::Bool &motion_allowed) { motionAllowed = motion_allowed.data; if (!motion_allowed.data) { stopButton->setText("Motion is disallowed"); stopButton->setEnabled(false); allowMotionButton->setText("Allow motion"); } else { stopButton->setText("Stop"); if (haveLease) { stopButton->setEnabled(true); } allowMotionButton->setText("Disallow motion"); } } void ControlPanel::sit() { callTriggerService(sitService_, "sit"); } void ControlPanel::stand() { callTriggerService(standService_, "stand"); } void ControlPanel::powerOn() { callTriggerService(powerOnService_, "power on"); } void ControlPanel::powerOff() { callTriggerService(powerOffService_, "power off"); } void ControlPanel::claimLease() { if (callTriggerService(claimLeaseService_, "claim lease")) claimLeaseButton->setEnabled(false); } void ControlPanel::releaseLease() { if (callTriggerService(releaseLeaseService_, "release lease")) releaseLeaseButton->setEnabled(false); } void ControlPanel::stop() { callTriggerService(stopService_, "stop"); } void ControlPanel::allowMotion() { std_srvs::SetBool req; req.request.data = !motionAllowed; callCustomTriggerService(allowMotionService_, "set motion allowed", req); } void ControlPanel::hardStop() { callTriggerService(hardStopService_, "hard stop"); } void ControlPanel::gentleStop() { callTriggerService(gentleStopService_, "gentle stop"); } void ControlPanel::releaseStop() { callTriggerService(releaseStopService_, "release stop"); } void ControlPanel::setMaxVel() { spot_msgs::SetVelocity req; req.request.velocity_limit.angular.z = angularZSpin->value(); req.request.velocity_limit.linear.x = linearXSpin->value(); req.request.velocity_limit.linear.y = linearYSpin->value(); callCustomTriggerService(maxVelocityService_, "set velocity limits", req); } void ControlPanel::sendBodyPose() { ROS_INFO("Sending body pose"); spot_msgs::PosedStand req; req.request.body_height = bodyHeightSpin->value(); req.request.body_yaw = yawSpin->value(); req.request.body_pitch = pitchSpin->value(); req.request.body_roll = rollSpin->value(); callCustomTriggerService(bodyPoseService_, "set body pose", req); } void ControlPanel::sendNeutralBodyPose() { ROS_INFO("Sending body neutral pose"); spot_msgs::PosedStand req; callCustomTriggerService(bodyPoseService_, "set body pose", req); } /** * @brief Get the message constant integer that corresponds to the currently selected combobox item * * @param comboBox Combobox whose selection should be checked * @param comboBoxMap Mapping from message constants to text in the combobox * @return int > 0 indicating the map constant, or -1 if it couldn't be found */ int comboBoxSelectionToMessageConstantInt(QComboBox* comboBox, const std::map<uint, std::string>& comboBoxMap) { std::string selectionText = comboBox->currentText().toStdString(); for (const auto& item : comboBoxMap) { if (selectionText == item.second) { return item.first; } } return -1; } void ControlPanel::setGait() { spot_msgs::SetLocomotion req; req.request.locomotion_mode = comboBoxSelectionToMessageConstantInt(gaitComboBox, gaitMap); callCustomTriggerService(gaitService_, "set gait", req); } void ControlPanel::setSwingHeight() { spot_msgs::SetSwingHeight req; req.request.swing_height = comboBoxSelectionToMessageConstantInt(swingHeightComboBox, swingHeightMap); callCustomTriggerService(swingHeightService_, "set swing height", req); } void ControlPanel::setTerrainParams() { spot_msgs::SetTerrainParams req; req.request.terrain_params.grated_surfaces_mode = comboBoxSelectionToMessageConstantInt(gratedSurfacesComboBox, gratedSurfacesMap); req.request.terrain_params.ground_mu_hint = frictionSpin->value(); callCustomTriggerService(terrainParamsService_, "set terrain params", req); } void ControlPanel::setObstacleParams() { spot_msgs::SetObstacleParams req; req.request.obstacle_params.obstacle_avoidance_padding = obstaclePaddingSpin->value(); callCustomTriggerService(obstacleParamsService_, "set obstacle params", req); } void ControlPanel::undock() { callTriggerService(undockService_, "undock"); } void ControlPanel::dock() { spot_msgs::Dock req; req.request.dock_id = dockFiducialSpin->value(); callCustomTriggerService(dockService_, "dock", req); } void ControlPanel::selfRight() { callTriggerService(selfRightService_, "self right"); } void ControlPanel::rollOverLeft() { callTriggerService(rollOverLeftService_, "roll over left"); } void ControlPanel::rollOverRight() { callTriggerService(rollOverRightService_, "roll over left"); } void ControlPanel::save(rviz::Config config) const { rviz::Panel::save(config); } // Load all configuration data for this panel from the given Config object. void ControlPanel::load(const rviz::Config &config) { rviz::Panel::load(config); } } // end namespace spot_viz #include <pluginlib/class_list_macros.h> PLUGINLIB_EXPORT_CLASS(spot_viz::ControlPanel, rviz::Panel) // END_TUTORIAL
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/CHANGELOG.rst
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Changelog for package spot_driver ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Forthcoming ----------- 1.0.0 (2023-04-07) ------------------ * add python-transforms3d-pip to package xml * add odometry topic which outputs twist in correct frame, fixes `#95 <https://github.com/heuristicus/spot_ros/issues/95>`_ * subscriber check now polls also depth/info topics * fix tf repeated message spam when publishing tfs at high frequency * increase velocity command timeout to 0.6 seconds probably fixes `#96 <https://github.com/heuristicus/spot_ros/issues/96>`_ * complete revision of the documentation mostly up to date with the current driver state * fix incorrect actionserver in use for in motion body pose * update maintainer * robots without arms do not require manipulation client * black formatting * connect up buttons, fix undock call, fix dock actionserver name * fix last docking command assignment, reset last stand command on dock. Fixes `#110 <https://github.com/heuristicus/spot_ros/issues/110>`_ * add actionserver for docking/undocking * Fix spam when point cloud client is not initialised because there is no EAP * changed rospy to logging.Logger dependency * removed arm controller trial * changed to correct tasks list * changed list name * changed lookup name * changed lookup definiton * only add tasks when needed * updates after testing picking and placing on real spot - added some useful arguments to msg definitions * starting to implement controller action server for moveit support * implemented grasp service * apply black formatting and add black check on PRs and pushes * only add hand camera task if arm * corrected index * added warn messages for out of range * reviewed limits for spot arm * changed gripper_open_angle to take degrees * adressed layout review comments * changed to fix sized arrays * changed hand pose msg * fixed indentation and removed walk to pixel method * add RollOver functions * include fix for failing service call * driver start process loops where it can fail due to the robot still booting. More messages about what it is doing. * posed stand actionserver sleeps a bit before returning to allow the motion to complete * implemented helper function for DockState message * use correct action and service fields, set actionserver result * add an actionserver for stand commands * Driver config file can be passed as an arg to driver launch * ROS loop rate can be set in params to allow higher publication frequencies * Wrapper method to walk to object * Subscriber to walk to object in picture ROS_NAMESPACE=spot rosrun my_grasping image_box.py Then click on pixel to walk to * service for getting dock state * print error messages when the estop keepalive has errors, initialise keepalive to none in init * autonomy is not allowed if the robot is on shore power, cmd_vel counts as autonomy * Created service for gripper pose * Added method to send location to gripper * rename old body_pose topic to try and reflect what it actually does * Methods: body to follow arm, arm force trajectory * Services for body follow arm, force trajectory arm * add posed_stand service which can be used to pose the body This also adds a check to the async_idle which prevents the idle stand command from activating while there is a command which has a non-None id. This should prevent commands from getting interrupted by that stand * Updated the way to ensure power on & spot standing * add terrain state to foot state, publish tf of foot position rt body * Method added to check Spot is powered on and standing New method: check_arm_power_and_stand * Removed Estop check before arm moves * Change method name Changed method's name from "make_robot_command" to "make_arm_trajectory_command" for clarity * Removed unnecessary code for testing Powering off robot after moving the arm was removed; removed unnecessay sleep when moving the arm * Added carry option for arm and hand images Hand images from EricVoll * Added hand image rate * tab shown on startup should be basic motion tab, minor fixes * allowed to move check has arg which specifies if autonomy enabled should be checked * sit, stand and self right disabled when motion disabled, ui has button for allow motion The stop button in the ui will now call the locked stop. Stop button is disabled and has its text changed when motion is not allowed * add locked_stop service which interrupts current motion and disallows further motion Publisher for the state of allow motion * Advanced motion tab, obstacle and terrain params added to driver and panel Move more advanced motion settings into the adv. motion tab to not clutter the basic motion. The settings there (ground friction, gait, swing height, grated surface mode) are I suspect relatively rarely used. Obstacle params message added, which allows the settings for the obstacle avoidance to be published from the driver. These are as usual empty by default since the SDK does not provide details. Currently the only modification allowed is to the obstacle padding. Terrain params message added, which allows setting of the ground friction and grated surfaces mode. Terrain and obstacle params are in the mobility params message published by the driver. Rviz panel allows interaction with the terrain and obstacle params. Comboboxes are now initialised by using a map generated from the constants in the ros messages, to try and make sure the ordering is correct. The map is also useful for constants which are non-consecutive like in the locomotion, for some reason the 9th value is unused but the 10th is. * velocity and body controls are in different tabs, add swing height and gait control add checks to ensure only valid values for locomotion and swing height are sent to the mobility params * additional layer of control over whether motion is allowed, which can be changed while the driver is running * reject velocity limits in the range 0 < lim < 0.15 as there can be issues with the trajectory command * allow velocity limits to be set in the driver launch and load them on start Also updats the mobility params message to store the velocity limits If the limits change, the rviz panel is updated with the latest values * initialise stop service after actionservers that it calls to prevent crashes if called during startup * add a flag to explicitly enable autonomous functions * add ros param to set the estop timeout, wrapper takes it as an arg * track when the trajectory command returns status unknown, and try to resend the command once * tolist() -> tobytes() * not build client if no point_cloud services are available * fix data type float32 -> uint8 * add lidar topic publisher, tf broadcaster * ros helpers with PointCloud * publish pointcloud from VLP16 * Service for gripper open at an angle * Wrapper updated to open gripper at a given angle * Implemented Close/open gripper services * Added open & close gripper services * Added stow, unstow, and control joints of the arm commands. * add spot dock and undock service * add ros param to set the estop timeout, wrapper takes it as an arg * calling the stop service now preempts actionservers if they are active * no longer reject trajectory poses which are not in body frame, just transform them * add topic go_to_pose which can be used to move the robot with the trajectory command * rename max_velocity to velocity_limit, now also limits velocity when moving backwards * add actionserver to set body pose * Add an additional envar to disable auto-launching the Velodyne as this _could\_ cause network issues * Fix a mismatched tag * Add the teleop_joy dependency * Use the velodyne_description package for the actual sensor mesh, use the cage as a separate entity. Add an accessories.launch file to automatically bring up the velodyne if needed * Add the bluetooth_teleop node, default config file. * Simple rviz panel for interaction with spot Can use the panel to claim and release the lease, power on and off, sit down and stand up, and set the body pose. To add, go to panels>add new panel and select SpotControlPanel in spot_viz * can require trajectory commands to reach goal precisely Add precise_positioning field to the trajectory goal. Setting to true will make the wrapper consider only STATUS_AT_GOAL status to mean that the robot is at the goal. Setting to false will replicate previous behaviour where STATUS_NEAR_GOAL also means that the robot is at the goal. Vary feedback messages from the driver depending on whether the precise positioning field was set. * Include the license file in the individual ROS packages * Add service call to set maximum velocity, use synchro trajectory command The service call receives a twist message and sets the mobility params vel_lim max_vel to the linear x and y, and angular z values in the message. This velocity limit affects anything that moves the robot around, such as the trajectory command and velocity command. The service call adds a srv to spot_msgs Output exception string when power_on command fails Fix minor typo in behavior_fault function name Populate state_description in the estop state message Minor cosmetic changes to srv imports and some comments for readability * Updated E-Stop to use keepalive client rather than the endpoint. Fixes a bug where the E-Stop would release immeaditly after being triggered (`#38 <https://github.com/heuristicus/spot_ros/issues/38>`_) Co-authored-by: marble-spot <[email protected]> * Add trajectory command interface (`#25 <https://github.com/heuristicus/spot_ros/issues/25>`_) * [spot_driver] add trajectory_cmd() method to spot_wrapper * [spot_driver] rename _last_motion_command to _last_trajectory_command * [spot_driver] rename _last_motion_command_time to _last_velocity_command_time * [spot_driver] fix trajectory_cmd * [spot_driver] fix options of trajectory_cmd() * [spot_msgs] add Trajectory.srv * [spot_driver] add trajectory service server * [spot_ros] add frame_id checking to trajectory_cmd * [spot_driver] fix bugs * [spot_driver] fix bugs in trajectory_cmd * convert trajectory command to an actionserver * [spot_ros] fix merge commit * [spot_driver] allow STATUS_NEAR_GOAL to be recognized as at_goal * [spot_driver] add handling for 0 duration Co-authored-by: Michal Staniaszek <[email protected]> Co-authored-by: Dave Niewinski <[email protected]> * Added service for clearing behavior faults (`#34 <https://github.com/heuristicus/spot_ros/issues/34>`_) * Create runtime static transform broadcaster for camera transforms (`#31 <https://github.com/heuristicus/spot_ros/issues/31>`_) The transforms between the body and camera frames are static and will not change. This change checks the transform for static frames once when an image with the required data is received. It then stores the transform to be published by a static transform publisher. Previously when the robot was moved quickly there would be a lag between the camera frames updating and the actual position of the robot. With static transforms the cameras are always in the correct position relative to the body. * Package structure more in line with ROS recommendation for python, works on noetic (`#32 <https://github.com/heuristicus/spot_ros/issues/32>`_) * install graph_nav_util with catkin_install_python * fix usage of Image.Format to be consistent with other usages Using Image.Format.FORMAT_RAW causes an AttributeError: AttributeError: 'EnumTypeWrapper' object has no attribute 'FORMAT_RAW' The usage here was inconsistent with usages in other files. * fix python package structure to work on noetic * fix shebang line in spot_ros, explicitly specify use of python3 * Updated command feedback protos and expanded twist mux * Fix image format and include graph_nav_util in install (`#29 <https://github.com/heuristicus/spot_ros/issues/29>`_) * install graph_nav_util with catkin_install_python * fix usage of Image.Format to be consistent with other usages Using Image.Format.FORMAT_RAW causes an AttributeError: AttributeError: 'EnumTypeWrapper' object has no attribute 'FORMAT_RAW' The usage here was inconsistent with usages in other files. * changed to use ros logging instead of print (`#14 <https://github.com/heuristicus/spot_ros/issues/14>`_) * [spot_driver] change print() to ros logging * [spot_driver] use ros logger instead of print() * Updated some deprecated functions * [spot_driver] bugfix for walking-mode * [spot_driver] add mobility params publisher * [spot_driver] fix locomotion_mode service * [spot_driver] add locomotion_mode service * [spot_driver] add stair_mode service to spot_ros * [spot_driver] add get_mobility_params method and change set_mobility_params method * fix for version v2.2.1, skip waypint\_ instead of waypoint * support graphnav navigate-to * add missing assignment to w field of quaternion * Changed cmd_vel queue size to 1 from infinite to prevent controller lag * Minor workaround for invalid timestamps * [spot_driver] changed the names of odometry frames to default * [spot_driver] changed default odom to kinematic odometry * [spot_driver] add exception handlings to AsyncIdle class * Publish /odom * [spot_driver] add rosparams to determine a parent odometry frame * [spot_driver] delete commented lines and redundant variables * Publish /vision tf as the parent of /body tf * [spot_driver] add python3-rospkg-modules dependency * Use 16UC1 instead of mono16 for depth image encoding * add twist_mux, interactive_marker_twist_server dependency * Removed token as of api 2.0 * Moved resetting and claiming estop out of spot ros startup * add install instructions * Updated URDF to include mount points, and deps for install * Incorporating clock skew between spot and ROS machine * Initial stab as accomodating skew between systems. Untested * Properly implemented checking the status of commands. Added a feedback message * Made the driver not automatically claim a body lease and e stop. Allows you to monitor without having control. Disconnect doesn't exit very gracefully. Need to wait on sitting success * Not defining a rate or defining a rate of <= 0 will disable a data source * Updated image type selection to use protobuf enums * Disabled auto standing by default. Updated api version numbering * Updated dependencies * Fixed mobility params when switching between movement and stationary * Lots of little fixes. Body positioning logic is broken * Error-checking improved * removed unnecessary interactive marker * Updated the estop setup so it is externally controllable * Mobility parameters implemented. Some stuff still hard-coded * Basic motion. Lots to clean up * Added lots of docstrings * Added services for power, stand, sit, self-right, and stop * Updated doc outline. Still missing updated docstrings * Refactoring to keep all the ros message building separate * Got depth images working * Added rosdoc * Added image streams into ROS * Fixed all the little mistakes from the last commit * Blocked-out remainder of robot state callback. Untested * Added messages and brought metrics and leases into ros * Refactored the ros driver to be cleaner. Added a lot of docstrings. Incomplete * Squashed commit of the following: commit 0424b961e75b0e8f4143424e9fb0121ee5b3c01c Author: Dave Niewinski <[email protected]> Date: Mon May 11 16:36:55 2020 -0400 Updated logging commit afdc5301f2b73f219b51ae3ce7c56e0f036e75a6 Author: Dave Niewinski <[email protected]> Date: Mon May 11 15:00:27 2020 -0400 Added launch and params commit 8c1066108d3cc2955cf49a73a75e3d249a8704d2 Author: Dave Niewinski <[email protected]> Date: Fri May 8 15:04:48 2020 -0400 Basic ros support implemented. Outputs joint angles, and odom commit 3f71252b182738234cc54e581cac3b8a54874733 Author: Dave Niewinski <[email protected]> Date: Wed May 6 16:46:21 2020 -0400 Basic functionality, just printing in the terminal. commit 505c17e1d4d5a28d14872d81e2f11b60b61135e9 Author: Dave Niewinski <[email protected]> Date: Wed May 6 14:00:42 2020 -0400 Initial pass at data from robot * Contributors: Chris Iverach-Brereton, Dave Niewinski, Esther, Harel Biggie, Kei Okada, Koki Shinjo, Maurice Brunner, Michal Staniaszek, Michel Heinemann, Naoto Tsukamoto, Naoya Yamaguchi, SpotCOREAI, Telios, Wolf Vollprecht, Yoshiki Obinata, harelb, jeremysee2, maubrunn, nfilliol
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/rosdoc.yaml
- builder: sphinx sphinx_root_dir: doc
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/setup.py
from setuptools import setup from catkin_pkg.python_setup import generate_distutils_setup d = generate_distutils_setup( packages=["spot_driver"], scripts=["scripts/spot_ros"], package_dir={"": "src"} ) setup(**d)
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3) project(spot_driver) find_package(catkin REQUIRED COMPONENTS rospy ) catkin_package() catkin_python_setup() include_directories( ${catkin_INCLUDE_DIRS} ) catkin_install_python(PROGRAMS scripts/spot_ros DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} ) install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) install(DIRECTORY doc DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) install(DIRECTORY config DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/package.xml
<?xml version="1.0"?> <package format="2"> <name>spot_driver</name> <version>1.0.0</version> <description>The spot_driver package</description> <maintainer email="[email protected]">Michal Staniaszek</maintainer> <license>BSD</license> <buildtool_depend>catkin</buildtool_depend> <exec_depend>spot_msgs</exec_depend> <exec_depend>std_srvs</exec_depend> <exec_depend>tf2_msgs</exec_depend> <exec_depend>tf2_geometry_msgs</exec_depend> <exec_depend>geometry_msgs</exec_depend> <exec_depend>sensor_msgs</exec_depend> <exec_depend>rospy</exec_depend> <exec_depend>python3-rospkg-modules</exec_depend> <exec_depend>twist_mux</exec_depend> <exec_depend>interactive_marker_twist_server</exec_depend> <exec_depend>teleop_twist_joy</exec_depend> <exec_depend>velodyne_pointcloud</exec_depend> <exec_depend>python-transforms3d-pip</exec_depend> <export> <rosdoc config="rosdoc.yaml" /> </export> </package>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/launch/accessories.launch
<launch> <group if="$(eval optenv('SPOT_VELODYNE', 0) and optenv('SPOT_VELODYNE_AUTOLAUNCH', 1))"> <include file="$(find velodyne_pointcloud)/launch/VLP16_points.launch"> <arg name="device_ip" value="$(optenv SPOT_VELODYNE_HOST 192.168.131.20)" /> </include> </group> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/launch/control.launch
<launch> <arg name="joy" default="true" /> <arg name="joy_dev" default="$(optenv SPOT_JOY_DEVICE /dev/input/js0)" /> <arg name="joy_config" default="$(eval optenv('SPOT_JOY_CONFIG', find('spot_driver') + '/config/teleop.yaml'))" /> <node pkg="interactive_marker_twist_server" type="marker_server" name="twist_marker_server" > <rosparam command="load" file="$(find spot_driver)/config/planar.yaml" /> <param name="link_name" value="body" /> <param name="robot_name" value="spot" /> </node> <group if="$(arg joy)"> <rosparam command="load" ns="bluetooth_teleop" file="$(arg joy_config)" /> <group ns="bluetooth_teleop"> <param name="joy_node/dev" value="$(arg joy_dev)" /> <node pkg="joy" type="joy_node" name="joy_node" /> <node pkg="teleop_twist_joy" type="teleop_node" name="teleop_twist_joy"/> </group> </group> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/launch/driver.launch
<launch> <arg name="username" default="dummyusername" /> <arg name="password" default="dummypassword" /> <arg name="hostname" default="192.168.50.3" /> <arg name="estop_timeout" default="9.0"/> <arg name="autonomy_enabled" default="true"/> <!-- In m/s. 0 applies spot's internal limits --> <arg name="max_linear_velocity_x" default="0"/> <arg name="max_linear_velocity_y" default="0"/> <arg name="max_angular_velocity_z" default="0"/> <arg name="allow_motion" default="true"/> <arg name="driver_config" default="$(find spot_driver)/config/spot_ros.yaml"/> <include file="$(find spot_description)/launch/description.launch" /> <include file="$(find spot_driver)/launch/control.launch" /> <include file="$(find spot_driver)/launch/accessories.launch" /> <node pkg="spot_driver" type="spot_ros" name="spot_ros" ns="spot" output="screen"> <rosparam file="$(arg driver_config)" command="load" /> <param name="username" value="$(arg username)" /> <param name="password" value="$(arg password)" /> <param name="hostname" value="$(arg hostname)" /> <param name="estop_timeout" value="$(arg estop_timeout)"/> <param name="autonomy_enabled" value="$(arg autonomy_enabled)"/> <param name="estop_timeout" value="$(arg estop_timeout)"/> <param name="max_linear_velocity_x" value="$(arg max_linear_velocity_x)"/> <param name="max_linear_velocity_y" value="$(arg max_linear_velocity_y)"/> <param name="max_angular_velocity_z" value="$(arg max_angular_velocity_z)"/> <param name="allow_motion" value="$(arg allow_motion)"/> <remap from="joint_states" to="/joint_states"/> <remap from="tf" to="/tf"/> </node> <node pkg="twist_mux" type="twist_mux" name="twist_mux" > <rosparam command="load" file="$(find spot_driver)/config/twist_mux.yaml" /> <remap from="cmd_vel_out" to="spot/cmd_vel"/> </node> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/src/spot_driver/__init__.py
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/src/spot_driver/spot_ros.py
import copy import rospy import math import time from std_srvs.srv import Trigger, TriggerResponse, SetBool, SetBoolResponse from std_msgs.msg import Bool from tf2_msgs.msg import TFMessage from sensor_msgs.msg import Image, CameraInfo from sensor_msgs.msg import PointCloud2 from sensor_msgs.msg import JointState from geometry_msgs.msg import TwistWithCovarianceStamped, Twist, Pose, PoseStamped from nav_msgs.msg import Odometry from bosdyn.api.spot import robot_command_pb2 as spot_command_pb2 from bosdyn.api import geometry_pb2, trajectory_pb2 from bosdyn.api.geometry_pb2 import Quaternion, SE2VelocityLimit from bosdyn.client import math_helpers from google.protobuf.wrappers_pb2 import DoubleValue import actionlib import functools import math import bosdyn.geometry import tf2_ros import tf2_geometry_msgs from spot_msgs.msg import Metrics from spot_msgs.msg import LeaseArray, LeaseResource from spot_msgs.msg import FootState, FootStateArray from spot_msgs.msg import EStopState, EStopStateArray from spot_msgs.msg import WiFiState from spot_msgs.msg import PowerState from spot_msgs.msg import BehaviorFault, BehaviorFaultState from spot_msgs.msg import SystemFault, SystemFaultState from spot_msgs.msg import BatteryState, BatteryStateArray from spot_msgs.msg import DockAction, DockGoal, DockResult from spot_msgs.msg import PoseBodyAction, PoseBodyGoal, PoseBodyResult from spot_msgs.msg import Feedback from spot_msgs.msg import MobilityParams, ObstacleParams, TerrainParams from spot_msgs.msg import NavigateToAction, NavigateToResult, NavigateToFeedback from spot_msgs.msg import TrajectoryAction, TrajectoryResult, TrajectoryFeedback from spot_msgs.srv import ListGraph, ListGraphResponse from spot_msgs.srv import SetLocomotion, SetLocomotionResponse from spot_msgs.srv import SetTerrainParams, SetTerrainParamsResponse from spot_msgs.srv import SetObstacleParams, SetObstacleParamsResponse from spot_msgs.srv import ClearBehaviorFault, ClearBehaviorFaultResponse from spot_msgs.srv import SetVelocity, SetVelocityResponse from spot_msgs.srv import Dock, DockResponse, GetDockState, GetDockStateResponse from spot_msgs.srv import PosedStand, PosedStandResponse from spot_msgs.srv import SetSwingHeight, SetSwingHeightResponse from spot_msgs.srv import ( ArmJointMovement, ArmJointMovementResponse, ArmJointMovementRequest, ) from spot_msgs.srv import ( GripperAngleMove, GripperAngleMoveResponse, GripperAngleMoveRequest, ) from spot_msgs.srv import ( ArmForceTrajectory, ArmForceTrajectoryResponse, ArmForceTrajectoryRequest, ) from spot_msgs.srv import HandPose, HandPoseResponse, HandPoseRequest from spot_msgs.srv import Grasp3d, Grasp3dRequest, Grasp3dResponse from .ros_helpers import * from spot_wrapper.wrapper import SpotWrapper import actionlib import logging import threading class RateLimitedCall: """ Wrap a function with this class to limit how frequently it can be called within a loop """ def __init__(self, fn, rate_limit): """ Args: fn: Function to call rate_limit: The function will not be called faster than this rate """ self.fn = fn self.min_time_between_calls = 1.0 / rate_limit self.last_call = 0 def __call__(self): now_sec = time.time() if (now_sec - self.last_call) > self.min_time_between_calls: self.fn() self.last_call = now_sec class SpotROS: """Parent class for using the wrapper. Defines all callbacks and keeps the wrapper alive""" def __init__(self): self.spot_wrapper = None self.last_tf_msg = TFMessage() self.callbacks = {} """Dictionary listing what callback to use for what data task""" self.callbacks["robot_state"] = self.RobotStateCB self.callbacks["metrics"] = self.MetricsCB self.callbacks["lease"] = self.LeaseCB self.callbacks["front_image"] = self.FrontImageCB self.callbacks["side_image"] = self.SideImageCB self.callbacks["rear_image"] = self.RearImageCB self.callbacks["hand_image"] = self.HandImageCB self.callbacks["lidar_points"] = self.PointCloudCB self.active_camera_tasks = [] self.camera_pub_to_async_task_mapping = {} def RobotStateCB(self, results): """Callback for when the Spot Wrapper gets new robot state data. Args: results: FutureWrapper object of AsyncPeriodicQuery callback """ state = self.spot_wrapper.robot_state if state: ## joint states ## joint_state = GetJointStatesFromState(state, self.spot_wrapper) self.joint_state_pub.publish(joint_state) ## TF ## tf_msg = GetTFFromState(state, self.spot_wrapper, self.mode_parent_odom_tf) to_remove = [] if len(tf_msg.transforms) > 0: for transform in tf_msg.transforms: for last_tf in self.last_tf_msg.transforms: if transform == last_tf: to_remove.append(transform) if to_remove: # Do it this way to preserve the original tf message received. If we store the message we have # destroyed then if there are two duplicates in a row we will not remove the second set. deduplicated_tf = copy.deepcopy(tf_msg) for repeat_tf in to_remove: deduplicated_tf.transforms.remove(repeat_tf) publish_tf = deduplicated_tf else: publish_tf = tf_msg self.tf_pub.publish(publish_tf) self.last_tf_msg = tf_msg # Odom Twist # twist_odom_msg = GetOdomTwistFromState(state, self.spot_wrapper) self.odom_twist_pub.publish(twist_odom_msg) # Odom # use_vision = self.mode_parent_odom_tf == "vision" odom_msg = GetOdomFromState( state, self.spot_wrapper, use_vision=use_vision, ) self.odom_pub.publish(odom_msg) odom_corrected_msg = get_corrected_odom(odom_msg) self.odom_corrected_pub.publish(odom_corrected_msg) # Feet # foot_array_msg = GetFeetFromState(state, self.spot_wrapper) self.tf_pub.publish(generate_feet_tf(foot_array_msg)) self.feet_pub.publish(foot_array_msg) # EStop # estop_array_msg = GetEStopStateFromState(state, self.spot_wrapper) self.estop_pub.publish(estop_array_msg) # WIFI # wifi_msg = GetWifiFromState(state, self.spot_wrapper) self.wifi_pub.publish(wifi_msg) # Battery States # battery_states_array_msg = GetBatteryStatesFromState( state, self.spot_wrapper ) self.is_charging = ( battery_states_array_msg.battery_states[0].status == BatteryState.STATUS_CHARGING ) self.battery_pub.publish(battery_states_array_msg) # Power State # power_state_msg = GetPowerStatesFromState(state, self.spot_wrapper) self.power_pub.publish(power_state_msg) # System Faults # system_fault_state_msg = GetSystemFaultsFromState(state, self.spot_wrapper) self.system_faults_pub.publish(system_fault_state_msg) # Behavior Faults # behavior_fault_state_msg = getBehaviorFaultsFromState( state, self.spot_wrapper ) self.behavior_faults_pub.publish(behavior_fault_state_msg) def MetricsCB(self, results): """Callback for when the Spot Wrapper gets new metrics data. Args: results: FutureWrapper object of AsyncPeriodicQuery callback """ metrics = self.spot_wrapper.metrics if metrics: metrics_msg = Metrics() local_time = self.spot_wrapper.robotToLocalTime(metrics.timestamp) metrics_msg.header.stamp = rospy.Time(local_time.seconds, local_time.nanos) for metric in metrics.metrics: if metric.label == "distance": metrics_msg.distance = metric.float_value if metric.label == "gait cycles": metrics_msg.gait_cycles = metric.int_value if metric.label == "time moving": metrics_msg.time_moving = rospy.Time( metric.duration.seconds, metric.duration.nanos ) if metric.label == "electric power": metrics_msg.electric_power = rospy.Time( metric.duration.seconds, metric.duration.nanos ) self.metrics_pub.publish(metrics_msg) def LeaseCB(self, results): """Callback for when the Spot Wrapper gets new lease data. Args: results: FutureWrapper object of AsyncPeriodicQuery callback """ lease_array_msg = LeaseArray() lease_list = self.spot_wrapper.lease if lease_list: for resource in lease_list: new_resource = LeaseResource() new_resource.resource = resource.resource new_resource.lease.resource = resource.lease.resource new_resource.lease.epoch = resource.lease.epoch for seq in resource.lease.sequence: new_resource.lease.sequence.append(seq) new_resource.lease_owner.client_name = resource.lease_owner.client_name new_resource.lease_owner.user_name = resource.lease_owner.user_name lease_array_msg.resources.append(new_resource) self.lease_pub.publish(lease_array_msg) def FrontImageCB(self, results): """Callback for when the Spot Wrapper gets new front image data. Args: results: FutureWrapper object of AsyncPeriodicQuery callback """ data = self.spot_wrapper.front_images if data: image_msg0, camera_info_msg0 = getImageMsg(data[0], self.spot_wrapper) self.frontleft_image_pub.publish(image_msg0) self.frontleft_image_info_pub.publish(camera_info_msg0) image_msg1, camera_info_msg1 = getImageMsg(data[1], self.spot_wrapper) self.frontright_image_pub.publish(image_msg1) self.frontright_image_info_pub.publish(camera_info_msg1) image_msg2, camera_info_msg2 = getImageMsg(data[2], self.spot_wrapper) self.frontleft_depth_pub.publish(image_msg2) self.frontleft_depth_info_pub.publish(camera_info_msg2) image_msg3, camera_info_msg3 = getImageMsg(data[3], self.spot_wrapper) self.frontright_depth_pub.publish(image_msg3) self.frontright_depth_info_pub.publish(camera_info_msg3) self.populate_camera_static_transforms(data[0]) self.populate_camera_static_transforms(data[1]) self.populate_camera_static_transforms(data[2]) self.populate_camera_static_transforms(data[3]) def SideImageCB(self, results): """Callback for when the Spot Wrapper gets new side image data. Args: results: FutureWrapper object of AsyncPeriodicQuery callback """ data = self.spot_wrapper.side_images if data: image_msg0, camera_info_msg0 = getImageMsg(data[0], self.spot_wrapper) self.left_image_pub.publish(image_msg0) self.left_image_info_pub.publish(camera_info_msg0) image_msg1, camera_info_msg1 = getImageMsg(data[1], self.spot_wrapper) self.right_image_pub.publish(image_msg1) self.right_image_info_pub.publish(camera_info_msg1) image_msg2, camera_info_msg2 = getImageMsg(data[2], self.spot_wrapper) self.left_depth_pub.publish(image_msg2) self.left_depth_info_pub.publish(camera_info_msg2) image_msg3, camera_info_msg3 = getImageMsg(data[3], self.spot_wrapper) self.right_depth_pub.publish(image_msg3) self.right_depth_info_pub.publish(camera_info_msg3) self.populate_camera_static_transforms(data[0]) self.populate_camera_static_transforms(data[1]) self.populate_camera_static_transforms(data[2]) self.populate_camera_static_transforms(data[3]) def RearImageCB(self, results): """Callback for when the Spot Wrapper gets new rear image data. Args: results: FutureWrapper object of AsyncPeriodicQuery callback """ data = self.spot_wrapper.rear_images if data: mage_msg0, camera_info_msg0 = getImageMsg(data[0], self.spot_wrapper) self.back_image_pub.publish(mage_msg0) self.back_image_info_pub.publish(camera_info_msg0) mage_msg1, camera_info_msg1 = getImageMsg(data[1], self.spot_wrapper) self.back_depth_pub.publish(mage_msg1) self.back_depth_info_pub.publish(camera_info_msg1) self.populate_camera_static_transforms(data[0]) self.populate_camera_static_transforms(data[1]) def HandImageCB(self, results): """Callback for when the Spot Wrapper gets new hand image data. Args: results: FutureWrapper object of AsyncPeriodicQuery callback """ data = self.spot_wrapper.hand_images if data: mage_msg0, camera_info_msg0 = getImageMsg(data[0], self.spot_wrapper) self.hand_image_mono_pub.publish(mage_msg0) self.hand_image_mono_info_pub.publish(camera_info_msg0) mage_msg1, camera_info_msg1 = getImageMsg(data[1], self.spot_wrapper) self.hand_depth_pub.publish(mage_msg1) self.hand_depth_info_pub.publish(camera_info_msg1) image_msg2, camera_info_msg2 = getImageMsg(data[2], self.spot_wrapper) self.hand_image_color_pub.publish(image_msg2) self.hand_image_color_info_pub.publish(camera_info_msg2) image_msg3, camera_info_msg3 = getImageMsg(data[3], self.spot_wrapper) self.hand_depth_in_hand_color_pub.publish(image_msg3) self.hand_depth_in_color_info_pub.publish(camera_info_msg3) self.populate_camera_static_transforms(data[0]) self.populate_camera_static_transforms(data[1]) self.populate_camera_static_transforms(data[2]) self.populate_camera_static_transforms(data[3]) def PointCloudCB(self, results): """Callback for when the Spot Wrapper gets new point cloud data. Args: results: FutureWrapper object of AsyncPeriodicQuery callback """ data = self.spot_wrapper.point_clouds if data: point_cloud_msg = GetPointCloudMsg(data[0], self.spot_wrapper) self.point_cloud_pub.publish(point_cloud_msg) self.populate_lidar_static_transforms(data[0]) def handle_claim(self, req): """ROS service handler for the claim service""" resp = self.spot_wrapper.claim() return TriggerResponse(resp[0], resp[1]) def handle_release(self, req): """ROS service handler for the release service""" resp = self.spot_wrapper.release() return TriggerResponse(resp[0], resp[1]) def handle_locked_stop(self, req): """Stop the current motion of the robot and disallow any further motion until the allow motion service is called""" self.allow_motion = False return self.handle_stop(req) def handle_stop(self, req): """ROS service handler for the stop service. Interrupts the currently active motion""" resp = self.spot_wrapper.stop() message = "Spot stop service was called" if self.navigate_as.is_active(): self.navigate_as.set_preempted( NavigateToResult(success=False, message=message) ) if self.trajectory_server.is_active(): self.trajectory_server.set_preempted( TrajectoryResult(success=False, message=message) ) if self.body_pose_as.is_active(): self.body_pose_as.set_preempted( PoseBodyResult(success=False, message=message) ) return TriggerResponse(resp[0], resp[1]) def handle_self_right(self, req): """ROS service handler for the self-right service""" if not self.robot_allowed_to_move(autonomous_command=False): return TriggerResponse(False, "Robot motion is not allowed") resp = self.spot_wrapper.self_right() return TriggerResponse(resp[0], resp[1]) def handle_sit(self, req): """ROS service handler for the sit service""" if not self.robot_allowed_to_move(autonomous_command=False): return TriggerResponse(False, "Robot motion is not allowed") resp = self.spot_wrapper.sit() return TriggerResponse(resp[0], resp[1]) def handle_stand(self, req): """ROS service handler for the stand service""" if not self.robot_allowed_to_move(autonomous_command=False): return TriggerResponse(False, "Robot motion is not allowed") resp = self.spot_wrapper.stand() return TriggerResponse(resp[0], resp[1]) def handle_posed_stand(self, req): """ Handle a service call for the posed stand Args: req: PosedStandRequest Returns: PosedStandResponse """ success, message = self._posed_stand( req.body_height, req.body_yaw, req.body_pitch, req.body_roll ) return PosedStandResponse(success, message) def handle_posed_stand_action(self, action): """ Handle a call to the posed stand actionserver If no value is provided, this is equivalent to the basic stand commmand Args: action: PoseBodyGoal """ success, message = self._posed_stand( action.body_height, action.yaw, action.pitch, action.roll ) result = PoseBodyResult(success, message) rospy.sleep(2) # Only return after the body has had a chance to move if success: self.body_pose_as.set_succeeded(result) else: self.body_pose_as.set_aborted(result) def _posed_stand(self, body_height, yaw, pitch, roll): """ Make the robot do a posed stand with specified body height and orientation By empirical observation, the limit on body height is [-0.16, 0.11], and RPY are probably limited to 30 degrees. Roll values are likely affected by the payload configuration as well. If the payload is misconfigured a high roll value could cause it to hit the legs Args: body_height: Height of the body relative to the default height yaw: Yaw to apply (in degrees) pitch: Pitch to apply (in degrees) roll: Roll to apply (in degrees) Returns: """ if not self.robot_allowed_to_move(autonomous_command=False): return False, "Robot motion is not allowed" resp = self.spot_wrapper.stand( body_height=body_height, body_yaw=math.radians(yaw), body_pitch=math.radians(pitch), body_roll=math.radians(roll), ) return resp[0], resp[1] def handle_power_on(self, req): """ROS service handler for the power-on service""" resp = self.spot_wrapper.power_on() return TriggerResponse(resp[0], resp[1]) def handle_safe_power_off(self, req): """ROS service handler for the safe-power-off service""" resp = self.spot_wrapper.safe_power_off() return TriggerResponse(resp[0], resp[1]) def handle_estop_hard(self, req): """ROS service handler to hard-eStop the robot. The robot will immediately cut power to the motors""" resp = self.spot_wrapper.assertEStop(True) return TriggerResponse(resp[0], resp[1]) def handle_estop_soft(self, req): """ROS service handler to soft-eStop the robot. The robot will try to settle on the ground before cutting power to the motors""" resp = self.spot_wrapper.assertEStop(False) return TriggerResponse(resp[0], resp[1]) def handle_estop_disengage(self, req): """ROS service handler to disengage the eStop on the robot.""" resp = self.spot_wrapper.disengageEStop() return TriggerResponse(resp[0], resp[1]) def handle_clear_behavior_fault(self, req): """ROS service handler for clearing behavior faults""" resp = self.spot_wrapper.clear_behavior_fault(req.id) return ClearBehaviorFaultResponse(resp[0], resp[1]) def handle_stair_mode(self, req): """ROS service handler to set a stair mode to the robot.""" try: mobility_params = self.spot_wrapper.get_mobility_params() mobility_params.stair_hint = req.data self.spot_wrapper.set_mobility_params(mobility_params) return SetBoolResponse(True, "Success") except Exception as e: return SetBoolResponse(False, "Error:{}".format(e)) def handle_locomotion_mode(self, req): """ROS service handler to set locomotion mode""" if req.locomotion_mode in [0, 9] or req.locomotion_mode > 10: msg = "Attempted to set locomotion mode to {}, which is an invalid value.".format( req.locomotion_mode ) rospy.logerr(msg) return SetLocomotionResponse(False, msg) try: mobility_params = self.spot_wrapper.get_mobility_params() mobility_params.locomotion_hint = req.locomotion_mode self.spot_wrapper.set_mobility_params(mobility_params) return SetLocomotionResponse(True, "Success") except Exception as e: return SetLocomotionResponse(False, "Error:{}".format(e)) def handle_swing_height(self, req): """ROS service handler to set the step swing height""" if req.swing_height == 0 or req.swing_height > 3: msg = "Attempted to set step swing height to {}, which is an invalid value.".format( req.swing_height ) rospy.logerr(msg) return SetSwingHeightResponse(False, msg) try: mobility_params = self.spot_wrapper.get_mobility_params() mobility_params.swing_height = req.swing_height self.spot_wrapper.set_mobility_params(mobility_params) return SetSwingHeightResponse(True, "Success") except Exception as e: return SetSwingHeightResponse(False, "Error:{}".format(e)) def handle_vel_limit(self, req): """ Handle a velocity_limit service call. Args: req: SetVelocityRequest containing requested velocity limit Returns: SetVelocityResponse """ success, message = self.set_velocity_limits( req.velocity_limit.linear.x, req.velocity_limit.linear.y, req.velocity_limit.angular.z, ) return SetVelocityResponse(success, message) def set_velocity_limits(self, max_linear_x, max_linear_y, max_angular_z): """ Modify the mobility params to have a limit on the robot's velocity during trajectory commands. Velocities sent to cmd_vel ignore these values Passing 0 to any of the values will use spot's internal limits Args: max_linear_x: Maximum forwards/backwards velocity max_linear_y: Maximum lateral velocity max_angular_z: Maximum rotation velocity Returns: (bool, str) boolean indicating whether the call was successful, along with a message """ if any( map(lambda x: 0 < x < 0.15, [max_linear_x, max_linear_y, max_angular_z]) ): return ( False, "Error: One of the values provided to velocity limits was below 0.15. Values in the range (" "0,0.15) can cause unexpected behaviour of the trajectory command.", ) try: mobility_params = self.spot_wrapper.get_mobility_params() mobility_params.vel_limit.CopyFrom( SE2VelocityLimit( max_vel=math_helpers.SE2Velocity( max_linear_x, max_linear_y, max_angular_z ).to_proto(), min_vel=math_helpers.SE2Velocity( -max_linear_x, -max_linear_y, -max_angular_z ).to_proto(), ) ) self.spot_wrapper.set_mobility_params(mobility_params) return True, "Success" except Exception as e: return False, "Error:{}".format(e) def _transform_pose_to_body_frame(self, pose): """ Transform a pose to the body frame Args: pose: PoseStamped to transform Raises: tf2_ros.LookupException if the transform lookup fails Returns: Transformed pose in body frame if given pose is not in the body frame, or the original pose if it is in the body frame """ if pose.header.frame_id == "body": return pose body_to_fixed = self.tf_buffer.lookup_transform( "body", pose.header.frame_id, rospy.Time() ) pose_in_body = tf2_geometry_msgs.do_transform_pose(pose, body_to_fixed) pose_in_body.header.frame_id = "body" return pose_in_body def robot_allowed_to_move(self, autonomous_command=True): """ Check if the robot is allowed to move. This means checking both that autonomy is enabled, which can only be set when the driver is started, and also that motion is allowed, the state of which can change while the driver is running Args: autonomous_command: If true, indicates that this function should also check if autonomy is enabled Returns: True if the robot is allowed to move, false otherwise """ if not self.allow_motion: rospy.logwarn( "Spot is not currently allowed to move. Use the allow_motion service to allow the robot to " "move." ) autonomy_ok = True if autonomous_command: if not self.autonomy_enabled: rospy.logwarn( "Spot is not allowed to be autonomous because this instance of the driver was started " "with it disabled. Set autonomy_enabled to true in the launch file to enable it." ) autonomy_ok = False if self.is_charging: rospy.logwarn( "Spot cannot be autonomous because it is connected to shore power." ) autonomy_ok = False return self.allow_motion and autonomy_ok def handle_allow_motion(self, req): """ Handle a call to set whether motion is allowed or not When motion is not allowed, any service call or topic which can move the robot will return without doing anything Returns: (bool, str) True if successful, along with a message """ self.allow_motion = req.data rospy.loginfo( "Robot motion is now {}".format( "allowed" if self.allow_motion else "disallowed" ) ) if not self.allow_motion: # Always send a stop command if disallowing motion, in case the robot is moving when it is sent self.spot_wrapper.stop() return True, "Spot motion was {}".format("enabled" if req.data else "disabled") def handle_obstacle_params(self, req): """ Handle a call to set the obstacle params part of mobility params. The previous values are always overwritten. Args: req: Returns: (bool, str) True if successful, along with a message """ mobility_params = self.spot_wrapper.get_mobility_params() obstacle_params = spot_command_pb2.ObstacleParams() # Currently only the obstacle setting that we allow is the padding. The previous value is always overwritten # Clamp to the range [0, 0.5] as on the controller if req.obstacle_params.obstacle_avoidance_padding < 0: rospy.logwarn( "Received padding value of {}, clamping to 0".format( req.obstacle_params.obstacle_avoidance_padding ) ) req.obstacle_params.obstacle_avoidance_padding = 0 if req.obstacle_params.obstacle_avoidance_padding > 0.5: rospy.logwarn( "Received padding value of {}, clamping to 0.5".format( req.obstacle_params.obstacle_avoidance_padding ) ) req.obstacle_params.obstacle_avoidance_padding = 0.5 disable_notallowed = "" if any( [ req.obstacle_params.disable_vision_foot_obstacle_avoidance, req.obstacle_params.disable_vision_foot_constraint_avoidance, req.obstacle_params.disable_vision_body_obstacle_avoidance, req.obstacle_params.disable_vision_foot_obstacle_body_assist, req.obstacle_params.disable_vision_negative_obstacles, ] ): disable_notallowed = " Disabling any of the obstacle avoidance components is not currently allowed." rospy.logerr( "At least one of the disable settings on obstacle params was true." + disable_notallowed ) obstacle_params.obstacle_avoidance_padding = ( req.obstacle_params.obstacle_avoidance_padding ) mobility_params.obstacle_params.CopyFrom(obstacle_params) self.spot_wrapper.set_mobility_params(mobility_params) return True, "Successfully set obstacle params" + disable_notallowed def handle_terrain_params(self, req): """ Handle a call to set the terrain params part of mobility params. The previous values are always overwritten Args: req: Returns: (bool, str) True if successful, along with a message """ mobility_params = self.spot_wrapper.get_mobility_params() # We always overwrite the previous settings of these values. Reject if not within recommended limits (as on # the controller) if 0.2 <= req.terrain_params.ground_mu_hint <= 0.8: # For some reason assignment to ground_mu_hint is not allowed once the terrain params are initialised # Must initialise with the protobuf type DoubleValue for initialisation to work terrain_params = spot_command_pb2.TerrainParams( ground_mu_hint=DoubleValue(value=req.terrain_params.ground_mu_hint) ) else: return ( False, "Failed to set terrain params, ground_mu_hint of {} is not in the range [0.4, 0.8]".format( req.terrain_params.ground_mu_hint ), ) if req.terrain_params.grated_surfaces_mode in [1, 2, 3]: terrain_params.grated_surfaces_mode = ( req.terrain_params.grated_surfaces_mode ) else: return ( False, "Failed to set terrain params, grated_surfaces_mode {} was not one of [1, 2, 3]".format( req.terrain_params.grated_surfaces_mode ), ) mobility_params.terrain_params.CopyFrom(terrain_params) self.spot_wrapper.set_mobility_params(mobility_params) return True, "Successfully set terrain params" def trajectory_callback(self, msg): """ Handle a callback from the trajectory topic requesting to go to a location The trajectory will time out after 5 seconds Args: msg: PoseStamped containing desired pose Returns: """ if not self.robot_allowed_to_move(): rospy.logerr( "Trajectory topic received a message but the robot is not allowed to move." ) return try: self._send_trajectory_command( self._transform_pose_to_body_frame(msg), rospy.Duration(5) ) except tf2_ros.LookupException as e: rospy.logerr(str(e)) def handle_trajectory(self, req): """ROS actionserver execution handler to handle receiving a request to move to a location""" if not self.robot_allowed_to_move(): rospy.logerr( "Trajectory service was called but robot is not allowed to move" ) self.trajectory_server.set_aborted( TrajectoryResult(False, "Robot is not allowed to move.") ) return target_pose = req.target_pose if req.target_pose.header.frame_id != "body": rospy.logwarn("Pose given was not in the body frame, will transform") try: target_pose = self._transform_pose_to_body_frame(target_pose) except tf2_ros.LookupException as e: self.trajectory_server.set_aborted( TrajectoryResult(False, "Could not transform pose into body frame") ) return if req.duration.data.to_sec() <= 0: self.trajectory_server.set_aborted( TrajectoryResult(False, "duration must be larger than 0") ) return cmd_duration = rospy.Duration(req.duration.data.secs, req.duration.data.nsecs) resp = self._send_trajectory_command( target_pose, cmd_duration, req.precise_positioning ) def timeout_cb(trajectory_server, _): trajectory_server.publish_feedback( TrajectoryFeedback("Failed to reach goal, timed out") ) trajectory_server.set_aborted( TrajectoryResult(False, "Failed to reach goal, timed out") ) # Abort the actionserver if cmd_duration is exceeded - the driver stops but does not provide feedback to # indicate this so we monitor it ourselves cmd_timeout = rospy.Timer( cmd_duration, functools.partial(timeout_cb, self.trajectory_server), oneshot=True, ) # Sleep to allow some feedback to come through from the trajectory command rospy.sleep(0.25) if self.spot_wrapper._trajectory_status_unknown: rospy.logerr( "Sent trajectory request to spot but received unknown feedback. Resending command. This will " "only be attempted once" ) # If we receive an unknown result from the trajectory, something went wrong internally (not # catastrophically). We need to resend the command, because getting status unknown happens right when # the command is sent. It's unclear right now why this happens resp = self._send_trajectory_command( target_pose, cmd_duration, req.precise_positioning ) cmd_timeout.shutdown() cmd_timeout = rospy.Timer( cmd_duration, functools.partial(timeout_cb, self.trajectory_server), oneshot=True, ) # The trajectory command is non-blocking but we need to keep this function up in order to interrupt if a # preempt is requested and to return success if/when the robot reaches the goal. Also check the is_active to # monitor whether the timeout_cb has already aborted the command rate = rospy.Rate(10) while ( not rospy.is_shutdown() and not self.trajectory_server.is_preempt_requested() and not self.spot_wrapper.at_goal and self.trajectory_server.is_active() and not self.spot_wrapper._trajectory_status_unknown ): if self.spot_wrapper.near_goal: if self.spot_wrapper._last_trajectory_command_precise: self.trajectory_server.publish_feedback( TrajectoryFeedback("Near goal, performing final adjustments") ) else: self.trajectory_server.publish_feedback( TrajectoryFeedback("Near goal") ) else: self.trajectory_server.publish_feedback( TrajectoryFeedback("Moving to goal") ) rate.sleep() # If still active after exiting the loop, the command did not time out if self.trajectory_server.is_active(): cmd_timeout.shutdown() if self.trajectory_server.is_preempt_requested(): self.trajectory_server.publish_feedback(TrajectoryFeedback("Preempted")) self.trajectory_server.set_preempted() self.spot_wrapper.stop() if self.spot_wrapper.at_goal: self.trajectory_server.publish_feedback( TrajectoryFeedback("Reached goal") ) self.trajectory_server.set_succeeded(TrajectoryResult(resp[0], resp[1])) else: self.trajectory_server.publish_feedback( TrajectoryFeedback("Failed to reach goal") ) self.trajectory_server.set_aborted( TrajectoryResult(False, "Failed to reach goal") ) def handle_roll_over_right(self, req): """Robot sit down and roll on to it its side for easier battery access""" del req resp = self.spot_wrapper.battery_change_pose(1) return TriggerResponse(resp[0], resp[1]) def handle_roll_over_left(self, req): """Robot sit down and roll on to it its side for easier battery access""" del req resp = self.spot_wrapper.battery_change_pose(2) return TriggerResponse(resp[0], resp[1]) def handle_dock(self, req): """Dock the robot""" resp = self.spot_wrapper.dock(req.dock_id) return DockResponse(resp[0], resp[1]) def handle_undock(self, req): """Undock the robot""" resp = self.spot_wrapper.undock() return TriggerResponse(resp[0], resp[1]) def handle_dock_action(self, req: DockGoal): if req.undock: resp = self.spot_wrapper.undock() else: resp = self.spot_wrapper.dock(req.dock_id) if resp[0]: self.dock_as.set_succeeded(DockResult(resp[0], resp[1])) else: self.dock_as.set_aborted(DockResult(resp[0], resp[1])) def handle_get_docking_state(self, req): """Get docking state of robot""" resp = self.spot_wrapper.get_docking_state() return GetDockStateResponse(GetDockStatesFromState(resp)) def _send_trajectory_command(self, pose, duration, precise=True): """ Send a trajectory command to the robot Args: pose: Pose the robot should go to. Must be in the body frame duration: After this duration, the command will time out and the robot will stop precise: If true, the robot will position itself precisely at the target pose, otherwise it will end up near (within ~0.5m, rotation optional) the requested location Returns: (bool, str) tuple indicating whether the command was successfully sent, and a message """ if not self.robot_allowed_to_move(): rospy.logerr("send trajectory was called but motion is not allowed.") return if pose.header.frame_id != "body": rospy.logerr("Trajectory command poses must be in the body frame") return return self.spot_wrapper.trajectory_cmd( goal_x=pose.pose.position.x, goal_y=pose.pose.position.y, goal_heading=math_helpers.Quat( w=pose.pose.orientation.w, x=pose.pose.orientation.x, y=pose.pose.orientation.y, z=pose.pose.orientation.z, ).to_yaw(), cmd_duration=duration.to_sec(), precise_position=precise, ) def cmdVelCallback(self, data): """Callback for cmd_vel command""" if not self.robot_allowed_to_move(): rospy.logerr("cmd_vel received a message but motion is not allowed.") return self.spot_wrapper.velocity_cmd(data.linear.x, data.linear.y, data.angular.z) def in_motion_or_idle_pose_cb(self, data): """ Callback for pose to be used while in motion or idling This sets the body control field in the mobility params. This means that the pose will be used while a motion command is executed. Only the pitch is maintained while moving. The roll and yaw will be applied by the idle stand command. """ if not self.robot_allowed_to_move(autonomous_command=False): rospy.logerr("body pose received a message but motion is not allowed.") return self._set_in_motion_or_idle_body_pose(data) def handle_in_motion_or_idle_body_pose(self, goal): """ Handle a goal received from the pose body actionserver Args: goal: PoseBodyGoal containing a pose to apply to the body Returns: """ # We can change the body pose if autonomy is not allowed if not self.robot_allowed_to_move(autonomous_command=False): rospy.logerr("body pose actionserver was called but motion is not allowed.") return # If the body_pose is empty, we use the rpy + height components instead if goal.body_pose == Pose(): # If the rpy+body height are all zero then we set the body to neutral pose if not any( [ goal.roll, goal.pitch, goal.yaw, not math.isclose(goal.body_height, 0, abs_tol=1e-9), ] ): pose = Pose() pose.orientation.w = 1 self._set_in_motion_or_idle_body_pose(pose) else: pose = Pose() # Multiplication order is important to get the correct quaternion orientation_quat = ( math_helpers.Quat.from_yaw(math.radians(goal.yaw)) * math_helpers.Quat.from_pitch(math.radians(goal.pitch)) * math_helpers.Quat.from_roll(math.radians(goal.roll)) ) pose.orientation.x = orientation_quat.x pose.orientation.y = orientation_quat.y pose.orientation.z = orientation_quat.z pose.orientation.w = orientation_quat.w pose.position.z = goal.body_height self._set_in_motion_or_idle_body_pose(pose) else: self._set_in_motion_or_idle_body_pose(goal.body_pose) # Give it some time to move rospy.sleep(2) self.motion_or_idle_body_pose_as.set_succeeded( PoseBodyResult( success=True, message="Successfully applied in-motion pose to body" ) ) def _set_in_motion_or_idle_body_pose(self, pose): """ Set the pose of the body which should be applied while in motion or idle Args: pose: Pose to be applied to the body. Only the body height is taken from the position component Returns: """ q = Quaternion() q.x = pose.orientation.x q.y = pose.orientation.y q.z = pose.orientation.z q.w = pose.orientation.w position = geometry_pb2.Vec3(z=pose.position.z) pose = geometry_pb2.SE3Pose(position=position, rotation=q) point = trajectory_pb2.SE3TrajectoryPoint(pose=pose) traj = trajectory_pb2.SE3Trajectory(points=[point]) body_control = spot_command_pb2.BodyControlParams(base_offset_rt_footprint=traj) mobility_params = self.spot_wrapper.get_mobility_params() mobility_params.body_control.CopyFrom(body_control) self.spot_wrapper.set_mobility_params(mobility_params) def handle_list_graph(self, upload_path): """ROS service handler for listing graph_nav waypoint_ids""" resp = self.spot_wrapper.list_graph(upload_path) return ListGraphResponse(resp) def handle_navigate_to_feedback(self): """Thread function to send navigate_to feedback""" while not rospy.is_shutdown() and self.run_navigate_to: localization_state = ( self.spot_wrapper._graph_nav_client.get_localization_state() ) if localization_state.localization.waypoint_id: self.navigate_as.publish_feedback( NavigateToFeedback(localization_state.localization.waypoint_id) ) rospy.Rate(10).sleep() def handle_navigate_to(self, msg): """ROS service handler to run mission of the robot. The robot will replay a mission""" if not self.robot_allowed_to_move(): rospy.logerr("navigate_to was requested but robot is not allowed to move.") self.navigate_as.set_aborted( NavigateToResult(False, "Autonomy is not enabled") ) return # create thread to periodically publish feedback feedback_thraed = threading.Thread( target=self.handle_navigate_to_feedback, args=() ) self.run_navigate_to = True feedback_thraed.start() # run navigate_to resp = self.spot_wrapper.navigate_to( upload_path=msg.upload_path, navigate_to=msg.navigate_to, initial_localization_fiducial=msg.initial_localization_fiducial, initial_localization_waypoint=msg.initial_localization_waypoint, ) self.run_navigate_to = False feedback_thraed.join() # check status if resp[0]: self.navigate_as.set_succeeded(NavigateToResult(resp[0], resp[1])) else: self.navigate_as.set_aborted(NavigateToResult(resp[0], resp[1])) def populate_camera_static_transforms(self, image_data): """Check data received from one of the image tasks and use the transform snapshot to extract the camera frame transforms. This is the transforms from body->frontleft->frontleft_fisheye, for example. These transforms never change, but they may be calibrated slightly differently for each robot so we need to generate the transforms at runtime. Args: image_data: Image protobuf data from the wrapper """ # We exclude the odometry frames from static transforms since they are not static. We can ignore the body # frame because it is a child of odom or vision depending on the mode_parent_odom_tf, and will be published # by the non-static transform publishing that is done by the state callback excluded_frames = [ self.tf_name_vision_odom, self.tf_name_kinematic_odom, "body", ] for frame_name in image_data.shot.transforms_snapshot.child_to_parent_edge_map: if frame_name in excluded_frames: continue parent_frame = ( image_data.shot.transforms_snapshot.child_to_parent_edge_map.get( frame_name ).parent_frame_name ) existing_transforms = [ (transform.header.frame_id, transform.child_frame_id) for transform in self.sensors_static_transforms ] if (parent_frame, frame_name) in existing_transforms: # We already extracted this transform continue transform = ( image_data.shot.transforms_snapshot.child_to_parent_edge_map.get( frame_name ) ) local_time = self.spot_wrapper.robotToLocalTime( image_data.shot.acquisition_time ) tf_time = rospy.Time(local_time.seconds, local_time.nanos) static_tf = populateTransformStamped( tf_time, transform.parent_frame_name, frame_name, transform.parent_tform_child, ) self.sensors_static_transforms.append(static_tf) self.sensors_static_transform_broadcaster.sendTransform( self.sensors_static_transforms ) def populate_lidar_static_transforms(self, point_cloud_data): """Check data received from one of the point cloud tasks and use the transform snapshot to extract the lidar frame transforms. This is the transforms from body->sensor, for example. These transforms never change, but they may be calibrated slightly differently for each robot so we need to generate the transforms at runtime. Args: point_cloud_data: PointCloud protobuf data from the wrapper """ # We exclude the odometry frames from static transforms since they are not static. We can ignore the body # frame because it is a child of odom or vision depending on the mode_parent_odom_tf, and will be published # by the non-static transform publishing that is done by the state callback excluded_frames = [ self.tf_name_vision_odom, self.tf_name_kinematic_odom, "body", ] for ( frame_name ) in ( point_cloud_data.point_cloud.source.transforms_snapshot.child_to_parent_edge_map ): if frame_name in excluded_frames: continue parent_frame = point_cloud_data.point_cloud.source.transforms_snapshot.child_to_parent_edge_map.get( frame_name ).parent_frame_name existing_transforms = [ (transform.header.frame_id, transform.child_frame_id) for transform in self.sensors_static_transforms ] if (parent_frame, frame_name) in existing_transforms: # We already extracted this transform continue transform = point_cloud_data.point_cloud.source.transforms_snapshot.child_to_parent_edge_map.get( frame_name ) local_time = self.spot_wrapper.robotToLocalTime( point_cloud_data.point_cloud.source.acquisition_time ) tf_time = rospy.Time(local_time.seconds, local_time.nanos) static_tf = populateTransformStamped( tf_time, transform.parent_frame_name, frame_name, transform.parent_tform_child, ) self.sensors_static_transforms.append(static_tf) self.sensors_static_transform_broadcaster.sendTransform( self.sensors_static_transforms ) # Arm functions ################################################## def handle_arm_stow(self, srv_data): """ROS service handler to command the arm to stow, home position""" resp = self.spot_wrapper.arm_stow() return TriggerResponse(resp[0], resp[1]) def handle_arm_unstow(self, srv_data): """ROS service handler to command the arm to unstow, joints are all zeros""" resp = self.spot_wrapper.arm_unstow() return TriggerResponse(resp[0], resp[1]) def handle_arm_joint_move(self, srv_data: ArmJointMovementRequest): """ROS service handler to send joint movement to the arm to execute""" resp = self.spot_wrapper.arm_joint_move(joint_targets=srv_data.joint_target) return ArmJointMovementResponse(resp[0], resp[1]) def handle_force_trajectory(self, srv_data: ArmForceTrajectoryRequest): """ROS service handler to send a force trajectory up or down a vertical force""" resp = self.spot_wrapper.force_trajectory(data=srv_data) return ArmForceTrajectoryResponse(resp[0], resp[1]) def handle_gripper_open(self, srv_data): """ROS service handler to open the gripper""" resp = self.spot_wrapper.gripper_open() return TriggerResponse(resp[0], resp[1]) def handle_gripper_close(self, srv_data): """ROS service handler to close the gripper""" resp = self.spot_wrapper.gripper_close() return TriggerResponse(resp[0], resp[1]) def handle_gripper_angle_open(self, srv_data: GripperAngleMoveRequest): """ROS service handler to open the gripper at an angle""" resp = self.spot_wrapper.gripper_angle_open(gripper_ang=srv_data.gripper_angle) return GripperAngleMoveResponse(resp[0], resp[1]) def handle_arm_carry(self, srv_data): """ROS service handler to put arm in carry mode""" resp = self.spot_wrapper.arm_carry() return TriggerResponse(resp[0], resp[1]) def handle_hand_pose(self, srv_data: HandPoseRequest): """ROS service to give a position to the gripper""" resp = self.spot_wrapper.hand_pose(data=srv_data) return HandPoseResponse(resp[0], resp[1]) def handle_grasp_3d(self, srv_data: Grasp3dRequest): """ROS service to grasp an object by x,y,z coordinates in given frame""" resp = self.spot_wrapper.grasp_3d( frame=srv_data.frame_name, object_rt_frame=srv_data.object_rt_frame, ) return Grasp3dResponse(resp[0], resp[1]) ################################################################## def shutdown(self): rospy.loginfo("Shutting down ROS driver for Spot") self.spot_wrapper.sit() rospy.Rate(0.25).sleep() self.spot_wrapper.disconnect() def publish_mobility_params(self): mobility_params_msg = MobilityParams() try: mobility_params = self.spot_wrapper.get_mobility_params() mobility_params_msg.body_control.position.x = ( mobility_params.body_control.base_offset_rt_footprint.points[ 0 ].pose.position.x ) mobility_params_msg.body_control.position.y = ( mobility_params.body_control.base_offset_rt_footprint.points[ 0 ].pose.position.y ) mobility_params_msg.body_control.position.z = ( mobility_params.body_control.base_offset_rt_footprint.points[ 0 ].pose.position.z ) mobility_params_msg.body_control.orientation.x = ( mobility_params.body_control.base_offset_rt_footprint.points[ 0 ].pose.rotation.x ) mobility_params_msg.body_control.orientation.y = ( mobility_params.body_control.base_offset_rt_footprint.points[ 0 ].pose.rotation.y ) mobility_params_msg.body_control.orientation.z = ( mobility_params.body_control.base_offset_rt_footprint.points[ 0 ].pose.rotation.z ) mobility_params_msg.body_control.orientation.w = ( mobility_params.body_control.base_offset_rt_footprint.points[ 0 ].pose.rotation.w ) mobility_params_msg.locomotion_hint = mobility_params.locomotion_hint mobility_params_msg.stair_hint = mobility_params.stair_hint mobility_params_msg.swing_height = mobility_params.swing_height mobility_params_msg.obstacle_params.obstacle_avoidance_padding = ( mobility_params.obstacle_params.obstacle_avoidance_padding ) mobility_params_msg.obstacle_params.disable_vision_foot_obstacle_avoidance = ( mobility_params.obstacle_params.disable_vision_foot_obstacle_avoidance ) mobility_params_msg.obstacle_params.disable_vision_foot_constraint_avoidance = ( mobility_params.obstacle_params.disable_vision_foot_constraint_avoidance ) mobility_params_msg.obstacle_params.disable_vision_body_obstacle_avoidance = ( mobility_params.obstacle_params.disable_vision_body_obstacle_avoidance ) mobility_params_msg.obstacle_params.disable_vision_foot_obstacle_body_assist = ( mobility_params.obstacle_params.disable_vision_foot_obstacle_body_assist ) mobility_params_msg.obstacle_params.disable_vision_negative_obstacles = ( mobility_params.obstacle_params.disable_vision_negative_obstacles ) if mobility_params.HasField("terrain_params"): if mobility_params.terrain_params.HasField("ground_mu_hint"): mobility_params_msg.terrain_params.ground_mu_hint = ( mobility_params.terrain_params.ground_mu_hint ) # hasfield does not work on grated surfaces mode if hasattr(mobility_params.terrain_params, "grated_surfaces_mode"): mobility_params_msg.terrain_params.grated_surfaces_mode = ( mobility_params.terrain_params.grated_surfaces_mode ) # The velocity limit values can be set independently so make sure each of them exists before setting if mobility_params.HasField("vel_limit"): if hasattr(mobility_params.vel_limit.max_vel.linear, "x"): mobility_params_msg.velocity_limit.linear.x = ( mobility_params.vel_limit.max_vel.linear.x ) if hasattr(mobility_params.vel_limit.max_vel.linear, "y"): mobility_params_msg.velocity_limit.linear.y = ( mobility_params.vel_limit.max_vel.linear.y ) if hasattr(mobility_params.vel_limit.max_vel, "angular"): mobility_params_msg.velocity_limit.angular.z = ( mobility_params.vel_limit.max_vel.angular ) except Exception as e: rospy.logerr("Error:{}".format(e)) pass self.mobility_params_pub.publish(mobility_params_msg) def publish_feedback(self): feedback_msg = Feedback() feedback_msg.standing = self.spot_wrapper.is_standing feedback_msg.sitting = self.spot_wrapper.is_sitting feedback_msg.moving = self.spot_wrapper.is_moving id_ = self.spot_wrapper.id try: feedback_msg.serial_number = id_.serial_number feedback_msg.species = id_.species feedback_msg.version = id_.version feedback_msg.nickname = id_.nickname feedback_msg.computer_serial_number = id_.computer_serial_number except: pass self.feedback_pub.publish(feedback_msg) def publish_allow_motion(self): self.motion_allowed_pub.publish(self.allow_motion) def check_for_subscriber(self): for pub in list(self.camera_pub_to_async_task_mapping.keys()): task_name = self.camera_pub_to_async_task_mapping[pub] if ( task_name not in self.active_camera_tasks and pub.get_num_connections() > 0 ): self.spot_wrapper.update_image_tasks(task_name) self.active_camera_tasks.append(task_name) print( f"Detected subscriber for {task_name} task, adding task to publish" ) def main(self): """Main function for the SpotROS class. Gets config from ROS and initializes the wrapper. Holds lease from wrapper and updates all async tasks at the ROS rate""" rospy.init_node("spot_ros", anonymous=True) self.rates = rospy.get_param("~rates", {}) if "loop_frequency" in self.rates: loop_rate = self.rates["loop_frequency"] else: loop_rate = 50 for param, rate in self.rates.items(): if rate > loop_rate: rospy.logwarn( "{} has a rate of {} specified, which is higher than the loop rate of {}. It will not " "be published at the expected frequency".format( param, rate, loop_rate ) ) rate = rospy.Rate(loop_rate) self.robot_name = rospy.get_param("~robot_name", "spot") self.username = rospy.get_param("~username", "default_value") self.password = rospy.get_param("~password", "default_value") self.hostname = rospy.get_param("~hostname", "default_value") self.motion_deadzone = rospy.get_param("~deadzone", 0.05) self.start_estop = rospy.get_param("~start_estop", True) self.estop_timeout = rospy.get_param("~estop_timeout", 9.0) self.autonomy_enabled = rospy.get_param("~autonomy_enabled", True) self.allow_motion = rospy.get_param("~allow_motion", True) self.use_take_lease = rospy.get_param("~use_take_lease", False) self.get_lease_on_action = rospy.get_param("~get_lease_on_action", False) self.is_charging = False self.tf_buffer = tf2_ros.Buffer() self.tf_listener = tf2_ros.TransformListener(self.tf_buffer) self.sensors_static_transform_broadcaster = tf2_ros.StaticTransformBroadcaster() # Static transform broadcaster is super simple and just a latched publisher. Every time we add a new static # transform we must republish all static transforms from this source, otherwise the tree will be incomplete. # We keep a list of all the static transforms we already have so they can be republished, and so we can check # which ones we already have self.sensors_static_transforms = [] # Spot has 2 types of odometries: 'odom' and 'vision' # The former one is kinematic odometry and the second one is a combined odometry of vision and kinematics # These params enables to change which odometry frame is a parent of body frame and to change tf names of each odometry frames. self.mode_parent_odom_tf = rospy.get_param( "~mode_parent_odom_tf", "odom" ) # 'vision' or 'odom' self.tf_name_kinematic_odom = rospy.get_param("~tf_name_kinematic_odom", "odom") self.tf_name_raw_kinematic = "odom" self.tf_name_vision_odom = rospy.get_param("~tf_name_vision_odom", "vision") self.tf_name_raw_vision = "vision" if ( self.mode_parent_odom_tf != self.tf_name_raw_kinematic and self.mode_parent_odom_tf != self.tf_name_raw_vision ): rospy.logerr( "rosparam '~mode_parent_odom_tf' should be 'odom' or 'vision'." ) return self.logger = logging.getLogger("rosout") rospy.loginfo("Starting ROS driver for Spot") self.spot_wrapper = SpotWrapper( username=self.username, password=self.password, hostname=self.hostname, robot_name=self.robot_name, logger=self.logger, start_estop=self.start_estop, estop_timeout=self.estop_timeout, rates=self.rates, callbacks=self.callbacks, use_take_lease=self.use_take_lease, get_lease_on_action=self.get_lease_on_action, ) if not self.spot_wrapper.is_valid: return # Images # self.back_image_pub = rospy.Publisher("camera/back/image", Image, queue_size=10) self.frontleft_image_pub = rospy.Publisher( "camera/frontleft/image", Image, queue_size=10 ) self.frontright_image_pub = rospy.Publisher( "camera/frontright/image", Image, queue_size=10 ) self.left_image_pub = rospy.Publisher("camera/left/image", Image, queue_size=10) self.right_image_pub = rospy.Publisher( "camera/right/image", Image, queue_size=10 ) self.hand_image_mono_pub = rospy.Publisher( "camera/hand_mono/image", Image, queue_size=10 ) self.hand_image_color_pub = rospy.Publisher( "camera/hand_color/image", Image, queue_size=10 ) # Depth # self.back_depth_pub = rospy.Publisher("depth/back/image", Image, queue_size=10) self.frontleft_depth_pub = rospy.Publisher( "depth/frontleft/image", Image, queue_size=10 ) self.frontright_depth_pub = rospy.Publisher( "depth/frontright/image", Image, queue_size=10 ) self.left_depth_pub = rospy.Publisher("depth/left/image", Image, queue_size=10) self.right_depth_pub = rospy.Publisher( "depth/right/image", Image, queue_size=10 ) self.hand_depth_pub = rospy.Publisher("depth/hand/image", Image, queue_size=10) self.hand_depth_in_hand_color_pub = rospy.Publisher( "depth/hand/depth_in_color", Image, queue_size=10 ) self.frontleft_depth_in_visual_pub = rospy.Publisher( "depth/frontleft/depth_in_visual", Image, queue_size=10 ) self.frontright_depth_in_visual_pub = rospy.Publisher( "depth/frontright/depth_in_visual", Image, queue_size=10 ) # EAP Pointcloud # self.point_cloud_pub = rospy.Publisher( "lidar/points", PointCloud2, queue_size=10 ) # Image Camera Info # self.back_image_info_pub = rospy.Publisher( "camera/back/camera_info", CameraInfo, queue_size=10 ) self.frontleft_image_info_pub = rospy.Publisher( "camera/frontleft/camera_info", CameraInfo, queue_size=10 ) self.frontright_image_info_pub = rospy.Publisher( "camera/frontright/camera_info", CameraInfo, queue_size=10 ) self.left_image_info_pub = rospy.Publisher( "camera/left/camera_info", CameraInfo, queue_size=10 ) self.right_image_info_pub = rospy.Publisher( "camera/right/camera_info", CameraInfo, queue_size=10 ) self.hand_image_mono_info_pub = rospy.Publisher( "camera/hand_mono/camera_info", CameraInfo, queue_size=10 ) self.hand_image_color_info_pub = rospy.Publisher( "camera/hand_color/camera_info", CameraInfo, queue_size=10 ) # Depth Camera Info # self.back_depth_info_pub = rospy.Publisher( "depth/back/camera_info", CameraInfo, queue_size=10 ) self.frontleft_depth_info_pub = rospy.Publisher( "depth/frontleft/camera_info", CameraInfo, queue_size=10 ) self.frontright_depth_info_pub = rospy.Publisher( "depth/frontright/camera_info", CameraInfo, queue_size=10 ) self.left_depth_info_pub = rospy.Publisher( "depth/left/camera_info", CameraInfo, queue_size=10 ) self.right_depth_info_pub = rospy.Publisher( "depth/right/camera_info", CameraInfo, queue_size=10 ) self.hand_depth_info_pub = rospy.Publisher( "depth/hand/camera_info", CameraInfo, queue_size=10 ) self.hand_depth_in_color_info_pub = rospy.Publisher( "camera/hand/depth_in_color/camera_info", CameraInfo, queue_size=10 ) self.frontleft_depth_in_visual_info_pub = rospy.Publisher( "depth/frontleft/depth_in_visual/camera_info", CameraInfo, queue_size=10 ) self.frontright_depth_in_visual_info_pub = rospy.Publisher( "depth/frontright/depth_in_visual/camera_info", CameraInfo, queue_size=10 ) self.camera_pub_to_async_task_mapping = { self.frontleft_image_pub: "front_image", self.frontleft_depth_pub: "front_image", self.frontleft_image_info_pub: "front_image", self.frontright_image_pub: "front_image", self.frontright_depth_pub: "front_image", self.frontright_image_info_pub: "front_image", self.back_image_pub: "rear_image", self.back_depth_pub: "rear_image", self.back_image_info_pub: "rear_image", self.right_image_pub: "side_image", self.right_depth_pub: "side_image", self.right_image_info_pub: "side_image", self.left_image_pub: "side_image", self.left_depth_pub: "side_image", self.left_image_info_pub: "side_image", self.hand_image_color_pub: "hand_image", self.hand_image_mono_pub: "hand_image", self.hand_image_mono_info_pub: "hand_image", self.hand_depth_pub: "hand_image", self.hand_depth_in_hand_color_pub: "hand_image", } # Status Publishers # self.joint_state_pub = rospy.Publisher( "joint_states", JointState, queue_size=10 ) """Defining a TF publisher manually because of conflicts between Python3 and tf""" self.tf_pub = rospy.Publisher("tf", TFMessage, queue_size=10) self.metrics_pub = rospy.Publisher("status/metrics", Metrics, queue_size=10) self.lease_pub = rospy.Publisher("status/leases", LeaseArray, queue_size=10) self.odom_twist_pub = rospy.Publisher( "odometry/twist", TwistWithCovarianceStamped, queue_size=10 ) self.odom_pub = rospy.Publisher("odometry", Odometry, queue_size=10) self.odom_corrected_pub = rospy.Publisher( "odometry_corrected", Odometry, queue_size=10 ) self.feet_pub = rospy.Publisher("status/feet", FootStateArray, queue_size=10) self.estop_pub = rospy.Publisher("status/estop", EStopStateArray, queue_size=10) self.wifi_pub = rospy.Publisher("status/wifi", WiFiState, queue_size=10) self.power_pub = rospy.Publisher( "status/power_state", PowerState, queue_size=10 ) self.battery_pub = rospy.Publisher( "status/battery_states", BatteryStateArray, queue_size=10 ) self.behavior_faults_pub = rospy.Publisher( "status/behavior_faults", BehaviorFaultState, queue_size=10 ) self.system_faults_pub = rospy.Publisher( "status/system_faults", SystemFaultState, queue_size=10 ) self.motion_allowed_pub = rospy.Publisher( "status/motion_allowed", Bool, queue_size=10 ) self.feedback_pub = rospy.Publisher("status/feedback", Feedback, queue_size=10) self.mobility_params_pub = rospy.Publisher( "status/mobility_params", MobilityParams, queue_size=10 ) rospy.Subscriber("cmd_vel", Twist, self.cmdVelCallback, queue_size=1) rospy.Subscriber( "go_to_pose", PoseStamped, self.trajectory_callback, queue_size=1 ) rospy.Subscriber( "in_motion_or_idle_body_pose", Pose, self.in_motion_or_idle_pose_cb, queue_size=1, ) rospy.Service("claim", Trigger, self.handle_claim) rospy.Service("release", Trigger, self.handle_release) rospy.Service("self_right", Trigger, self.handle_self_right) rospy.Service("sit", Trigger, self.handle_sit) rospy.Service("stand", Trigger, self.handle_stand) rospy.Service("power_on", Trigger, self.handle_power_on) rospy.Service("power_off", Trigger, self.handle_safe_power_off) rospy.Service("estop/hard", Trigger, self.handle_estop_hard) rospy.Service("estop/gentle", Trigger, self.handle_estop_soft) rospy.Service("estop/release", Trigger, self.handle_estop_disengage) rospy.Service("allow_motion", SetBool, self.handle_allow_motion) rospy.Service("stair_mode", SetBool, self.handle_stair_mode) rospy.Service("locomotion_mode", SetLocomotion, self.handle_locomotion_mode) rospy.Service("swing_height", SetSwingHeight, self.handle_swing_height) rospy.Service("velocity_limit", SetVelocity, self.handle_vel_limit) rospy.Service( "clear_behavior_fault", ClearBehaviorFault, self.handle_clear_behavior_fault ) rospy.Service("terrain_params", SetTerrainParams, self.handle_terrain_params) rospy.Service("obstacle_params", SetObstacleParams, self.handle_obstacle_params) rospy.Service("posed_stand", PosedStand, self.handle_posed_stand) rospy.Service("list_graph", ListGraph, self.handle_list_graph) rospy.Service("roll_over_right", Trigger, self.handle_roll_over_right) rospy.Service("roll_over_left", Trigger, self.handle_roll_over_left) # Docking rospy.Service("dock", Dock, self.handle_dock) rospy.Service("undock", Trigger, self.handle_undock) rospy.Service("docking_state", GetDockState, self.handle_get_docking_state) # Arm Services ######################################### rospy.Service("arm_stow", Trigger, self.handle_arm_stow) rospy.Service("arm_unstow", Trigger, self.handle_arm_unstow) rospy.Service("gripper_open", Trigger, self.handle_gripper_open) rospy.Service("gripper_close", Trigger, self.handle_gripper_close) rospy.Service("arm_carry", Trigger, self.handle_arm_carry) rospy.Service( "gripper_angle_open", GripperAngleMove, self.handle_gripper_angle_open ) rospy.Service("arm_joint_move", ArmJointMovement, self.handle_arm_joint_move) rospy.Service( "force_trajectory", ArmForceTrajectory, self.handle_force_trajectory ) rospy.Service("gripper_pose", HandPose, self.handle_hand_pose) rospy.Service("grasp_3d", Grasp3d, self.handle_grasp_3d) ######################################################### self.navigate_as = actionlib.SimpleActionServer( "navigate_to", NavigateToAction, execute_cb=self.handle_navigate_to, auto_start=False, ) self.navigate_as.start() self.trajectory_server = actionlib.SimpleActionServer( "trajectory", TrajectoryAction, execute_cb=self.handle_trajectory, auto_start=False, ) self.trajectory_server.start() self.motion_or_idle_body_pose_as = actionlib.SimpleActionServer( "motion_or_idle_body_pose", PoseBodyAction, execute_cb=self.handle_in_motion_or_idle_body_pose, auto_start=False, ) self.motion_or_idle_body_pose_as.start() self.body_pose_as = actionlib.SimpleActionServer( "body_pose", PoseBodyAction, execute_cb=self.handle_posed_stand_action, auto_start=False, ) self.body_pose_as.start() self.dock_as = actionlib.SimpleActionServer( "dock", DockAction, execute_cb=self.handle_dock_action, auto_start=False, ) self.dock_as.start() # Stop service calls other services so initialise it after them to prevent crashes which can happen if # the service is immediately called rospy.Service("stop", Trigger, self.handle_stop) rospy.Service("locked_stop", Trigger, self.handle_locked_stop) rospy.on_shutdown(self.shutdown) max_linear_x = rospy.get_param("~max_linear_velocity_x", 0) max_linear_y = rospy.get_param("~max_linear_velocity_y", 0) max_angular_z = rospy.get_param("~max_angular_velocity_z", 0) self.set_velocity_limits(max_linear_x, max_linear_y, max_angular_z) self.auto_claim = rospy.get_param("~auto_claim", False) self.auto_power_on = rospy.get_param("~auto_power_on", False) self.auto_stand = rospy.get_param("~auto_stand", False) if self.auto_claim: self.spot_wrapper.claim() if self.auto_power_on: self.spot_wrapper.power_on() if self.auto_stand: self.spot_wrapper.stand() rate_limited_feedback = RateLimitedCall( self.publish_feedback, self.rates["feedback"] ) rate_limited_mobility_params = RateLimitedCall( self.publish_mobility_params, self.rates["mobility_params"] ) rate_check_for_subscriber = RateLimitedCall( self.check_for_subscriber, self.rates["check_subscribers"] ) rate_limited_motion_allowed = RateLimitedCall(self.publish_allow_motion, 10) rospy.loginfo("Driver started") while not rospy.is_shutdown(): self.spot_wrapper.updateTasks() rate_limited_feedback() rate_limited_mobility_params() rate_limited_motion_allowed() rate_check_for_subscriber() rate.sleep()
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/src/spot_driver/ros_helpers.py
import copy import rospy import tf2_ros import transforms3d from std_msgs.msg import Empty from tf2_msgs.msg import TFMessage from geometry_msgs.msg import TransformStamped, Transform from sensor_msgs.msg import Image, CameraInfo from sensor_msgs.msg import JointState from sensor_msgs.msg import PointCloud2, PointField from geometry_msgs.msg import PoseWithCovariance from geometry_msgs.msg import TwistWithCovariance from geometry_msgs.msg import TwistWithCovarianceStamped from nav_msgs.msg import Odometry from spot_msgs.msg import Metrics from spot_msgs.msg import LeaseArray, LeaseResource from spot_msgs.msg import FootState, FootStateArray from spot_msgs.msg import EStopState, EStopStateArray from spot_msgs.msg import WiFiState from spot_msgs.msg import PowerState from spot_msgs.msg import BehaviorFault, BehaviorFaultState from spot_msgs.msg import SystemFault, SystemFaultState from spot_msgs.msg import BatteryState, BatteryStateArray from spot_msgs.msg import DockState from bosdyn.api import image_pb2, point_cloud_pb2 from bosdyn.client.math_helpers import SE3Pose from bosdyn.client.frame_helpers import get_odom_tform_body, get_vision_tform_body import numpy as np friendly_joint_names = {} """Dictionary for mapping BD joint names to more friendly names""" friendly_joint_names["fl.hx"] = "front_left_hip_x" friendly_joint_names["fl.hy"] = "front_left_hip_y" friendly_joint_names["fl.kn"] = "front_left_knee" friendly_joint_names["fr.hx"] = "front_right_hip_x" friendly_joint_names["fr.hy"] = "front_right_hip_y" friendly_joint_names["fr.kn"] = "front_right_knee" friendly_joint_names["hl.hx"] = "rear_left_hip_x" friendly_joint_names["hl.hy"] = "rear_left_hip_y" friendly_joint_names["hl.kn"] = "rear_left_knee" friendly_joint_names["hr.hx"] = "rear_right_hip_x" friendly_joint_names["hr.hy"] = "rear_right_hip_y" friendly_joint_names["hr.kn"] = "rear_right_knee" # arm joints friendly_joint_names["arm0.sh0"] = "arm_joint1" friendly_joint_names["arm0.sh1"] = "arm_joint2" friendly_joint_names["arm0.el0"] = "arm_joint3" friendly_joint_names["arm0.el1"] = "arm_joint4" friendly_joint_names["arm0.wr0"] = "arm_joint5" friendly_joint_names["arm0.wr1"] = "arm_joint6" friendly_joint_names["arm0.f1x"] = "arm_gripper" class DefaultCameraInfo(CameraInfo): """Blank class extending CameraInfo ROS topic that defaults most parameters""" def __init__(self): super().__init__() self.distortion_model = "plumb_bob" self.D.append(0) self.D.append(0) self.D.append(0) self.D.append(0) self.D.append(0) self.K[1] = 0 self.K[3] = 0 self.K[6] = 0 self.K[7] = 0 self.K[8] = 1 self.R[0] = 1 self.R[1] = 0 self.R[2] = 0 self.R[3] = 0 self.R[4] = 1 self.R[5] = 0 self.R[6] = 0 self.R[7] = 0 self.R[8] = 1 self.P[1] = 0 self.P[3] = 0 self.P[4] = 0 self.P[7] = 0 self.P[8] = 0 self.P[9] = 0 self.P[10] = 1 self.P[11] = 0 def populateTransformStamped(time, parent_frame, child_frame, transform): """Populates a TransformStamped message Args: time: The time of the transform parent_frame: The parent frame of the transform child_frame: The child_frame_id of the transform transform: A transform to copy into a StampedTransform object. Should have position (x,y,z) and rotation (x, y,z,w) members Returns: TransformStamped message. Empty if transform does not have position or translation attribute """ if hasattr(transform, "position"): position = transform.position elif hasattr(transform, "translation"): position = transform.translation else: rospy.logerr( "Trying to generate StampedTransform but input transform has neither position nor translation " "attributes" ) return TransformStamped() new_tf = TransformStamped() new_tf.header.stamp = time new_tf.header.frame_id = parent_frame new_tf.child_frame_id = child_frame new_tf.transform.translation.x = position.x new_tf.transform.translation.y = position.y new_tf.transform.translation.z = position.z new_tf.transform.rotation.x = transform.rotation.x new_tf.transform.rotation.y = transform.rotation.y new_tf.transform.rotation.z = transform.rotation.z new_tf.transform.rotation.w = transform.rotation.w return new_tf def getImageMsg(data, spot_wrapper): """Takes the imag and camera data and populates the necessary ROS messages Args: data: Image proto spot_wrapper: A SpotWrapper object Returns: (tuple): * Image: message of the image captured * CameraInfo: message to define the state and config of the camera that took the image """ image_msg = Image() local_time = spot_wrapper.robotToLocalTime(data.shot.acquisition_time) image_msg.header.stamp = rospy.Time(local_time.seconds, local_time.nanos) image_msg.header.frame_id = data.shot.frame_name_image_sensor image_msg.height = data.shot.image.rows image_msg.width = data.shot.image.cols # Color/greyscale formats. # JPEG format if data.shot.image.format == image_pb2.Image.FORMAT_JPEG: image_msg.encoding = "rgb8" image_msg.is_bigendian = True image_msg.step = 3 * data.shot.image.cols image_msg.data = data.shot.image.data # Uncompressed. Requires pixel_format. if data.shot.image.format == image_pb2.Image.FORMAT_RAW: # One byte per pixel. if data.shot.image.pixel_format == image_pb2.Image.PIXEL_FORMAT_GREYSCALE_U8: image_msg.encoding = "mono8" image_msg.is_bigendian = True image_msg.step = data.shot.image.cols image_msg.data = data.shot.image.data # Three bytes per pixel. if data.shot.image.pixel_format == image_pb2.Image.PIXEL_FORMAT_RGB_U8: image_msg.encoding = "rgb8" image_msg.is_bigendian = True image_msg.step = 3 * data.shot.image.cols image_msg.data = data.shot.image.data # Four bytes per pixel. if data.shot.image.pixel_format == image_pb2.Image.PIXEL_FORMAT_RGBA_U8: image_msg.encoding = "rgba8" image_msg.is_bigendian = True image_msg.step = 4 * data.shot.image.cols image_msg.data = data.shot.image.data # Little-endian uint16 z-distance from camera (mm). if data.shot.image.pixel_format == image_pb2.Image.PIXEL_FORMAT_DEPTH_U16: image_msg.encoding = "16UC1" image_msg.is_bigendian = False image_msg.step = 2 * data.shot.image.cols image_msg.data = data.shot.image.data camera_info_msg = DefaultCameraInfo() local_time = spot_wrapper.robotToLocalTime(data.shot.acquisition_time) camera_info_msg.header.stamp = rospy.Time(local_time.seconds, local_time.nanos) camera_info_msg.header.frame_id = data.shot.frame_name_image_sensor camera_info_msg.height = data.shot.image.rows camera_info_msg.width = data.shot.image.cols camera_info_msg.K[0] = data.source.pinhole.intrinsics.focal_length.x camera_info_msg.K[2] = data.source.pinhole.intrinsics.principal_point.x camera_info_msg.K[4] = data.source.pinhole.intrinsics.focal_length.y camera_info_msg.K[5] = data.source.pinhole.intrinsics.principal_point.y camera_info_msg.P[0] = data.source.pinhole.intrinsics.focal_length.x camera_info_msg.P[2] = data.source.pinhole.intrinsics.principal_point.x camera_info_msg.P[5] = data.source.pinhole.intrinsics.focal_length.y camera_info_msg.P[6] = data.source.pinhole.intrinsics.principal_point.y return image_msg, camera_info_msg def GetPointCloudMsg(data, spot_wrapper): """Takes the imag and camera data and populates the necessary ROS messages Args: data: PointCloud proto (PointCloudResponse) spot_wrapper: A SpotWrapper object Returns: PointCloud: message of the point cloud (PointCloud2) """ point_cloud_msg = PointCloud2() local_time = spot_wrapper.robotToLocalTime(data.point_cloud.source.acquisition_time) point_cloud_msg.header.stamp = rospy.Time(local_time.seconds, local_time.nanos) point_cloud_msg.header.frame_id = data.point_cloud.source.frame_name_sensor if data.point_cloud.encoding == point_cloud_pb2.PointCloud.ENCODING_XYZ_32F: point_cloud_msg.height = 1 point_cloud_msg.width = data.point_cloud.num_points point_cloud_msg.fields = [] for i, ax in enumerate(("x", "y", "z")): field = PointField() field.name = ax field.offset = i * 4 field.datatype = PointField.FLOAT32 field.count = 1 point_cloud_msg.fields.append(field) point_cloud_msg.is_bigendian = False point_cloud_np = np.frombuffer(data.point_cloud.data, dtype=np.uint8) point_cloud_msg.point_step = 12 # float32 XYZ point_cloud_msg.row_step = point_cloud_msg.width * point_cloud_msg.point_step point_cloud_msg.data = point_cloud_np.tobytes() point_cloud_msg.is_dense = True else: rospy.logwarn("Not supported point cloud data type.") return point_cloud_msg def GetJointStatesFromState(state, spot_wrapper): """Maps joint state data from robot state proto to ROS JointState message Args: data: Robot State proto spot_wrapper: A SpotWrapper object Returns: JointState message """ joint_state = JointState() local_time = spot_wrapper.robotToLocalTime( state.kinematic_state.acquisition_timestamp ) joint_state.header.stamp = rospy.Time(local_time.seconds, local_time.nanos) for joint in state.kinematic_state.joint_states: # there is a joint with name arm0.hr0 in the robot state, however this # joint has no data and should not be there, this is why we ignore it if joint.name == "arm0.hr0": continue joint_state.name.append(friendly_joint_names.get(joint.name, "ERROR")) joint_state.position.append(joint.position.value) joint_state.velocity.append(joint.velocity.value) joint_state.effort.append(joint.load.value) return joint_state def GetEStopStateFromState(state, spot_wrapper): """Maps eStop state data from robot state proto to ROS EStopArray message Args: data: Robot State proto spot_wrapper: A SpotWrapper object Returns: EStopArray message """ estop_array_msg = EStopStateArray() for estop in state.estop_states: estop_msg = EStopState() local_time = spot_wrapper.robotToLocalTime(estop.timestamp) estop_msg.header.stamp = rospy.Time(local_time.seconds, local_time.nanos) estop_msg.name = estop.name estop_msg.type = estop.type estop_msg.state = estop.state estop_msg.state_description = estop.state_description estop_array_msg.estop_states.append(estop_msg) return estop_array_msg def GetFeetFromState(state, spot_wrapper): """Maps foot position state data from robot state proto to ROS FootStateArray message Args: data: Robot State proto spot_wrapper: A SpotWrapper object Returns: FootStateArray message """ foot_array_msg = FootStateArray() for foot in state.foot_state: foot_msg = FootState() foot_msg.foot_position_rt_body.x = foot.foot_position_rt_body.x foot_msg.foot_position_rt_body.y = foot.foot_position_rt_body.y foot_msg.foot_position_rt_body.z = foot.foot_position_rt_body.z foot_msg.contact = foot.contact if foot.HasField("terrain"): terrain = foot.terrain foot_msg.terrain.ground_mu_est = terrain.ground_mu_est foot_msg.terrain.frame_name = terrain.frame_name foot_msg.terrain.foot_slip_distance_rt_frame = ( terrain.foot_slip_distance_rt_frame ) foot_msg.terrain.foot_slip_velocity_rt_frame = ( terrain.foot_slip_velocity_rt_frame ) foot_msg.terrain.ground_contact_normal_rt_frame = ( terrain.ground_contact_normal_rt_frame ) foot_msg.terrain.visual_surface_ground_penetration_mean = ( terrain.visual_surface_ground_penetration_mean ) foot_msg.terrain.visual_surface_ground_penetration_std = ( terrain.visual_surface_ground_penetration_std ) foot_array_msg.states.append(foot_msg) return foot_array_msg def GetOdomTwistFromState(state, spot_wrapper): """Maps odometry data from robot state proto to ROS TwistWithCovarianceStamped message Args: data: Robot State proto spot_wrapper: A SpotWrapper object Returns: TwistWithCovarianceStamped message """ twist_odom_msg = TwistWithCovarianceStamped() local_time = spot_wrapper.robotToLocalTime( state.kinematic_state.acquisition_timestamp ) twist_odom_msg.header.stamp = rospy.Time(local_time.seconds, local_time.nanos) twist_odom_msg.twist.twist.linear.x = ( state.kinematic_state.velocity_of_body_in_odom.linear.x ) twist_odom_msg.twist.twist.linear.y = ( state.kinematic_state.velocity_of_body_in_odom.linear.y ) twist_odom_msg.twist.twist.linear.z = ( state.kinematic_state.velocity_of_body_in_odom.linear.z ) twist_odom_msg.twist.twist.angular.x = ( state.kinematic_state.velocity_of_body_in_odom.angular.x ) twist_odom_msg.twist.twist.angular.y = ( state.kinematic_state.velocity_of_body_in_odom.angular.y ) twist_odom_msg.twist.twist.angular.z = ( state.kinematic_state.velocity_of_body_in_odom.angular.z ) return twist_odom_msg def get_corrected_odom(base_odometry: Odometry): """ Get odometry from state but correct the twist portion of the message to be in the child frame id rather than the odom/vision frame. https://dev.bostondynamics.com/protos/bosdyn/api/proto_reference#kinematicstate indicates the twist in the state is in the odom frame and not the body frame, as is expected by many ROS components. Conversion of https://github.com/tpet/nav_utils/blob/master/src/nav_utils/odom_twist_to_child_frame.cpp Args: base_odometry: Uncorrected odometry message Returns: Odometry with twist in the body frame """ # Note: transforms3d has quaternions in wxyz, not xyzw like ros. # Get the transform from body to odom/vision so we have the inverse transform, which we will use to correct the # twist. We don't actually care about the translation at any point since we're just rotating the twist vectors inverse_rotation = transforms3d.quaternions.quat2mat( transforms3d.quaternions.qinverse( [ base_odometry.pose.pose.orientation.w, base_odometry.pose.pose.orientation.x, base_odometry.pose.pose.orientation.y, base_odometry.pose.pose.orientation.z, ] ) ) # transform the linear twist by rotating the vector according to the rotation from body to odom linear_twist = np.array( [ [base_odometry.twist.twist.linear.x], [base_odometry.twist.twist.linear.y], [base_odometry.twist.twist.linear.z], ] ) corrected_linear = inverse_rotation.dot(linear_twist) # Do the same for the angular twist angular_twist = np.array( [ [base_odometry.twist.twist.angular.x], [base_odometry.twist.twist.angular.y], [base_odometry.twist.twist.angular.z], ] ) corrected_angular = inverse_rotation.dot(angular_twist) corrected_odometry = copy.deepcopy(base_odometry) corrected_odometry.twist.twist.linear.x = corrected_linear[0][0] corrected_odometry.twist.twist.linear.y = corrected_linear[1][0] corrected_odometry.twist.twist.linear.z = corrected_linear[2][0] corrected_odometry.twist.twist.angular.x = corrected_angular[0][0] corrected_odometry.twist.twist.angular.y = corrected_angular[1][0] corrected_odometry.twist.twist.angular.z = corrected_angular[2][0] return corrected_odometry def GetOdomFromState(state, spot_wrapper, use_vision=True): """Maps odometry data from robot state proto to ROS Odometry message WARNING: The odometry twist from this message is in the odom frame and not in the body frame. This will likely cause issues. You should use the odometry_corrected topic instead Args: state: Robot State proto spot_wrapper: A SpotWrapper object use_vision: If true, the odometry frame will be vision rather than odom Returns: Odometry message """ odom_msg = Odometry() local_time = spot_wrapper.robotToLocalTime( state.kinematic_state.acquisition_timestamp ) odom_msg.header.stamp = rospy.Time(local_time.seconds, local_time.nanos) if use_vision == True: odom_msg.header.frame_id = "vision" tform_body = get_vision_tform_body(state.kinematic_state.transforms_snapshot) else: odom_msg.header.frame_id = "odom" tform_body = get_odom_tform_body(state.kinematic_state.transforms_snapshot) odom_msg.child_frame_id = "body" pose_odom_msg = PoseWithCovariance() pose_odom_msg.pose.position.x = tform_body.position.x pose_odom_msg.pose.position.y = tform_body.position.y pose_odom_msg.pose.position.z = tform_body.position.z pose_odom_msg.pose.orientation.x = tform_body.rotation.x pose_odom_msg.pose.orientation.y = tform_body.rotation.y pose_odom_msg.pose.orientation.z = tform_body.rotation.z pose_odom_msg.pose.orientation.w = tform_body.rotation.w odom_msg.pose = pose_odom_msg twist_odom_msg = GetOdomTwistFromState(state, spot_wrapper).twist odom_msg.twist = twist_odom_msg return odom_msg def GetWifiFromState(state, spot_wrapper): """Maps wireless state data from robot state proto to ROS WiFiState message Args: data: Robot State proto spot_wrapper: A SpotWrapper object Returns: WiFiState message """ wifi_msg = WiFiState() for comm_state in state.comms_states: if comm_state.HasField("wifi_state"): wifi_msg.current_mode = comm_state.wifi_state.current_mode wifi_msg.essid = comm_state.wifi_state.essid return wifi_msg def generate_feet_tf(foot_states_msg): """ Generate a tf message containing information about foot states Args: foot_states_msg: FootStateArray message containing the foot states from the robot state Returns: tf message with foot states """ foot_ordering = ["front_left", "front_right", "rear_left", "rear_right"] foot_tfs = TFMessage() time_now = rospy.Time.now() for idx, foot_state in enumerate(foot_states_msg.states): foot_transform = Transform() # Rotation of the foot is not given foot_transform.rotation.w = 1 foot_transform.translation.x = foot_state.foot_position_rt_body.x foot_transform.translation.y = foot_state.foot_position_rt_body.y foot_transform.translation.z = foot_state.foot_position_rt_body.z foot_tfs.transforms.append( populateTransformStamped( time_now, "body", foot_ordering[idx] + "_foot", foot_transform ) ) return foot_tfs def GetTFFromState(state, spot_wrapper, inverse_target_frame): """Maps robot link state data from robot state proto to ROS TFMessage message Args: data: Robot State proto spot_wrapper: A SpotWrapper object inverse_target_frame: A frame name to be inversed to a parent frame. Returns: TFMessage message """ tf_msg = TFMessage() for ( frame_name ) in state.kinematic_state.transforms_snapshot.child_to_parent_edge_map: if state.kinematic_state.transforms_snapshot.child_to_parent_edge_map.get( frame_name ).parent_frame_name: try: transform = state.kinematic_state.transforms_snapshot.child_to_parent_edge_map.get( frame_name ) local_time = spot_wrapper.robotToLocalTime( state.kinematic_state.acquisition_timestamp ) tf_time = rospy.Time(local_time.seconds, local_time.nanos) if inverse_target_frame == frame_name: geo_tform_inversed = SE3Pose.from_obj( transform.parent_tform_child ).inverse() new_tf = populateTransformStamped( tf_time, frame_name, transform.parent_frame_name, geo_tform_inversed, ) else: new_tf = populateTransformStamped( tf_time, transform.parent_frame_name, frame_name, transform.parent_tform_child, ) tf_msg.transforms.append(new_tf) except Exception as e: spot_wrapper.logger.error("Error: {}".format(e)) return tf_msg def GetBatteryStatesFromState(state, spot_wrapper): """Maps battery state data from robot state proto to ROS BatteryStateArray message Args: data: Robot State proto spot_wrapper: A SpotWrapper object Returns: BatteryStateArray message """ battery_states_array_msg = BatteryStateArray() for battery in state.battery_states: battery_msg = BatteryState() local_time = spot_wrapper.robotToLocalTime(battery.timestamp) battery_msg.header.stamp = rospy.Time(local_time.seconds, local_time.nanos) battery_msg.identifier = battery.identifier battery_msg.charge_percentage = battery.charge_percentage.value battery_msg.estimated_runtime = rospy.Time( battery.estimated_runtime.seconds, battery.estimated_runtime.nanos ) battery_msg.current = battery.current.value battery_msg.voltage = battery.voltage.value for temp in battery.temperatures: battery_msg.temperatures.append(temp) battery_msg.status = battery.status battery_states_array_msg.battery_states.append(battery_msg) return battery_states_array_msg def GetPowerStatesFromState(state, spot_wrapper): """Maps power state data from robot state proto to ROS PowerState message Args: data: Robot State proto spot_wrapper: A SpotWrapper object Returns: PowerState message """ power_state_msg = PowerState() local_time = spot_wrapper.robotToLocalTime(state.power_state.timestamp) power_state_msg.header.stamp = rospy.Time(local_time.seconds, local_time.nanos) power_state_msg.motor_power_state = state.power_state.motor_power_state power_state_msg.shore_power_state = state.power_state.shore_power_state power_state_msg.locomotion_charge_percentage = ( state.power_state.locomotion_charge_percentage.value ) power_state_msg.locomotion_estimated_runtime = rospy.Time( state.power_state.locomotion_estimated_runtime.seconds, state.power_state.locomotion_estimated_runtime.nanos, ) return power_state_msg def GetDockStatesFromState(state): """Maps dock state data from robot state proto to ROS DockState message Args: state: Robot State proto Returns: DockState message """ dock_state_msg = DockState() dock_state_msg.status = state.status dock_state_msg.dock_type = state.dock_type dock_state_msg.dock_id = state.dock_id dock_state_msg.power_status = state.power_status return dock_state_msg def getBehaviorFaults(behavior_faults, spot_wrapper): """Helper function to strip out behavior faults into a list Args: behavior_faults: List of BehaviorFaults spot_wrapper: A SpotWrapper object Returns: List of BehaviorFault messages """ faults = [] for fault in behavior_faults: new_fault = BehaviorFault() new_fault.behavior_fault_id = fault.behavior_fault_id local_time = spot_wrapper.robotToLocalTime(fault.onset_timestamp) new_fault.header.stamp = rospy.Time(local_time.seconds, local_time.nanos) new_fault.cause = fault.cause new_fault.status = fault.status faults.append(new_fault) return faults def getSystemFaults(system_faults, spot_wrapper): """Helper function to strip out system faults into a list Args: systen_faults: List of SystemFaults spot_wrapper: A SpotWrapper object Returns: List of SystemFault messages """ faults = [] for fault in system_faults: new_fault = SystemFault() new_fault.name = fault.name local_time = spot_wrapper.robotToLocalTime(fault.onset_timestamp) new_fault.header.stamp = rospy.Time(local_time.seconds, local_time.nanos) new_fault.duration = rospy.Time(fault.duration.seconds, fault.duration.nanos) new_fault.code = fault.code new_fault.uid = fault.uid new_fault.error_message = fault.error_message for att in fault.attributes: new_fault.attributes.append(att) new_fault.severity = fault.severity faults.append(new_fault) return faults def GetSystemFaultsFromState(state, spot_wrapper): """Maps system fault data from robot state proto to ROS SystemFaultState message Args: data: Robot State proto spot_wrapper: A SpotWrapper object Returns: SystemFaultState message """ system_fault_state_msg = SystemFaultState() system_fault_state_msg.faults = getSystemFaults( state.system_fault_state.faults, spot_wrapper ) system_fault_state_msg.historical_faults = getSystemFaults( state.system_fault_state.historical_faults, spot_wrapper ) return system_fault_state_msg def getBehaviorFaultsFromState(state, spot_wrapper): """Maps behavior fault data from robot state proto to ROS BehaviorFaultState message Args: data: Robot State proto spot_wrapper: A SpotWrapper object Returns: BehaviorFaultState message """ behavior_fault_state_msg = BehaviorFaultState() behavior_fault_state_msg.faults = getBehaviorFaults( state.behavior_fault_state.faults, spot_wrapper ) return behavior_fault_state_msg
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/config/planar.yaml
linear_scale: x: 1 y: 1 max_positive_linear_velocity: x: 1 y: 1 max_negative_linear_velocity: x: -1 y: -1
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/config/twist_mux.yaml
topics: - name : bt_joy topic : bluetooth_teleop/cmd_vel timeout : 0.5 priority: 9 - name : interactive_marker topic : twist_marker_server/cmd_vel timeout : 0.5 priority: 8 - name : external topic : cmd_vel timeout : 0.5 priority: 1 locks: []
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/config/teleop.yaml
# Teleop configuration for PS4 joystick using the x-pad configuration. # Left thumb-stick up/down/left/right for forward/backward/left/right translation # Right thumb-stick left/right for twist # Left shoulder button for enable # Right shoulder button for enable-turbo # # L1 R1 # L2 R2 # _=====_ _=====_ # / _____ \ / _____ \ # +.-'_____'-.------------------------------.-'_____'-.+ # / | | '. S O N Y .' | _ | \ # / ___| /|\ |___ \ / ___| /_\ |___ \ (Y) # / | | | ; ; | _ _ || # | | <--- ---> | | | ||_| (_)|| (X) (B) # | |___ | ___| ; ; |___ ___|| # |\ | \|/ | / _ ____ _ \ | (X) | /| (A) # | \ |_____| .','" "', (_PS_) ,'" "', '. |_____| .' | # | '-.______.-' / \ / \ '-._____.-' | # | | LJ |--------| RJ | | # | /\ / \ /\ | # | / '.___.' '.___.' \ | # | / \ | # \ / \ / # \________/ \_________/ # # ^ x # | # | # y <-----+ Accelerometer axes # \ # \ # > z (out) # # BUTTON Value # L1 4 # L2 6 # R1 5 # R2 7 # A 1 # B 2 # X 0 # Y 3 # # AXIS Value # Left Horiz. 0 # Left Vert. 1 # Right Horiz. 3 # Right Vert. 4 # L2 2 # R2 5 # D-pad Horiz. 9 # D-pad Vert. 10 # Accel x 7 # Accel y 6 # Accel z 8 teleop_twist_joy: axis_linear: x: 1 y: 0 scale_linear: x: 0.4 y: 0.4 scale_linear_turbo: x: 2.0 # TODO: should this be 1.0? y: 2.0 # TODO: should this be 1.0? axis_angular: yaw: 3 scale_angular: yaw: 1.4 # TODO: should this be 1.0? scale_angular_turbo: yaw: 1.4 # TODO: should this be 1.0? enable_button: 4 enable_turbo_button: 5 joy_node: deadzone: 0.1 # TODO: should this be 0.02? autorepeat_rate: 20
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/spot_driver/config/spot_ros.yaml
rates: # loop_frequency is the frequency of the loop which publishes messages loop_frequency: 50.0 # These are desired frequencies. You should not expect to receive messages at exactly the specified frequency. For # higher frequencies, you will need to modify the loop frequency and the rates below. robot_state: 20.0 metrics: 0.04 lease: 1.0 front_image: 10.0 side_image: 10.0 rear_image: 10.0 point_cloud: 10.0 hand_image: 10.0 feedback: 10.0 mobility_params: 10.0 check_subscribers: 10.0 # If true, automatically claim the lease when the driver starts auto_claim: False # If true, automatically power on when the driver starts (requires auto_claim) auto_power_on: False # If true, automatically stand when the driver starts (requires auto_power_on) auto_stand: False claim: # If true, forcefully take the lease, instead of acquiring it, which can fail if someone else has it use_take_lease: False # If true, try and claim the lease when doing actions if we don't already have it. Also automatically powers on for # stand, rollover and self-right commands get_lease_on_action: False
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/ros_usage.rst
Basic Driver Usage ================== .. warning:: Before doing anything with the robot, you should read the Boston Dynamics `safety guidelines <https://d3cjkvgbik1jtv.cloudfront.net/Spot%20IFU/spot_information_for_use_EN_v1.1.pdf>`_. .. note:: Details of how the robot functions can be found in the `Boston Dynamics SDK documentation <https://dev.bostondynamics.com>`_. Verify the URDF --------------- To verify that the spot_viz and spot_description packages are sourced properly, you can run .. code:: bash roslaunch spot_viz view_model.launch This will load RVIZ with the robot description visible. It should also show any additions you may have added to the robot's URDF .. image:: images/view_model.png Configure your networking ------------------------- If your ROS machine is attached to a payload port you will need to configure it so that it can connect to spot. See `payload network configuration <https://support.bostondynamics.com/s/article/Payload-device-network-configuration>`_ for more details. Running the driver ------------------ .. code:: bash roslaunch spot_driver driver.launch When launching, there are some options you may need to configure for your setup: +----------------------+---------------+-------------------------------------------------------------------+ |Argument |Default |Description | +======================+===============+===================================================================+ |username |dummyusername |Use this username to authenticate with spot | +----------------------+---------------+-------------------------------------------------------------------+ |password |dummypassword |Use this password to authenticate with spot | +----------------------+---------------+-------------------------------------------------------------------+ |hostname |192.168.50.3 |The IP address at which spot can be found | +----------------------+---------------+-------------------------------------------------------------------+ |estop_timeout |9.0 |Time allowed before rpc commands will time out. Comms between the | | | |robot and driver are checked at a rate of 1/3 of this time. If | | | |comms are down, a gentle estop will trigger | +----------------------+---------------+-------------------------------------------------------------------+ |autonomy_enabled |True |If false, some autonomy commands will be disabled for this run of | | | |the driver. This can only be changed on driver restart | | | | | +----------------------+---------------+-------------------------------------------------------------------+ |max_linear_velocity_x |0 |Limit on linear velocity for moving forwards. 0 is whatever is | | | |specified by BD. | | | | | +----------------------+---------------+-------------------------------------------------------------------+ |max_linear_velocity_y |0 |Limit on linear velocity for moving sideways. 0 is whatever is | | | |specified by BD. | | | | | +----------------------+---------------+-------------------------------------------------------------------+ |max_linear_velocity_z |0 |Limit on angular velocity for rotation. 0 is whatever is specified | | | |by BD. | | | | | +----------------------+---------------+-------------------------------------------------------------------+ |allow_motion |True |If false, the robot starts with all motion disallowed and must have| | | |it enabled by calling a service or pressing a button in rviz | | | | | +----------------------+---------------+-------------------------------------------------------------------+ View the robot -------------- Once the robot is connected, you should be able to visualize its odometry, joint positions, camera streams, etc. using rviz. To view these streams, run .. code:: bash roslaunch spot_viz view_robot.launch Once RVIZ is loaded, you should see something similar to this. .. image:: images/view_robot.png Taking control of the robot --------------------------- The easiest way to control the robot is through the rviz control panel, which connects to the various ROS services. Many commands which can be executed using a service or topic can also be executed using the panel. To add the panel to rviz go to Panels>Add new panel and the select ``SpotControlPanel`` under ``spot_viz``. It is included by default in the ``view_robot`` launch file. .. image:: images/rviz_panel.png Holding the lease ~~~~~~~~~~~~~~~~~ A body lease gives the holder the ability to command the spot to make actions in the world. There are two ways to claim a body lease and eStop using this driver. #. Automatically when the driver starts by enabling the ``auto_claim`` variable #. By calling the ``/spot/claim`` service after the driver is started You cannot claim a lease on the robot if something else already has a lease. This is for security and safety reasons. Check the``status/leases`` topic for information on current leases. You can release the lease by calling the ``/spot/release`` service. .. warning:: Releasing the lease while the robot is standing will trigger a gentle estop. Holding a lease automatically establishes an estop connection to the robot. All buttons except the claim lease button on the rviz panel are disabled if the ROS driver does not hold the lease. Emergency stops ~~~~~~~~~~~~~~~ The estop connection gives the robot a way to guarantee that the commanding system is maintaining contact with the robot. If this contact is lost, the robot will perform a gentle stop. The gentle and hard estops are calling through to the BD SDK. The gentle stop is at ``/spot/estop/gentle``. It stops all motion of the robot and commands it to sit. This stop does not have to be released. .. warning:: The hard estop immediately cuts power to the motors. The robot may collapse in an uncontrolled manner. The hard estop is at ``/spot/estop/hard`` this will kill power to the motors and must be released before you can send any commands to the robot. To release the estop, call ``/spot/estop/release``. There is an additional service ``/spot/stop`` which is implemented by the driver. This service stops any command that is currently being executed. The ``/spot/locked_stop`` stops the current command and also disallows any further motion of the robot. Motion can be allowed again by calling the ``/spot/allow_motion`` service. The top of the rviz panel has buttons to control the estops as described above, and also displays their status. It also shows whether the robot is allowed to move or not. .. image:: images/rviz_estops.png Enable motor power ~~~~~~~~~~~~~~~~~~ Motor power needs to be enabled once you have a Lease on the body. This can be done in two ways: #. Automatically when the driver starts by enabling the ``auto_power_on`` variable #. By calling the ``/spot/power_on`` service after the driver is started Stand the robot up ~~~~~~~~~~~~~~~~~~ Once the motors are powered, stand the robot up so it is able to move through the world. This can be done in two ways: #. Automatically when the driver starts by enabling the ``auto_stand`` variable #. By calling the ``/spot/stand`` service after the driver is started Controlling the velocity ------------------------ .. warning:: Spot will attempt to avoid any obstacles it detects with its cameras, but no vision or actuation system is perfect. Make sure to only move the robot in a safe area and in a controlled manner. Topic ~~~~~~~~~~ To control Spot, you can send a Twist message to command a velocity. .. code:: bash rostopic pub /spot/cmd_vel geometry_msgs/Twist "linear: x: 0.0 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: 0.3" -r 10 That command will have spot rotate on the spot at 0.3 radians/second. Note the -r at the end of the command. That has ROS resend the message over again. If you don't resend the message, the driver will assume a timeout and stop commanding motion of the robot. Controlling the body -------------------- There are two different ways of specifying the pose of the body. Static body pose ~~~~~~~~~~~~~~~~ The static body pose changes the body position only when the robot is stationary. Any other motion will reset the body to its normal pose. It can adjust the roll, pitch, yaw, and body height. Service ^^^^^^^ The body can be posed by a service call to ``/spot/posed_stand``. If using a pose message, you can control the body height by setting the z component of position. The x and y components of position are ignored. If the pose message is non-zero, any roll/pitch/yaw specification will be ignored. If using the roll/pitch/yaw specification, enter values in degrees, and body height in metres. Body height is based on displacement from the neutral position. If you send an empty message, the body pose will be reset to neutral. Actionserver ^^^^^^^^^^^^ The actionserver ``/spot/body_pose`` can be called to set the body pose. To test this, start an action client with .. code:: bash rosrun actionlib_tools axclient.py /spot/body_pose You will see a window pop up, and you can specify the body pose with a Pose message, or by specifying roll, pitch and yaw, and a body height. Here is what the axclient window will look like: .. code:: yaml body_pose: position: x: 0.0 y: 0.0 z: 0.0 orientation: x: 0.0 y: 0.0 z: 0.0 w: 0.0 roll: 0 pitch: 0 yaw: 0 body_height: 0.0 Rviz ^^^^ The static pose can also be controlled in the body tab. .. image:: images/rviz_body_tab.png In-motion body pose ~~~~~~~~~~~~~~~~~~~ .. warning:: The in-motion body pose can affect the stability of the robot while walking. It is also possible to specify a pose the robot should hold while it is in motion. This is a more restricted version of the static body pose and cannot achieve the same body heights or rotational changes. While idle, all the parameters specified will be held. The pitch and body height are maintained throughout any walking motion the robot makes. When the robot stops walking, it will return to the pose specified by all parameters. Topic ^^^^^ This pose can be set through the ``/spot/in_motion_or_idle_body_pose`` topic .. code:: bash rostopic pub /spot/in_motion_or_idle_body_pose geometry_msgs/Pose "position: x: 0.0 y: 0.0 z: 0.0 orientation: x: 0.0 y: 0.0 z: 0.0 w: 1.0" Actionserver ^^^^^^^^^^^^ The actionserver is found at ``/spot/motion_or_idle_body_pose`` and has the same parameters as the static pose. Moving to a pose ---------------- .. warning:: Take into account the Boston Dynamics `safety guidelines <https://d3cjkvgbik1jtv.cloudfront.net/Spot%20IFU/spot_information_for_use_EN_v1.1.pdf>`_ when moving the robot. The robot will attempt to avoid obstacles but will also walk over any uneven terrain, regardless of what that terrain is made up of. You should operate in a controlled environment. One of the most important commands for easily controlling the robot is the trajectory command. This command allows you to move the robot to a position in space by specifying a pose relative to the robot's current position. You may specify a pose in a different frame than the ``body`` frame and it will be transformed into that frame. ROS Topic ~~~~~~~~~ The ``/spot/go_to_pose`` topic can be used to move the robot by specifying a pose. The following command will move the robot one metre forwards from its current location. .. code:: bash rostopic pub /spot/go_to_pose geometry_msgs/PoseStamped "header: seq: 0 stamp: secs: 0 nsecs: 0 frame_id: 'body' pose: position: x: 1 y: 0.0 z: 0.0 orientation: x: 0.0 y: 0.0 z: 0.0 w: 1" Actionserver ~~~~~~~~~~~~ The ``/spot/trajectory`` actionserver gives you a little more control than the ros topic, and will also give you information about success or failure. .. warning:: If there is an obstacle along the trajectory the robot is trying to move along, it may fail as the trajectory command is different to the command that is used by the controller. In this case, the actionserver will return success despite not actually reaching the requested pose. As of 2021/09/10 the boston dynamics API does not appear to provide feedback which we can use to return failure when this happens. In addition to the pose, you can specify ``duration``, which specifies how long the command can run before timing out. The ``precise_positioning`` variable can be used to request that the robot move more precisely to the specified pose. If set to false, the robot will move to "near" the specified pose. It's not clear what exactly defines being "near" to the pose, but you should not expect to reach the pose precisely. The robot will end up within ~0.5m of the pose, and not make much effort to align to the orientation. You can test the actionserver by using an action client .. code:: bash rosrun actionlib_tools axclient /spot/trajectory And fill in the values as you like. Rviz ~~~~ You can connect the 2d nav goal tool to publish to the ``/spot/go_to_pose`` topic. The default rviz config provided with .. code:: bash roslaunch spot_viz view_robot.launch Already has the tool configured, but you can also do this by right clicking the toolbar, selecting tool properties, then changing the nav goal topic to ``/spot/go_to_pose``. Setting velocity limits ----------------------- You can set a velocity limit in m/s for the motion to poses using the ``/spot/velocity_limit`` service: .. code:: bash rosservice call /spot/velocity_limit "velocity_limit: linear: x: 0.0 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: 0.0" Only the x and y components of linear velocity are considered, and the z component of angular. You can adjust the velocity limits on startup by setting the max linear/angular velocity params. You can also set the limits using the rviz panel. .. image:: images/rviz_motion_tab.png Cameras and Depth Clouds ------------------------ Spot is equipped 5 RGB and depth-sensing cameras: 2 on the front, one on each side, and one in the rear. All of these cameras publish at approximately 10Hz. Note that the front cameras are mounted sideways, so they have a narrower horizontal FoV, but a larger vertical one. The camera data likewise rotated anticlockwise by 90 degrees. The ``frontleft`` camera and depth topics are from the camera physically located on the front-left of the robot. This camera is pointed to the robot's right, so the depth cloud will appear in front of the robot's right shoulder: .. image:: images/front-left-depth.png Similarly the ``frontright`` camera and depth topics are from the camera physically located on the front-right of the robot. This camera points to the robot's left, so the depth cloud will appear in front of the robot's left shoulder: .. image:: images/front-right-depth.png The complete list of depth and camera topics is below: +--------------------------------+----------------------------+-------------------------------------------------------+ | Topic | Type | Comments | +================================+============================+=======================================================+ | camera/frontleft/camera/image | Image | Data from the front-left camera, which points to the | | | | right. Image is rotated 90 degrees anticlockwise. | +--------------------------------+----------------------------+-------------------------------------------------------+ | camera/frontright/camera/image | Image | Data from the front-right camera, which points to the | | | | left. Image is rotated 90 degrees anticlockwise. | +--------------------------------+----------------------------+-------------------------------------------------------+ | camera/left/camera/image | Image | | +--------------------------------+----------------------------+-------------------------------------------------------+ | camera/right/camera/image | Image | | +--------------------------------+----------------------------+-------------------------------------------------------+ | camera/back/camera/image | Image | | +--------------------------------+----------------------------+-------------------------------------------------------+ | depth/frontleft/camera/image | Image | Data from the front-left camera, which points to the | | | | right. | +--------------------------------+----------------------------+-------------------------------------------------------+ | depth/frontright/camera/image | Image | Data from the front-right camera, which points to the | | | | left. | +--------------------------------+----------------------------+-------------------------------------------------------+ | depth/left/camera/image | Image | | +--------------------------------+----------------------------+-------------------------------------------------------+ | depth/right/camera/image | Image | | +--------------------------------+----------------------------+-------------------------------------------------------+ | depth/back/camera/image | Image | | +--------------------------------+----------------------------+-------------------------------------------------------+ Self righting and roll over --------------------------- .. warning:: Self righting and battery charging may or may not take into account payloads configured on the robot. Test with your configuration before using. The self-right command can be accessed through ``/spot/self_right``. The roll over commands can be accessed through the ``/spot/roll_over_left`` and ``/spot/roll_over_right`` services. You can also access these actions through rviz. .. image:: images/rviz_floor_tab.png Autonomous docking ------------------ .. note:: See Boston Dynamics support for information about `setting up the dock <https://support.bostondynamics.com/s/article/Spot-Dock-setup>`_. If using a Spot Enterprise, you will have access to autonomous docking capabilities. Services ~~~~~~~~ You can trigger undocking with ``/spot/undock``. Docking can be triggered with ``/spot/dock``. You must provide the fiducial ID of the dock the robot should dock at. Actionserver ~~~~~~~~~~~~ Docking can also be performed using a single actionserver at ``/spot/dock``. To undock, the ``undock`` variable should be set to true. Docking is the default action and requires specification of the fiducial ID in the ``dock_id`` variable. Rviz ~~~~ You can also perform docking through the dock tab. .. image:: images/rviz_dock_tab.png Advanced motion control ----------------------- There are other parameters that can be used to specify the behaviour of the robot. These allow for more granular control of specific things. You should read and understand the SDK documentation before using these services to alter any of these parameters. * `/spot/swing_height <https://dev.bostondynamics.com/protos/bosdyn/api/proto_reference.html?highlight=power_state#swingheight>`_ * `/spot/terrain_params <https://dev.bostondynamics.com/protos/bosdyn/api/proto_reference.html?highlight=power_state#terrainparams>`_ * `/spot/locomotion_mode <https://dev.bostondynamics.com/protos/bosdyn/api/proto_reference.html?highlight=mobilityparams#locomotionhint>`_ * `/spot/obstacle_params <https://dev.bostondynamics.com/protos/bosdyn/api/proto_reference.html?highlight=power_state#obstacleparams>`_ Some of the more advanced motion controls can be accessed through the advanced motion tab. .. image:: images/rviz_adv_motion_tab.png Monitoring ---------- There are various topics which output information about the state of the robot: +------------------------+----------------------------+---------------------------------------------------------+ | Topic | Type | Description | +========================+============================+=========================================================+ | status/metrics | Metrics | General metrics for the system like distance walked | +------------------------+----------------------------+---------------------------------------------------------+ | status/leases | LeaseArray | A list of what leases are held on the system | +------------------------+----------------------------+---------------------------------------------------------+ | odometry/twist | TwistWithCovarianceStamped | The estimated odometry of the platform | +------------------------+----------------------------+---------------------------------------------------------+ | status/feet | FootStateArray | The status and position of each foot | +------------------------+----------------------------+---------------------------------------------------------+ | status/estop | EStopStateArray | The status of the eStop system | +------------------------+----------------------------+---------------------------------------------------------+ | status/wifi | WiFiState | Status of the wifi system | +------------------------+----------------------------+---------------------------------------------------------+ | status/power_state | PowerState | General power information | +------------------------+----------------------------+---------------------------------------------------------+ | status/battery_states | BatteryStateArray | Information for the battery and all cells in the system | +------------------------+----------------------------+---------------------------------------------------------+ | status/behavior_faults | BehaviorFaultState | A listing of behavior faults in the system | +------------------------+----------------------------+---------------------------------------------------------+ | status/system_faults | SystemFaultState | A listing of system faults in the system | +------------------------+----------------------------+---------------------------------------------------------+ | status/feedback | Feedback | Feedback from the Spot robot | +------------------------+----------------------------+---------------------------------------------------------+ | status/mobility_params | MobilityParams | Describes the current state of the mobility parameters | | | | defining the motion behaviour of the robot | +------------------------+----------------------------+---------------------------------------------------------+ Troubleshooting --------------- These instructions are a minimum subset of instructions to get this driver working and do not contain all necessary debugging steps. Please refer to the `Spot SDK Quickstart <https://github.com/boston-dynamics/spot-sdk/blob/master/docs/python/quickstart.md>`_ for more detailed debugging steps.
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/index.html
<!DOCTYPE HTML> <meta charset="UTF-8"> <meta http-equiv="refresh" content="1; url=html/index.html"> <script> window.location.href = "html/index.html" </script> <title>Page Redirection</title> If you are not redirected automatically, follow the <a href='html/index.html'>link to docs</a>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/driver_configuration.rst
Driver configuration ==================== There are some basic settings that can be configured to control how the driver runs and at what rate it obtains data. Data that is more important for your applications can be obtained at a higher rate. The default configuration file is located at ``spot_driver/config/spot_ros.yaml`` Rate parameters --------------- These parameters control the rate of various callbacks and loops in the driver. .. note:: These rates are requests and not guarantees. The rate may vary depending on your network configuration and other factors. +------------------------+---------------------------------------------------------------------------------+ |Parameter |Description | +========================+=================================================================================+ |rates/robot_state |The robot's state (include joint angles) | +------------------------+---------------------------------------------------------------------------------+ |rates/metrics |The robot's metrics | +------------------------+---------------------------------------------------------------------------------+ |rates/lease |The robot's lease state | +------------------------+---------------------------------------------------------------------------------+ |rates/front_image |The image and depth image from the front camera | +------------------------+---------------------------------------------------------------------------------+ |rates/side_image |The image and depth image from the side cameras | +------------------------+---------------------------------------------------------------------------------+ |rates/loop_frequency |The image and depth image from the rear camera | +------------------------+---------------------------------------------------------------------------------+ |rates/point_cloud |The point cloud from the EAP lidar | +------------------------+---------------------------------------------------------------------------------+ |rates/hand_image |The image and depth image from the arm's hand camera | +------------------------+---------------------------------------------------------------------------------+ |rates/feedback |A feedback message with various information | +------------------------+---------------------------------------------------------------------------------+ |rates/mobility_params |Parameters indicating the robot's mobility state | +------------------------+---------------------------------------------------------------------------------+ |rates/check_subscribers |Check for subscribers on camera topics. Data is not published without subscribers| +------------------------+---------------------------------------------------------------------------------+ Startup parameters ------------------- There are several parameters which can be used to automatically do certain actions when the driver starts. .. warning:: Having the robot power its motors and stand after the driver connects is a physical action is inherently dangerous. Consider whether you need these settings, and ensure the area is clear before starting the driver. +------------------------+---------------------------------------------------------------------------------+ | Parameter | Description | +------------------------+---------------------------------------------------------------------------------+ | auto_claim | A boolean to automatically claim the body and e stop when the driver connects | +------------------------+---------------------------------------------------------------------------------+ | auto_power_on | A boolean to automatically power on the robot's motors when the driver connects | +------------------------+---------------------------------------------------------------------------------+ | auto_stand | A boolean to automatically stand the robot after the driver conneccts | +------------------------+---------------------------------------------------------------------------------+ Environment variables --------------------- Some environment variables can modify the behaviour or configuration of the driver. +----------------------------+-----------------------------------+----------------------------------------------------------------------------+ |Variable |Default Value |Description | +============================+===================================+============================================================================+ |SPOT_VELODYNE_HOST |192.168.131.20 |IP address of the VLP-16 sensor | +----------------------------+-----------------------------------+----------------------------------------------------------------------------+ |SPOT_JOY_DEVICE |/dev/input/js0 |The Linux joypad input device used by the joy_teleop node | | | | | +----------------------------+-----------------------------------+----------------------------------------------------------------------------+ |SPOT_JOY_CONFIG |spot_control/config/teleop.yaml |Joypad button/axis configuration file for joy_teleop | | | | | +----------------------------+-----------------------------------+----------------------------------------------------------------------------+ |SPOT_VELODYNE_AUTOLAUNCH |1 |If 1 and SPOT_VELODYNE is also 1, the VLP16 ROS node will start | | | |automatically | +----------------------------+-----------------------------------+----------------------------------------------------------------------------+
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/ros_setup.rst
Computer Setup ============== Building the Driver from Source ------------------------------- The driver is not released to the ROS package servers, so it must be built from source. This requires a source workspace on the ROS PC. You can add it to an existing workspace or follow the instructions below to create a new one. .. code:: bash mkdir -p ~/spot_ws/src Setup the workspace so it knows about your ROS installation .. code:: bash cd ~/spot_ws/src source /opt/ros/noetic/setup.bash catkin_init_workspace Clone the spot_ros repository into the workspace .. code:: bash cd ~/spot_ws/src git clone https://github.com/heuristicus/spot_ros.git Use rosdep to install of the necessary dependencies .. code:: bash cd ~/spot_ws/ rosdep install --from-paths spot_driver spot_msgs spot_viz spot_description --ignore-src -y Once all the necessary packages are installed, build the packages in the workspace .. code:: bash cd ~/spot_ws/ catkin build Source your newly built workspace and the packages inside .. code:: bash source ~/spot_ws/devel/setup.bash Adding to the URDF ------------------ .. warning:: When adding payloads, you should always add them to the robot's configuration through the `admin panel <https://support.bostondynamics.com/s/article/Payload-configuration-requirements>`_. Adding only the URDF does not add the payload to spot's built in collision avoidance. The driver supports some configuration of the URDF via environment variables. These can either be manually set in the terminal before starting the driver, or added to $HOME/.bashrc as desired. The table below lists the available variables and their default values: +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ | Variable |Default Value |Description | +=====================+===============+=======================================================================================================+ |SPOT_PACK |0 |If 1, enables the Clearpath ROS backpack accessory and adds it to the URDF | +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ |SPOT_LIDAR_MOUNT |0 |If 1, adds the Lidar mount to the backpack. Requires SPOT_PACK to be 1 | +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ |SPOT_VELODYNE |0 |If 1, adds the a VLP-16 sensor to the lidar mount. Requires SPOT_LIDAR_MOUNT to be 1 | | | | | +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ |SPOT_ARM |0 |If 1, adds the Spot arm to the URDF | +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ |SPOT_VELODYNE_XYZ |0 0 0 |XYZ offset for the VLP-16 from the backpack lidar mount | +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ |SPOT_VELODYNE_RPY |0 0 0 |RPY offset for the VLP-16 from the backpack lidar mount | +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ |SPOT_URDF_EXTRAS |empty.urdf |Optional URDF file to add additional joints and links to the robot | +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ You can add a custom URDF to the robot using the ``SPOT_URDF_EXTRAS`` environment variable, which must be set in the terminal from which the driver is run. This should point to a URDF/xacro file which has an object where the parent is one of the frames on the robot. It might look something like below. .. code:: xml <?xml version="1.0"?> <robot name="spot_frontier" xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:include filename="$(find my_payload_package)/urdf/my_payload.xacro"/> <xacro:my_payload parent="real_rear_rail"/> </robot> Building for Melodic -------------------- .. note:: If you can, consider using ROS noetic instead, which does not have these build issues. Please note that the Spot SDK uses Python3, which is not officially supported by ROS Melodic. If you encounter an error of this form: .. code:: bash Traceback (most recent call last): File "/home/administrator/catkin_ws/src/spot_ros/spot_driver/scripts/spot_ros", line 3, in <module> from spot_driver.spot_ros import SpotROS File "/home/administrator/catkin_ws/src/spot_ros/spot_driver/src/spot_driver/spot_ros.py", line 19, in <module> import tf2_ros File "/opt/ros/melodic/lib/python2.7/dist-packages/tf2_ros/__init__.py", line 38, in <module> from tf2_py import * File "/opt/ros/melodic/lib/python2.7/dist-packages/tf2_py/__init__.py", line 38, in <module> from ._tf2 import * ImportError: dynamic module does not define module export function (PyInit__tf2) When launching the driver, please follow these steps: 1. ``rm -rf devel/ build/ install/`` -- this will remove any old build artifacts from your workspace 2. ``git clone https://github.com/ros/geometry2 --branch 0.6.5`` into your ``src`` folder 3. rebuild your workspace with .. code:: bash catkin_make --cmake-args -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so Or if you are using an Nvidia Jetson: .. code:: bash catkin_make --cmake-args -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/aarch64-linux-gnu/libpython3.6m.so 4. re-run ``source devel/setup.bash`` 5. start the driver with ``roslaunch spot_driver driver.launch``
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/README.md
To generate docs, run ``` sphinx-build -b html . html ```
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/index.rst
Spot ROS User Documentation =========================== .. toctree:: :maxdepth: 0 :caption: Contents robot_setup ros_setup driver_configuration ros_usage arm_usage
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/robot_setup.rst
Robot Configuration =========================== To configure the robot, you should consult `Boston Dynamics' support pages <https://support.bostondynamics.com/s/>`_. Robot administration is performed through the `admin console <https://support.bostondynamics.com/s/article/Spot-system-administration>`_. Networking ---------------- See the `network setup <https://support.bostondynamics.com/s/article/Spot-network-setup>`_ pages for details on network configuration. Using WiFi for ROS communication is not recommended, except for monitoring purposes. The driver can output a lot of data. It is recommended that you connect the Spot to the ROS PC via a payload port. See the `payload developer guide <https://dev.bostondynamics.com/docs/payload/readme>`_ for details.
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/arm_usage.rst
Arm control =========== The driver can also send commands to the robots arm, if it has one. The following services allow control of various parts of the arm. +------------------------+------------------------+ |Service |Description | +========================+========================+ |/spot/arm_carry | | +------------------------+------------------------+ |/spot/arm_joint_move | | +------------------------+------------------------+ |/spot/arm_stow | | +------------------------+------------------------+ |/spot/arm_unstow | | +------------------------+------------------------+ |/spot/force_trajectory | | +------------------------+------------------------+ |/spot/grasp_3d | | +------------------------+------------------------+ |/spot/gripper_angle_open| | +------------------------+------------------------+ |/spot/gripper_close | | +------------------------+------------------------+ |/spot/gripper_open | | +------------------------+------------------------+ |/spot/gripper_pose | | +------------------------+------------------------+
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/conf.py
# -*- coding: utf-8 -*- import os import sys import xml.etree.ElementTree as etree sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) extensions = [ "sphinx.ext.autodoc", "sphinx.ext.doctest", "sphinx.ext.viewcode", ] source_suffix = ".rst" master_doc = "index" project = "Spot ROS User Documentation" copyright = "2020, Clearpath Robotics, 2023 Oxford Robotics Institute" # Get version number from package.xml. tree = etree.parse("../spot_driver/package.xml") version = tree.find("version").text release = version # .. html_theme = 'nature' # .. html_theme_path = ["."] html_theme = "sphinx_rtd_theme" html_theme_path = ["."] html_sidebars = {"**": ["sidebartoc.html", "sourcelink.html", "searchbox.html"]} # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. html_show_sphinx = False # The name of an image file (relative to this directory) to place at the top # of the sidebar. # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. # -- Options for LaTeX output ------------------------------------------------ latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # # 'preamble': '', # Latex figure (float) alignment # # 'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ( master_doc, "SpotROSUserDocumentation.tex", "Spot ROS User Documentation", "Dave Niewinski, Michal Staniaszek", "manual", ), ]
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/ros_usage.html
<!DOCTYPE html> <html class="writer-html4" lang="en" > <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Basic Driver Usage &mdash; Spot ROS User Documentation 0.0.0 documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <!--[if lt IE 9]> <script src="_static/js/html5shiv.min.js"></script> <![endif]--> <script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/language_data.js"></script> <script src="_static/js/theme.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="next" title="Arm control" href="arm_usage.html" /> <link rel="prev" title="Driver configuration" href="driver_configuration.html" /> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > <a href="index.html" class="icon icon-home"> Spot ROS User Documentation </a> <div class="version"> 0.0.0 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> <p class="caption"><span class="caption-text">Contents</span></p> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="robot_setup.html">Robot Configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="ros_setup.html">Computer Setup</a></li> <li class="toctree-l1"><a class="reference internal" href="driver_configuration.html">Driver configuration</a></li> <li class="toctree-l1 current"><a class="current reference internal" href="#">Basic Driver Usage</a><ul> <li class="toctree-l2"><a class="reference internal" href="#verify-the-urdf">Verify the URDF</a></li> <li class="toctree-l2"><a class="reference internal" href="#configure-your-networking">Configure your networking</a></li> <li class="toctree-l2"><a class="reference internal" href="#running-the-driver">Running the driver</a></li> <li class="toctree-l2"><a class="reference internal" href="#view-the-robot">View the robot</a></li> <li class="toctree-l2"><a class="reference internal" href="#taking-control-of-the-robot">Taking control of the robot</a><ul> <li class="toctree-l3"><a class="reference internal" href="#holding-the-lease">Holding the lease</a></li> <li class="toctree-l3"><a class="reference internal" href="#emergency-stops">Emergency stops</a></li> <li class="toctree-l3"><a class="reference internal" href="#enable-motor-power">Enable motor power</a></li> <li class="toctree-l3"><a class="reference internal" href="#stand-the-robot-up">Stand the robot up</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="#controlling-the-velocity">Controlling the velocity</a><ul> <li class="toctree-l3"><a class="reference internal" href="#topic">Topic</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="#controlling-the-body">Controlling the body</a><ul> <li class="toctree-l3"><a class="reference internal" href="#static-body-pose">Static body pose</a><ul> <li class="toctree-l4"><a class="reference internal" href="#service">Service</a></li> <li class="toctree-l4"><a class="reference internal" href="#actionserver">Actionserver</a></li> <li class="toctree-l4"><a class="reference internal" href="#rviz">Rviz</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="#in-motion-body-pose">In-motion body pose</a><ul> <li class="toctree-l4"><a class="reference internal" href="#id1">Topic</a></li> <li class="toctree-l4"><a class="reference internal" href="#id2">Actionserver</a></li> </ul> </li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="#moving-to-a-pose">Moving to a pose</a><ul> <li class="toctree-l3"><a class="reference internal" href="#ros-topic">ROS Topic</a></li> <li class="toctree-l3"><a class="reference internal" href="#id4">Actionserver</a></li> <li class="toctree-l3"><a class="reference internal" href="#id5">Rviz</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="#setting-velocity-limits">Setting velocity limits</a></li> <li class="toctree-l2"><a class="reference internal" href="#cameras-and-depth-clouds">Cameras and Depth Clouds</a></li> <li class="toctree-l2"><a class="reference internal" href="#self-righting-and-roll-over">Self righting and roll over</a></li> <li class="toctree-l2"><a class="reference internal" href="#autonomous-docking">Autonomous docking</a><ul> <li class="toctree-l3"><a class="reference internal" href="#services">Services</a></li> <li class="toctree-l3"><a class="reference internal" href="#id6">Actionserver</a></li> <li class="toctree-l3"><a class="reference internal" href="#id7">Rviz</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="#advanced-motion-control">Advanced motion control</a></li> <li class="toctree-l2"><a class="reference internal" href="#monitoring">Monitoring</a></li> <li class="toctree-l2"><a class="reference internal" href="#troubleshooting">Troubleshooting</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="arm_usage.html">Arm control</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="index.html">Spot ROS User Documentation</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> <li><a href="index.html" class="icon icon-home"></a> &raquo;</li> <li>Basic Driver Usage</li> <li class="wy-breadcrumbs-aside"> <a href="_sources/ros_usage.rst.txt" rel="nofollow"> View page source</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="basic-driver-usage"> <h1>Basic Driver Usage<a class="headerlink" href="#basic-driver-usage" title="Permalink to this headline">¶</a></h1> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">Before doing anything with the robot, you should read the Boston Dynamics <a class="reference external" href="https://d3cjkvgbik1jtv.cloudfront.net/Spot%20IFU/spot_information_for_use_EN_v1.1.pdf">safety guidelines</a>.</p> </div> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">Details of how the robot functions can be found in the <a class="reference external" href="https://dev.bostondynamics.com">Boston Dynamics SDK documentation</a>.</p> </div> <div class="section" id="verify-the-urdf"> <h2>Verify the URDF<a class="headerlink" href="#verify-the-urdf" title="Permalink to this headline">¶</a></h2> <p>To verify that the spot_viz and spot_description packages are sourced properly, you can run</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">roslaunch</span> <span class="n">spot_viz</span> <span class="n">view_model</span><span class="o">.</span><span class="n">launch</span> </pre></div> </div> <p>This will load RVIZ with the robot description visible. It should also show any additions you may have added to the robot’s URDF</p> <img alt="_images/view_model.png" src="_images/view_model.png" /> </div> <div class="section" id="configure-your-networking"> <h2>Configure your networking<a class="headerlink" href="#configure-your-networking" title="Permalink to this headline">¶</a></h2> <p>If your ROS machine is attached to a payload port you will need to configure it so that it can connect to spot. See <a class="reference external" href="https://support.bostondynamics.com/s/article/Payload-device-network-configuration">payload network configuration</a> for more details.</p> </div> <div class="section" id="running-the-driver"> <h2>Running the driver<a class="headerlink" href="#running-the-driver" title="Permalink to this headline">¶</a></h2> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">roslaunch</span> <span class="n">spot_driver</span> <span class="n">driver</span><span class="o">.</span><span class="n">launch</span> </pre></div> </div> <p>When launching, there are some options you may need to configure for your setup:</p> <table border="1" class="docutils"> <colgroup> <col width="21%" /> <col width="14%" /> <col width="64%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Argument</th> <th class="head">Default</th> <th class="head">Description</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>username</td> <td>dummyusername</td> <td>Use this username to authenticate with spot</td> </tr> <tr class="row-odd"><td>password</td> <td>dummypassword</td> <td>Use this password to authenticate with spot</td> </tr> <tr class="row-even"><td>hostname</td> <td>192.168.50.3</td> <td>The IP address at which spot can be found</td> </tr> <tr class="row-odd"><td>estop_timeout</td> <td>9.0</td> <td>Time allowed before rpc commands will time out. Comms between the robot and driver are checked at a rate of 1/3 of this time. If comms are down, a gentle estop will trigger</td> </tr> <tr class="row-even"><td>autonomy_enabled</td> <td>True</td> <td>If false, some autonomy commands will be disabled for this run of the driver. This can only be changed on driver restart</td> </tr> <tr class="row-odd"><td>max_linear_velocity_x</td> <td>0</td> <td>Limit on linear velocity for moving forwards. 0 is whatever is specified by BD.</td> </tr> <tr class="row-even"><td>max_linear_velocity_y</td> <td>0</td> <td>Limit on linear velocity for moving sideways. 0 is whatever is specified by BD.</td> </tr> <tr class="row-odd"><td>max_linear_velocity_z</td> <td>0</td> <td>Limit on angular velocity for rotation. 0 is whatever is specified by BD.</td> </tr> <tr class="row-even"><td>allow_motion</td> <td>True</td> <td>If false, the robot starts with all motion disallowed and must have it enabled by calling a service or pressing a button in rviz</td> </tr> </tbody> </table> </div> <div class="section" id="view-the-robot"> <h2>View the robot<a class="headerlink" href="#view-the-robot" title="Permalink to this headline">¶</a></h2> <p>Once the robot is connected, you should be able to visualize its odometry, joint positions, camera streams, etc. using rviz. To view these streams, run</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">roslaunch</span> <span class="n">spot_viz</span> <span class="n">view_robot</span><span class="o">.</span><span class="n">launch</span> </pre></div> </div> <p>Once RVIZ is loaded, you should see something similar to this.</p> <img alt="_images/view_robot.png" src="_images/view_robot.png" /> </div> <div class="section" id="taking-control-of-the-robot"> <h2>Taking control of the robot<a class="headerlink" href="#taking-control-of-the-robot" title="Permalink to this headline">¶</a></h2> <p>The easiest way to control the robot is through the rviz control panel, which connects to the various ROS services. Many commands which can be executed using a service or topic can also be executed using the panel. To add the panel to rviz go to Panels&gt;Add new panel and the select <code class="docutils literal notranslate"><span class="pre">SpotControlPanel</span></code> under <code class="docutils literal notranslate"><span class="pre">spot_viz</span></code>. It is included by default in the <code class="docutils literal notranslate"><span class="pre">view_robot</span></code> launch file.</p> <img alt="_images/rviz_panel.png" src="_images/rviz_panel.png" /> <div class="section" id="holding-the-lease"> <h3>Holding the lease<a class="headerlink" href="#holding-the-lease" title="Permalink to this headline">¶</a></h3> <p>A body lease gives the holder the ability to command the spot to make actions in the world.</p> <p>There are two ways to claim a body lease and eStop using this driver.</p> <ol class="arabic simple"> <li>Automatically when the driver starts by enabling the <code class="docutils literal notranslate"><span class="pre">auto_claim</span></code> variable</li> <li>By calling the <code class="docutils literal notranslate"><span class="pre">/spot/claim</span></code> service after the driver is started</li> </ol> <p>You cannot claim a lease on the robot if something else already has a lease. This is for security and safety reasons. Check the``status/leases`` topic for information on current leases.</p> <p>You can release the lease by calling the <code class="docutils literal notranslate"><span class="pre">/spot/release</span></code> service.</p> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">Releasing the lease while the robot is standing will trigger a gentle estop.</p> </div> <p>Holding a lease automatically establishes an estop connection to the robot.</p> <p>All buttons except the claim lease button on the rviz panel are disabled if the ROS driver does not hold the lease.</p> </div> <div class="section" id="emergency-stops"> <h3>Emergency stops<a class="headerlink" href="#emergency-stops" title="Permalink to this headline">¶</a></h3> <p>The estop connection gives the robot a way to guarantee that the commanding system is maintaining contact with the robot. If this contact is lost, the robot will perform a gentle stop. The gentle and hard estops are calling through to the BD SDK.</p> <p>The gentle stop is at <code class="docutils literal notranslate"><span class="pre">/spot/estop/gentle</span></code>. It stops all motion of the robot and commands it to sit. This stop does not have to be released.</p> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">The hard estop immediately cuts power to the motors. The robot may collapse in an uncontrolled manner.</p> </div> <p>The hard estop is at <code class="docutils literal notranslate"><span class="pre">/spot/estop/hard</span></code> this will kill power to the motors and must be released before you can send any commands to the robot. To release the estop, call <code class="docutils literal notranslate"><span class="pre">/spot/estop/release</span></code>.</p> <p>There is an additional service <code class="docutils literal notranslate"><span class="pre">/spot/stop</span></code> which is implemented by the driver. This service stops any command that is currently being executed. The <code class="docutils literal notranslate"><span class="pre">/spot/locked_stop</span></code> stops the current command and also disallows any further motion of the robot. Motion can be allowed again by calling the <code class="docutils literal notranslate"><span class="pre">/spot/allow_motion</span></code> service.</p> <p>The top of the rviz panel has buttons to control the estops as described above, and also displays their status. It also shows whether the robot is allowed to move or not.</p> <img alt="_images/rviz_estops.png" src="_images/rviz_estops.png" /> </div> <div class="section" id="enable-motor-power"> <h3>Enable motor power<a class="headerlink" href="#enable-motor-power" title="Permalink to this headline">¶</a></h3> <p>Motor power needs to be enabled once you have a Lease on the body. This can be done in two ways:</p> <ol class="arabic simple"> <li>Automatically when the driver starts by enabling the <code class="docutils literal notranslate"><span class="pre">auto_power_on</span></code> variable</li> <li>By calling the <code class="docutils literal notranslate"><span class="pre">/spot/power_on</span></code> service after the driver is started</li> </ol> </div> <div class="section" id="stand-the-robot-up"> <h3>Stand the robot up<a class="headerlink" href="#stand-the-robot-up" title="Permalink to this headline">¶</a></h3> <p>Once the motors are powered, stand the robot up so it is able to move through the world. This can be done in two ways:</p> <ol class="arabic simple"> <li>Automatically when the driver starts by enabling the <code class="docutils literal notranslate"><span class="pre">auto_stand</span></code> variable</li> <li>By calling the <code class="docutils literal notranslate"><span class="pre">/spot/stand</span></code> service after the driver is started</li> </ol> </div> </div> <div class="section" id="controlling-the-velocity"> <h2>Controlling the velocity<a class="headerlink" href="#controlling-the-velocity" title="Permalink to this headline">¶</a></h2> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">Spot will attempt to avoid any obstacles it detects with its cameras, but no vision or actuation system is perfect. Make sure to only move the robot in a safe area and in a controlled manner.</p> </div> <div class="section" id="topic"> <h3>Topic<a class="headerlink" href="#topic" title="Permalink to this headline">¶</a></h3> <p>To control Spot, you can send a Twist message to command a velocity.</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">rostopic</span> <span class="n">pub</span> <span class="o">/</span><span class="n">spot</span><span class="o">/</span><span class="n">cmd_vel</span> <span class="n">geometry_msgs</span><span class="o">/</span><span class="n">Twist</span> <span class="s2">&quot;linear:</span> <span class="n">x</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">y</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">z</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">angular</span><span class="p">:</span> <span class="n">x</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">y</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">z</span><span class="p">:</span> <span class="mf">0.3</span><span class="s2">&quot; -r 10</span> </pre></div> </div> <p>That command will have spot rotate on the spot at 0.3 radians/second. Note the -r at the end of the command. That has ROS resend the message over again. If you don’t resend the message, the driver will assume a timeout and stop commanding motion of the robot.</p> </div> </div> <div class="section" id="controlling-the-body"> <h2>Controlling the body<a class="headerlink" href="#controlling-the-body" title="Permalink to this headline">¶</a></h2> <p>There are two different ways of specifying the pose of the body.</p> <div class="section" id="static-body-pose"> <h3>Static body pose<a class="headerlink" href="#static-body-pose" title="Permalink to this headline">¶</a></h3> <p>The static body pose changes the body position only when the robot is stationary. Any other motion will reset the body to its normal pose. It can adjust the roll, pitch, yaw, and body height.</p> <div class="section" id="service"> <h4>Service<a class="headerlink" href="#service" title="Permalink to this headline">¶</a></h4> <p>The body can be posed by a service call to <code class="docutils literal notranslate"><span class="pre">/spot/posed_stand</span></code>.</p> <p>If using a pose message, you can control the body height by setting the z component of position. The x and y components of position are ignored. If the pose message is non-zero, any roll/pitch/yaw specification will be ignored.</p> <p>If using the roll/pitch/yaw specification, enter values in degrees, and body height in metres. Body height is based on displacement from the neutral position.</p> <p>If you send an empty message, the body pose will be reset to neutral.</p> </div> <div class="section" id="actionserver"> <h4>Actionserver<a class="headerlink" href="#actionserver" title="Permalink to this headline">¶</a></h4> <p>The actionserver <code class="docutils literal notranslate"><span class="pre">/spot/body_pose</span></code> can be called to set the body pose.</p> <p>To test this, start an action client with</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">rosrun</span> <span class="n">actionlib_tools</span> <span class="n">axclient</span><span class="o">.</span><span class="n">py</span> <span class="o">/</span><span class="n">spot</span><span class="o">/</span><span class="n">body_pose</span> </pre></div> </div> <p>You will see a window pop up, and you can specify the body pose with a Pose message, or by specifying roll, pitch and yaw, and a body height.</p> <p>Here is what the axclient window will look like:</p> <div class="code yaml highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">body_pose</span><span class="p">:</span> <span class="n">position</span><span class="p">:</span> <span class="n">x</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">y</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">z</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">orientation</span><span class="p">:</span> <span class="n">x</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">y</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">z</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">w</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">roll</span><span class="p">:</span> <span class="mi">0</span> <span class="n">pitch</span><span class="p">:</span> <span class="mi">0</span> <span class="n">yaw</span><span class="p">:</span> <span class="mi">0</span> <span class="n">body_height</span><span class="p">:</span> <span class="mf">0.0</span> </pre></div> </div> </div> <div class="section" id="rviz"> <h4>Rviz<a class="headerlink" href="#rviz" title="Permalink to this headline">¶</a></h4> <p>The static pose can also be controlled in the body tab.</p> <img alt="_images/rviz_body_tab.png" src="_images/rviz_body_tab.png" /> </div> </div> <div class="section" id="in-motion-body-pose"> <h3>In-motion body pose<a class="headerlink" href="#in-motion-body-pose" title="Permalink to this headline">¶</a></h3> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">The in-motion body pose can affect the stability of the robot while walking.</p> </div> <p>It is also possible to specify a pose the robot should hold while it is in motion. This is a more restricted version of the static body pose and cannot achieve the same body heights or rotational changes. While idle, all the parameters specified will be held. The pitch and body height are maintained throughout any walking motion the robot makes. When the robot stops walking, it will return to the pose specified by all parameters.</p> <div class="section" id="id1"> <h4>Topic<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h4> <p>This pose can be set through the <code class="docutils literal notranslate"><span class="pre">/spot/in_motion_or_idle_body_pose</span></code> topic</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">rostopic</span> <span class="n">pub</span> <span class="o">/</span><span class="n">spot</span><span class="o">/</span><span class="n">in_motion_or_idle_body_pose</span> <span class="n">geometry_msgs</span><span class="o">/</span><span class="n">Pose</span> <span class="s2">&quot;position:</span> <span class="n">x</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">y</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">z</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">orientation</span><span class="p">:</span> <span class="n">x</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">y</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">z</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">w</span><span class="p">:</span> <span class="mf">1.0</span><span class="s2">&quot;</span> </pre></div> </div> </div> <div class="section" id="id2"> <h4>Actionserver<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h4> <p>The actionserver is found at <code class="docutils literal notranslate"><span class="pre">/spot/motion_or_idle_body_pose</span></code> and has the same parameters as the static pose.</p> </div> </div> </div> <div class="section" id="moving-to-a-pose"> <h2>Moving to a pose<a class="headerlink" href="#moving-to-a-pose" title="Permalink to this headline">¶</a></h2> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">Take into account the Boston Dynamics <a class="reference external" href="https://d3cjkvgbik1jtv.cloudfront.net/Spot%20IFU/spot_information_for_use_EN_v1.1.pdf">safety guidelines</a> when moving the robot. The robot will attempt to avoid obstacles but will also walk over any uneven terrain, regardless of what that terrain is made up of. You should operate in a controlled environment.</p> </div> <p>One of the most important commands for easily controlling the robot is the trajectory command. This command allows you to move the robot to a position in space by specifying a pose relative to the robot’s current position. You may specify a pose in a different frame than the <code class="docutils literal notranslate"><span class="pre">body</span></code> frame and it will be transformed into that frame.</p> <div class="section" id="ros-topic"> <h3>ROS Topic<a class="headerlink" href="#ros-topic" title="Permalink to this headline">¶</a></h3> <p>The <code class="docutils literal notranslate"><span class="pre">/spot/go_to_pose</span></code> topic can be used to move the robot by specifying a pose.</p> <p>The following command will move the robot one metre forwards from its current location.</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">rostopic</span> <span class="n">pub</span> <span class="o">/</span><span class="n">spot</span><span class="o">/</span><span class="n">go_to_pose</span> <span class="n">geometry_msgs</span><span class="o">/</span><span class="n">PoseStamped</span> <span class="s2">&quot;header:</span> <span class="n">seq</span><span class="p">:</span> <span class="mi">0</span> <span class="n">stamp</span><span class="p">:</span> <span class="n">secs</span><span class="p">:</span> <span class="mi">0</span> <span class="n">nsecs</span><span class="p">:</span> <span class="mi">0</span> <span class="n">frame_id</span><span class="p">:</span> <span class="s1">&#39;body&#39;</span> <span class="n">pose</span><span class="p">:</span> <span class="n">position</span><span class="p">:</span> <span class="n">x</span><span class="p">:</span> <span class="mi">1</span> <span class="n">y</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">z</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">orientation</span><span class="p">:</span> <span class="n">x</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">y</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">z</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">w</span><span class="p">:</span> <span class="mi">1</span><span class="s2">&quot;</span> </pre></div> </div> </div> <div class="section" id="id4"> <h3>Actionserver<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3> <p>The <code class="docutils literal notranslate"><span class="pre">/spot/trajectory</span></code> actionserver gives you a little more control than the ros topic, and will also give you information about success or failure.</p> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p>If there is an obstacle along the trajectory the robot is trying to move along, it may fail as the trajectory command is different to the command that is used by the controller. In this case, the actionserver will return success despite not actually reaching the requested pose.</p> <p class="last">As of 2021/09/10 the boston dynamics API does not appear to provide feedback which we can use to return failure when this happens.</p> </div> <p>In addition to the pose, you can specify <code class="docutils literal notranslate"><span class="pre">duration</span></code>, which specifies how long the command can run before timing out.</p> <p>The <code class="docutils literal notranslate"><span class="pre">precise_positioning</span></code> variable can be used to request that the robot move more precisely to the specified pose. If set to false, the robot will move to “near” the specified pose. It’s not clear what exactly defines being “near” to the pose, but you should not expect to reach the pose precisely. The robot will end up within ~0.5m of the pose, and not make much effort to align to the orientation.</p> <p>You can test the actionserver by using an action client</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">rosrun</span> <span class="n">actionlib_tools</span> <span class="n">axclient</span> <span class="o">/</span><span class="n">spot</span><span class="o">/</span><span class="n">trajectory</span> </pre></div> </div> <p>And fill in the values as you like.</p> </div> <div class="section" id="id5"> <h3>Rviz<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3> <p>You can connect the 2d nav goal tool to publish to the <code class="docutils literal notranslate"><span class="pre">/spot/go_to_pose</span></code> topic. The default rviz config provided with</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">roslaunch</span> <span class="n">spot_viz</span> <span class="n">view_robot</span><span class="o">.</span><span class="n">launch</span> </pre></div> </div> <p>Already has the tool configured, but you can also do this by right clicking the toolbar, selecting tool properties, then changing the nav goal topic to <code class="docutils literal notranslate"><span class="pre">/spot/go_to_pose</span></code>.</p> </div> </div> <div class="section" id="setting-velocity-limits"> <h2>Setting velocity limits<a class="headerlink" href="#setting-velocity-limits" title="Permalink to this headline">¶</a></h2> <p>You can set a velocity limit in m/s for the motion to poses using the <code class="docutils literal notranslate"><span class="pre">/spot/velocity_limit</span></code> service:</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">rosservice</span> <span class="n">call</span> <span class="o">/</span><span class="n">spot</span><span class="o">/</span><span class="n">velocity_limit</span> <span class="s2">&quot;velocity_limit:</span> <span class="n">linear</span><span class="p">:</span> <span class="n">x</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">y</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">z</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">angular</span><span class="p">:</span> <span class="n">x</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">y</span><span class="p">:</span> <span class="mf">0.0</span> <span class="n">z</span><span class="p">:</span> <span class="mf">0.0</span><span class="s2">&quot;</span> </pre></div> </div> <p>Only the x and y components of linear velocity are considered, and the z component of angular.</p> <p>You can adjust the velocity limits on startup by setting the max linear/angular velocity params.</p> <p>You can also set the limits using the rviz panel.</p> <img alt="_images/rviz_motion_tab.png" src="_images/rviz_motion_tab.png" /> </div> <div class="section" id="cameras-and-depth-clouds"> <h2>Cameras and Depth Clouds<a class="headerlink" href="#cameras-and-depth-clouds" title="Permalink to this headline">¶</a></h2> <p>Spot is equipped 5 RGB and depth-sensing cameras: 2 on the front, one on each side, and one in the rear. All of these cameras publish at approximately 10Hz.</p> <p>Note that the front cameras are mounted sideways, so they have a narrower horizontal FoV, but a larger vertical one. The camera data likewise rotated anticlockwise by 90 degrees.</p> <p>The <code class="docutils literal notranslate"><span class="pre">frontleft</span></code> camera and depth topics are from the camera physically located on the front-left of the robot. This camera is pointed to the robot’s right, so the depth cloud will appear in front of the robot’s right shoulder:</p> <img alt="_images/front-left-depth.png" src="_images/front-left-depth.png" /> <p>Similarly the <code class="docutils literal notranslate"><span class="pre">frontright</span></code> camera and depth topics are from the camera physically located on the front-right of the robot. This camera points to the robot’s left, so the depth cloud will appear in front of the robot’s left shoulder:</p> <img alt="_images/front-right-depth.png" src="_images/front-right-depth.png" /> <p>The complete list of depth and camera topics is below:</p> <table border="1" class="docutils"> <colgroup> <col width="28%" /> <col width="24%" /> <col width="48%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Topic</th> <th class="head">Type</th> <th class="head">Comments</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>camera/frontleft/camera/image</td> <td>Image</td> <td>Data from the front-left camera, which points to the right. Image is rotated 90 degrees anticlockwise.</td> </tr> <tr class="row-odd"><td>camera/frontright/camera/image</td> <td>Image</td> <td>Data from the front-right camera, which points to the left. Image is rotated 90 degrees anticlockwise.</td> </tr> <tr class="row-even"><td>camera/left/camera/image</td> <td>Image</td> <td>&#160;</td> </tr> <tr class="row-odd"><td>camera/right/camera/image</td> <td>Image</td> <td>&#160;</td> </tr> <tr class="row-even"><td>camera/back/camera/image</td> <td>Image</td> <td>&#160;</td> </tr> <tr class="row-odd"><td>depth/frontleft/camera/image</td> <td>Image</td> <td>Data from the front-left camera, which points to the right.</td> </tr> <tr class="row-even"><td>depth/frontright/camera/image</td> <td>Image</td> <td>Data from the front-right camera, which points to the left.</td> </tr> <tr class="row-odd"><td>depth/left/camera/image</td> <td>Image</td> <td>&#160;</td> </tr> <tr class="row-even"><td>depth/right/camera/image</td> <td>Image</td> <td>&#160;</td> </tr> <tr class="row-odd"><td>depth/back/camera/image</td> <td>Image</td> <td>&#160;</td> </tr> </tbody> </table> </div> <div class="section" id="self-righting-and-roll-over"> <h2>Self righting and roll over<a class="headerlink" href="#self-righting-and-roll-over" title="Permalink to this headline">¶</a></h2> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">Self righting and battery charging may or may not take into account payloads configured on the robot. Test with your configuration before using.</p> </div> <p>The self-right command can be accessed through <code class="docutils literal notranslate"><span class="pre">/spot/self_right</span></code>.</p> <p>The roll over commands can be accessed through the <code class="docutils literal notranslate"><span class="pre">/spot/roll_over_left</span></code> and <code class="docutils literal notranslate"><span class="pre">/spot/roll_over_right</span></code> services.</p> <p>You can also access these actions through rviz.</p> <img alt="_images/rviz_floor_tab.png" src="_images/rviz_floor_tab.png" /> </div> <div class="section" id="autonomous-docking"> <h2>Autonomous docking<a class="headerlink" href="#autonomous-docking" title="Permalink to this headline">¶</a></h2> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">See Boston Dynamics support for information about <a class="reference external" href="https://support.bostondynamics.com/s/article/Spot-Dock-setup">setting up the dock</a>.</p> </div> <p>If using a Spot Enterprise, you will have access to autonomous docking capabilities.</p> <div class="section" id="services"> <h3>Services<a class="headerlink" href="#services" title="Permalink to this headline">¶</a></h3> <p>You can trigger undocking with <code class="docutils literal notranslate"><span class="pre">/spot/undock</span></code>.</p> <p>Docking can be triggered with <code class="docutils literal notranslate"><span class="pre">/spot/dock</span></code>. You must provide the fiducial ID of the dock the robot should dock at.</p> </div> <div class="section" id="id6"> <h3>Actionserver<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3> <p>Docking can also be performed using a single actionserver at <code class="docutils literal notranslate"><span class="pre">/spot/dock</span></code>. To undock, the <code class="docutils literal notranslate"><span class="pre">undock</span></code> variable should be set to true. Docking is the default action and requires specification of the fiducial ID in the <code class="docutils literal notranslate"><span class="pre">dock_id</span></code> variable.</p> </div> <div class="section" id="id7"> <h3>Rviz<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3> <p>You can also perform docking through the dock tab.</p> <img alt="_images/rviz_dock_tab.png" src="_images/rviz_dock_tab.png" /> </div> </div> <div class="section" id="advanced-motion-control"> <h2>Advanced motion control<a class="headerlink" href="#advanced-motion-control" title="Permalink to this headline">¶</a></h2> <p>There are other parameters that can be used to specify the behaviour of the robot. These allow for more granular control of specific things. You should read and understand the SDK documentation before using these services to alter any of these parameters.</p> <ul class="simple"> <li><a class="reference external" href="https://dev.bostondynamics.com/protos/bosdyn/api/proto_reference.html?highlight=power_state#swingheight">/spot/swing_height</a></li> <li><a class="reference external" href="https://dev.bostondynamics.com/protos/bosdyn/api/proto_reference.html?highlight=power_state#terrainparams">/spot/terrain_params</a></li> <li><a class="reference external" href="https://dev.bostondynamics.com/protos/bosdyn/api/proto_reference.html?highlight=mobilityparams#locomotionhint">/spot/locomotion_mode</a></li> <li><a class="reference external" href="https://dev.bostondynamics.com/protos/bosdyn/api/proto_reference.html?highlight=power_state#obstacleparams">/spot/obstacle_params</a></li> </ul> <p>Some of the more advanced motion controls can be accessed through the advanced motion tab.</p> <img alt="_images/rviz_adv_motion_tab.png" src="_images/rviz_adv_motion_tab.png" /> </div> <div class="section" id="monitoring"> <h2>Monitoring<a class="headerlink" href="#monitoring" title="Permalink to this headline">¶</a></h2> <p>There are various topics which output information about the state of the robot:</p> <table border="1" class="docutils"> <colgroup> <col width="22%" /> <col width="26%" /> <col width="52%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Topic</th> <th class="head">Type</th> <th class="head">Description</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>status/metrics</td> <td>Metrics</td> <td>General metrics for the system like distance walked</td> </tr> <tr class="row-odd"><td>status/leases</td> <td>LeaseArray</td> <td>A list of what leases are held on the system</td> </tr> <tr class="row-even"><td>odometry/twist</td> <td>TwistWithCovarianceStamped</td> <td>The estimated odometry of the platform</td> </tr> <tr class="row-odd"><td>status/feet</td> <td>FootStateArray</td> <td>The status and position of each foot</td> </tr> <tr class="row-even"><td>status/estop</td> <td>EStopStateArray</td> <td>The status of the eStop system</td> </tr> <tr class="row-odd"><td>status/wifi</td> <td>WiFiState</td> <td>Status of the wifi system</td> </tr> <tr class="row-even"><td>status/power_state</td> <td>PowerState</td> <td>General power information</td> </tr> <tr class="row-odd"><td>status/battery_states</td> <td>BatteryStateArray</td> <td>Information for the battery and all cells in the system</td> </tr> <tr class="row-even"><td>status/behavior_faults</td> <td>BehaviorFaultState</td> <td>A listing of behavior faults in the system</td> </tr> <tr class="row-odd"><td>status/system_faults</td> <td>SystemFaultState</td> <td>A listing of system faults in the system</td> </tr> <tr class="row-even"><td>status/feedback</td> <td>Feedback</td> <td>Feedback from the Spot robot</td> </tr> <tr class="row-odd"><td>status/mobility_params</td> <td>MobilityParams</td> <td>Describes the current state of the mobility parameters defining the motion behaviour of the robot</td> </tr> </tbody> </table> </div> <div class="section" id="troubleshooting"> <h2>Troubleshooting<a class="headerlink" href="#troubleshooting" title="Permalink to this headline">¶</a></h2> <p>These instructions are a minimum subset of instructions to get this driver working and do not contain all necessary debugging steps. Please refer to the <a class="reference external" href="https://github.com/boston-dynamics/spot-sdk/blob/master/docs/python/quickstart.md">Spot SDK Quickstart</a> for more detailed debugging steps.</p> </div> </div> </div> </div> <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> <a href="driver_configuration.html" class="btn btn-neutral float-left" title="Driver configuration" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> <a href="arm_usage.html" class="btn btn-neutral float-right" title="Arm control" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> </div> <hr/> <div role="contentinfo"> <p>&#169; Copyright 2020, Clearpath Robotics, 2023 Oxford Robotics Institute.</p> </div> </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> </body> </html>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/genindex.html
<!DOCTYPE html> <html class="writer-html4" lang="en" > <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Index &mdash; Spot ROS User Documentation 0.0.0 documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <!--[if lt IE 9]> <script src="_static/js/html5shiv.min.js"></script> <![endif]--> <script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/language_data.js"></script> <script src="_static/js/theme.js"></script> <link rel="index" title="Index" href="#" /> <link rel="search" title="Search" href="search.html" /> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > <a href="index.html" class="icon icon-home"> Spot ROS User Documentation </a> <div class="version"> 0.0.0 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> <p class="caption"><span class="caption-text">Contents</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="robot_setup.html">Robot Configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="ros_setup.html">Computer Setup</a></li> <li class="toctree-l1"><a class="reference internal" href="driver_configuration.html">Driver configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="ros_usage.html">Basic Driver Usage</a></li> <li class="toctree-l1"><a class="reference internal" href="arm_usage.html">Arm control</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="index.html">Spot ROS User Documentation</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> <li><a href="index.html" class="icon icon-home"></a> &raquo;</li> <li>Index</li> <li class="wy-breadcrumbs-aside"> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <h1 id="index">Index</h1> <div class="genindex-jumpbox"> </div> </div> </div> <footer> <hr/> <div role="contentinfo"> <p>&#169; Copyright 2020, Clearpath Robotics, 2023 Oxford Robotics Institute.</p> </div> </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> </body> </html>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/index.html
<!DOCTYPE html> <html class="writer-html4" lang="en" > <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Spot ROS User Documentation &mdash; Spot ROS User Documentation 0.0.0 documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <!--[if lt IE 9]> <script src="_static/js/html5shiv.min.js"></script> <![endif]--> <script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/language_data.js"></script> <script src="_static/js/theme.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="next" title="Robot Configuration" href="robot_setup.html" /> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > <a href="#" class="icon icon-home"> Spot ROS User Documentation </a> <div class="version"> 0.0.0 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> <p class="caption"><span class="caption-text">Contents</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="robot_setup.html">Robot Configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="ros_setup.html">Computer Setup</a></li> <li class="toctree-l1"><a class="reference internal" href="driver_configuration.html">Driver configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="ros_usage.html">Basic Driver Usage</a></li> <li class="toctree-l1"><a class="reference internal" href="arm_usage.html">Arm control</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="#">Spot ROS User Documentation</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> <li><a href="#" class="icon icon-home"></a> &raquo;</li> <li>Spot ROS User Documentation</li> <li class="wy-breadcrumbs-aside"> <a href="_sources/index.rst.txt" rel="nofollow"> View page source</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="spot-ros-user-documentation"> <h1>Spot ROS User Documentation<a class="headerlink" href="#spot-ros-user-documentation" title="Permalink to this headline">¶</a></h1> <div class="toctree-wrapper compound"> <p class="caption"><span class="caption-text">Contents</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="robot_setup.html">Robot Configuration</a><ul> <li class="toctree-l2"><a class="reference internal" href="robot_setup.html#networking">Networking</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="ros_setup.html">Computer Setup</a><ul> <li class="toctree-l2"><a class="reference internal" href="ros_setup.html#building-the-driver-from-source">Building the Driver from Source</a></li> <li class="toctree-l2"><a class="reference internal" href="ros_setup.html#adding-to-the-urdf">Adding to the URDF</a></li> <li class="toctree-l2"><a class="reference internal" href="ros_setup.html#building-for-melodic">Building for Melodic</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="driver_configuration.html">Driver configuration</a><ul> <li class="toctree-l2"><a class="reference internal" href="driver_configuration.html#rate-parameters">Rate parameters</a></li> <li class="toctree-l2"><a class="reference internal" href="driver_configuration.html#startup-parameters">Startup parameters</a></li> <li class="toctree-l2"><a class="reference internal" href="driver_configuration.html#environment-variables">Environment variables</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="ros_usage.html">Basic Driver Usage</a><ul> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#verify-the-urdf">Verify the URDF</a></li> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#configure-your-networking">Configure your networking</a></li> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#running-the-driver">Running the driver</a></li> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#view-the-robot">View the robot</a></li> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#taking-control-of-the-robot">Taking control of the robot</a><ul> <li class="toctree-l3"><a class="reference internal" href="ros_usage.html#holding-the-lease">Holding the lease</a></li> <li class="toctree-l3"><a class="reference internal" href="ros_usage.html#emergency-stops">Emergency stops</a></li> <li class="toctree-l3"><a class="reference internal" href="ros_usage.html#enable-motor-power">Enable motor power</a></li> <li class="toctree-l3"><a class="reference internal" href="ros_usage.html#stand-the-robot-up">Stand the robot up</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#controlling-the-velocity">Controlling the velocity</a><ul> <li class="toctree-l3"><a class="reference internal" href="ros_usage.html#topic">Topic</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#controlling-the-body">Controlling the body</a><ul> <li class="toctree-l3"><a class="reference internal" href="ros_usage.html#static-body-pose">Static body pose</a><ul> <li class="toctree-l4"><a class="reference internal" href="ros_usage.html#service">Service</a></li> <li class="toctree-l4"><a class="reference internal" href="ros_usage.html#actionserver">Actionserver</a></li> <li class="toctree-l4"><a class="reference internal" href="ros_usage.html#rviz">Rviz</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="ros_usage.html#in-motion-body-pose">In-motion body pose</a><ul> <li class="toctree-l4"><a class="reference internal" href="ros_usage.html#id1">Topic</a></li> <li class="toctree-l4"><a class="reference internal" href="ros_usage.html#id2">Actionserver</a></li> </ul> </li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#moving-to-a-pose">Moving to a pose</a><ul> <li class="toctree-l3"><a class="reference internal" href="ros_usage.html#ros-topic">ROS Topic</a></li> <li class="toctree-l3"><a class="reference internal" href="ros_usage.html#id4">Actionserver</a></li> <li class="toctree-l3"><a class="reference internal" href="ros_usage.html#id5">Rviz</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#setting-velocity-limits">Setting velocity limits</a></li> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#cameras-and-depth-clouds">Cameras and Depth Clouds</a></li> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#self-righting-and-roll-over">Self righting and roll over</a></li> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#autonomous-docking">Autonomous docking</a><ul> <li class="toctree-l3"><a class="reference internal" href="ros_usage.html#services">Services</a></li> <li class="toctree-l3"><a class="reference internal" href="ros_usage.html#id6">Actionserver</a></li> <li class="toctree-l3"><a class="reference internal" href="ros_usage.html#id7">Rviz</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#advanced-motion-control">Advanced motion control</a></li> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#monitoring">Monitoring</a></li> <li class="toctree-l2"><a class="reference internal" href="ros_usage.html#troubleshooting">Troubleshooting</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="arm_usage.html">Arm control</a></li> </ul> </div> </div> </div> </div> <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> <a href="robot_setup.html" class="btn btn-neutral float-right" title="Robot Configuration" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> </div> <hr/> <div role="contentinfo"> <p>&#169; Copyright 2020, Clearpath Robotics, 2023 Oxford Robotics Institute.</p> </div> </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> </body> </html>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/search.html
<!DOCTYPE html> <html class="writer-html4" lang="en" > <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Search &mdash; Spot ROS User Documentation 0.0.0 documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <!--[if lt IE 9]> <script src="_static/js/html5shiv.min.js"></script> <![endif]--> <script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/language_data.js"></script> <script src="_static/js/theme.js"></script> <script src="_static/searchtools.js"></script> <script src="_static/language_data.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="#" /> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > <a href="index.html" class="icon icon-home"> Spot ROS User Documentation </a> <div class="version"> 0.0.0 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="#" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> <p class="caption"><span class="caption-text">Contents</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="robot_setup.html">Robot Configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="ros_setup.html">Computer Setup</a></li> <li class="toctree-l1"><a class="reference internal" href="driver_configuration.html">Driver configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="ros_usage.html">Basic Driver Usage</a></li> <li class="toctree-l1"><a class="reference internal" href="arm_usage.html">Arm control</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="index.html">Spot ROS User Documentation</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> <li><a href="index.html" class="icon icon-home"></a> &raquo;</li> <li>Search</li> <li class="wy-breadcrumbs-aside"> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <noscript> <div id="fallback" class="admonition warning"> <p class="last"> Please activate JavaScript to enable the search functionality. </p> </div> </noscript> <div id="search-results"> </div> </div> </div> <footer> <hr/> <div role="contentinfo"> <p>&#169; Copyright 2020, Clearpath Robotics, 2023 Oxford Robotics Institute.</p> </div> </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> <script> jQuery(function() { Search.loadIndex("searchindex.js"); }); </script> <script id="searchindexloader"></script> </body> </html>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/ros_setup.html
<!DOCTYPE html> <html class="writer-html4" lang="en" > <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Computer Setup &mdash; Spot ROS User Documentation 0.0.0 documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <!--[if lt IE 9]> <script src="_static/js/html5shiv.min.js"></script> <![endif]--> <script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/language_data.js"></script> <script src="_static/js/theme.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="next" title="Driver configuration" href="driver_configuration.html" /> <link rel="prev" title="Robot Configuration" href="robot_setup.html" /> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > <a href="index.html" class="icon icon-home"> Spot ROS User Documentation </a> <div class="version"> 0.0.0 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> <p class="caption"><span class="caption-text">Contents</span></p> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="robot_setup.html">Robot Configuration</a></li> <li class="toctree-l1 current"><a class="current reference internal" href="#">Computer Setup</a><ul> <li class="toctree-l2"><a class="reference internal" href="#building-the-driver-from-source">Building the Driver from Source</a></li> <li class="toctree-l2"><a class="reference internal" href="#adding-to-the-urdf">Adding to the URDF</a></li> <li class="toctree-l2"><a class="reference internal" href="#building-for-melodic">Building for Melodic</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="driver_configuration.html">Driver configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="ros_usage.html">Basic Driver Usage</a></li> <li class="toctree-l1"><a class="reference internal" href="arm_usage.html">Arm control</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="index.html">Spot ROS User Documentation</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> <li><a href="index.html" class="icon icon-home"></a> &raquo;</li> <li>Computer Setup</li> <li class="wy-breadcrumbs-aside"> <a href="_sources/ros_setup.rst.txt" rel="nofollow"> View page source</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="computer-setup"> <h1>Computer Setup<a class="headerlink" href="#computer-setup" title="Permalink to this headline">¶</a></h1> <div class="section" id="building-the-driver-from-source"> <h2>Building the Driver from Source<a class="headerlink" href="#building-the-driver-from-source" title="Permalink to this headline">¶</a></h2> <p>The driver is not released to the ROS package servers, so it must be built from source. This requires a source workspace on the ROS PC. You can add it to an existing workspace or follow the instructions below to create a new one.</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">mkdir</span> <span class="o">-</span><span class="n">p</span> <span class="o">~/</span><span class="n">spot_ws</span><span class="o">/</span><span class="n">src</span> </pre></div> </div> <p>Setup the workspace so it knows about your ROS installation</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">~/</span><span class="n">spot_ws</span><span class="o">/</span><span class="n">src</span> <span class="n">source</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">ros</span><span class="o">/</span><span class="n">noetic</span><span class="o">/</span><span class="n">setup</span><span class="o">.</span><span class="n">bash</span> <span class="n">catkin_init_workspace</span> </pre></div> </div> <p>Clone the spot_ros repository into the workspace</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">~/</span><span class="n">spot_ws</span><span class="o">/</span><span class="n">src</span> <span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">heuristicus</span><span class="o">/</span><span class="n">spot_ros</span><span class="o">.</span><span class="n">git</span> </pre></div> </div> <p>Use rosdep to install of the necessary dependencies</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">~/</span><span class="n">spot_ws</span><span class="o">/</span> <span class="n">rosdep</span> <span class="n">install</span> <span class="o">--</span><span class="n">from</span><span class="o">-</span><span class="n">paths</span> <span class="n">spot_driver</span> <span class="n">spot_msgs</span> <span class="n">spot_viz</span> <span class="n">spot_description</span> <span class="o">--</span><span class="n">ignore</span><span class="o">-</span><span class="n">src</span> <span class="o">-</span><span class="n">y</span> </pre></div> </div> <p>Once all the necessary packages are installed, build the packages in the workspace</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">~/</span><span class="n">spot_ws</span><span class="o">/</span> <span class="n">catkin</span> <span class="n">build</span> </pre></div> </div> <p>Source your newly built workspace and the packages inside</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">source</span> <span class="o">~/</span><span class="n">spot_ws</span><span class="o">/</span><span class="n">devel</span><span class="o">/</span><span class="n">setup</span><span class="o">.</span><span class="n">bash</span> </pre></div> </div> </div> <div class="section" id="adding-to-the-urdf"> <h2>Adding to the URDF<a class="headerlink" href="#adding-to-the-urdf" title="Permalink to this headline">¶</a></h2> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">When adding payloads, you should always add them to the robot’s configuration through the <a class="reference external" href="https://support.bostondynamics.com/s/article/Payload-configuration-requirements">admin panel</a>. Adding only the URDF does not add the payload to spot’s built in collision avoidance.</p> </div> <p>The driver supports some configuration of the URDF via environment variables. These can either be manually set in the terminal before starting the driver, or added to $HOME/.bashrc as desired. The table below lists the available variables and their default values:</p> <table border="1" class="docutils"> <colgroup> <col width="15%" /> <col width="11%" /> <col width="74%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Variable</th> <th class="head">Default Value</th> <th class="head">Description</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>SPOT_PACK</td> <td>0</td> <td>If 1, enables the Clearpath ROS backpack accessory and adds it to the URDF</td> </tr> <tr class="row-odd"><td>SPOT_LIDAR_MOUNT</td> <td>0</td> <td>If 1, adds the Lidar mount to the backpack. Requires SPOT_PACK to be 1</td> </tr> <tr class="row-even"><td>SPOT_VELODYNE</td> <td>0</td> <td>If 1, adds the a VLP-16 sensor to the lidar mount. Requires SPOT_LIDAR_MOUNT to be 1</td> </tr> <tr class="row-odd"><td>SPOT_ARM</td> <td>0</td> <td>If 1, adds the Spot arm to the URDF</td> </tr> <tr class="row-even"><td>SPOT_VELODYNE_XYZ</td> <td>0 0 0</td> <td>XYZ offset for the VLP-16 from the backpack lidar mount</td> </tr> <tr class="row-odd"><td>SPOT_VELODYNE_RPY</td> <td>0 0 0</td> <td>RPY offset for the VLP-16 from the backpack lidar mount</td> </tr> <tr class="row-even"><td>SPOT_URDF_EXTRAS</td> <td>empty.urdf</td> <td>Optional URDF file to add additional joints and links to the robot</td> </tr> </tbody> </table> <p>You can add a custom URDF to the robot using the <code class="docutils literal notranslate"><span class="pre">SPOT_URDF_EXTRAS</span></code> environment variable, which must be set in the terminal from which the driver is run. This should point to a URDF/xacro file which has an object where the parent is one of the frames on the robot.</p> <p>It might look something like below.</p> <div class="code xml highlight-default notranslate"><div class="highlight"><pre><span></span>&lt;?xml version=&quot;1.0&quot;?&gt; &lt;robot name=&quot;spot_frontier&quot; xmlns:xacro=&quot;http://www.ros.org/wiki/xacro&quot;&gt; &lt;xacro:include filename=&quot;$(find my_payload_package)/urdf/my_payload.xacro&quot;/&gt; &lt;xacro:my_payload parent=&quot;real_rear_rail&quot;/&gt; &lt;/robot&gt; </pre></div> </div> </div> <div class="section" id="building-for-melodic"> <h2>Building for Melodic<a class="headerlink" href="#building-for-melodic" title="Permalink to this headline">¶</a></h2> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">If you can, consider using ROS noetic instead, which does not have these build issues.</p> </div> <p>Please note that the Spot SDK uses Python3, which is not officially supported by ROS Melodic. If you encounter an error of this form:</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Traceback</span> <span class="p">(</span><span class="n">most</span> <span class="n">recent</span> <span class="n">call</span> <span class="n">last</span><span class="p">):</span> <span class="n">File</span> <span class="s2">&quot;/home/administrator/catkin_ws/src/spot_ros/spot_driver/scripts/spot_ros&quot;</span><span class="p">,</span> <span class="n">line</span> <span class="mi">3</span><span class="p">,</span> <span class="ow">in</span> <span class="o">&lt;</span><span class="n">module</span><span class="o">&gt;</span> <span class="kn">from</span> <span class="nn">spot_driver.spot_ros</span> <span class="kn">import</span> <span class="n">SpotROS</span> <span class="n">File</span> <span class="s2">&quot;/home/administrator/catkin_ws/src/spot_ros/spot_driver/src/spot_driver/spot_ros.py&quot;</span><span class="p">,</span> <span class="n">line</span> <span class="mi">19</span><span class="p">,</span> <span class="ow">in</span> <span class="o">&lt;</span><span class="n">module</span><span class="o">&gt;</span> <span class="kn">import</span> <span class="nn">tf2_ros</span> <span class="n">File</span> <span class="s2">&quot;/opt/ros/melodic/lib/python2.7/dist-packages/tf2_ros/__init__.py&quot;</span><span class="p">,</span> <span class="n">line</span> <span class="mi">38</span><span class="p">,</span> <span class="ow">in</span> <span class="o">&lt;</span><span class="n">module</span><span class="o">&gt;</span> <span class="kn">from</span> <span class="nn">tf2_py</span> <span class="kn">import</span> <span class="o">*</span> <span class="n">File</span> <span class="s2">&quot;/opt/ros/melodic/lib/python2.7/dist-packages/tf2_py/__init__.py&quot;</span><span class="p">,</span> <span class="n">line</span> <span class="mi">38</span><span class="p">,</span> <span class="ow">in</span> <span class="o">&lt;</span><span class="n">module</span><span class="o">&gt;</span> <span class="kn">from</span> <span class="nn">._tf2</span> <span class="kn">import</span> <span class="o">*</span> <span class="ne">ImportError</span><span class="p">:</span> <span class="n">dynamic</span> <span class="n">module</span> <span class="n">does</span> <span class="ow">not</span> <span class="n">define</span> <span class="n">module</span> <span class="n">export</span> <span class="n">function</span> <span class="p">(</span><span class="n">PyInit__tf2</span><span class="p">)</span> </pre></div> </div> <p>When launching the driver, please follow these steps:</p> <ol class="arabic simple"> <li><code class="docutils literal notranslate"><span class="pre">rm</span> <span class="pre">-rf</span> <span class="pre">devel/</span> <span class="pre">build/</span> <span class="pre">install/</span></code> – this will remove any old build artifacts from your workspace</li> <li><code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">clone</span> <span class="pre">https://github.com/ros/geometry2</span> <span class="pre">--branch</span> <span class="pre">0.6.5</span></code> into your <code class="docutils literal notranslate"><span class="pre">src</span></code> folder</li> <li>rebuild your workspace with</li> </ol> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">catkin_make</span> <span class="o">--</span><span class="n">cmake</span><span class="o">-</span><span class="n">args</span> <span class="o">-</span><span class="n">DCMAKE_BUILD_TYPE</span><span class="o">=</span><span class="n">Release</span> <span class="o">-</span><span class="n">DPYTHON_EXECUTABLE</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">python3</span> <span class="o">-</span><span class="n">DPYTHON_INCLUDE_DIR</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">include</span><span class="o">/</span><span class="n">python3</span><span class="mf">.6</span><span class="n">m</span> <span class="o">-</span><span class="n">DPYTHON_LIBRARY</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">x86_64</span><span class="o">-</span><span class="n">linux</span><span class="o">-</span><span class="n">gnu</span><span class="o">/</span><span class="n">libpython3</span><span class="mf">.6</span><span class="n">m</span><span class="o">.</span><span class="n">so</span> </pre></div> </div> <p>Or if you are using an Nvidia Jetson:</p> <div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">catkin_make</span> <span class="o">--</span><span class="n">cmake</span><span class="o">-</span><span class="n">args</span> <span class="o">-</span><span class="n">DCMAKE_BUILD_TYPE</span><span class="o">=</span><span class="n">Release</span> <span class="o">-</span><span class="n">DPYTHON_EXECUTABLE</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">python3</span> <span class="o">-</span><span class="n">DPYTHON_INCLUDE_DIR</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">include</span><span class="o">/</span><span class="n">python3</span><span class="mf">.6</span><span class="n">m</span> <span class="o">-</span><span class="n">DPYTHON_LIBRARY</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">aarch64</span><span class="o">-</span><span class="n">linux</span><span class="o">-</span><span class="n">gnu</span><span class="o">/</span><span class="n">libpython3</span><span class="mf">.6</span><span class="n">m</span><span class="o">.</span><span class="n">so</span> </pre></div> </div> <ol class="arabic simple" start="4"> <li>re-run <code class="docutils literal notranslate"><span class="pre">source</span> <span class="pre">devel/setup.bash</span></code></li> <li>start the driver with <code class="docutils literal notranslate"><span class="pre">roslaunch</span> <span class="pre">spot_driver</span> <span class="pre">driver.launch</span></code></li> </ol> </div> </div> </div> </div> <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> <a href="robot_setup.html" class="btn btn-neutral float-left" title="Robot Configuration" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> <a href="driver_configuration.html" class="btn btn-neutral float-right" title="Driver configuration" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> </div> <hr/> <div role="contentinfo"> <p>&#169; Copyright 2020, Clearpath Robotics, 2023 Oxford Robotics Institute.</p> </div> </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> </body> </html>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/driver_configuration.html
<!DOCTYPE html> <html class="writer-html4" lang="en" > <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Driver configuration &mdash; Spot ROS User Documentation 0.0.0 documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <!--[if lt IE 9]> <script src="_static/js/html5shiv.min.js"></script> <![endif]--> <script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/language_data.js"></script> <script src="_static/js/theme.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="next" title="Basic Driver Usage" href="ros_usage.html" /> <link rel="prev" title="Computer Setup" href="ros_setup.html" /> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > <a href="index.html" class="icon icon-home"> Spot ROS User Documentation </a> <div class="version"> 0.0.0 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> <p class="caption"><span class="caption-text">Contents</span></p> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="robot_setup.html">Robot Configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="ros_setup.html">Computer Setup</a></li> <li class="toctree-l1 current"><a class="current reference internal" href="#">Driver configuration</a><ul> <li class="toctree-l2"><a class="reference internal" href="#rate-parameters">Rate parameters</a></li> <li class="toctree-l2"><a class="reference internal" href="#startup-parameters">Startup parameters</a></li> <li class="toctree-l2"><a class="reference internal" href="#environment-variables">Environment variables</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="ros_usage.html">Basic Driver Usage</a></li> <li class="toctree-l1"><a class="reference internal" href="arm_usage.html">Arm control</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="index.html">Spot ROS User Documentation</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> <li><a href="index.html" class="icon icon-home"></a> &raquo;</li> <li>Driver configuration</li> <li class="wy-breadcrumbs-aside"> <a href="_sources/driver_configuration.rst.txt" rel="nofollow"> View page source</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="driver-configuration"> <h1>Driver configuration<a class="headerlink" href="#driver-configuration" title="Permalink to this headline">¶</a></h1> <p>There are some basic settings that can be configured to control how the driver runs and at what rate it obtains data. Data that is more important for your applications can be obtained at a higher rate.</p> <p>The default configuration file is located at <code class="docutils literal notranslate"><span class="pre">spot_driver/config/spot_ros.yaml</span></code></p> <div class="section" id="rate-parameters"> <h2>Rate parameters<a class="headerlink" href="#rate-parameters" title="Permalink to this headline">¶</a></h2> <p>These parameters control the rate of various callbacks and loops in the driver.</p> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">These rates are requests and not guarantees. The rate may vary depending on your network configuration and other factors.</p> </div> <table border="1" class="docutils"> <colgroup> <col width="23%" /> <col width="77%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Parameter</th> <th class="head">Description</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>rates/robot_state</td> <td>The robot’s state (include joint angles)</td> </tr> <tr class="row-odd"><td>rates/metrics</td> <td>The robot’s metrics</td> </tr> <tr class="row-even"><td>rates/lease</td> <td>The robot’s lease state</td> </tr> <tr class="row-odd"><td>rates/front_image</td> <td>The image and depth image from the front camera</td> </tr> <tr class="row-even"><td>rates/side_image</td> <td>The image and depth image from the side cameras</td> </tr> <tr class="row-odd"><td>rates/loop_frequency</td> <td>The image and depth image from the rear camera</td> </tr> <tr class="row-even"><td>rates/point_cloud</td> <td>The point cloud from the EAP lidar</td> </tr> <tr class="row-odd"><td>rates/hand_image</td> <td>The image and depth image from the arm’s hand camera</td> </tr> <tr class="row-even"><td>rates/feedback</td> <td>A feedback message with various information</td> </tr> <tr class="row-odd"><td>rates/mobility_params</td> <td>Parameters indicating the robot’s mobility state</td> </tr> <tr class="row-even"><td>rates/check_subscribers</td> <td>Check for subscribers on camera topics. Data is not published without subscribers</td> </tr> </tbody> </table> </div> <div class="section" id="startup-parameters"> <h2>Startup parameters<a class="headerlink" href="#startup-parameters" title="Permalink to this headline">¶</a></h2> <p>There are several parameters which can be used to automatically do certain actions when the driver starts.</p> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">Having the robot power its motors and stand after the driver connects is a physical action is inherently dangerous. Consider whether you need these settings, and ensure the area is clear before starting the driver.</p> </div> <table border="1" class="docutils"> <colgroup> <col width="23%" /> <col width="77%" /> </colgroup> <tbody valign="top"> <tr class="row-odd"><td>Parameter</td> <td>Description</td> </tr> <tr class="row-even"><td>auto_claim</td> <td>A boolean to automatically claim the body and e stop when the driver connects</td> </tr> <tr class="row-odd"><td>auto_power_on</td> <td>A boolean to automatically power on the robot’s motors when the driver connects</td> </tr> <tr class="row-even"><td>auto_stand</td> <td>A boolean to automatically stand the robot after the driver conneccts</td> </tr> </tbody> </table> </div> <div class="section" id="environment-variables"> <h2>Environment variables<a class="headerlink" href="#environment-variables" title="Permalink to this headline">¶</a></h2> <p>Some environment variables can modify the behaviour or configuration of the driver.</p> <table border="1" class="docutils"> <colgroup> <col width="20%" /> <col width="25%" /> <col width="55%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Variable</th> <th class="head">Default Value</th> <th class="head">Description</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>SPOT_VELODYNE_HOST</td> <td>192.168.131.20</td> <td>IP address of the VLP-16 sensor</td> </tr> <tr class="row-odd"><td>SPOT_JOY_DEVICE</td> <td>/dev/input/js0</td> <td>The Linux joypad input device used by the joy_teleop node</td> </tr> <tr class="row-even"><td>SPOT_JOY_CONFIG</td> <td>spot_control/config/teleop.yaml</td> <td>Joypad button/axis configuration file for joy_teleop</td> </tr> <tr class="row-odd"><td>SPOT_VELODYNE_AUTOLAUNCH</td> <td>1</td> <td>If 1 and SPOT_VELODYNE is also 1, the VLP16 ROS node will start automatically</td> </tr> </tbody> </table> </div> </div> </div> </div> <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> <a href="ros_setup.html" class="btn btn-neutral float-left" title="Computer Setup" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> <a href="ros_usage.html" class="btn btn-neutral float-right" title="Basic Driver Usage" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> </div> <hr/> <div role="contentinfo"> <p>&#169; Copyright 2020, Clearpath Robotics, 2023 Oxford Robotics Institute.</p> </div> </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> </body> </html>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/arm_usage.html
<!DOCTYPE html> <html class="writer-html4" lang="en" > <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Arm control &mdash; Spot ROS User Documentation 0.0.0 documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <!--[if lt IE 9]> <script src="_static/js/html5shiv.min.js"></script> <![endif]--> <script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/language_data.js"></script> <script src="_static/js/theme.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="prev" title="Basic Driver Usage" href="ros_usage.html" /> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > <a href="index.html" class="icon icon-home"> Spot ROS User Documentation </a> <div class="version"> 0.0.0 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> <p class="caption"><span class="caption-text">Contents</span></p> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="robot_setup.html">Robot Configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="ros_setup.html">Computer Setup</a></li> <li class="toctree-l1"><a class="reference internal" href="driver_configuration.html">Driver configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="ros_usage.html">Basic Driver Usage</a></li> <li class="toctree-l1 current"><a class="current reference internal" href="#">Arm control</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="index.html">Spot ROS User Documentation</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> <li><a href="index.html" class="icon icon-home"></a> &raquo;</li> <li>Arm control</li> <li class="wy-breadcrumbs-aside"> <a href="_sources/arm_usage.rst.txt" rel="nofollow"> View page source</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="arm-control"> <h1>Arm control<a class="headerlink" href="#arm-control" title="Permalink to this headline">¶</a></h1> <p>The driver can also send commands to the robots arm, if it has one. The following services allow control of various parts of the arm.</p> <table border="1" class="docutils"> <colgroup> <col width="50%" /> <col width="50%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Service</th> <th class="head">Description</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>/spot/arm_carry</td> <td>&#160;</td> </tr> <tr class="row-odd"><td>/spot/arm_joint_move</td> <td>&#160;</td> </tr> <tr class="row-even"><td>/spot/arm_stow</td> <td>&#160;</td> </tr> <tr class="row-odd"><td>/spot/arm_unstow</td> <td>&#160;</td> </tr> <tr class="row-even"><td>/spot/force_trajectory</td> <td>&#160;</td> </tr> <tr class="row-odd"><td>/spot/grasp_3d</td> <td>&#160;</td> </tr> <tr class="row-even"><td>/spot/gripper_angle_open</td> <td>&#160;</td> </tr> <tr class="row-odd"><td>/spot/gripper_close</td> <td>&#160;</td> </tr> <tr class="row-even"><td>/spot/gripper_open</td> <td>&#160;</td> </tr> <tr class="row-odd"><td>/spot/gripper_pose</td> <td>&#160;</td> </tr> </tbody> </table> </div> </div> </div> <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> <a href="ros_usage.html" class="btn btn-neutral float-left" title="Basic Driver Usage" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> </div> <hr/> <div role="contentinfo"> <p>&#169; Copyright 2020, Clearpath Robotics, 2023 Oxford Robotics Institute.</p> </div> </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> </body> </html>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/searchindex.js
Search.setIndex({docnames:["arm_usage","driver_configuration","index","robot_setup","ros_setup","ros_usage"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.viewcode":1,sphinx:55},filenames:["arm_usage.rst","driver_configuration.rst","index.rst","robot_setup.rst","ros_setup.rst","ros_usage.rst"],objects:{},objnames:{},objtypes:{},terms:{"10hz":5,"boolean":1,"case":5,"default":[1,4,5],"export":4,"function":[4,5],"import":[1,4,5],"long":5,"new":[4,5],"return":5,"static":2,"true":5,"try":5,"while":5,Adding:2,And:5,DNS:[],For:[],IPs:[],Not:[],One:5,ROS:[1,3,4],That:5,The:[0,1,3,4,5],Then:[],There:[1,5],These:[1,4,5],Use:[4,5],Using:3,__init__:4,_tf2:4,aarch64:4,abil:5,abl:5,about:[4,5],abov:5,access:5,accessori:4,account:5,achiev:5,action:[1,5],actionlib_tool:5,actionserv:2,actual:5,actuat:5,add:[4,5],added:[4,5],adding:4,addit:[4,5],address:[1,5],adjust:5,admin:[3,4],administr:[3,4],adv:[],advanc:2,affect:5,after:[1,5],again:5,align:5,all:[4,5],allow:[0,5],allow_mot:5,along:5,alreadi:5,also:[0,1,5],alter:5,alwai:4,amount:[],angl:1,angular:5,ani:[4,5],anticlockwis:5,anyth:5,api:5,appear:5,applic:1,applicaiton:[],approxim:5,apt:[],area:[1,5],arg:4,argument:5,arm:[1,2,4],arm_carri:0,arm_joint_mov:0,arm_stow:0,arm_unstow:0,around:[],arrow:[],articl:[],artifact:4,assign:[],assum:5,attach:5,attempt:5,authent:5,auto:[],auto_claim:[1,5],auto_power_on:[1,5],auto_stand:[1,5],automat:[1,5],autonom:2,autonomi:5,autonomy_en:5,avail:4,avoid:[4,5],axclient:5,axi:1,back:5,backpack:4,backward:[],bai:[],balenaetch:[],base:5,bash:4,bashrc:4,basic:[1,2],batteri:5,battery_st:5,batterystatearrai:5,been:[],befor:[1,4,5],behavior:5,behavior_fault:5,behaviorfaultst:5,behaviour:[1,5],behviour:[],being:5,below:[4,5],between:5,bin:4,blue:[],bodi:[1,2],body_height:5,body_pos:5,bosdyn:[],boston:[3,5],bostondynam:[],br0:[],branch:4,bridg:[],bridge_maxwait:[],bridge_port:[],browser:[],build:2,built:4,button:[1,5],c1cf6e31e6bade8868b172b4f42ed6fbab17c654:[],call:[4,5],callback:1,camera:[1,2],can:[0,1,3,4,5],cannot:5,capabl:5,catkin:4,catkin_init_workspac:4,catkin_mak:4,catkin_w:4,caus:[],cell:5,certain:1,chang:5,charg:5,check:[1,5],check_subscrib:1,choos:[],circl:[],claim:[1,5],clear:[1,5],clearpath:4,clearpathrobot:[],click:5,client:5,clone:4,cloud:[1,2],cmake:4,cmd_vel:5,collaps:5,collis:4,com:4,comm:5,command:[0,5],comment:5,common:[],commonli:[],commun:3,complet:5,compon:5,comput:2,config:[1,5],configur:[2,4],connecct:1,conneciton:[],connect:[1,3,5],consid:[1,4,5],consol:3,consult:3,contact:5,contain:5,content:2,control:[1,2],core:[],correctli:[],cover:[],creat:4,cuation:[],current:5,custom:4,cut:5,cython:[],danger:1,data:[1,3,5],date:[],dcmake_build_typ:4,debug:5,dedic:[],defin:[4,5],degre:5,depend:[1,4],depth:[1,2],describ:5,descript:[0,1,4,5],desir:4,desktop:[],despit:5,detail:[3,5],detect:5,dev:1,devel:4,develop:3,devic:1,dhcp:[],differ:5,directli:[],disabbl:[],disabl:5,disallow:5,displac:5,displai:5,dist:4,distanc:5,dock:2,dock_id:5,document:5,doe:[4,5],doing:5,don:5,done:5,down:5,download:[],dpython_execut:4,dpython_include_dir:4,dpython_librari:4,drive:[],driver:[0,2,3],dummypassword:5,dummyusernam:5,durat:5,dynam:[3,4,5],each:5,eap:1,easiest:5,easili:5,edit:[],effort:5,either:4,els:5,emerg:2,empi:[],empti:[4,5],enabl:[2,4],encount:4,end:5,ender:[],ensur:1,enter:5,enterpris:5,environ:[2,4,5],equip:5,error:4,establish:5,estim:5,estop:5,estop_timeout:5,estopstatearrai:5,etc:5,eth:[],ethernet:[],exactli:5,exampl:[],except:[3,5],execut:5,exist:4,expect:5,factor:1,fail:5,failur:5,fals:5,fault:5,feedback:[1,5],feet:5,fiduci:5,file:[1,4,5],filenam:4,fill:5,find:4,first:[],folder:4,follow:[0,4,5],foot:5,footstatearrai:5,force_trajectori:0,form:4,forward:5,found:5,fov:5,frame:[4,5],frame_id:5,from:[1,2,5],front:[1,5],front_imag:1,frontier_basepl:[],frontleft:5,frontright:5,fulli:[],further:5,futur:[],gener:5,gentl:5,geometry2:4,geometry_msg:5,get:5,gigabit:[],git:4,github:4,give:5,global:[],gnu:4,go_to_pos:5,goal:5,going:[],grab:[],granular:5,grasp_3d:0,grayscal:[],gripper_angle_open:0,gripper_clos:0,gripper_open:0,gripper_pos:0,guarante:[1,5],gui:[],guid:3,guidelin:5,hand:1,hand_imag:1,happen:5,hard:5,has:[0,4,5],hasn:[],have:[1,4,5],header:5,height:5,held:5,here:5,heuristicu:4,higher:1,highli:[],highlight:[],hkp:[],hold:2,holder:5,home:4,horizont:5,host:[],hostnam:5,how:[1,5],html:[],http:4,icon:[],idl:5,ifac:[],ignor:[4,5],imag:[1,5],immedi:5,implement:5,implmement:[],importerror:4,improv:[],in_motion_or_idle_body_pos:5,includ:[1,4,5],indic:1,inet:[],inform:[1,5],inher:1,input:1,insid:4,instal:4,instant:[],instead:4,instruct:[4,5],interact:[],interfac:[],ipaddress:[],ipv4:[],iso:[],issu:4,its:[1,5],jetson:4,joint:[1,4,5],joy_teleop:1,joypad:1,js0:1,keep:[],kei:[],keyserv:[],kill:5,kinet:[],know:4,larg:[],larger:5,last:4,later:[],latest:[],launch:[4,5],leas:[1,2],leasearrai:5,left:5,lib:4,libpython3:4,lidar:[1,4],like:[4,5],likewis:5,limit:2,line:4,linear:5,link:4,linux:[1,4],list:[4,5],littl:5,load:5,locat:[1,5],locked_stop:5,locomotion_mod:5,locomotionhint:[],login:[],look:[4,5],loop:1,loop_frequ:1,loopback:[],lost:5,lot:3,machin:5,made:5,mai:[1,5],maintain:5,mainten:[],make:5,manag:[],mani:5,manner:5,manual:4,marker:[],match:[],max:5,max_linear_velocity_i:5,max_linear_velocity_x:5,max_linear_velocity_z:5,melod:2,messag:[1,5],method:[],metr:5,metric:[1,5],might:4,minimum:5,mission:[],mkdir:4,mobil:[1,5],mobility_param:[1,5],mobilityparam:5,modifi:1,modul:4,monitor:[2,3],more:[1,5],most:[4,5],motion:2,motion_or_idle_body_pos:5,motor:[1,2],mount:[4,5],move:2,much:5,multipl:[],must:[4,5],my_payload:4,my_payload_packag:4,name:4,nameserv:[],narrow:5,nav:5,navig:[],necessari:[4,5],need:[1,5],netmask:[],network:[1,2],neutral:5,newli:4,node:1,noetic:4,non:5,normal:5,note:[4,5],nsec:5,number:[],nvidia:4,object:4,obstacl:5,obstacle_param:5,obstacleparam:[],obtain:1,odometri:5,offici:4,offset:4,ofometri:[],old:4,onc:[4,5],one:[0,4,5],onli:[4,5],onlin:[],onto:[],open:[],oper:5,opt:4,option:[4,5],org:4,orient:5,origin:[],other:[1,5],out:5,outdat:[],output:[3,5],outsid:[],over:2,packag:[4,5],page:3,panel:[4,5],param:5,paramet:[2,5],parent:4,part:0,password:5,past:[],path:4,payload:[3,4,5],perfect:5,perform:[3,5],physic:[1,5],pip3:[],pip:[],pitch:5,platform:5,pleas:[4,5],point:[1,4,5],point_cloud:1,pop:5,port:[3,5],pose:2,pose_bodi:[],posed_stand:5,posestamp:5,posit:5,possibl:5,power:[1,2],power_on:5,power_st:5,powerst:5,precis:5,precise_posit:5,prefix:[],press:5,prevent:[],process:[],properli:5,properti:5,proto:[],proto_refer:[],provid:5,pub:5,publish:[1,5],pull:[],purpos:3,put:[],pyinit__tf2:4,python2:4,python3:4,quickstart:5,quirk:[],radian:5,radio:[],rang:[],rate:[2,5],reach:5,read:5,real_rear_rail:4,rear:[1,5],rear_imag:[],reason:5,rebuild:4,recent:4,recommend:3,recv:[],red:[],refer:5,referen:[],regardless:5,regex:[],rel:5,releas:[4,5],rememb:[],remov:4,replac:[],report:[],repositori:4,request:[1,5],requir:[4,5],resend:5,reserv:[],reset:5,restart:5,restrict:5,rgb:5,right:2,robot:[0,1,2,4],robot_st:1,robott:[],roll:2,roll_over_left:5,roll_over_right:5,ros:[4,5],rosdep:4,roslaunch:[4,5],rosrun:5,rosservic:5,rostop:5,rotat:5,rout:[],rpc:5,rpy:4,run:[1,2,4],rviz:2,safe:5,safeti:5,sake:[],same:5,screen:[],script:4,sdk:[4,5],sec:5,second:5,section:[],secur:5,see:[3,5],seek:[],select:5,self:2,self_right:5,send:[0,5],sens:5,sensor:[1,4],seq:5,server:4,servic:[0,2],set:[1,2,4],setup:[2,3,5],sever:1,should:[3,4,5],shoulder:5,show:5,side:[1,5],side_imag:1,sidewai:5,similar:5,similarli:5,simpl:[],sinc:[],singl:5,sit:5,softwar:[],some:[1,4,5],someth:[4,5],sourc:[2,5],space:5,specif:5,specifi:5,speific:[],spot:[0,3,4,5],spot_arm:4,spot_control:1,spot_descript:[4,5],spot_driv:[1,4,5],spot_fronti:4,spot_joy_config:1,spot_joy_devic:1,spot_lidar_mount:4,spot_msg:4,spot_pack:4,spot_ro:[1,4],spot_runtime_dr:[],spot_urdf_extra:4,spot_velodyn:[1,4],spot_velodyne_autolaunch:1,spot_velodyne_host:1,spot_velodyne_rpi:4,spot_velodyne_xyz:4,spot_viz:[4,5],spot_w:4,spotcontrolpanel:5,spotro:4,src:4,stabil:5,stamp:5,stand:[1,2],standard:[],start:[1,4,5],startup:[2,5],state:[1,5],stationari:5,statu:5,step:[4,5],stop:[1,2],store:[],stream:5,strongli:[],subnet:[],subscrib:1,subset:5,success:5,sudo:[],support:[3,4,5],sure:5,swing_height:5,swingheight:[],system:5,system_fault:5,systemfaultst:5,tab:5,tabl:4,take:2,teleop:1,termin:4,terrain:5,terrain_param:5,terrainparam:[],test:5,tf2_py:4,tf2_ro:4,than:5,thei:5,them:4,thi:[4,5],thing:5,those:[],through:[3,4,5],throughout:5,time:5,timeout:5,togeth:[],tool:5,toolbar:5,top:5,topic:[1,2],traceback:4,trajectori:5,transform:5,trigger:5,troubleshoot:2,turn:[],twist:5,twistwithcovariancestamp:5,two:5,type:5,ubuntu:[],uncontrol:5,under:5,understand:5,undock:5,uneven:5,unexpect:[],until:[],updat:[],upgrad:[],urdf:2,usag:2,use:5,used:[1,5],useful:[],usernam:5,uses:4,using:[4,5],usr:4,valid:[],valu:[1,4,5],vari:1,variabl:[2,4,5],variou:[0,1,5],veloc:2,velocity_limit:5,veri:[],verifi:2,version:[4,5],vertic:5,via:[3,4],view:2,view_model:5,view_robot:5,visibl:5,vision:5,visual:5,vlp16:1,vlp:[1,4],wai:5,walk:5,want:[],web:[],well:[],what:[1,5],whatev:5,when:[1,4,5],where:4,whether:[1,5],which:[1,4,5],wifi:[3,5],wifist:5,wiki:4,window:5,wireless:[],wish:[],within:5,without:1,work:5,workspac:4,world:5,www:4,x86_64:4,xacro:4,xml:4,xmln:4,xyz:4,yaml:1,yaw:5,yet:[],you:[1,3,4,5],your:[1,2,4],zero:5},titles:["Arm control","Driver configuration","Spot ROS User Documentation","Robot Configuration","Computer Setup","Basic Driver Usage"],titleterms:{"function":[],"new":[],"static":5,Adding:4,ROS:[2,5],actionserv:5,address:[],administr:[],advanc:5,arm:0,automat:[],autonom:5,basic:5,bodi:5,build:4,camera:5,chang:[],check:[],cloud:5,comput:4,configur:[1,3,5],control:[0,5],core:[],creat:[],depend:[],depth:5,dock:5,document:2,driver:[1,4,5],emerg:5,enabl:5,environ:1,estop:[],etc:[],from:4,hold:5,instal:[],interact:[],interfac:[],leas:5,limit:5,login:[],manag:[],marker:[],melod:4,monitor:5,motion:5,motor:5,move:5,network:[3,5],option:[],over:5,paramet:1,platform:[],pose:5,power:5,rate:1,right:5,robot:[3,5],robott:[],roll:5,run:5,rviz:5,self:5,servic:5,set:5,setup:4,softwar:[],sourc:4,spot:2,stand:5,startup:1,stop:5,take:5,topic:5,troubleshoot:5,urdf:[4,5],usag:5,user:2,variabl:1,veloc:5,verifi:5,version:[],view:5,your:5}})
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/robot_setup.html
<!DOCTYPE html> <html class="writer-html4" lang="en" > <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Robot Configuration &mdash; Spot ROS User Documentation 0.0.0 documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <!--[if lt IE 9]> <script src="_static/js/html5shiv.min.js"></script> <![endif]--> <script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/language_data.js"></script> <script src="_static/js/theme.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="next" title="Computer Setup" href="ros_setup.html" /> <link rel="prev" title="Spot ROS User Documentation" href="index.html" /> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > <a href="index.html" class="icon icon-home"> Spot ROS User Documentation </a> <div class="version"> 0.0.0 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> <p class="caption"><span class="caption-text">Contents</span></p> <ul class="current"> <li class="toctree-l1 current"><a class="current reference internal" href="#">Robot Configuration</a><ul> <li class="toctree-l2"><a class="reference internal" href="#networking">Networking</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="ros_setup.html">Computer Setup</a></li> <li class="toctree-l1"><a class="reference internal" href="driver_configuration.html">Driver configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="ros_usage.html">Basic Driver Usage</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="index.html">Spot ROS User Documentation</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> <li><a href="index.html" class="icon icon-home"></a> &raquo;</li> <li>Robot Configuration</li> <li class="wy-breadcrumbs-aside"> <a href="_sources/robot_setup.rst.txt" rel="nofollow"> View page source</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="robot-configuration"> <h1>Robot Configuration<a class="headerlink" href="#robot-configuration" title="Permalink to this headline">¶</a></h1> <p>To configure the robot, you should consult <a class="reference external" href="https://support.bostondynamics.com/s/">Boston Dynamics’ support pages</a>.</p> <p>Robot administration is performed through the <a class="reference external" href="https://support.bostondynamics.com/s/article/Spot-system-administration">admin console</a>.</p> <div class="section" id="networking"> <h2>Networking<a class="headerlink" href="#networking" title="Permalink to this headline">¶</a></h2> <p>See the <a class="reference external" href="https://support.bostondynamics.com/s/article/Spot-network-setup">network setup</a> pages for details on network configuration.</p> <p>Using WiFi for ROS communication is not recommended, except for monitoring purposes.</p> <p>The driver can output a lot of data. It is recommended that you connect the Spot to the ROS PC via a payload port. See the <a class="reference external" href="https://dev.bostondynamics.com/docs/payload/readme">payload developer guide</a> for details.</p> </div> </div> </div> </div> <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> <a href="index.html" class="btn btn-neutral float-left" title="Spot ROS User Documentation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> <a href="ros_setup.html" class="btn btn-neutral float-right" title="Computer Setup" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> </div> <hr/> <div role="contentinfo"> <p>&#169; Copyright 2020, Clearpath Robotics, 2023 Oxford Robotics Institute.</p> </div> </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> </body> </html>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_sources/robot_setup.rst.txt
Robot Configuration =========================== To configure the robot, you should consult `Boston Dynamics' support pages <https://support.bostondynamics.com/s/>`_. Robot administration is performed through the `admin console <https://support.bostondynamics.com/s/article/Spot-system-administration>`_. Networking ---------------- See the `network setup <https://support.bostondynamics.com/s/article/Spot-network-setup>`_ pages for details on network configuration. Using WiFi for ROS communication is not recommended, except for monitoring purposes. The driver can output a lot of data. It is recommended that you connect the Spot to the ROS PC via a payload port. See the `payload developer guide <https://dev.bostondynamics.com/docs/payload/readme>`_ for details.
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_sources/ros_setup.rst.txt
Computer Setup ============== Building the Driver from Source ------------------------------- The driver is not released to the ROS package servers, so it must be built from source. This requires a source workspace on the ROS PC. You can add it to an existing workspace or follow the instructions below to create a new one. .. code:: bash mkdir -p ~/spot_ws/src Setup the workspace so it knows about your ROS installation .. code:: bash cd ~/spot_ws/src source /opt/ros/noetic/setup.bash catkin_init_workspace Clone the spot_ros repository into the workspace .. code:: bash cd ~/spot_ws/src git clone https://github.com/heuristicus/spot_ros.git Use rosdep to install of the necessary dependencies .. code:: bash cd ~/spot_ws/ rosdep install --from-paths spot_driver spot_msgs spot_viz spot_description --ignore-src -y Once all the necessary packages are installed, build the packages in the workspace .. code:: bash cd ~/spot_ws/ catkin build Source your newly built workspace and the packages inside .. code:: bash source ~/spot_ws/devel/setup.bash Adding to the URDF ------------------ .. warning:: When adding payloads, you should always add them to the robot's configuration through the `admin panel <https://support.bostondynamics.com/s/article/Payload-configuration-requirements>`_. Adding only the URDF does not add the payload to spot's built in collision avoidance. The driver supports some configuration of the URDF via environment variables. These can either be manually set in the terminal before starting the driver, or added to $HOME/.bashrc as desired. The table below lists the available variables and their default values: +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ | Variable |Default Value |Description | +=====================+===============+=======================================================================================================+ |SPOT_PACK |0 |If 1, enables the Clearpath ROS backpack accessory and adds it to the URDF | +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ |SPOT_LIDAR_MOUNT |0 |If 1, adds the Lidar mount to the backpack. Requires SPOT_PACK to be 1 | +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ |SPOT_VELODYNE |0 |If 1, adds the a VLP-16 sensor to the lidar mount. Requires SPOT_LIDAR_MOUNT to be 1 | | | | | +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ |SPOT_ARM |0 |If 1, adds the Spot arm to the URDF | +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ |SPOT_VELODYNE_XYZ |0 0 0 |XYZ offset for the VLP-16 from the backpack lidar mount | +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ |SPOT_VELODYNE_RPY |0 0 0 |RPY offset for the VLP-16 from the backpack lidar mount | +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ |SPOT_URDF_EXTRAS |empty.urdf |Optional URDF file to add additional joints and links to the robot | +---------------------+---------------+-------------------------------------------------------------------------------------------------------+ You can add a custom URDF to the robot using the ``SPOT_URDF_EXTRAS`` environment variable, which must be set in the terminal from which the driver is run. This should point to a URDF/xacro file which has an object where the parent is one of the frames on the robot. It might look something like below. .. code:: xml <?xml version="1.0"?> <robot name="spot_frontier" xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:include filename="$(find my_payload_package)/urdf/my_payload.xacro"/> <xacro:my_payload parent="real_rear_rail"/> </robot> Building for Melodic -------------------- .. note:: If you can, consider using ROS noetic instead, which does not have these build issues. Please note that the Spot SDK uses Python3, which is not officially supported by ROS Melodic. If you encounter an error of this form: .. code:: bash Traceback (most recent call last): File "/home/administrator/catkin_ws/src/spot_ros/spot_driver/scripts/spot_ros", line 3, in <module> from spot_driver.spot_ros import SpotROS File "/home/administrator/catkin_ws/src/spot_ros/spot_driver/src/spot_driver/spot_ros.py", line 19, in <module> import tf2_ros File "/opt/ros/melodic/lib/python2.7/dist-packages/tf2_ros/__init__.py", line 38, in <module> from tf2_py import * File "/opt/ros/melodic/lib/python2.7/dist-packages/tf2_py/__init__.py", line 38, in <module> from ._tf2 import * ImportError: dynamic module does not define module export function (PyInit__tf2) When launching the driver, please follow these steps: 1. ``rm -rf devel/ build/ install/`` -- this will remove any old build artifacts from your workspace 2. ``git clone https://github.com/ros/geometry2 --branch 0.6.5`` into your ``src`` folder 3. rebuild your workspace with .. code:: bash catkin_make --cmake-args -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so Or if you are using an Nvidia Jetson: .. code:: bash catkin_make --cmake-args -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/aarch64-linux-gnu/libpython3.6m.so 4. re-run ``source devel/setup.bash`` 5. start the driver with ``roslaunch spot_driver driver.launch``
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_sources/arm_usage.rst.txt
Arm control =========== The driver can also send commands to the robots arm, if it has one. The following services allow control of various parts of the arm. +------------------------+------------------------+ |Service |Description | +========================+========================+ |/spot/arm_carry | | +------------------------+------------------------+ |/spot/arm_joint_move | | +------------------------+------------------------+ |/spot/arm_stow | | +------------------------+------------------------+ |/spot/arm_unstow | | +------------------------+------------------------+ |/spot/force_trajectory | | +------------------------+------------------------+ |/spot/grasp_3d | | +------------------------+------------------------+ |/spot/gripper_angle_open| | +------------------------+------------------------+ |/spot/gripper_close | | +------------------------+------------------------+ |/spot/gripper_open | | +------------------------+------------------------+ |/spot/gripper_pose | | +------------------------+------------------------+
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_sources/ros_usage.rst.txt
Basic Driver Usage ================== .. warning:: Before doing anything with the robot, you should read the Boston Dynamics `safety guidelines <https://d3cjkvgbik1jtv.cloudfront.net/Spot%20IFU/spot_information_for_use_EN_v1.1.pdf>`_. .. note:: Details of how the robot functions can be found in the `Boston Dynamics SDK documentation <https://dev.bostondynamics.com>`_. Verify the URDF --------------- To verify that the spot_viz and spot_description packages are sourced properly, you can run .. code:: bash roslaunch spot_viz view_model.launch This will load RVIZ with the robot description visible. It should also show any additions you may have added to the robot's URDF .. image:: images/view_model.png Configure your networking ------------------------- If your ROS machine is attached to a payload port you will need to configure it so that it can connect to spot. See `payload network configuration <https://support.bostondynamics.com/s/article/Payload-device-network-configuration>`_ for more details. Running the driver ------------------ .. code:: bash roslaunch spot_driver driver.launch When launching, there are some options you may need to configure for your setup: +----------------------+---------------+-------------------------------------------------------------------+ |Argument |Default |Description | +======================+===============+===================================================================+ |username |dummyusername |Use this username to authenticate with spot | +----------------------+---------------+-------------------------------------------------------------------+ |password |dummypassword |Use this password to authenticate with spot | +----------------------+---------------+-------------------------------------------------------------------+ |hostname |192.168.50.3 |The IP address at which spot can be found | +----------------------+---------------+-------------------------------------------------------------------+ |estop_timeout |9.0 |Time allowed before rpc commands will time out. Comms between the | | | |robot and driver are checked at a rate of 1/3 of this time. If | | | |comms are down, a gentle estop will trigger | +----------------------+---------------+-------------------------------------------------------------------+ |autonomy_enabled |True |If false, some autonomy commands will be disabled for this run of | | | |the driver. This can only be changed on driver restart | | | | | +----------------------+---------------+-------------------------------------------------------------------+ |max_linear_velocity_x |0 |Limit on linear velocity for moving forwards. 0 is whatever is | | | |specified by BD. | | | | | +----------------------+---------------+-------------------------------------------------------------------+ |max_linear_velocity_y |0 |Limit on linear velocity for moving sideways. 0 is whatever is | | | |specified by BD. | | | | | +----------------------+---------------+-------------------------------------------------------------------+ |max_linear_velocity_z |0 |Limit on angular velocity for rotation. 0 is whatever is specified | | | |by BD. | | | | | +----------------------+---------------+-------------------------------------------------------------------+ |allow_motion |True |If false, the robot starts with all motion disallowed and must have| | | |it enabled by calling a service or pressing a button in rviz | | | | | +----------------------+---------------+-------------------------------------------------------------------+ View the robot -------------- Once the robot is connected, you should be able to visualize its odometry, joint positions, camera streams, etc. using rviz. To view these streams, run .. code:: bash roslaunch spot_viz view_robot.launch Once RVIZ is loaded, you should see something similar to this. .. image:: images/view_robot.png Taking control of the robot --------------------------- The easiest way to control the robot is through the rviz control panel, which connects to the various ROS services. Many commands which can be executed using a service or topic can also be executed using the panel. To add the panel to rviz go to Panels>Add new panel and the select ``SpotControlPanel`` under ``spot_viz``. It is included by default in the ``view_robot`` launch file. .. image:: images/rviz_panel.png Holding the lease ~~~~~~~~~~~~~~~~~ A body lease gives the holder the ability to command the spot to make actions in the world. There are two ways to claim a body lease and eStop using this driver. #. Automatically when the driver starts by enabling the ``auto_claim`` variable #. By calling the ``/spot/claim`` service after the driver is started You cannot claim a lease on the robot if something else already has a lease. This is for security and safety reasons. Check the``status/leases`` topic for information on current leases. You can release the lease by calling the ``/spot/release`` service. .. warning:: Releasing the lease while the robot is standing will trigger a gentle estop. Holding a lease automatically establishes an estop connection to the robot. All buttons except the claim lease button on the rviz panel are disabled if the ROS driver does not hold the lease. Emergency stops ~~~~~~~~~~~~~~~ The estop connection gives the robot a way to guarantee that the commanding system is maintaining contact with the robot. If this contact is lost, the robot will perform a gentle stop. The gentle and hard estops are calling through to the BD SDK. The gentle stop is at ``/spot/estop/gentle``. It stops all motion of the robot and commands it to sit. This stop does not have to be released. .. warning:: The hard estop immediately cuts power to the motors. The robot may collapse in an uncontrolled manner. The hard estop is at ``/spot/estop/hard`` this will kill power to the motors and must be released before you can send any commands to the robot. To release the estop, call ``/spot/estop/release``. There is an additional service ``/spot/stop`` which is implemented by the driver. This service stops any command that is currently being executed. The ``/spot/locked_stop`` stops the current command and also disallows any further motion of the robot. Motion can be allowed again by calling the ``/spot/allow_motion`` service. The top of the rviz panel has buttons to control the estops as described above, and also displays their status. It also shows whether the robot is allowed to move or not. .. image:: images/rviz_estops.png Enable motor power ~~~~~~~~~~~~~~~~~~ Motor power needs to be enabled once you have a Lease on the body. This can be done in two ways: #. Automatically when the driver starts by enabling the ``auto_power_on`` variable #. By calling the ``/spot/power_on`` service after the driver is started Stand the robot up ~~~~~~~~~~~~~~~~~~ Once the motors are powered, stand the robot up so it is able to move through the world. This can be done in two ways: #. Automatically when the driver starts by enabling the ``auto_stand`` variable #. By calling the ``/spot/stand`` service after the driver is started Controlling the velocity ------------------------ .. warning:: Spot will attempt to avoid any obstacles it detects with its cameras, but no vision or actuation system is perfect. Make sure to only move the robot in a safe area and in a controlled manner. Topic ~~~~~~~~~~ To control Spot, you can send a Twist message to command a velocity. .. code:: bash rostopic pub /spot/cmd_vel geometry_msgs/Twist "linear: x: 0.0 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: 0.3" -r 10 That command will have spot rotate on the spot at 0.3 radians/second. Note the -r at the end of the command. That has ROS resend the message over again. If you don't resend the message, the driver will assume a timeout and stop commanding motion of the robot. Controlling the body -------------------- There are two different ways of specifying the pose of the body. Static body pose ~~~~~~~~~~~~~~~~ The static body pose changes the body position only when the robot is stationary. Any other motion will reset the body to its normal pose. It can adjust the roll, pitch, yaw, and body height. Service ^^^^^^^ The body can be posed by a service call to ``/spot/posed_stand``. If using a pose message, you can control the body height by setting the z component of position. The x and y components of position are ignored. If the pose message is non-zero, any roll/pitch/yaw specification will be ignored. If using the roll/pitch/yaw specification, enter values in degrees, and body height in metres. Body height is based on displacement from the neutral position. If you send an empty message, the body pose will be reset to neutral. Actionserver ^^^^^^^^^^^^ The actionserver ``/spot/body_pose`` can be called to set the body pose. To test this, start an action client with .. code:: bash rosrun actionlib_tools axclient.py /spot/body_pose You will see a window pop up, and you can specify the body pose with a Pose message, or by specifying roll, pitch and yaw, and a body height. Here is what the axclient window will look like: .. code:: yaml body_pose: position: x: 0.0 y: 0.0 z: 0.0 orientation: x: 0.0 y: 0.0 z: 0.0 w: 0.0 roll: 0 pitch: 0 yaw: 0 body_height: 0.0 Rviz ^^^^ The static pose can also be controlled in the body tab. .. image:: images/rviz_body_tab.png In-motion body pose ~~~~~~~~~~~~~~~~~~~ .. warning:: The in-motion body pose can affect the stability of the robot while walking. It is also possible to specify a pose the robot should hold while it is in motion. This is a more restricted version of the static body pose and cannot achieve the same body heights or rotational changes. While idle, all the parameters specified will be held. The pitch and body height are maintained throughout any walking motion the robot makes. When the robot stops walking, it will return to the pose specified by all parameters. Topic ^^^^^ This pose can be set through the ``/spot/in_motion_or_idle_body_pose`` topic .. code:: bash rostopic pub /spot/in_motion_or_idle_body_pose geometry_msgs/Pose "position: x: 0.0 y: 0.0 z: 0.0 orientation: x: 0.0 y: 0.0 z: 0.0 w: 1.0" Actionserver ^^^^^^^^^^^^ The actionserver is found at ``/spot/motion_or_idle_body_pose`` and has the same parameters as the static pose. Moving to a pose ---------------- .. warning:: Take into account the Boston Dynamics `safety guidelines <https://d3cjkvgbik1jtv.cloudfront.net/Spot%20IFU/spot_information_for_use_EN_v1.1.pdf>`_ when moving the robot. The robot will attempt to avoid obstacles but will also walk over any uneven terrain, regardless of what that terrain is made up of. You should operate in a controlled environment. One of the most important commands for easily controlling the robot is the trajectory command. This command allows you to move the robot to a position in space by specifying a pose relative to the robot's current position. You may specify a pose in a different frame than the ``body`` frame and it will be transformed into that frame. ROS Topic ~~~~~~~~~ The ``/spot/go_to_pose`` topic can be used to move the robot by specifying a pose. The following command will move the robot one metre forwards from its current location. .. code:: bash rostopic pub /spot/go_to_pose geometry_msgs/PoseStamped "header: seq: 0 stamp: secs: 0 nsecs: 0 frame_id: 'body' pose: position: x: 1 y: 0.0 z: 0.0 orientation: x: 0.0 y: 0.0 z: 0.0 w: 1" Actionserver ~~~~~~~~~~~~ The ``/spot/trajectory`` actionserver gives you a little more control than the ros topic, and will also give you information about success or failure. .. warning:: If there is an obstacle along the trajectory the robot is trying to move along, it may fail as the trajectory command is different to the command that is used by the controller. In this case, the actionserver will return success despite not actually reaching the requested pose. As of 2021/09/10 the boston dynamics API does not appear to provide feedback which we can use to return failure when this happens. In addition to the pose, you can specify ``duration``, which specifies how long the command can run before timing out. The ``precise_positioning`` variable can be used to request that the robot move more precisely to the specified pose. If set to false, the robot will move to "near" the specified pose. It's not clear what exactly defines being "near" to the pose, but you should not expect to reach the pose precisely. The robot will end up within ~0.5m of the pose, and not make much effort to align to the orientation. You can test the actionserver by using an action client .. code:: bash rosrun actionlib_tools axclient /spot/trajectory And fill in the values as you like. Rviz ~~~~ You can connect the 2d nav goal tool to publish to the ``/spot/go_to_pose`` topic. The default rviz config provided with .. code:: bash roslaunch spot_viz view_robot.launch Already has the tool configured, but you can also do this by right clicking the toolbar, selecting tool properties, then changing the nav goal topic to ``/spot/go_to_pose``. Setting velocity limits ----------------------- You can set a velocity limit in m/s for the motion to poses using the ``/spot/velocity_limit`` service: .. code:: bash rosservice call /spot/velocity_limit "velocity_limit: linear: x: 0.0 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: 0.0" Only the x and y components of linear velocity are considered, and the z component of angular. You can adjust the velocity limits on startup by setting the max linear/angular velocity params. You can also set the limits using the rviz panel. .. image:: images/rviz_motion_tab.png Cameras and Depth Clouds ------------------------ Spot is equipped 5 RGB and depth-sensing cameras: 2 on the front, one on each side, and one in the rear. All of these cameras publish at approximately 10Hz. Note that the front cameras are mounted sideways, so they have a narrower horizontal FoV, but a larger vertical one. The camera data likewise rotated anticlockwise by 90 degrees. The ``frontleft`` camera and depth topics are from the camera physically located on the front-left of the robot. This camera is pointed to the robot's right, so the depth cloud will appear in front of the robot's right shoulder: .. image:: images/front-left-depth.png Similarly the ``frontright`` camera and depth topics are from the camera physically located on the front-right of the robot. This camera points to the robot's left, so the depth cloud will appear in front of the robot's left shoulder: .. image:: images/front-right-depth.png The complete list of depth and camera topics is below: +--------------------------------+----------------------------+-------------------------------------------------------+ | Topic | Type | Comments | +================================+============================+=======================================================+ | camera/frontleft/camera/image | Image | Data from the front-left camera, which points to the | | | | right. Image is rotated 90 degrees anticlockwise. | +--------------------------------+----------------------------+-------------------------------------------------------+ | camera/frontright/camera/image | Image | Data from the front-right camera, which points to the | | | | left. Image is rotated 90 degrees anticlockwise. | +--------------------------------+----------------------------+-------------------------------------------------------+ | camera/left/camera/image | Image | | +--------------------------------+----------------------------+-------------------------------------------------------+ | camera/right/camera/image | Image | | +--------------------------------+----------------------------+-------------------------------------------------------+ | camera/back/camera/image | Image | | +--------------------------------+----------------------------+-------------------------------------------------------+ | depth/frontleft/camera/image | Image | Data from the front-left camera, which points to the | | | | right. | +--------------------------------+----------------------------+-------------------------------------------------------+ | depth/frontright/camera/image | Image | Data from the front-right camera, which points to the | | | | left. | +--------------------------------+----------------------------+-------------------------------------------------------+ | depth/left/camera/image | Image | | +--------------------------------+----------------------------+-------------------------------------------------------+ | depth/right/camera/image | Image | | +--------------------------------+----------------------------+-------------------------------------------------------+ | depth/back/camera/image | Image | | +--------------------------------+----------------------------+-------------------------------------------------------+ Self righting and roll over --------------------------- .. warning:: Self righting and battery charging may or may not take into account payloads configured on the robot. Test with your configuration before using. The self-right command can be accessed through ``/spot/self_right``. The roll over commands can be accessed through the ``/spot/roll_over_left`` and ``/spot/roll_over_right`` services. You can also access these actions through rviz. .. image:: images/rviz_floor_tab.png Autonomous docking ------------------ .. note:: See Boston Dynamics support for information about `setting up the dock <https://support.bostondynamics.com/s/article/Spot-Dock-setup>`_. If using a Spot Enterprise, you will have access to autonomous docking capabilities. Services ~~~~~~~~ You can trigger undocking with ``/spot/undock``. Docking can be triggered with ``/spot/dock``. You must provide the fiducial ID of the dock the robot should dock at. Actionserver ~~~~~~~~~~~~ Docking can also be performed using a single actionserver at ``/spot/dock``. To undock, the ``undock`` variable should be set to true. Docking is the default action and requires specification of the fiducial ID in the ``dock_id`` variable. Rviz ~~~~ You can also perform docking through the dock tab. .. image:: images/rviz_dock_tab.png Advanced motion control ----------------------- There are other parameters that can be used to specify the behaviour of the robot. These allow for more granular control of specific things. You should read and understand the SDK documentation before using these services to alter any of these parameters. * `/spot/swing_height <https://dev.bostondynamics.com/protos/bosdyn/api/proto_reference.html?highlight=power_state#swingheight>`_ * `/spot/terrain_params <https://dev.bostondynamics.com/protos/bosdyn/api/proto_reference.html?highlight=power_state#terrainparams>`_ * `/spot/locomotion_mode <https://dev.bostondynamics.com/protos/bosdyn/api/proto_reference.html?highlight=mobilityparams#locomotionhint>`_ * `/spot/obstacle_params <https://dev.bostondynamics.com/protos/bosdyn/api/proto_reference.html?highlight=power_state#obstacleparams>`_ Some of the more advanced motion controls can be accessed through the advanced motion tab. .. image:: images/rviz_adv_motion_tab.png Monitoring ---------- There are various topics which output information about the state of the robot: +------------------------+----------------------------+---------------------------------------------------------+ | Topic | Type | Description | +========================+============================+=========================================================+ | status/metrics | Metrics | General metrics for the system like distance walked | +------------------------+----------------------------+---------------------------------------------------------+ | status/leases | LeaseArray | A list of what leases are held on the system | +------------------------+----------------------------+---------------------------------------------------------+ | odometry/twist | TwistWithCovarianceStamped | The estimated odometry of the platform | +------------------------+----------------------------+---------------------------------------------------------+ | status/feet | FootStateArray | The status and position of each foot | +------------------------+----------------------------+---------------------------------------------------------+ | status/estop | EStopStateArray | The status of the eStop system | +------------------------+----------------------------+---------------------------------------------------------+ | status/wifi | WiFiState | Status of the wifi system | +------------------------+----------------------------+---------------------------------------------------------+ | status/power_state | PowerState | General power information | +------------------------+----------------------------+---------------------------------------------------------+ | status/battery_states | BatteryStateArray | Information for the battery and all cells in the system | +------------------------+----------------------------+---------------------------------------------------------+ | status/behavior_faults | BehaviorFaultState | A listing of behavior faults in the system | +------------------------+----------------------------+---------------------------------------------------------+ | status/system_faults | SystemFaultState | A listing of system faults in the system | +------------------------+----------------------------+---------------------------------------------------------+ | status/feedback | Feedback | Feedback from the Spot robot | +------------------------+----------------------------+---------------------------------------------------------+ | status/mobility_params | MobilityParams | Describes the current state of the mobility parameters | | | | defining the motion behaviour of the robot | +------------------------+----------------------------+---------------------------------------------------------+ Troubleshooting --------------- These instructions are a minimum subset of instructions to get this driver working and do not contain all necessary debugging steps. Please refer to the `Spot SDK Quickstart <https://github.com/boston-dynamics/spot-sdk/blob/master/docs/python/quickstart.md>`_ for more detailed debugging steps.
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_sources/driver_configuration.rst.txt
Driver configuration ==================== There are some basic settings that can be configured to control how the driver runs and at what rate it obtains data. Data that is more important for your applications can be obtained at a higher rate. The default configuration file is located at ``spot_driver/config/spot_ros.yaml`` Rate parameters --------------- These parameters control the rate of various callbacks and loops in the driver. .. note:: These rates are requests and not guarantees. The rate may vary depending on your network configuration and other factors. +------------------------+---------------------------------------------------------------------------------+ |Parameter |Description | +========================+=================================================================================+ |rates/robot_state |The robot's state (include joint angles) | +------------------------+---------------------------------------------------------------------------------+ |rates/metrics |The robot's metrics | +------------------------+---------------------------------------------------------------------------------+ |rates/lease |The robot's lease state | +------------------------+---------------------------------------------------------------------------------+ |rates/front_image |The image and depth image from the front camera | +------------------------+---------------------------------------------------------------------------------+ |rates/side_image |The image and depth image from the side cameras | +------------------------+---------------------------------------------------------------------------------+ |rates/loop_frequency |The image and depth image from the rear camera | +------------------------+---------------------------------------------------------------------------------+ |rates/point_cloud |The point cloud from the EAP lidar | +------------------------+---------------------------------------------------------------------------------+ |rates/hand_image |The image and depth image from the arm's hand camera | +------------------------+---------------------------------------------------------------------------------+ |rates/feedback |A feedback message with various information | +------------------------+---------------------------------------------------------------------------------+ |rates/mobility_params |Parameters indicating the robot's mobility state | +------------------------+---------------------------------------------------------------------------------+ |rates/check_subscribers |Check for subscribers on camera topics. Data is not published without subscribers| +------------------------+---------------------------------------------------------------------------------+ Startup parameters ------------------- There are several parameters which can be used to automatically do certain actions when the driver starts. .. warning:: Having the robot power its motors and stand after the driver connects is a physical action is inherently dangerous. Consider whether you need these settings, and ensure the area is clear before starting the driver. +------------------------+---------------------------------------------------------------------------------+ | Parameter | Description | +------------------------+---------------------------------------------------------------------------------+ | auto_claim | A boolean to automatically claim the body and e stop when the driver connects | +------------------------+---------------------------------------------------------------------------------+ | auto_power_on | A boolean to automatically power on the robot's motors when the driver connects | +------------------------+---------------------------------------------------------------------------------+ | auto_stand | A boolean to automatically stand the robot after the driver conneccts | +------------------------+---------------------------------------------------------------------------------+ Environment variables --------------------- Some environment variables can modify the behaviour or configuration of the driver. +----------------------------+-----------------------------------+----------------------------------------------------------------------------+ |Variable |Default Value |Description | +============================+===================================+============================================================================+ |SPOT_VELODYNE_HOST |192.168.131.20 |IP address of the VLP-16 sensor | +----------------------------+-----------------------------------+----------------------------------------------------------------------------+ |SPOT_JOY_DEVICE |/dev/input/js0 |The Linux joypad input device used by the joy_teleop node | | | | | +----------------------------+-----------------------------------+----------------------------------------------------------------------------+ |SPOT_JOY_CONFIG |spot_control/config/teleop.yaml |Joypad button/axis configuration file for joy_teleop | | | | | +----------------------------+-----------------------------------+----------------------------------------------------------------------------+ |SPOT_VELODYNE_AUTOLAUNCH |1 |If 1 and SPOT_VELODYNE is also 1, the VLP16 ROS node will start | | | |automatically | +----------------------------+-----------------------------------+----------------------------------------------------------------------------+
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_sources/index.rst.txt
Spot ROS User Documentation =========================== .. toctree:: :maxdepth: 0 :caption: Contents robot_setup ros_setup driver_configuration ros_usage arm_usage
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_static/searchtools.js
/* * searchtools.js * ~~~~~~~~~~~~~~~~ * * Sphinx JavaScript utilities for the full-text search. * * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ if (!Scorer) { /** * Simple result scoring code. */ var Scorer = { // Implement the following function to further tweak the score for each result // The function takes a result array [filename, title, anchor, descr, score] // and returns the new score. /* score: function(result) { return result[4]; }, */ // query matches the full name of an object objNameMatch: 11, // or matches in the last dotted part of the object name objPartialMatch: 6, // Additive scores depending on the priority of the object objPrio: {0: 15, // used to be importantResults 1: 5, // used to be objectResults 2: -5}, // used to be unimportantResults // Used when the priority is not in the mapping. objPrioDefault: 0, // query found in title title: 15, // query found in terms term: 5 }; } if (!splitQuery) { function splitQuery(query) { return query.split(/\s+/); } } /** * Search Module */ var Search = { _index : null, _queued_query : null, _pulse_status : -1, init : function() { var params = $.getQueryParameters(); if (params.q) { var query = params.q[0]; $('input[name="q"]')[0].value = query; this.performSearch(query); } }, loadIndex : function(url) { $.ajax({type: "GET", url: url, data: null, dataType: "script", cache: true, complete: function(jqxhr, textstatus) { if (textstatus != "success") { document.getElementById("searchindexloader").src = url; } }}); }, setIndex : function(index) { var q; this._index = index; if ((q = this._queued_query) !== null) { this._queued_query = null; Search.query(q); } }, hasIndex : function() { return this._index !== null; }, deferQuery : function(query) { this._queued_query = query; }, stopPulse : function() { this._pulse_status = 0; }, startPulse : function() { if (this._pulse_status >= 0) return; function pulse() { var i; Search._pulse_status = (Search._pulse_status + 1) % 4; var dotString = ''; for (i = 0; i < Search._pulse_status; i++) dotString += '.'; Search.dots.text(dotString); if (Search._pulse_status > -1) window.setTimeout(pulse, 500); } pulse(); }, /** * perform a search for something (or wait until index is loaded) */ performSearch : function(query) { // create the required interface elements this.out = $('#search-results'); this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out); this.dots = $('<span></span>').appendTo(this.title); this.status = $('<p style="display: none"></p>').appendTo(this.out); this.output = $('<ul class="search"/>').appendTo(this.out); $('#search-progress').text(_('Preparing search...')); this.startPulse(); // index already loaded, the browser was quick! if (this.hasIndex()) this.query(query); else this.deferQuery(query); }, /** * execute search (requires search index to be loaded) */ query : function(query) { var i; // stem the searchterms and add them to the correct list var stemmer = new Stemmer(); var searchterms = []; var excluded = []; var hlterms = []; var tmp = splitQuery(query); var objectterms = []; for (i = 0; i < tmp.length; i++) { if (tmp[i] !== "") { objectterms.push(tmp[i].toLowerCase()); } if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) || tmp[i] === "") { // skip this "word" continue; } // stem the word var word = stemmer.stemWord(tmp[i].toLowerCase()); // prevent stemmer from cutting word smaller than two chars if(word.length < 3 && tmp[i].length >= 3) { word = tmp[i]; } var toAppend; // select the correct list if (word[0] == '-') { toAppend = excluded; word = word.substr(1); } else { toAppend = searchterms; hlterms.push(tmp[i].toLowerCase()); } // only add if not already in the list if (!$u.contains(toAppend, word)) toAppend.push(word); } var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" ")); // console.debug('SEARCH: searching for:'); // console.info('required: ', searchterms); // console.info('excluded: ', excluded); // prepare search var terms = this._index.terms; var titleterms = this._index.titleterms; // array of [filename, title, anchor, descr, score] var results = []; $('#search-progress').empty(); // lookup as object for (i = 0; i < objectterms.length; i++) { var others = [].concat(objectterms.slice(0, i), objectterms.slice(i+1, objectterms.length)); results = results.concat(this.performObjectSearch(objectterms[i], others)); } // lookup as search terms in fulltext results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms)); // let the scorer override scores with a custom scoring function if (Scorer.score) { for (i = 0; i < results.length; i++) results[i][4] = Scorer.score(results[i]); } // now sort the results by score (in opposite order of appearance, since the // display function below uses pop() to retrieve items) and then // alphabetically results.sort(function(a, b) { var left = a[4]; var right = b[4]; if (left > right) { return 1; } else if (left < right) { return -1; } else { // same score: sort alphabetically left = a[1].toLowerCase(); right = b[1].toLowerCase(); return (left > right) ? -1 : ((left < right) ? 1 : 0); } }); // for debugging //Search.lastresults = results.slice(); // a copy //console.info('search results:', Search.lastresults); // print the results var resultCount = results.length; function displayNextItem() { // results left, load the summary and display it if (results.length) { var item = results.pop(); var listItem = $('<li style="display:none"></li>'); if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') { // dirhtml builder var dirname = item[0] + '/'; if (dirname.match(/\/index\/$/)) { dirname = dirname.substring(0, dirname.length-6); } else if (dirname == 'index/') { dirname = ''; } listItem.append($('<a/>').attr('href', DOCUMENTATION_OPTIONS.URL_ROOT + dirname + highlightstring + item[2]).html(item[1])); } else { // normal html builders listItem.append($('<a/>').attr('href', item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX + highlightstring + item[2]).html(item[1])); } if (item[3]) { listItem.append($('<span> (' + item[3] + ')</span>')); Search.output.append(listItem); listItem.slideDown(5, function() { displayNextItem(); }); } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) { var suffix = DOCUMENTATION_OPTIONS.SOURCELINK_SUFFIX; if (suffix === undefined) { suffix = '.txt'; } $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[5] + (item[5].slice(-suffix.length) === suffix ? '' : suffix), dataType: "text", complete: function(jqxhr, textstatus) { var data = jqxhr.responseText; if (data !== '' && data !== undefined) { listItem.append(Search.makeSearchSummary(data, searchterms, hlterms)); } Search.output.append(listItem); listItem.slideDown(5, function() { displayNextItem(); }); }}); } else { // no source available, just display title Search.output.append(listItem); listItem.slideDown(5, function() { displayNextItem(); }); } } // search finished, update title and status message else { Search.stopPulse(); Search.title.text(_('Search Results')); if (!resultCount) Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.')); else Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount)); Search.status.fadeIn(500); } } displayNextItem(); }, /** * search for object names */ performObjectSearch : function(object, otherterms) { var filenames = this._index.filenames; var docnames = this._index.docnames; var objects = this._index.objects; var objnames = this._index.objnames; var titles = this._index.titles; var i; var results = []; for (var prefix in objects) { for (var name in objects[prefix]) { var fullname = (prefix ? prefix + '.' : '') + name; if (fullname.toLowerCase().indexOf(object) > -1) { var score = 0; var parts = fullname.split('.'); // check for different match types: exact matches of full name or // "last name" (i.e. last dotted part) if (fullname == object || parts[parts.length - 1] == object) { score += Scorer.objNameMatch; // matches in last name } else if (parts[parts.length - 1].indexOf(object) > -1) { score += Scorer.objPartialMatch; } var match = objects[prefix][name]; var objname = objnames[match[1]][2]; var title = titles[match[0]]; // If more than one term searched for, we require other words to be // found in the name/title/description if (otherterms.length > 0) { var haystack = (prefix + ' ' + name + ' ' + objname + ' ' + title).toLowerCase(); var allfound = true; for (i = 0; i < otherterms.length; i++) { if (haystack.indexOf(otherterms[i]) == -1) { allfound = false; break; } } if (!allfound) { continue; } } var descr = objname + _(', in ') + title; var anchor = match[3]; if (anchor === '') anchor = fullname; else if (anchor == '-') anchor = objnames[match[1]][1] + '-' + fullname; // add custom score for some objects according to scorer if (Scorer.objPrio.hasOwnProperty(match[2])) { score += Scorer.objPrio[match[2]]; } else { score += Scorer.objPrioDefault; } results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]); } } } return results; }, /** * search for full-text terms in the index */ performTermsSearch : function(searchterms, excluded, terms, titleterms) { var docnames = this._index.docnames; var filenames = this._index.filenames; var titles = this._index.titles; var i, j, file; var fileMap = {}; var scoreMap = {}; var results = []; // perform the search on the required terms for (i = 0; i < searchterms.length; i++) { var word = searchterms[i]; var files = []; var _o = [ {files: terms[word], score: Scorer.term}, {files: titleterms[word], score: Scorer.title} ]; // no match but word was a required one if ($u.every(_o, function(o){return o.files === undefined;})) { break; } // found search word in contents $u.each(_o, function(o) { var _files = o.files; if (_files === undefined) return if (_files.length === undefined) _files = [_files]; files = files.concat(_files); // set score for the word in each file to Scorer.term for (j = 0; j < _files.length; j++) { file = _files[j]; if (!(file in scoreMap)) scoreMap[file] = {} scoreMap[file][word] = o.score; } }); // create the mapping for (j = 0; j < files.length; j++) { file = files[j]; if (file in fileMap) fileMap[file].push(word); else fileMap[file] = [word]; } } // now check if the files don't contain excluded terms for (file in fileMap) { var valid = true; // check if all requirements are matched if (fileMap[file].length != searchterms.length) continue; // ensure that none of the excluded terms is in the search result for (i = 0; i < excluded.length; i++) { if (terms[excluded[i]] == file || titleterms[excluded[i]] == file || $u.contains(terms[excluded[i]] || [], file) || $u.contains(titleterms[excluded[i]] || [], file)) { valid = false; break; } } // if we have still a valid result we can add it to the result list if (valid) { // select one (max) score for the file. // for better ranking, we should calculate ranking by using words statistics like basic tf-idf... var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]})); results.push([docnames[file], titles[file], '', null, score, filenames[file]]); } } return results; }, /** * helper function to return a node containing the * search summary for a given text. keywords is a list * of stemmed words, hlwords is the list of normal, unstemmed * words. the first one is used to find the occurrence, the * latter for highlighting it. */ makeSearchSummary : function(text, keywords, hlwords) { var textLower = text.toLowerCase(); var start = 0; $.each(keywords, function() { var i = textLower.indexOf(this.toLowerCase()); if (i > -1) start = i; }); start = Math.max(start - 120, 0); var excerpt = ((start > 0) ? '...' : '') + $.trim(text.substr(start, 240)) + ((start + 240 - text.length) ? '...' : ''); var rv = $('<div class="context"></div>').text(excerpt); $.each(hlwords, function() { rv = rv.highlightText(this, 'highlighted'); }); return rv; } }; $(document).ready(function() { Search.init(); });
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_static/underscore.js
// Underscore.js 1.9.1 // http://underscorejs.org // (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors // Underscore may be freely distributed under the MIT license. (function() { // Baseline setup // -------------- // Establish the root object, `window` (`self`) in the browser, `global` // on the server, or `this` in some virtual machines. We use `self` // instead of `window` for `WebWorker` support. var root = typeof self == 'object' && self.self === self && self || typeof global == 'object' && global.global === global && global || this || {}; // Save the previous value of the `_` variable. var previousUnderscore = root._; // Save bytes in the minified (but not gzipped) version: var ArrayProto = Array.prototype, ObjProto = Object.prototype; var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null; // Create quick reference variables for speed access to core prototypes. var push = ArrayProto.push, slice = ArrayProto.slice, toString = ObjProto.toString, hasOwnProperty = ObjProto.hasOwnProperty; // All **ECMAScript 5** native function implementations that we hope to use // are declared here. var nativeIsArray = Array.isArray, nativeKeys = Object.keys, nativeCreate = Object.create; // Naked function reference for surrogate-prototype-swapping. var Ctor = function(){}; // Create a safe reference to the Underscore object for use below. var _ = function(obj) { if (obj instanceof _) return obj; if (!(this instanceof _)) return new _(obj); this._wrapped = obj; }; // Export the Underscore object for **Node.js**, with // backwards-compatibility for their old module API. If we're in // the browser, add `_` as a global object. // (`nodeType` is checked to ensure that `module` // and `exports` are not HTML elements.) if (typeof exports != 'undefined' && !exports.nodeType) { if (typeof module != 'undefined' && !module.nodeType && module.exports) { exports = module.exports = _; } exports._ = _; } else { root._ = _; } // Current version. _.VERSION = '1.9.1'; // Internal function that returns an efficient (for current engines) version // of the passed-in callback, to be repeatedly applied in other Underscore // functions. var optimizeCb = function(func, context, argCount) { if (context === void 0) return func; switch (argCount == null ? 3 : argCount) { case 1: return function(value) { return func.call(context, value); }; // The 2-argument case is omitted because we’re not using it. case 3: return function(value, index, collection) { return func.call(context, value, index, collection); }; case 4: return function(accumulator, value, index, collection) { return func.call(context, accumulator, value, index, collection); }; } return function() { return func.apply(context, arguments); }; }; var builtinIteratee; // An internal function to generate callbacks that can be applied to each // element in a collection, returning the desired result — either `identity`, // an arbitrary callback, a property matcher, or a property accessor. var cb = function(value, context, argCount) { if (_.iteratee !== builtinIteratee) return _.iteratee(value, context); if (value == null) return _.identity; if (_.isFunction(value)) return optimizeCb(value, context, argCount); if (_.isObject(value) && !_.isArray(value)) return _.matcher(value); return _.property(value); }; // External wrapper for our callback generator. Users may customize // `_.iteratee` if they want additional predicate/iteratee shorthand styles. // This abstraction hides the internal-only argCount argument. _.iteratee = builtinIteratee = function(value, context) { return cb(value, context, Infinity); }; // Some functions take a variable number of arguments, or a few expected // arguments at the beginning and then a variable number of values to operate // on. This helper accumulates all remaining arguments past the function’s // argument length (or an explicit `startIndex`), into an array that becomes // the last argument. Similar to ES6’s "rest parameter". var restArguments = function(func, startIndex) { startIndex = startIndex == null ? func.length - 1 : +startIndex; return function() { var length = Math.max(arguments.length - startIndex, 0), rest = Array(length), index = 0; for (; index < length; index++) { rest[index] = arguments[index + startIndex]; } switch (startIndex) { case 0: return func.call(this, rest); case 1: return func.call(this, arguments[0], rest); case 2: return func.call(this, arguments[0], arguments[1], rest); } var args = Array(startIndex + 1); for (index = 0; index < startIndex; index++) { args[index] = arguments[index]; } args[startIndex] = rest; return func.apply(this, args); }; }; // An internal function for creating a new object that inherits from another. var baseCreate = function(prototype) { if (!_.isObject(prototype)) return {}; if (nativeCreate) return nativeCreate(prototype); Ctor.prototype = prototype; var result = new Ctor; Ctor.prototype = null; return result; }; var shallowProperty = function(key) { return function(obj) { return obj == null ? void 0 : obj[key]; }; }; var has = function(obj, path) { return obj != null && hasOwnProperty.call(obj, path); } var deepGet = function(obj, path) { var length = path.length; for (var i = 0; i < length; i++) { if (obj == null) return void 0; obj = obj[path[i]]; } return length ? obj : void 0; }; // Helper for collection methods to determine whether a collection // should be iterated as an array or as an object. // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; var getLength = shallowProperty('length'); var isArrayLike = function(collection) { var length = getLength(collection); return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX; }; // Collection Functions // -------------------- // The cornerstone, an `each` implementation, aka `forEach`. // Handles raw objects in addition to array-likes. Treats all // sparse array-likes as if they were dense. _.each = _.forEach = function(obj, iteratee, context) { iteratee = optimizeCb(iteratee, context); var i, length; if (isArrayLike(obj)) { for (i = 0, length = obj.length; i < length; i++) { iteratee(obj[i], i, obj); } } else { var keys = _.keys(obj); for (i = 0, length = keys.length; i < length; i++) { iteratee(obj[keys[i]], keys[i], obj); } } return obj; }; // Return the results of applying the iteratee to each element. _.map = _.collect = function(obj, iteratee, context) { iteratee = cb(iteratee, context); var keys = !isArrayLike(obj) && _.keys(obj), length = (keys || obj).length, results = Array(length); for (var index = 0; index < length; index++) { var currentKey = keys ? keys[index] : index; results[index] = iteratee(obj[currentKey], currentKey, obj); } return results; }; // Create a reducing function iterating left or right. var createReduce = function(dir) { // Wrap code that reassigns argument variables in a separate function than // the one that accesses `arguments.length` to avoid a perf hit. (#1991) var reducer = function(obj, iteratee, memo, initial) { var keys = !isArrayLike(obj) && _.keys(obj), length = (keys || obj).length, index = dir > 0 ? 0 : length - 1; if (!initial) { memo = obj[keys ? keys[index] : index]; index += dir; } for (; index >= 0 && index < length; index += dir) { var currentKey = keys ? keys[index] : index; memo = iteratee(memo, obj[currentKey], currentKey, obj); } return memo; }; return function(obj, iteratee, memo, context) { var initial = arguments.length >= 3; return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial); }; }; // **Reduce** builds up a single result from a list of values, aka `inject`, // or `foldl`. _.reduce = _.foldl = _.inject = createReduce(1); // The right-associative version of reduce, also known as `foldr`. _.reduceRight = _.foldr = createReduce(-1); // Return the first value which passes a truth test. Aliased as `detect`. _.find = _.detect = function(obj, predicate, context) { var keyFinder = isArrayLike(obj) ? _.findIndex : _.findKey; var key = keyFinder(obj, predicate, context); if (key !== void 0 && key !== -1) return obj[key]; }; // Return all the elements that pass a truth test. // Aliased as `select`. _.filter = _.select = function(obj, predicate, context) { var results = []; predicate = cb(predicate, context); _.each(obj, function(value, index, list) { if (predicate(value, index, list)) results.push(value); }); return results; }; // Return all the elements for which a truth test fails. _.reject = function(obj, predicate, context) { return _.filter(obj, _.negate(cb(predicate)), context); }; // Determine whether all of the elements match a truth test. // Aliased as `all`. _.every = _.all = function(obj, predicate, context) { predicate = cb(predicate, context); var keys = !isArrayLike(obj) && _.keys(obj), length = (keys || obj).length; for (var index = 0; index < length; index++) { var currentKey = keys ? keys[index] : index; if (!predicate(obj[currentKey], currentKey, obj)) return false; } return true; }; // Determine if at least one element in the object matches a truth test. // Aliased as `any`. _.some = _.any = function(obj, predicate, context) { predicate = cb(predicate, context); var keys = !isArrayLike(obj) && _.keys(obj), length = (keys || obj).length; for (var index = 0; index < length; index++) { var currentKey = keys ? keys[index] : index; if (predicate(obj[currentKey], currentKey, obj)) return true; } return false; }; // Determine if the array or object contains a given item (using `===`). // Aliased as `includes` and `include`. _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) { if (!isArrayLike(obj)) obj = _.values(obj); if (typeof fromIndex != 'number' || guard) fromIndex = 0; return _.indexOf(obj, item, fromIndex) >= 0; }; // Invoke a method (with arguments) on every item in a collection. _.invoke = restArguments(function(obj, path, args) { var contextPath, func; if (_.isFunction(path)) { func = path; } else if (_.isArray(path)) { contextPath = path.slice(0, -1); path = path[path.length - 1]; } return _.map(obj, function(context) { var method = func; if (!method) { if (contextPath && contextPath.length) { context = deepGet(context, contextPath); } if (context == null) return void 0; method = context[path]; } return method == null ? method : method.apply(context, args); }); }); // Convenience version of a common use case of `map`: fetching a property. _.pluck = function(obj, key) { return _.map(obj, _.property(key)); }; // Convenience version of a common use case of `filter`: selecting only objects // containing specific `key:value` pairs. _.where = function(obj, attrs) { return _.filter(obj, _.matcher(attrs)); }; // Convenience version of a common use case of `find`: getting the first object // containing specific `key:value` pairs. _.findWhere = function(obj, attrs) { return _.find(obj, _.matcher(attrs)); }; // Return the maximum element (or element-based computation). _.max = function(obj, iteratee, context) { var result = -Infinity, lastComputed = -Infinity, value, computed; if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { obj = isArrayLike(obj) ? obj : _.values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; if (value != null && value > result) { result = value; } } } else { iteratee = cb(iteratee, context); _.each(obj, function(v, index, list) { computed = iteratee(v, index, list); if (computed > lastComputed || computed === -Infinity && result === -Infinity) { result = v; lastComputed = computed; } }); } return result; }; // Return the minimum element (or element-based computation). _.min = function(obj, iteratee, context) { var result = Infinity, lastComputed = Infinity, value, computed; if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { obj = isArrayLike(obj) ? obj : _.values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; if (value != null && value < result) { result = value; } } } else { iteratee = cb(iteratee, context); _.each(obj, function(v, index, list) { computed = iteratee(v, index, list); if (computed < lastComputed || computed === Infinity && result === Infinity) { result = v; lastComputed = computed; } }); } return result; }; // Shuffle a collection. _.shuffle = function(obj) { return _.sample(obj, Infinity); }; // Sample **n** random values from a collection using the modern version of the // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). // If **n** is not specified, returns a single random element. // The internal `guard` argument allows it to work with `map`. _.sample = function(obj, n, guard) { if (n == null || guard) { if (!isArrayLike(obj)) obj = _.values(obj); return obj[_.random(obj.length - 1)]; } var sample = isArrayLike(obj) ? _.clone(obj) : _.values(obj); var length = getLength(sample); n = Math.max(Math.min(n, length), 0); var last = length - 1; for (var index = 0; index < n; index++) { var rand = _.random(index, last); var temp = sample[index]; sample[index] = sample[rand]; sample[rand] = temp; } return sample.slice(0, n); }; // Sort the object's values by a criterion produced by an iteratee. _.sortBy = function(obj, iteratee, context) { var index = 0; iteratee = cb(iteratee, context); return _.pluck(_.map(obj, function(value, key, list) { return { value: value, index: index++, criteria: iteratee(value, key, list) }; }).sort(function(left, right) { var a = left.criteria; var b = right.criteria; if (a !== b) { if (a > b || a === void 0) return 1; if (a < b || b === void 0) return -1; } return left.index - right.index; }), 'value'); }; // An internal function used for aggregate "group by" operations. var group = function(behavior, partition) { return function(obj, iteratee, context) { var result = partition ? [[], []] : {}; iteratee = cb(iteratee, context); _.each(obj, function(value, index) { var key = iteratee(value, index, obj); behavior(result, value, key); }); return result; }; }; // Groups the object's values by a criterion. Pass either a string attribute // to group by, or a function that returns the criterion. _.groupBy = group(function(result, value, key) { if (has(result, key)) result[key].push(value); else result[key] = [value]; }); // Indexes the object's values by a criterion, similar to `groupBy`, but for // when you know that your index values will be unique. _.indexBy = group(function(result, value, key) { result[key] = value; }); // Counts instances of an object that group by a certain criterion. Pass // either a string attribute to count by, or a function that returns the // criterion. _.countBy = group(function(result, value, key) { if (has(result, key)) result[key]++; else result[key] = 1; }); var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; // Safely create a real, live array from anything iterable. _.toArray = function(obj) { if (!obj) return []; if (_.isArray(obj)) return slice.call(obj); if (_.isString(obj)) { // Keep surrogate pair characters together return obj.match(reStrSymbol); } if (isArrayLike(obj)) return _.map(obj, _.identity); return _.values(obj); }; // Return the number of elements in an object. _.size = function(obj) { if (obj == null) return 0; return isArrayLike(obj) ? obj.length : _.keys(obj).length; }; // Split a collection into two arrays: one whose elements all satisfy the given // predicate, and one whose elements all do not satisfy the predicate. _.partition = group(function(result, value, pass) { result[pass ? 0 : 1].push(value); }, true); // Array Functions // --------------- // Get the first element of an array. Passing **n** will return the first N // values in the array. Aliased as `head` and `take`. The **guard** check // allows it to work with `_.map`. _.first = _.head = _.take = function(array, n, guard) { if (array == null || array.length < 1) return n == null ? void 0 : []; if (n == null || guard) return array[0]; return _.initial(array, array.length - n); }; // Returns everything but the last entry of the array. Especially useful on // the arguments object. Passing **n** will return all the values in // the array, excluding the last N. _.initial = function(array, n, guard) { return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); }; // Get the last element of an array. Passing **n** will return the last N // values in the array. _.last = function(array, n, guard) { if (array == null || array.length < 1) return n == null ? void 0 : []; if (n == null || guard) return array[array.length - 1]; return _.rest(array, Math.max(0, array.length - n)); }; // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. // Especially useful on the arguments object. Passing an **n** will return // the rest N values in the array. _.rest = _.tail = _.drop = function(array, n, guard) { return slice.call(array, n == null || guard ? 1 : n); }; // Trim out all falsy values from an array. _.compact = function(array) { return _.filter(array, Boolean); }; // Internal implementation of a recursive `flatten` function. var flatten = function(input, shallow, strict, output) { output = output || []; var idx = output.length; for (var i = 0, length = getLength(input); i < length; i++) { var value = input[i]; if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) { // Flatten current level of array or arguments object. if (shallow) { var j = 0, len = value.length; while (j < len) output[idx++] = value[j++]; } else { flatten(value, shallow, strict, output); idx = output.length; } } else if (!strict) { output[idx++] = value; } } return output; }; // Flatten out an array, either recursively (by default), or just one level. _.flatten = function(array, shallow) { return flatten(array, shallow, false); }; // Return a version of the array that does not contain the specified value(s). _.without = restArguments(function(array, otherArrays) { return _.difference(array, otherArrays); }); // Produce a duplicate-free version of the array. If the array has already // been sorted, you have the option of using a faster algorithm. // The faster algorithm will not work with an iteratee if the iteratee // is not a one-to-one function, so providing an iteratee will disable // the faster algorithm. // Aliased as `unique`. _.uniq = _.unique = function(array, isSorted, iteratee, context) { if (!_.isBoolean(isSorted)) { context = iteratee; iteratee = isSorted; isSorted = false; } if (iteratee != null) iteratee = cb(iteratee, context); var result = []; var seen = []; for (var i = 0, length = getLength(array); i < length; i++) { var value = array[i], computed = iteratee ? iteratee(value, i, array) : value; if (isSorted && !iteratee) { if (!i || seen !== computed) result.push(value); seen = computed; } else if (iteratee) { if (!_.contains(seen, computed)) { seen.push(computed); result.push(value); } } else if (!_.contains(result, value)) { result.push(value); } } return result; }; // Produce an array that contains the union: each distinct element from all of // the passed-in arrays. _.union = restArguments(function(arrays) { return _.uniq(flatten(arrays, true, true)); }); // Produce an array that contains every item shared between all the // passed-in arrays. _.intersection = function(array) { var result = []; var argsLength = arguments.length; for (var i = 0, length = getLength(array); i < length; i++) { var item = array[i]; if (_.contains(result, item)) continue; var j; for (j = 1; j < argsLength; j++) { if (!_.contains(arguments[j], item)) break; } if (j === argsLength) result.push(item); } return result; }; // Take the difference between one array and a number of other arrays. // Only the elements present in just the first array will remain. _.difference = restArguments(function(array, rest) { rest = flatten(rest, true, true); return _.filter(array, function(value){ return !_.contains(rest, value); }); }); // Complement of _.zip. Unzip accepts an array of arrays and groups // each array's elements on shared indices. _.unzip = function(array) { var length = array && _.max(array, getLength).length || 0; var result = Array(length); for (var index = 0; index < length; index++) { result[index] = _.pluck(array, index); } return result; }; // Zip together multiple lists into a single array -- elements that share // an index go together. _.zip = restArguments(_.unzip); // Converts lists into objects. Pass either a single array of `[key, value]` // pairs, or two parallel arrays of the same length -- one of keys, and one of // the corresponding values. Passing by pairs is the reverse of _.pairs. _.object = function(list, values) { var result = {}; for (var i = 0, length = getLength(list); i < length; i++) { if (values) { result[list[i]] = values[i]; } else { result[list[i][0]] = list[i][1]; } } return result; }; // Generator function to create the findIndex and findLastIndex functions. var createPredicateIndexFinder = function(dir) { return function(array, predicate, context) { predicate = cb(predicate, context); var length = getLength(array); var index = dir > 0 ? 0 : length - 1; for (; index >= 0 && index < length; index += dir) { if (predicate(array[index], index, array)) return index; } return -1; }; }; // Returns the first index on an array-like that passes a predicate test. _.findIndex = createPredicateIndexFinder(1); _.findLastIndex = createPredicateIndexFinder(-1); // Use a comparator function to figure out the smallest index at which // an object should be inserted so as to maintain order. Uses binary search. _.sortedIndex = function(array, obj, iteratee, context) { iteratee = cb(iteratee, context, 1); var value = iteratee(obj); var low = 0, high = getLength(array); while (low < high) { var mid = Math.floor((low + high) / 2); if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; } return low; }; // Generator function to create the indexOf and lastIndexOf functions. var createIndexFinder = function(dir, predicateFind, sortedIndex) { return function(array, item, idx) { var i = 0, length = getLength(array); if (typeof idx == 'number') { if (dir > 0) { i = idx >= 0 ? idx : Math.max(idx + length, i); } else { length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; } } else if (sortedIndex && idx && length) { idx = sortedIndex(array, item); return array[idx] === item ? idx : -1; } if (item !== item) { idx = predicateFind(slice.call(array, i, length), _.isNaN); return idx >= 0 ? idx + i : -1; } for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { if (array[idx] === item) return idx; } return -1; }; }; // Return the position of the first occurrence of an item in an array, // or -1 if the item is not included in the array. // If the array is large and already in sort order, pass `true` // for **isSorted** to use binary search. _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex); _.lastIndexOf = createIndexFinder(-1, _.findLastIndex); // Generate an integer Array containing an arithmetic progression. A port of // the native Python `range()` function. See // [the Python documentation](http://docs.python.org/library/functions.html#range). _.range = function(start, stop, step) { if (stop == null) { stop = start || 0; start = 0; } if (!step) { step = stop < start ? -1 : 1; } var length = Math.max(Math.ceil((stop - start) / step), 0); var range = Array(length); for (var idx = 0; idx < length; idx++, start += step) { range[idx] = start; } return range; }; // Chunk a single array into multiple arrays, each containing `count` or fewer // items. _.chunk = function(array, count) { if (count == null || count < 1) return []; var result = []; var i = 0, length = array.length; while (i < length) { result.push(slice.call(array, i, i += count)); } return result; }; // Function (ahem) Functions // ------------------ // Determines whether to execute a function as a constructor // or a normal function with the provided arguments. var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) { if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); var self = baseCreate(sourceFunc.prototype); var result = sourceFunc.apply(self, args); if (_.isObject(result)) return result; return self; }; // Create a function bound to a given object (assigning `this`, and arguments, // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if // available. _.bind = restArguments(function(func, context, args) { if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function'); var bound = restArguments(function(callArgs) { return executeBound(func, bound, context, this, args.concat(callArgs)); }); return bound; }); // Partially apply a function by creating a version that has had some of its // arguments pre-filled, without changing its dynamic `this` context. _ acts // as a placeholder by default, allowing any combination of arguments to be // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument. _.partial = restArguments(function(func, boundArgs) { var placeholder = _.partial.placeholder; var bound = function() { var position = 0, length = boundArgs.length; var args = Array(length); for (var i = 0; i < length; i++) { args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; } while (position < arguments.length) args.push(arguments[position++]); return executeBound(func, bound, this, this, args); }; return bound; }); _.partial.placeholder = _; // Bind a number of an object's methods to that object. Remaining arguments // are the method names to be bound. Useful for ensuring that all callbacks // defined on an object belong to it. _.bindAll = restArguments(function(obj, keys) { keys = flatten(keys, false, false); var index = keys.length; if (index < 1) throw new Error('bindAll must be passed function names'); while (index--) { var key = keys[index]; obj[key] = _.bind(obj[key], obj); } }); // Memoize an expensive function by storing its results. _.memoize = function(func, hasher) { var memoize = function(key) { var cache = memoize.cache; var address = '' + (hasher ? hasher.apply(this, arguments) : key); if (!has(cache, address)) cache[address] = func.apply(this, arguments); return cache[address]; }; memoize.cache = {}; return memoize; }; // Delays a function for the given number of milliseconds, and then calls // it with the arguments supplied. _.delay = restArguments(function(func, wait, args) { return setTimeout(function() { return func.apply(null, args); }, wait); }); // Defers a function, scheduling it to run after the current call stack has // cleared. _.defer = _.partial(_.delay, _, 1); // Returns a function, that, when invoked, will only be triggered at most once // during a given window of time. Normally, the throttled function will run // as much as it can, without ever going more than once per `wait` duration; // but if you'd like to disable the execution on the leading edge, pass // `{leading: false}`. To disable execution on the trailing edge, ditto. _.throttle = function(func, wait, options) { var timeout, context, args, result; var previous = 0; if (!options) options = {}; var later = function() { previous = options.leading === false ? 0 : _.now(); timeout = null; result = func.apply(context, args); if (!timeout) context = args = null; }; var throttled = function() { var now = _.now(); if (!previous && options.leading === false) previous = now; var remaining = wait - (now - previous); context = this; args = arguments; if (remaining <= 0 || remaining > wait) { if (timeout) { clearTimeout(timeout); timeout = null; } previous = now; result = func.apply(context, args); if (!timeout) context = args = null; } else if (!timeout && options.trailing !== false) { timeout = setTimeout(later, remaining); } return result; }; throttled.cancel = function() { clearTimeout(timeout); previous = 0; timeout = context = args = null; }; return throttled; }; // Returns a function, that, as long as it continues to be invoked, will not // be triggered. The function will be called after it stops being called for // N milliseconds. If `immediate` is passed, trigger the function on the // leading edge, instead of the trailing. _.debounce = function(func, wait, immediate) { var timeout, result; var later = function(context, args) { timeout = null; if (args) result = func.apply(context, args); }; var debounced = restArguments(function(args) { if (timeout) clearTimeout(timeout); if (immediate) { var callNow = !timeout; timeout = setTimeout(later, wait); if (callNow) result = func.apply(this, args); } else { timeout = _.delay(later, wait, this, args); } return result; }); debounced.cancel = function() { clearTimeout(timeout); timeout = null; }; return debounced; }; // Returns the first function passed as an argument to the second, // allowing you to adjust arguments, run code before and after, and // conditionally execute the original function. _.wrap = function(func, wrapper) { return _.partial(wrapper, func); }; // Returns a negated version of the passed-in predicate. _.negate = function(predicate) { return function() { return !predicate.apply(this, arguments); }; }; // Returns a function that is the composition of a list of functions, each // consuming the return value of the function that follows. _.compose = function() { var args = arguments; var start = args.length - 1; return function() { var i = start; var result = args[start].apply(this, arguments); while (i--) result = args[i].call(this, result); return result; }; }; // Returns a function that will only be executed on and after the Nth call. _.after = function(times, func) { return function() { if (--times < 1) { return func.apply(this, arguments); } }; }; // Returns a function that will only be executed up to (but not including) the Nth call. _.before = function(times, func) { var memo; return function() { if (--times > 0) { memo = func.apply(this, arguments); } if (times <= 1) func = null; return memo; }; }; // Returns a function that will be executed at most one time, no matter how // often you call it. Useful for lazy initialization. _.once = _.partial(_.before, 2); _.restArguments = restArguments; // Object Functions // ---------------- // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; var collectNonEnumProps = function(obj, keys) { var nonEnumIdx = nonEnumerableProps.length; var constructor = obj.constructor; var proto = _.isFunction(constructor) && constructor.prototype || ObjProto; // Constructor is a special case. var prop = 'constructor'; if (has(obj, prop) && !_.contains(keys, prop)) keys.push(prop); while (nonEnumIdx--) { prop = nonEnumerableProps[nonEnumIdx]; if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) { keys.push(prop); } } }; // Retrieve the names of an object's own properties. // Delegates to **ECMAScript 5**'s native `Object.keys`. _.keys = function(obj) { if (!_.isObject(obj)) return []; if (nativeKeys) return nativeKeys(obj); var keys = []; for (var key in obj) if (has(obj, key)) keys.push(key); // Ahem, IE < 9. if (hasEnumBug) collectNonEnumProps(obj, keys); return keys; }; // Retrieve all the property names of an object. _.allKeys = function(obj) { if (!_.isObject(obj)) return []; var keys = []; for (var key in obj) keys.push(key); // Ahem, IE < 9. if (hasEnumBug) collectNonEnumProps(obj, keys); return keys; }; // Retrieve the values of an object's properties. _.values = function(obj) { var keys = _.keys(obj); var length = keys.length; var values = Array(length); for (var i = 0; i < length; i++) { values[i] = obj[keys[i]]; } return values; }; // Returns the results of applying the iteratee to each element of the object. // In contrast to _.map it returns an object. _.mapObject = function(obj, iteratee, context) { iteratee = cb(iteratee, context); var keys = _.keys(obj), length = keys.length, results = {}; for (var index = 0; index < length; index++) { var currentKey = keys[index]; results[currentKey] = iteratee(obj[currentKey], currentKey, obj); } return results; }; // Convert an object into a list of `[key, value]` pairs. // The opposite of _.object. _.pairs = function(obj) { var keys = _.keys(obj); var length = keys.length; var pairs = Array(length); for (var i = 0; i < length; i++) { pairs[i] = [keys[i], obj[keys[i]]]; } return pairs; }; // Invert the keys and values of an object. The values must be serializable. _.invert = function(obj) { var result = {}; var keys = _.keys(obj); for (var i = 0, length = keys.length; i < length; i++) { result[obj[keys[i]]] = keys[i]; } return result; }; // Return a sorted list of the function names available on the object. // Aliased as `methods`. _.functions = _.methods = function(obj) { var names = []; for (var key in obj) { if (_.isFunction(obj[key])) names.push(key); } return names.sort(); }; // An internal function for creating assigner functions. var createAssigner = function(keysFunc, defaults) { return function(obj) { var length = arguments.length; if (defaults) obj = Object(obj); if (length < 2 || obj == null) return obj; for (var index = 1; index < length; index++) { var source = arguments[index], keys = keysFunc(source), l = keys.length; for (var i = 0; i < l; i++) { var key = keys[i]; if (!defaults || obj[key] === void 0) obj[key] = source[key]; } } return obj; }; }; // Extend a given object with all the properties in passed-in object(s). _.extend = createAssigner(_.allKeys); // Assigns a given object with all the own properties in the passed-in object(s). // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) _.extendOwn = _.assign = createAssigner(_.keys); // Returns the first key on an object that passes a predicate test. _.findKey = function(obj, predicate, context) { predicate = cb(predicate, context); var keys = _.keys(obj), key; for (var i = 0, length = keys.length; i < length; i++) { key = keys[i]; if (predicate(obj[key], key, obj)) return key; } }; // Internal pick helper function to determine if `obj` has key `key`. var keyInObj = function(value, key, obj) { return key in obj; }; // Return a copy of the object only containing the whitelisted properties. _.pick = restArguments(function(obj, keys) { var result = {}, iteratee = keys[0]; if (obj == null) return result; if (_.isFunction(iteratee)) { if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]); keys = _.allKeys(obj); } else { iteratee = keyInObj; keys = flatten(keys, false, false); obj = Object(obj); } for (var i = 0, length = keys.length; i < length; i++) { var key = keys[i]; var value = obj[key]; if (iteratee(value, key, obj)) result[key] = value; } return result; }); // Return a copy of the object without the blacklisted properties. _.omit = restArguments(function(obj, keys) { var iteratee = keys[0], context; if (_.isFunction(iteratee)) { iteratee = _.negate(iteratee); if (keys.length > 1) context = keys[1]; } else { keys = _.map(flatten(keys, false, false), String); iteratee = function(value, key) { return !_.contains(keys, key); }; } return _.pick(obj, iteratee, context); }); // Fill in a given object with default properties. _.defaults = createAssigner(_.allKeys, true); // Creates an object that inherits from the given prototype object. // If additional properties are provided then they will be added to the // created object. _.create = function(prototype, props) { var result = baseCreate(prototype); if (props) _.extendOwn(result, props); return result; }; // Create a (shallow-cloned) duplicate of an object. _.clone = function(obj) { if (!_.isObject(obj)) return obj; return _.isArray(obj) ? obj.slice() : _.extend({}, obj); }; // Invokes interceptor with the obj, and then returns obj. // The primary purpose of this method is to "tap into" a method chain, in // order to perform operations on intermediate results within the chain. _.tap = function(obj, interceptor) { interceptor(obj); return obj; }; // Returns whether an object has a given set of `key:value` pairs. _.isMatch = function(object, attrs) { var keys = _.keys(attrs), length = keys.length; if (object == null) return !length; var obj = Object(object); for (var i = 0; i < length; i++) { var key = keys[i]; if (attrs[key] !== obj[key] || !(key in obj)) return false; } return true; }; // Internal recursive comparison function for `isEqual`. var eq, deepEq; eq = function(a, b, aStack, bStack) { // Identical objects are equal. `0 === -0`, but they aren't identical. // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). if (a === b) return a !== 0 || 1 / a === 1 / b; // `null` or `undefined` only equal to itself (strict comparison). if (a == null || b == null) return false; // `NaN`s are equivalent, but non-reflexive. if (a !== a) return b !== b; // Exhaust primitive checks var type = typeof a; if (type !== 'function' && type !== 'object' && typeof b != 'object') return false; return deepEq(a, b, aStack, bStack); }; // Internal recursive comparison function for `isEqual`. deepEq = function(a, b, aStack, bStack) { // Unwrap any wrapped objects. if (a instanceof _) a = a._wrapped; if (b instanceof _) b = b._wrapped; // Compare `[[Class]]` names. var className = toString.call(a); if (className !== toString.call(b)) return false; switch (className) { // Strings, numbers, regular expressions, dates, and booleans are compared by value. case '[object RegExp]': // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') case '[object String]': // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is // equivalent to `new String("5")`. return '' + a === '' + b; case '[object Number]': // `NaN`s are equivalent, but non-reflexive. // Object(NaN) is equivalent to NaN. if (+a !== +a) return +b !== +b; // An `egal` comparison is performed for other numeric values. return +a === 0 ? 1 / +a === 1 / b : +a === +b; case '[object Date]': case '[object Boolean]': // Coerce dates and booleans to numeric primitive values. Dates are compared by their // millisecond representations. Note that invalid dates with millisecond representations // of `NaN` are not equivalent. return +a === +b; case '[object Symbol]': return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b); } var areArrays = className === '[object Array]'; if (!areArrays) { if (typeof a != 'object' || typeof b != 'object') return false; // Objects with different constructors are not equivalent, but `Object`s or `Array`s // from different frames are. var aCtor = a.constructor, bCtor = b.constructor; if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && _.isFunction(bCtor) && bCtor instanceof bCtor) && ('constructor' in a && 'constructor' in b)) { return false; } } // Assume equality for cyclic structures. The algorithm for detecting cyclic // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. // Initializing stack of traversed objects. // It's done here since we only need them for objects and arrays comparison. aStack = aStack || []; bStack = bStack || []; var length = aStack.length; while (length--) { // Linear search. Performance is inversely proportional to the number of // unique nested structures. if (aStack[length] === a) return bStack[length] === b; } // Add the first object to the stack of traversed objects. aStack.push(a); bStack.push(b); // Recursively compare objects and arrays. if (areArrays) { // Compare array lengths to determine if a deep comparison is necessary. length = a.length; if (length !== b.length) return false; // Deep compare the contents, ignoring non-numeric properties. while (length--) { if (!eq(a[length], b[length], aStack, bStack)) return false; } } else { // Deep compare objects. var keys = _.keys(a), key; length = keys.length; // Ensure that both objects contain the same number of properties before comparing deep equality. if (_.keys(b).length !== length) return false; while (length--) { // Deep compare each member key = keys[length]; if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false; } } // Remove the first object from the stack of traversed objects. aStack.pop(); bStack.pop(); return true; }; // Perform a deep comparison to check if two objects are equal. _.isEqual = function(a, b) { return eq(a, b); }; // Is a given array, string, or object empty? // An "empty" object has no enumerable own-properties. _.isEmpty = function(obj) { if (obj == null) return true; if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0; return _.keys(obj).length === 0; }; // Is a given value a DOM element? _.isElement = function(obj) { return !!(obj && obj.nodeType === 1); }; // Is a given value an array? // Delegates to ECMA5's native Array.isArray _.isArray = nativeIsArray || function(obj) { return toString.call(obj) === '[object Array]'; }; // Is a given variable an object? _.isObject = function(obj) { var type = typeof obj; return type === 'function' || type === 'object' && !!obj; }; // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet. _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error', 'Symbol', 'Map', 'WeakMap', 'Set', 'WeakSet'], function(name) { _['is' + name] = function(obj) { return toString.call(obj) === '[object ' + name + ']'; }; }); // Define a fallback version of the method in browsers (ahem, IE < 9), where // there isn't any inspectable "Arguments" type. if (!_.isArguments(arguments)) { _.isArguments = function(obj) { return has(obj, 'callee'); }; } // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8, // IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236). var nodelist = root.document && root.document.childNodes; if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') { _.isFunction = function(obj) { return typeof obj == 'function' || false; }; } // Is a given object a finite number? _.isFinite = function(obj) { return !_.isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj)); }; // Is the given value `NaN`? _.isNaN = function(obj) { return _.isNumber(obj) && isNaN(obj); }; // Is a given value a boolean? _.isBoolean = function(obj) { return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; }; // Is a given value equal to null? _.isNull = function(obj) { return obj === null; }; // Is a given variable undefined? _.isUndefined = function(obj) { return obj === void 0; }; // Shortcut function for checking if an object has a given property directly // on itself (in other words, not on a prototype). _.has = function(obj, path) { if (!_.isArray(path)) { return has(obj, path); } var length = path.length; for (var i = 0; i < length; i++) { var key = path[i]; if (obj == null || !hasOwnProperty.call(obj, key)) { return false; } obj = obj[key]; } return !!length; }; // Utility Functions // ----------------- // Run Underscore.js in *noConflict* mode, returning the `_` variable to its // previous owner. Returns a reference to the Underscore object. _.noConflict = function() { root._ = previousUnderscore; return this; }; // Keep the identity function around for default iteratees. _.identity = function(value) { return value; }; // Predicate-generating functions. Often useful outside of Underscore. _.constant = function(value) { return function() { return value; }; }; _.noop = function(){}; // Creates a function that, when passed an object, will traverse that object’s // properties down the given `path`, specified as an array of keys or indexes. _.property = function(path) { if (!_.isArray(path)) { return shallowProperty(path); } return function(obj) { return deepGet(obj, path); }; }; // Generates a function for a given object that returns a given property. _.propertyOf = function(obj) { if (obj == null) { return function(){}; } return function(path) { return !_.isArray(path) ? obj[path] : deepGet(obj, path); }; }; // Returns a predicate for checking whether an object has a given set of // `key:value` pairs. _.matcher = _.matches = function(attrs) { attrs = _.extendOwn({}, attrs); return function(obj) { return _.isMatch(obj, attrs); }; }; // Run a function **n** times. _.times = function(n, iteratee, context) { var accum = Array(Math.max(0, n)); iteratee = optimizeCb(iteratee, context, 1); for (var i = 0; i < n; i++) accum[i] = iteratee(i); return accum; }; // Return a random integer between min and max (inclusive). _.random = function(min, max) { if (max == null) { max = min; min = 0; } return min + Math.floor(Math.random() * (max - min + 1)); }; // A (possibly faster) way to get the current timestamp as an integer. _.now = Date.now || function() { return new Date().getTime(); }; // List of HTML entities for escaping. var escapeMap = { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#x27;', '`': '&#x60;' }; var unescapeMap = _.invert(escapeMap); // Functions for escaping and unescaping strings to/from HTML interpolation. var createEscaper = function(map) { var escaper = function(match) { return map[match]; }; // Regexes for identifying a key that needs to be escaped. var source = '(?:' + _.keys(map).join('|') + ')'; var testRegexp = RegExp(source); var replaceRegexp = RegExp(source, 'g'); return function(string) { string = string == null ? '' : '' + string; return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; }; }; _.escape = createEscaper(escapeMap); _.unescape = createEscaper(unescapeMap); // Traverses the children of `obj` along `path`. If a child is a function, it // is invoked with its parent as context. Returns the value of the final // child, or `fallback` if any child is undefined. _.result = function(obj, path, fallback) { if (!_.isArray(path)) path = [path]; var length = path.length; if (!length) { return _.isFunction(fallback) ? fallback.call(obj) : fallback; } for (var i = 0; i < length; i++) { var prop = obj == null ? void 0 : obj[path[i]]; if (prop === void 0) { prop = fallback; i = length; // Ensure we don't continue iterating. } obj = _.isFunction(prop) ? prop.call(obj) : prop; } return obj; }; // Generate a unique integer id (unique within the entire client session). // Useful for temporary DOM ids. var idCounter = 0; _.uniqueId = function(prefix) { var id = ++idCounter + ''; return prefix ? prefix + id : id; }; // By default, Underscore uses ERB-style template delimiters, change the // following template settings to use alternative delimiters. _.templateSettings = { evaluate: /<%([\s\S]+?)%>/g, interpolate: /<%=([\s\S]+?)%>/g, escape: /<%-([\s\S]+?)%>/g }; // When customizing `templateSettings`, if you don't want to define an // interpolation, evaluation or escaping regex, we need one that is // guaranteed not to match. var noMatch = /(.)^/; // Certain characters need to be escaped so that they can be put into a // string literal. var escapes = { "'": "'", '\\': '\\', '\r': 'r', '\n': 'n', '\u2028': 'u2028', '\u2029': 'u2029' }; var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g; var escapeChar = function(match) { return '\\' + escapes[match]; }; // In order to prevent third-party code injection through // `_.templateSettings.variable`, we test it against the following regular // expression. It is intentionally a bit more liberal than just matching valid // identifiers, but still prevents possible loopholes through defaults or // destructuring assignment. var bareIdentifier = /^\s*(\w|\$)+\s*$/; // JavaScript micro-templating, similar to John Resig's implementation. // Underscore templating handles arbitrary delimiters, preserves whitespace, // and correctly escapes quotes within interpolated code. // NB: `oldSettings` only exists for backwards compatibility. _.template = function(text, settings, oldSettings) { if (!settings && oldSettings) settings = oldSettings; settings = _.defaults({}, settings, _.templateSettings); // Combine delimiters into one regular expression via alternation. var matcher = RegExp([ (settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source ].join('|') + '|$', 'g'); // Compile the template source, escaping string literals appropriately. var index = 0; var source = "__p+='"; text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { source += text.slice(index, offset).replace(escapeRegExp, escapeChar); index = offset + match.length; if (escape) { source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; } else if (interpolate) { source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; } else if (evaluate) { source += "';\n" + evaluate + "\n__p+='"; } // Adobe VMs need the match returned to produce the correct offset. return match; }); source += "';\n"; var argument = settings.variable; if (argument) { // Insure against third-party code injection. if (!bareIdentifier.test(argument)) throw new Error( 'variable is not a bare identifier: ' + argument ); } else { // If a variable is not specified, place data values in local scope. source = 'with(obj||{}){\n' + source + '}\n'; argument = 'obj'; } source = "var __t,__p='',__j=Array.prototype.join," + "print=function(){__p+=__j.call(arguments,'');};\n" + source + 'return __p;\n'; var render; try { render = new Function(argument, '_', source); } catch (e) { e.source = source; throw e; } var template = function(data) { return render.call(this, data, _); }; // Provide the compiled source as a convenience for precompilation. template.source = 'function(' + argument + '){\n' + source + '}'; return template; }; // Add a "chain" function. Start chaining a wrapped Underscore object. _.chain = function(obj) { var instance = _(obj); instance._chain = true; return instance; }; // OOP // --------------- // If Underscore is called as a function, it returns a wrapped object that // can be used OO-style. This wrapper holds altered versions of all the // underscore functions. Wrapped objects may be chained. // Helper function to continue chaining intermediate results. var chainResult = function(instance, obj) { return instance._chain ? _(obj).chain() : obj; }; // Add your own custom functions to the Underscore object. _.mixin = function(obj) { _.each(_.functions(obj), function(name) { var func = _[name] = obj[name]; _.prototype[name] = function() { var args = [this._wrapped]; push.apply(args, arguments); return chainResult(this, func.apply(_, args)); }; }); return _; }; // Add all of the Underscore functions to the wrapper object. _.mixin(_); // Add all mutator Array functions to the wrapper. _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { var method = ArrayProto[name]; _.prototype[name] = function() { var obj = this._wrapped; method.apply(obj, arguments); if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0]; return chainResult(this, obj); }; }); // Add all accessor Array functions to the wrapper. _.each(['concat', 'join', 'slice'], function(name) { var method = ArrayProto[name]; _.prototype[name] = function() { return chainResult(this, method.apply(this._wrapped, arguments)); }; }); // Extracts the result from a wrapped and chained object. _.prototype.value = function() { return this._wrapped; }; // Provide unwrapping proxy for some methods used in engine operations // such as arithmetic and JSON stringification. _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; _.prototype.toString = function() { return String(this._wrapped); }; // AMD registration happens at the end for compatibility with AMD loaders // that may not enforce next-turn semantics on modules. Even though general // practice for AMD registration is to be anonymous, underscore registers // as a named module because, like jQuery, it is a base library that is // popular enough to be bundled in a third party lib, but not be part of // an AMD load request. Those cases could generate an error when an // anonymous define() is called outside of a loader request. if (typeof define == 'function' && define.amd) { define('underscore', [], function() { return _; }); } }());
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_static/doctools.js
/* * doctools.js * ~~~~~~~~~~~ * * Sphinx JavaScript utilities for all documentation. * * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ /** * select a different prefix for underscore */ $u = _.noConflict(); /** * make the code below compatible with browsers without * an installed firebug like debugger if (!window.console || !console.firebug) { var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; window.console = {}; for (var i = 0; i < names.length; ++i) window.console[names[i]] = function() {}; } */ /** * small helper function to urldecode strings */ jQuery.urldecode = function(x) { return decodeURIComponent(x).replace(/\+/g, ' '); }; /** * small helper function to urlencode strings */ jQuery.urlencode = encodeURIComponent; /** * This function returns the parsed url parameters of the * current request. Multiple values per key are supported, * it will always return arrays of strings for the value parts. */ jQuery.getQueryParameters = function(s) { if (typeof s === 'undefined') s = document.location.search; var parts = s.substr(s.indexOf('?') + 1).split('&'); var result = {}; for (var i = 0; i < parts.length; i++) { var tmp = parts[i].split('=', 2); var key = jQuery.urldecode(tmp[0]); var value = jQuery.urldecode(tmp[1]); if (key in result) result[key].push(value); else result[key] = [value]; } return result; }; /** * highlight a given string on a jquery object by wrapping it in * span elements with the given class name. */ jQuery.fn.highlightText = function(text, className) { function highlight(node, addItems) { if (node.nodeType === 3) { var val = node.nodeValue; var pos = val.toLowerCase().indexOf(text); if (pos >= 0 && !jQuery(node.parentNode).hasClass(className) && !jQuery(node.parentNode).hasClass("nohighlight")) { var span; var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); if (isInSVG) { span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); } else { span = document.createElement("span"); span.className = className; } span.appendChild(document.createTextNode(val.substr(pos, text.length))); node.parentNode.insertBefore(span, node.parentNode.insertBefore( document.createTextNode(val.substr(pos + text.length)), node.nextSibling)); node.nodeValue = val.substr(0, pos); if (isInSVG) { var bbox = span.getBBox(); var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); rect.x.baseVal.value = bbox.x; rect.y.baseVal.value = bbox.y; rect.width.baseVal.value = bbox.width; rect.height.baseVal.value = bbox.height; rect.setAttribute('class', className); var parentOfText = node.parentNode.parentNode; addItems.push({ "parent": node.parentNode, "target": rect}); } } } else if (!jQuery(node).is("button, select, textarea")) { jQuery.each(node.childNodes, function() { highlight(this, addItems); }); } } var addItems = []; var result = this.each(function() { highlight(this, addItems); }); for (var i = 0; i < addItems.length; ++i) { jQuery(addItems[i].parent).before(addItems[i].target); } return result; }; /* * backward compatibility for jQuery.browser * This will be supported until firefox bug is fixed. */ if (!jQuery.browser) { jQuery.uaMatch = function(ua) { ua = ua.toLowerCase(); var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || /(webkit)[ \/]([\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || /(msie) ([\w.]+)/.exec(ua) || ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || []; return { browser: match[ 1 ] || "", version: match[ 2 ] || "0" }; }; jQuery.browser = {}; jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; } /** * Small JavaScript module for the documentation. */ var Documentation = { init : function() { this.fixFirefoxAnchorBug(); this.highlightSearchWords(); this.initIndexTable(); if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { this.initOnKeyListeners(); } }, /** * i18n support */ TRANSLATIONS : {}, PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, LOCALE : 'unknown', // gettext and ngettext don't access this so that the functions // can safely bound to a different name (_ = Documentation.gettext) gettext : function(string) { var translated = Documentation.TRANSLATIONS[string]; if (typeof translated === 'undefined') return string; return (typeof translated === 'string') ? translated : translated[0]; }, ngettext : function(singular, plural, n) { var translated = Documentation.TRANSLATIONS[singular]; if (typeof translated === 'undefined') return (n == 1) ? singular : plural; return translated[Documentation.PLURALEXPR(n)]; }, addTranslations : function(catalog) { for (var key in catalog.messages) this.TRANSLATIONS[key] = catalog.messages[key]; this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); this.LOCALE = catalog.locale; }, /** * add context elements like header anchor links */ addContextElements : function() { $('div[id] > :header:first').each(function() { $('<a class="headerlink">\u00B6</a>'). attr('href', '#' + this.id). attr('title', _('Permalink to this headline')). appendTo(this); }); $('dt[id]').each(function() { $('<a class="headerlink">\u00B6</a>'). attr('href', '#' + this.id). attr('title', _('Permalink to this definition')). appendTo(this); }); }, /** * workaround a firefox stupidity * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 */ fixFirefoxAnchorBug : function() { if (document.location.hash && $.browser.mozilla) window.setTimeout(function() { document.location.href += ''; }, 10); }, /** * highlight the search words provided in the url in the text */ highlightSearchWords : function() { var params = $.getQueryParameters(); var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; if (terms.length) { var body = $('div.body'); if (!body.length) { body = $('body'); } window.setTimeout(function() { $.each(terms, function() { body.highlightText(this.toLowerCase(), 'highlighted'); }); }, 10); $('<p class="highlight-link"><a href="javascript:Documentation.' + 'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>') .appendTo($('#searchbox')); } }, /** * init the domain index toggle buttons */ initIndexTable : function() { var togglers = $('img.toggler').click(function() { var src = $(this).attr('src'); var idnum = $(this).attr('id').substr(7); $('tr.cg-' + idnum).toggle(); if (src.substr(-9) === 'minus.png') $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); else $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); }).css('display', ''); if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { togglers.click(); } }, /** * helper function to hide the search marks again */ hideSearchWords : function() { $('#searchbox .highlight-link').fadeOut(300); $('span.highlighted').removeClass('highlighted'); }, /** * make the url absolute */ makeURL : function(relativeURL) { return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; }, /** * get the current relative url */ getCurrentURL : function() { var path = document.location.pathname; var parts = path.split(/\//); $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { if (this === '..') parts.pop(); }); var url = parts.join('/'); return path.substring(url.lastIndexOf('/') + 1, path.length - 1); }, initOnKeyListeners: function() { $(document).keyup(function(event) { var activeElementType = document.activeElement.tagName; // don't navigate when in search box or textarea if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { switch (event.keyCode) { case 37: // left var prevHref = $('link[rel="prev"]').prop('href'); if (prevHref) { window.location.href = prevHref; return false; } case 39: // right var nextHref = $('link[rel="next"]').prop('href'); if (nextHref) { window.location.href = nextHref; return false; } } } }); } }; // quick alias for translations _ = Documentation.gettext; $(document).ready(function() { Documentation.init(); });
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_static/basic.css
/* * basic.css * ~~~~~~~~~ * * Sphinx stylesheet -- basic theme. * * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ /* -- main layout ----------------------------------------------------------- */ div.clearer { clear: both; } /* -- relbar ---------------------------------------------------------------- */ div.related { width: 100%; font-size: 90%; } div.related h3 { display: none; } div.related ul { margin: 0; padding: 0 0 0 10px; list-style: none; } div.related li { display: inline; } div.related li.right { float: right; margin-right: 5px; } /* -- sidebar --------------------------------------------------------------- */ div.sphinxsidebarwrapper { padding: 10px 5px 0 10px; } div.sphinxsidebar { float: left; width: 230px; margin-left: -100%; font-size: 90%; word-wrap: break-word; overflow-wrap : break-word; } div.sphinxsidebar ul { list-style: none; } div.sphinxsidebar ul ul, div.sphinxsidebar ul.want-points { margin-left: 20px; list-style: square; } div.sphinxsidebar ul ul { margin-top: 0; margin-bottom: 0; } div.sphinxsidebar form { margin-top: 10px; } div.sphinxsidebar input { border: 1px solid #98dbcc; font-family: sans-serif; font-size: 1em; } div.sphinxsidebar #searchbox form.search { overflow: hidden; } div.sphinxsidebar #searchbox input[type="text"] { float: left; width: 80%; padding: 0.25em; box-sizing: border-box; } div.sphinxsidebar #searchbox input[type="submit"] { float: left; width: 20%; border-left: none; padding: 0.25em; box-sizing: border-box; } img { border: 0; max-width: 100%; } /* -- search page ----------------------------------------------------------- */ ul.search { margin: 10px 0 0 20px; padding: 0; } ul.search li { padding: 5px 0 5px 20px; background-image: url(file.png); background-repeat: no-repeat; background-position: 0 7px; } ul.search li a { font-weight: bold; } ul.search li div.context { color: #888; margin: 2px 0 0 30px; text-align: left; } ul.keywordmatches li.goodmatch a { font-weight: bold; } /* -- index page ------------------------------------------------------------ */ table.contentstable { width: 90%; margin-left: auto; margin-right: auto; } table.contentstable p.biglink { line-height: 150%; } a.biglink { font-size: 1.3em; } span.linkdescr { font-style: italic; padding-top: 5px; font-size: 90%; } /* -- general index --------------------------------------------------------- */ table.indextable { width: 100%; } table.indextable td { text-align: left; vertical-align: top; } table.indextable ul { margin-top: 0; margin-bottom: 0; list-style-type: none; } table.indextable > tbody > tr > td > ul { padding-left: 0em; } table.indextable tr.pcap { height: 10px; } table.indextable tr.cap { margin-top: 10px; background-color: #f2f2f2; } img.toggler { margin-right: 3px; margin-top: 3px; cursor: pointer; } div.modindex-jumpbox { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 1em 0 1em 0; padding: 0.4em; } div.genindex-jumpbox { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 1em 0 1em 0; padding: 0.4em; } /* -- domain module index --------------------------------------------------- */ table.modindextable td { padding: 2px; border-collapse: collapse; } /* -- general body styles --------------------------------------------------- */ div.body { min-width: 450px; max-width: 800px; } div.body p, div.body dd, div.body li, div.body blockquote { -moz-hyphens: auto; -ms-hyphens: auto; -webkit-hyphens: auto; hyphens: auto; } a.headerlink { visibility: hidden; } h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, h4:hover > a.headerlink, h5:hover > a.headerlink, h6:hover > a.headerlink, dt:hover > a.headerlink, caption:hover > a.headerlink, p.caption:hover > a.headerlink, div.code-block-caption:hover > a.headerlink { visibility: visible; } div.body p.caption { text-align: inherit; } div.body td { text-align: left; } .first { margin-top: 0 !important; } p.rubric { margin-top: 30px; font-weight: bold; } img.align-left, .figure.align-left, object.align-left { clear: left; float: left; margin-right: 1em; } img.align-right, .figure.align-right, object.align-right { clear: right; float: right; margin-left: 1em; } img.align-center, .figure.align-center, object.align-center { display: block; margin-left: auto; margin-right: auto; } .align-left { text-align: left; } .align-center { text-align: center; } .align-right { text-align: right; } /* -- sidebars -------------------------------------------------------------- */ div.sidebar { margin: 0 0 0.5em 1em; border: 1px solid #ddb; padding: 7px 7px 0 7px; background-color: #ffe; width: 40%; float: right; } p.sidebar-title { font-weight: bold; } /* -- topics ---------------------------------------------------------------- */ div.topic { border: 1px solid #ccc; padding: 7px 7px 0 7px; margin: 10px 0 10px 0; } p.topic-title { font-size: 1.1em; font-weight: bold; margin-top: 10px; } /* -- admonitions ----------------------------------------------------------- */ div.admonition { margin-top: 10px; margin-bottom: 10px; padding: 7px; } div.admonition dt { font-weight: bold; } div.admonition dl { margin-bottom: 0; } p.admonition-title { margin: 0px 10px 5px 0px; font-weight: bold; } div.body p.centered { text-align: center; margin-top: 25px; } /* -- tables ---------------------------------------------------------------- */ table.docutils { border: 0; border-collapse: collapse; } table.align-center { margin-left: auto; margin-right: auto; } table caption span.caption-number { font-style: italic; } table caption span.caption-text { } table.docutils td, table.docutils th { padding: 1px 8px 1px 5px; border-top: 0; border-left: 0; border-right: 0; border-bottom: 1px solid #aaa; } table.footnote td, table.footnote th { border: 0 !important; } th { text-align: left; padding-right: 5px; } table.citation { border-left: solid 1px gray; margin-left: 1px; } table.citation td { border-bottom: none; } /* -- figures --------------------------------------------------------------- */ div.figure { margin: 0.5em; padding: 0.5em; } div.figure p.caption { padding: 0.3em; } div.figure p.caption span.caption-number { font-style: italic; } div.figure p.caption span.caption-text { } /* -- field list styles ----------------------------------------------------- */ table.field-list td, table.field-list th { border: 0 !important; } .field-list ul { margin: 0; padding-left: 1em; } .field-list p { margin: 0; } .field-name { -moz-hyphens: manual; -ms-hyphens: manual; -webkit-hyphens: manual; hyphens: manual; } /* -- hlist styles ---------------------------------------------------------- */ table.hlist td { vertical-align: top; } /* -- other body styles ----------------------------------------------------- */ ol.arabic { list-style: decimal; } ol.loweralpha { list-style: lower-alpha; } ol.upperalpha { list-style: upper-alpha; } ol.lowerroman { list-style: lower-roman; } ol.upperroman { list-style: upper-roman; } dl { margin-bottom: 15px; } dd p { margin-top: 0px; } dd ul, dd table { margin-bottom: 10px; } dd { margin-top: 3px; margin-bottom: 10px; margin-left: 30px; } dt:target, span.highlighted { background-color: #fbe54e; } rect.highlighted { fill: #fbe54e; } dl.glossary dt { font-weight: bold; font-size: 1.1em; } .optional { font-size: 1.3em; } .sig-paren { font-size: larger; } .versionmodified { font-style: italic; } .system-message { background-color: #fda; padding: 5px; border: 3px solid red; } .footnote:target { background-color: #ffa; } .line-block { display: block; margin-top: 1em; margin-bottom: 1em; } .line-block .line-block { margin-top: 0; margin-bottom: 0; margin-left: 1.5em; } .guilabel, .menuselection { font-family: sans-serif; } .accelerator { text-decoration: underline; } .classifier { font-style: oblique; } abbr, acronym { border-bottom: dotted 1px; cursor: help; } /* -- code displays --------------------------------------------------------- */ pre { overflow: auto; overflow-y: hidden; /* fixes display issues on Chrome browsers */ } span.pre { -moz-hyphens: none; -ms-hyphens: none; -webkit-hyphens: none; hyphens: none; } td.linenos pre { padding: 5px 0px; border: 0; background-color: transparent; color: #aaa; } table.highlighttable { margin-left: 0.5em; } table.highlighttable td { padding: 0 0.5em 0 0.5em; } div.code-block-caption { padding: 2px 5px; font-size: small; } div.code-block-caption code { background-color: transparent; } div.code-block-caption + div > div.highlight > pre { margin-top: 0; } div.code-block-caption span.caption-number { padding: 0.1em 0.3em; font-style: italic; } div.code-block-caption span.caption-text { } div.literal-block-wrapper { padding: 1em 1em 0; } div.literal-block-wrapper div.highlight { margin: 0; } code.descname { background-color: transparent; font-weight: bold; font-size: 1.2em; } code.descclassname { background-color: transparent; } code.xref, a code { background-color: transparent; font-weight: bold; } h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { background-color: transparent; } .viewcode-link { float: right; } .viewcode-back { float: right; font-family: sans-serif; } div.viewcode-block:target { margin: -1px -10px; padding: 0 10px; } /* -- math display ---------------------------------------------------------- */ img.math { vertical-align: middle; } div.body div.math p { text-align: center; } span.eqno { float: right; } span.eqno a.headerlink { position: relative; left: 0px; z-index: 1; } div.math:hover a.headerlink { visibility: visible; } /* -- printout stylesheet --------------------------------------------------- */ @media print { div.document, div.documentwrapper, div.bodywrapper { margin: 0 !important; width: 100%; } div.sphinxsidebar, div.related, div.footer, #top-link { display: none; } }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_static/language_data.js
/* * language_data.js * ~~~~~~~~~~~~~~~~ * * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. * * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"]; /* Non-minified version JS is _stemmer.js if file is provided */ /** * Porter Stemmer */ var Stemmer = function() { var step2list = { ational: 'ate', tional: 'tion', enci: 'ence', anci: 'ance', izer: 'ize', bli: 'ble', alli: 'al', entli: 'ent', eli: 'e', ousli: 'ous', ization: 'ize', ation: 'ate', ator: 'ate', alism: 'al', iveness: 'ive', fulness: 'ful', ousness: 'ous', aliti: 'al', iviti: 'ive', biliti: 'ble', logi: 'log' }; var step3list = { icate: 'ic', ative: '', alize: 'al', iciti: 'ic', ical: 'ic', ful: '', ness: '' }; var c = "[^aeiou]"; // consonant var v = "[aeiouy]"; // vowel var C = c + "[^aeiouy]*"; // consonant sequence var V = v + "[aeiou]*"; // vowel sequence var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 var s_v = "^(" + C + ")?" + v; // vowel in stem this.stemWord = function (w) { var stem; var suffix; var firstch; var origword = w; if (w.length < 3) return w; var re; var re2; var re3; var re4; firstch = w.substr(0,1); if (firstch == "y") w = firstch.toUpperCase() + w.substr(1); // Step 1a re = /^(.+?)(ss|i)es$/; re2 = /^(.+?)([^s])s$/; if (re.test(w)) w = w.replace(re,"$1$2"); else if (re2.test(w)) w = w.replace(re2,"$1$2"); // Step 1b re = /^(.+?)eed$/; re2 = /^(.+?)(ed|ing)$/; if (re.test(w)) { var fp = re.exec(w); re = new RegExp(mgr0); if (re.test(fp[1])) { re = /.$/; w = w.replace(re,""); } } else if (re2.test(w)) { var fp = re2.exec(w); stem = fp[1]; re2 = new RegExp(s_v); if (re2.test(stem)) { w = stem; re2 = /(at|bl|iz)$/; re3 = new RegExp("([^aeiouylsz])\\1$"); re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); if (re2.test(w)) w = w + "e"; else if (re3.test(w)) { re = /.$/; w = w.replace(re,""); } else if (re4.test(w)) w = w + "e"; } } // Step 1c re = /^(.+?)y$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; re = new RegExp(s_v); if (re.test(stem)) w = stem + "i"; } // Step 2 re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; suffix = fp[2]; re = new RegExp(mgr0); if (re.test(stem)) w = stem + step2list[suffix]; } // Step 3 re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; suffix = fp[2]; re = new RegExp(mgr0); if (re.test(stem)) w = stem + step3list[suffix]; } // Step 4 re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; re2 = /^(.+?)(s|t)(ion)$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; re = new RegExp(mgr1); if (re.test(stem)) w = stem; } else if (re2.test(w)) { var fp = re2.exec(w); stem = fp[1] + fp[2]; re2 = new RegExp(mgr1); if (re2.test(stem)) w = stem; } // Step 5 re = /^(.+?)e$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; re = new RegExp(mgr1); re2 = new RegExp(meq1); re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) w = stem; } re = /ll$/; re2 = new RegExp(mgr1); if (re.test(w) && re2.test(w)) { re = /.$/; w = w.replace(re,""); } // and turn initial Y back to y if (firstch == "y") w = firstch.toLowerCase() + w.substr(1); return w; } } var splitChars = (function() { var result = {}; var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648, 1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702, 2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971, 2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345, 3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761, 3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, 4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125, 8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695, 11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587, 43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141]; var i, j, start, end; for (i = 0; i < singles.length; i++) { result[singles[i]] = true; } var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709], [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161], [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568], [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807], [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047], [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383], [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450], [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547], [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673], [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820], [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946], [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023], [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173], [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332], [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481], [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718], [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791], [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095], [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205], [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687], [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968], [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869], [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102], [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271], [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592], [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822], [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167], [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959], [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143], [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318], [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483], [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101], [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567], [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292], [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444], [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783], [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311], [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511], [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774], [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071], [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263], [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519], [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647], [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967], [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295], [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274], [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007], [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381], [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]]; for (i = 0; i < ranges.length; i++) { start = ranges[i][0]; end = ranges[i][1]; for (j = start; j <= end; j++) { result[j] = true; } } return result; })(); function splitQuery(query) { var result = []; var start = -1; for (var i = 0; i < query.length; i++) { if (splitChars[query.charCodeAt(i)]) { if (start !== -1) { result.push(query.slice(start, i)); start = -1; } } else if (start === -1) { start = i; } } if (start !== -1) { result.push(query.slice(start)); } return result; }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_static/jquery.js
/*! * jQuery JavaScript Library v3.3.1-dfsg * https://jquery.com/ * * Includes Sizzle.js * https://sizzlejs.com/ * * Copyright JS Foundation and other contributors * Released under the MIT license * https://jquery.org/license * * Date: 2019-04-19T06:52Z */ ( function( global, factory ) { "use strict"; if ( typeof module === "object" && typeof module.exports === "object" ) { // For CommonJS and CommonJS-like environments where a proper `window` // is present, execute the factory and get jQuery. // For environments that do not have a `window` with a `document` // (such as Node.js), expose a factory as module.exports. // This accentuates the need for the creation of a real `window`. // e.g. var jQuery = require("jquery")(window); // See ticket #14549 for more info. module.exports = global.document ? factory( global, true ) : function( w ) { if ( !w.document ) { throw new Error( "jQuery requires a window with a document" ); } return factory( w ); }; } else { factory( global ); } // Pass this if window is not defined yet } )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { // Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 // throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode // arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common // enough that all such attempts are guarded in a try block. var arr = []; var document = window.document; var getProto = Object.getPrototypeOf; var slice = arr.slice; var concat = arr.concat; var push = arr.push; var indexOf = arr.indexOf; var class2type = {}; var toString = class2type.toString; var hasOwn = class2type.hasOwnProperty; var fnToString = hasOwn.toString; var ObjectFunctionString = fnToString.call( Object ); var support = {}; var isFunction = function isFunction( obj ) { // Support: Chrome <=57, Firefox <=52 // In some browsers, typeof returns "function" for HTML <object> elements // (i.e., `typeof document.createElement( "object" ) === "function"`). // We don't want to classify *any* DOM node as a function. return typeof obj === "function" && typeof obj.nodeType !== "number"; }; var isWindow = function isWindow( obj ) { return obj != null && obj === obj.window; }; var preservedScriptAttributes = { type: true, src: true, noModule: true }; function DOMEval( code, doc, node ) { doc = doc || document; var i, script = doc.createElement( "script" ); script.text = code; if ( node ) { for ( i in preservedScriptAttributes ) { if ( node[ i ] ) { script[ i ] = node[ i ]; } } } doc.head.appendChild( script ).parentNode.removeChild( script ); } function toType( obj ) { if ( obj == null ) { return obj + ""; } // Support: Android <=2.3 only (functionish RegExp) return typeof obj === "object" || typeof obj === "function" ? class2type[ toString.call( obj ) ] || "object" : typeof obj; } /* global Symbol */ // Defining this global in .eslintrc.json would create a danger of using the global // unguarded in another place, it seems safer to define global only for this module var version = "3.3.1", // Define a local copy of jQuery jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' // Need init if jQuery is called (just allow error to be thrown if not included) return new jQuery.fn.init( selector, context ); }, // Support: Android <=4.0 only // Make sure we trim BOM and NBSP rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; jQuery.fn = jQuery.prototype = { // The current version of jQuery being used jquery: version, constructor: jQuery, // The default length of a jQuery object is 0 length: 0, toArray: function() { return slice.call( this ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { // Return all the elements in a clean array if ( num == null ) { return slice.call( this ); } // Return just the one element from the set return num < 0 ? this[ num + this.length ] : this[ num ]; }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems ) { // Build a new jQuery matched element set var ret = jQuery.merge( this.constructor(), elems ); // Add the old object onto the stack (as a reference) ret.prevObject = this; // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. each: function( callback ) { return jQuery.each( this, callback ); }, map: function( callback ) { return this.pushStack( jQuery.map( this, function( elem, i ) { return callback.call( elem, i, elem ); } ) ); }, slice: function() { return this.pushStack( slice.apply( this, arguments ) ); }, first: function() { return this.eq( 0 ); }, last: function() { return this.eq( -1 ); }, eq: function( i ) { var len = this.length, j = +i + ( i < 0 ? len : 0 ); return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); }, end: function() { return this.prevObject || this.constructor(); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: push, sort: arr.sort, splice: arr.splice }; jQuery.extend = jQuery.fn.extend = function() { var options, name, src, copy, copyIsArray, clone, target = arguments[ 0 ] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; // Skip the boolean and the target target = arguments[ i ] || {}; i++; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !isFunction( target ) ) { target = {}; } // Extend jQuery itself if only one argument is passed if ( i === length ) { target = this; i--; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( ( options = arguments[ i ] ) != null ) { // Extend the base object for ( name in options ) { src = target[ name ]; copy = options[ name ]; // Prevent Object.prototype pollution // Prevent never-ending loop if ( name === "__proto__" || target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject( copy ) || ( copyIsArray = Array.isArray( copy ) ) ) ) { if ( copyIsArray ) { copyIsArray = false; clone = src && Array.isArray( src ) ? src : []; } else { clone = src && jQuery.isPlainObject( src ) ? src : {}; } // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; jQuery.extend( { // Unique for each copy of jQuery on the page expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), // Assume jQuery is ready without the ready module isReady: true, error: function( msg ) { throw new Error( msg ); }, noop: function() {}, isPlainObject: function( obj ) { var proto, Ctor; // Detect obvious negatives // Use toString instead of jQuery.type to catch host objects if ( !obj || toString.call( obj ) !== "[object Object]" ) { return false; } proto = getProto( obj ); // Objects with no prototype (e.g., `Object.create( null )`) are plain if ( !proto ) { return true; } // Objects with prototype are plain iff they were constructed by a global Object function Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; }, isEmptyObject: function( obj ) { /* eslint-disable no-unused-vars */ // See https://github.com/eslint/eslint/issues/6125 var name; for ( name in obj ) { return false; } return true; }, // Evaluates a script in a global context globalEval: function( code ) { DOMEval( code ); }, each: function( obj, callback ) { var length, i = 0; if ( isArrayLike( obj ) ) { length = obj.length; for ( ; i < length; i++ ) { if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { break; } } } else { for ( i in obj ) { if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { break; } } } return obj; }, // Support: Android <=4.0 only trim: function( text ) { return text == null ? "" : ( text + "" ).replace( rtrim, "" ); }, // results is for internal usage only makeArray: function( arr, results ) { var ret = results || []; if ( arr != null ) { if ( isArrayLike( Object( arr ) ) ) { jQuery.merge( ret, typeof arr === "string" ? [ arr ] : arr ); } else { push.call( ret, arr ); } } return ret; }, inArray: function( elem, arr, i ) { return arr == null ? -1 : indexOf.call( arr, elem, i ); }, // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit merge: function( first, second ) { var len = +second.length, j = 0, i = first.length; for ( ; j < len; j++ ) { first[ i++ ] = second[ j ]; } first.length = i; return first; }, grep: function( elems, callback, invert ) { var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert; // Go through the array, only saving the items // that pass the validator function for ( ; i < length; i++ ) { callbackInverse = !callback( elems[ i ], i ); if ( callbackInverse !== callbackExpect ) { matches.push( elems[ i ] ); } } return matches; }, // arg is for internal usage only map: function( elems, callback, arg ) { var length, value, i = 0, ret = []; // Go through the array, translating each of the items to their new values if ( isArrayLike( elems ) ) { length = elems.length; for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } // Go through every key on the object, } else { for ( i in elems ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } } // Flatten any nested arrays return concat.apply( [], ret ); }, // A global GUID counter for objects guid: 1, // jQuery.support is not used in Core but other projects attach their // properties to it so it needs to exist. support: support } ); if ( typeof Symbol === "function" ) { jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; } // Populate the class2type map jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), function( i, name ) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); } ); function isArrayLike( obj ) { // Support: real iOS 8.2 only (not reproducible in simulator) // `in` check used to prevent JIT error (gh-2145) // hasOwn isn't used here due to false negatives // regarding Nodelist length in IE var length = !!obj && "length" in obj && obj.length, type = toType( obj ); if ( isFunction( obj ) || isWindow( obj ) ) { return false; } return type === "array" || length === 0 || typeof length === "number" && length > 0 && ( length - 1 ) in obj; } var Sizzle = /*! * Sizzle CSS Selector Engine v2.3.3 * https://sizzlejs.com/ * * Copyright jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2016-08-08 */ (function( window ) { var i, support, Expr, getText, isXML, tokenize, compile, select, outermostContext, sortInput, hasDuplicate, // Local document vars setDocument, document, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, // Instance-specific data expando = "sizzle" + 1 * new Date(), preferredDoc = window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; } return 0; }, // Instance methods hasOwn = ({}).hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push = arr.push, slice = arr.slice, // Use a stripped-down indexOf as it's faster than native // https://jsperf.com/thor-indexof-vs-for/5 indexOf = function( list, elem ) { var i = 0, len = list.length; for ( ; i < len; i++ ) { if ( list[i] === elem ) { return i; } } return -1; }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", // Regular expressions // http://www.w3.org/TR/css3-selectors/#whitespace whitespace = "[\\x20\\t\\r\\n\\f]", // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2) "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + ")(?:\\((" + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: // 1. quoted (capture 3; capture 4 or capture 5) "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + // 2. simple (capture 6) "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + // 3. anything else (capture 2) ".*" + ")\\)|)", // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter rwhitespace = new RegExp( whitespace + "+", "g" ), rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), matchExpr = { "ID": new RegExp( "^#(" + identifier + ")" ), "CLASS": new RegExp( "^\\.(" + identifier + ")" ), "TAG": new RegExp( "^(" + identifier + "|[*])" ), "ATTR": new RegExp( "^" + attributes ), "PSEUDO": new RegExp( "^" + pseudos ), "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), // For use in libraries implementing .is() // We use this for POS matching in `select` "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, // Easily-parseable/retrievable ID or TAG or CLASS selectors rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, // CSS escapes // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), funescape = function( _, escaped, escapedWhitespace ) { var high = "0x" + escaped - 0x10000; // NaN means non-codepoint // Support: Firefox<24 // Workaround erroneous numeric interpretation of +"0x" return high !== high || escapedWhitespace ? escaped : high < 0 ? // BMP codepoint String.fromCharCode( high + 0x10000 ) : // Supplemental Plane codepoint (surrogate pair) String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }, // CSS string/identifier serialization // https://drafts.csswg.org/cssom/#common-serializing-idioms rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, fcssescape = function( ch, asCodePoint ) { if ( asCodePoint ) { // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER if ( ch === "\0" ) { return "\uFFFD"; } // Control characters and (dependent upon position) numbers get escaped as code points return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; } // Other potentially-special ASCII characters get backslash-escaped return "\\" + ch; }, // Used for iframes // See setDocument() // Removing the function wrapper causes a "Permission Denied" // error in IE unloadHandler = function() { setDocument(); }, disabledAncestor = addCombinator( function( elem ) { return elem.disabled === true && ("form" in elem || "label" in elem); }, { dir: "parentNode", next: "legend" } ); // Optimize for push.apply( _, NodeList ) try { push.apply( (arr = slice.call( preferredDoc.childNodes )), preferredDoc.childNodes ); // Support: Android<4.0 // Detect silently failing push.apply arr[ preferredDoc.childNodes.length ].nodeType; } catch ( e ) { push = { apply: arr.length ? // Leverage slice if possible function( target, els ) { push_native.apply( target, slice.call(els) ); } : // Support: IE<9 // Otherwise append directly function( target, els ) { var j = target.length, i = 0; // Can't trust NodeList.length while ( (target[j++] = els[i++]) ) {} target.length = j - 1; } }; } function Sizzle( selector, context, results, seed ) { var m, i, elem, nid, match, groups, newSelector, newContext = context && context.ownerDocument, // nodeType defaults to 9, since context defaults to document nodeType = context ? context.nodeType : 9; results = results || []; // Return early from calls with invalid selector or context if ( typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { return results; } // Try to shortcut find operations (as opposed to filters) in HTML documents if ( !seed ) { if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { setDocument( context ); } context = context || document; if ( documentIsHTML ) { // If the selector is sufficiently simple, try using a "get*By*" DOM method // (excepting DocumentFragment context, where the methods don't exist) if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { // ID selector if ( (m = match[1]) ) { // Document context if ( nodeType === 9 ) { if ( (elem = context.getElementById( m )) ) { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID if ( elem.id === m ) { results.push( elem ); return results; } } else { return results; } // Element context } else { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID if ( newContext && (elem = newContext.getElementById( m )) && contains( context, elem ) && elem.id === m ) { results.push( elem ); return results; } } // Type selector } else if ( match[2] ) { push.apply( results, context.getElementsByTagName( selector ) ); return results; // Class selector } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { push.apply( results, context.getElementsByClassName( m ) ); return results; } } // Take advantage of querySelectorAll if ( support.qsa && !compilerCache[ selector + " " ] && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { if ( nodeType !== 1 ) { newContext = context; newSelector = selector; // qSA looks outside Element context, which is not what we want // Thanks to Andrew Dupont for this workaround technique // Support: IE <=8 // Exclude object elements } else if ( context.nodeName.toLowerCase() !== "object" ) { // Capture the context ID, setting it first if necessary if ( (nid = context.getAttribute( "id" )) ) { nid = nid.replace( rcssescape, fcssescape ); } else { context.setAttribute( "id", (nid = expando) ); } // Prefix every selector in the list groups = tokenize( selector ); i = groups.length; while ( i-- ) { groups[i] = "#" + nid + " " + toSelector( groups[i] ); } newSelector = groups.join( "," ); // Expand context for sibling selectors newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; } if ( newSelector ) { try { push.apply( results, newContext.querySelectorAll( newSelector ) ); return results; } catch ( qsaError ) { } finally { if ( nid === expando ) { context.removeAttribute( "id" ); } } } } } } // All others return select( selector.replace( rtrim, "$1" ), context, results, seed ); } /** * Create key-value caches of limited size * @returns {function(string, object)} Returns the Object data after storing it on itself with * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) * deleting the oldest entry */ function createCache() { var keys = []; function cache( key, value ) { // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) if ( keys.push( key + " " ) > Expr.cacheLength ) { // Only keep the most recent entries delete cache[ keys.shift() ]; } return (cache[ key + " " ] = value); } return cache; } /** * Mark a function for special use by Sizzle * @param {Function} fn The function to mark */ function markFunction( fn ) { fn[ expando ] = true; return fn; } /** * Support testing using an element * @param {Function} fn Passed the created element and returns a boolean result */ function assert( fn ) { var el = document.createElement("fieldset"); try { return !!fn( el ); } catch (e) { return false; } finally { // Remove from its parent by default if ( el.parentNode ) { el.parentNode.removeChild( el ); } // release memory in IE el = null; } } /** * Adds the same handler for all of the specified attrs * @param {String} attrs Pipe-separated list of attributes * @param {Function} handler The method that will be applied */ function addHandle( attrs, handler ) { var arr = attrs.split("|"), i = arr.length; while ( i-- ) { Expr.attrHandle[ arr[i] ] = handler; } } /** * Checks document order of two siblings * @param {Element} a * @param {Element} b * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b */ function siblingCheck( a, b ) { var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && a.sourceIndex - b.sourceIndex; // Use IE sourceIndex if available on both nodes if ( diff ) { return diff; } // Check if b follows a if ( cur ) { while ( (cur = cur.nextSibling) ) { if ( cur === b ) { return -1; } } } return a ? 1 : -1; } /** * Returns a function to use in pseudos for input types * @param {String} type */ function createInputPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === type; }; } /** * Returns a function to use in pseudos for buttons * @param {String} type */ function createButtonPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && elem.type === type; }; } /** * Returns a function to use in pseudos for :enabled/:disabled * @param {Boolean} disabled true for :disabled; false for :enabled */ function createDisabledPseudo( disabled ) { // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable return function( elem ) { // Only certain elements can match :enabled or :disabled // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled if ( "form" in elem ) { // Check for inherited disabledness on relevant non-disabled elements: // * listed form-associated elements in a disabled fieldset // https://html.spec.whatwg.org/multipage/forms.html#category-listed // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled // * option elements in a disabled optgroup // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled // All such elements have a "form" property. if ( elem.parentNode && elem.disabled === false ) { // Option elements defer to a parent optgroup if present if ( "label" in elem ) { if ( "label" in elem.parentNode ) { return elem.parentNode.disabled === disabled; } else { return elem.disabled === disabled; } } // Support: IE 6 - 11 // Use the isDisabled shortcut property to check for disabled fieldset ancestors return elem.isDisabled === disabled || // Where there is no isDisabled, check manually /* jshint -W018 */ elem.isDisabled !== !disabled && disabledAncestor( elem ) === disabled; } return elem.disabled === disabled; // Try to winnow out elements that can't be disabled before trusting the disabled property. // Some victims get caught in our net (label, legend, menu, track), but it shouldn't // even exist on them, let alone have a boolean value. } else if ( "label" in elem ) { return elem.disabled === disabled; } // Remaining elements are neither :enabled nor :disabled return false; }; } /** * Returns a function to use in pseudos for positionals * @param {Function} fn */ function createPositionalPseudo( fn ) { return markFunction(function( argument ) { argument = +argument; return markFunction(function( seed, matches ) { var j, matchIndexes = fn( [], seed.length, argument ), i = matchIndexes.length; // Match elements found at the specified indexes while ( i-- ) { if ( seed[ (j = matchIndexes[i]) ] ) { seed[j] = !(matches[j] = seed[j]); } } }); }); } /** * Checks a node for validity as a Sizzle context * @param {Element|Object=} context * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value */ function testContext( context ) { return context && typeof context.getElementsByTagName !== "undefined" && context; } // Expose support vars for convenience support = Sizzle.support = {}; /** * Detects XML nodes * @param {Element|Object} elem An element or a document * @returns {Boolean} True iff elem is a non-HTML XML node */ isXML = Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = elem && (elem.ownerDocument || elem).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; /** * Sets document-related variables once based on the current document * @param {Element|Object} [doc] An element or document object to use to set the document * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function( node ) { var hasCompare, subWindow, doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { return document; } // Update global variables document = doc; docElem = document.documentElement; documentIsHTML = !isXML( document ); // Support: IE 9-11, Edge // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) if ( preferredDoc !== document && (subWindow = document.defaultView) && subWindow.top !== subWindow ) { // Support: IE 11, Edge if ( subWindow.addEventListener ) { subWindow.addEventListener( "unload", unloadHandler, false ); // Support: IE 9 - 10 only } else if ( subWindow.attachEvent ) { subWindow.attachEvent( "onunload", unloadHandler ); } } /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 // Verify that getAttribute really returns attributes and not properties // (excepting IE8 booleans) support.attributes = assert(function( el ) { el.className = "i"; return !el.getAttribute("className"); }); /* getElement(s)By* ---------------------------------------------------------------------- */ // Check if getElementsByTagName("*") returns only elements support.getElementsByTagName = assert(function( el ) { el.appendChild( document.createComment("") ); return !el.getElementsByTagName("*").length; }); // Support: IE<9 support.getElementsByClassName = rnative.test( document.getElementsByClassName ); // Support: IE<10 // Check if getElementById returns elements by name // The broken getElementById methods don't pick up programmatically-set names, // so use a roundabout getElementsByName test support.getById = assert(function( el ) { docElem.appendChild( el ).id = expando; return !document.getElementsByName || !document.getElementsByName( expando ).length; }); // ID filter and find if ( support.getById ) { Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { return elem.getAttribute("id") === attrId; }; }; Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var elem = context.getElementById( id ); return elem ? [ elem ] : []; } }; } else { Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return node && node.value === attrId; }; }; // Support: IE 6 - 7 only // getElementById is not reliable as a find shortcut Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var node, i, elems, elem = context.getElementById( id ); if ( elem ) { // Verify the id attribute node = elem.getAttributeNode("id"); if ( node && node.value === id ) { return [ elem ]; } // Fall back on getElementsByName elems = context.getElementsByName( id ); i = 0; while ( (elem = elems[i++]) ) { node = elem.getAttributeNode("id"); if ( node && node.value === id ) { return [ elem ]; } } } return []; } }; } // Tag Expr.find["TAG"] = support.getElementsByTagName ? function( tag, context ) { if ( typeof context.getElementsByTagName !== "undefined" ) { return context.getElementsByTagName( tag ); // DocumentFragment nodes don't have gEBTN } else if ( support.qsa ) { return context.querySelectorAll( tag ); } } : function( tag, context ) { var elem, tmp = [], i = 0, // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too results = context.getElementsByTagName( tag ); // Filter out possible comments if ( tag === "*" ) { while ( (elem = results[i++]) ) { if ( elem.nodeType === 1 ) { tmp.push( elem ); } } return tmp; } return results; }; // Class Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { return context.getElementsByClassName( className ); } }; /* QSA/matchesSelector ---------------------------------------------------------------------- */ // QSA and matchesSelector support // matchesSelector(:active) reports false when true (IE9/Opera 11.5) rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21) // We allow this because of a bug in IE8/9 that throws an error // whenever `document.activeElement` is accessed on an iframe // So, we allow :focus to pass through QSA all the time to avoid the IE error // See https://bugs.jquery.com/ticket/13378 rbuggyQSA = []; if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { // Build QSA regex // Regex strategy adopted from Diego Perini assert(function( el ) { // Select is set to empty string on purpose // This is to test IE's treatment of not explicitly // setting a boolean content attribute, // since its presence should be enough // https://bugs.jquery.com/ticket/12359 docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" + "<select id='" + expando + "-\r\\' msallowcapture=''>" + "<option selected=''></option></select>"; // Support: IE8, Opera 11-12.16 // Nothing should be selected when empty strings follow ^= or $= or *= // The test attribute must be unknown in Opera but "safe" for WinRT // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section if ( el.querySelectorAll("[msallowcapture^='']").length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); } // Support: IE8 // Boolean attributes and "value" are not treated correctly if ( !el.querySelectorAll("[selected]").length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { rbuggyQSA.push("~="); } // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests if ( !el.querySelectorAll(":checked").length ) { rbuggyQSA.push(":checked"); } // Support: Safari 8+, iOS 8+ // https://bugs.webkit.org/show_bug.cgi?id=136851 // In-page `selector#id sibling-combinator selector` fails if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { rbuggyQSA.push(".#.+[+~]"); } }); assert(function( el ) { el.innerHTML = "<a href='' disabled='disabled'></a>" + "<select disabled='disabled'><option/></select>"; // Support: Windows 8 Native Apps // The type and name attributes are restricted during .innerHTML assignment var input = document.createElement("input"); input.setAttribute( "type", "hidden" ); el.appendChild( input ).setAttribute( "name", "D" ); // Support: IE8 // Enforce case-sensitivity of name attribute if ( el.querySelectorAll("[name=d]").length ) { rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests if ( el.querySelectorAll(":enabled").length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Support: IE9-11+ // IE's :disabled selector does not pick up the children of disabled fieldsets docElem.appendChild( el ).disabled = true; if ( el.querySelectorAll(":disabled").length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Opera 10-11 does not throw on post-comma invalid pseudos el.querySelectorAll("*,:x"); rbuggyQSA.push(",.*:"); }); } if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector) )) ) { assert(function( el ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) support.disconnectedMatch = matches.call( el, "*" ); // This should fail with an exception // Gecko does not error, returns false instead matches.call( el, "[s!='']:x" ); rbuggyMatches.push( "!=", pseudos ); }); } rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); /* Contains ---------------------------------------------------------------------- */ hasCompare = rnative.test( docElem.compareDocumentPosition ); // Element contains another // Purposefully self-exclusive // As in, an element does not contain itself contains = hasCompare || rnative.test( docElem.contains ) ? function( a, b ) { var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode; return a === bup || !!( bup && bup.nodeType === 1 && ( adown.contains ? adown.contains( bup ) : a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 )); } : function( a, b ) { if ( b ) { while ( (b = b.parentNode) ) { if ( b === a ) { return true; } } } return false; }; /* Sorting ---------------------------------------------------------------------- */ // Document order sorting sortOrder = hasCompare ? function( a, b ) { // Flag for duplicate removal if ( a === b ) { hasDuplicate = true; return 0; } // Sort on method existence if only one input has compareDocumentPosition var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; if ( compare ) { return compare; } // Calculate position if both inputs belong to the same document compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? a.compareDocumentPosition( b ) : // Otherwise we know they are disconnected 1; // Disconnected nodes if ( compare & 1 || (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { // Choose the first element that is related to our preferred document if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { return -1; } if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { return 1; } // Maintain original order return sortInput ? ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; } return compare & 4 ? -1 : 1; } : function( a, b ) { // Exit early if the nodes are identical if ( a === b ) { hasDuplicate = true; return 0; } var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [ a ], bp = [ b ]; // Parentless nodes are either documents or disconnected if ( !aup || !bup ) { return a === document ? -1 : b === document ? 1 : aup ? -1 : bup ? 1 : sortInput ? ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; // If the nodes are siblings, we can do a quick check } else if ( aup === bup ) { return siblingCheck( a, b ); } // Otherwise we need full lists of their ancestors for comparison cur = a; while ( (cur = cur.parentNode) ) { ap.unshift( cur ); } cur = b; while ( (cur = cur.parentNode) ) { bp.unshift( cur ); } // Walk down the tree looking for a discrepancy while ( ap[i] === bp[i] ) { i++; } return i ? // Do a sibling check if the nodes have a common ancestor siblingCheck( ap[i], bp[i] ) : // Otherwise nodes in our document sort first ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0; }; return document; }; Sizzle.matches = function( expr, elements ) { return Sizzle( expr, null, null, elements ); }; Sizzle.matchesSelector = function( elem, expr ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } // Make sure that attribute selectors are quoted expr = expr.replace( rattributeQuotes, "='$1']" ); if ( support.matchesSelector && documentIsHTML && !compilerCache[ expr + " " ] && ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { try { var ret = matches.call( elem, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9 elem.document && elem.document.nodeType !== 11 ) { return ret; } } catch (e) {} } return Sizzle( expr, document, null, [ elem ] ).length > 0; }; Sizzle.contains = function( context, elem ) { // Set document vars if needed if ( ( context.ownerDocument || context ) !== document ) { setDocument( context ); } return contains( context, elem ); }; Sizzle.attr = function( elem, name ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } var fn = Expr.attrHandle[ name.toLowerCase() ], // Don't get fooled by Object.prototype properties (jQuery #13807) val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? fn( elem, name, !documentIsHTML ) : undefined; return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute( name ) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; }; Sizzle.escape = function( sel ) { return (sel + "").replace( rcssescape, fcssescape ); }; Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; /** * Document sorting and removing duplicates * @param {ArrayLike} results */ Sizzle.uniqueSort = function( results ) { var elem, duplicates = [], j = 0, i = 0; // Unless we *know* we can detect duplicates, assume their presence hasDuplicate = !support.detectDuplicates; sortInput = !support.sortStable && results.slice( 0 ); results.sort( sortOrder ); if ( hasDuplicate ) { while ( (elem = results[i++]) ) { if ( elem === results[ i ] ) { j = duplicates.push( i ); } } while ( j-- ) { results.splice( duplicates[ j ], 1 ); } } // Clear input after sorting to release objects // See https://github.com/jquery/sizzle/pull/225 sortInput = null; return results; }; /** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */ getText = Sizzle.getText = function( elem ) { var node, ret = "", i = 0, nodeType = elem.nodeType; if ( !nodeType ) { // If no nodeType, this is expected to be an array while ( (node = elem[i++]) ) { // Do not traverse comment nodes ret += getText( node ); } } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { // Use textContent for elements // innerText usage removed for consistency of new lines (jQuery #11153) if ( typeof elem.textContent === "string" ) { return elem.textContent; } else { // Traverse its children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { ret += getText( elem ); } } } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } // Do not include comment or processing instruction nodes return ret; }; Expr = Sizzle.selectors = { // Can be adjusted by the user cacheLength: 50, createPseudo: markFunction, match: matchExpr, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: true }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: true }, "~": { dir: "previousSibling" } }, preFilter: { "ATTR": function( match ) { match[1] = match[1].replace( runescape, funescape ); // Move the given value to match[3] whether quoted or unquoted match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); if ( match[2] === "~=" ) { match[3] = " " + match[3] + " "; } return match.slice( 0, 4 ); }, "CHILD": function( match ) { /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4 xn-component of xn+y argument ([+-]?\d*n|) 5 sign of xn-component 6 x of xn-component 7 sign of y-component 8 y of y-component */ match[1] = match[1].toLowerCase(); if ( match[1].slice( 0, 3 ) === "nth" ) { // nth-* requires argument if ( !match[3] ) { Sizzle.error( match[0] ); } // numeric x and y parameters for Expr.filter.CHILD // remember that false/true cast respectively to 0/1 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); // other types prohibit arguments } else if ( match[3] ) { Sizzle.error( match[0] ); } return match; }, "PSEUDO": function( match ) { var excess, unquoted = !match[6] && match[2]; if ( matchExpr["CHILD"].test( match[0] ) ) { return null; } // Accept quoted arguments as-is if ( match[3] ) { match[2] = match[4] || match[5] || ""; // Strip excess characters from unquoted arguments } else if ( unquoted && rpseudo.test( unquoted ) && // Get excess from tokenize (recursively) (excess = tokenize( unquoted, true )) && // advance to the next closing parenthesis (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { // excess is a negative index match[0] = match[0].slice( 0, excess ); match[2] = unquoted.slice( 0, excess ); } // Return only captures needed by the pseudo filter method (type and argument) return match.slice( 0, 3 ); } }, filter: { "TAG": function( nodeNameSelector ) { var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); return nodeNameSelector === "*" ? function() { return true; } : function( elem ) { return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; }; }, "CLASS": function( className ) { var pattern = classCache[ className + " " ]; return pattern || (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && classCache( className, function( elem ) { return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); }); }, "ATTR": function( name, operator, check ) { return function( elem ) { var result = Sizzle.attr( elem, name ); if ( result == null ) { return operator === "!="; } if ( !operator ) { return true; } result += ""; return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf( check ) === 0 : operator === "*=" ? check && result.indexOf( check ) > -1 : operator === "$=" ? check && result.slice( -check.length ) === check : operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; }; }, "CHILD": function( type, what, argument, first, last ) { var simple = type.slice( 0, 3 ) !== "nth", forward = type.slice( -4 ) !== "last", ofType = what === "of-type"; return first === 1 && last === 0 ? // Shortcut for :nth-*(n) function( elem ) { return !!elem.parentNode; } : function( elem, context, xml ) { var cache, uniqueCache, outerCache, node, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false; if ( parent ) { // :(first|last|only)-(child|of-type) if ( simple ) { while ( dir ) { node = elem; while ( (node = node[ dir ]) ) { if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { return false; } } // Reverse direction for :only-* (if we haven't yet done so) start = dir = type === "only" && !start && "nextSibling"; } return true; } start = [ forward ? parent.firstChild : parent.lastChild ]; // non-xml :nth-child(...) stores cache data on `parent` if ( forward && useCache ) { // Seek `elem` from a previously-cached index // ...in a gzip-friendly way node = parent; outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; diff = nodeIndex && cache[ 2 ]; node = nodeIndex && parent.childNodes[ nodeIndex ]; while ( (node = ++nodeIndex && node && node[ dir ] || // Fallback to seeking `elem` from the start (diff = nodeIndex = 0) || start.pop()) ) { // When found, cache indexes on `parent` and break if ( node.nodeType === 1 && ++diff && node === elem ) { uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; break; } } } else { // Use previously-cached element index if available if ( useCache ) { // ...in a gzip-friendly way node = elem; outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; diff = nodeIndex; } // xml :nth-child(...) // or :nth-last-child(...) or :nth(-last)?-of-type(...) if ( diff === false ) { // Use the same loop as above to seek `elem` from the start while ( (node = ++nodeIndex && node && node[ dir ] || (diff = nodeIndex = 0) || start.pop()) ) { if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { // Cache the index of each encountered element if ( useCache ) { outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); uniqueCache[ type ] = [ dirruns, diff ]; } if ( node === elem ) { break; } } } } } // Incorporate the offset, then check against cycle size diff -= last; return diff === first || ( diff % first === 0 && diff / first >= 0 ); } }; }, "PSEUDO": function( pseudo, argument ) { // pseudo-class names are case-insensitive // http://www.w3.org/TR/selectors/#pseudo-classes // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters // Remember that setFilters inherits from pseudos var args, fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || Sizzle.error( "unsupported pseudo: " + pseudo ); // The user may use createPseudo to indicate that // arguments are needed to create the filter function // just as Sizzle does if ( fn[ expando ] ) { return fn( argument ); } // But maintain support for old signatures if ( fn.length > 1 ) { args = [ pseudo, pseudo, "", argument ]; return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? markFunction(function( seed, matches ) { var idx, matched = fn( seed, argument ), i = matched.length; while ( i-- ) { idx = indexOf( seed, matched[i] ); seed[ idx ] = !( matches[ idx ] = matched[i] ); } }) : function( elem ) { return fn( elem, 0, args ); }; } return fn; } }, pseudos: { // Potentially complex pseudos "not": markFunction(function( selector ) { // Trim the selector passed to compile // to avoid treating leading and trailing // spaces as combinators var input = [], results = [], matcher = compile( selector.replace( rtrim, "$1" ) ); return matcher[ expando ] ? markFunction(function( seed, matches, context, xml ) { var elem, unmatched = matcher( seed, null, xml, [] ), i = seed.length; // Match elements unmatched by `matcher` while ( i-- ) { if ( (elem = unmatched[i]) ) { seed[i] = !(matches[i] = elem); } } }) : function( elem, context, xml ) { input[0] = elem; matcher( input, null, xml, results ); // Don't keep the element (issue #299) input[0] = null; return !results.pop(); }; }), "has": markFunction(function( selector ) { return function( elem ) { return Sizzle( selector, elem ).length > 0; }; }), "contains": markFunction(function( text ) { text = text.replace( runescape, funescape ); return function( elem ) { return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; }; }), // "Whether an element is represented by a :lang() selector // is based solely on the element's language value // being equal to the identifier C, // or beginning with the identifier C immediately followed by "-". // The matching of C against the element's language value is performed case-insensitively. // The identifier C does not have to be a valid language name." // http://www.w3.org/TR/selectors/#lang-pseudo "lang": markFunction( function( lang ) { // lang value must be a valid identifier if ( !ridentifier.test(lang || "") ) { Sizzle.error( "unsupported lang: " + lang ); } lang = lang.replace( runescape, funescape ).toLowerCase(); return function( elem ) { var elemLang; do { if ( (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { elemLang = elemLang.toLowerCase(); return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; } } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); return false; }; }), // Miscellaneous "target": function( elem ) { var hash = window.location && window.location.hash; return hash && hash.slice( 1 ) === elem.id; }, "root": function( elem ) { return elem === docElem; }, "focus": function( elem ) { return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); }, // Boolean properties "enabled": createDisabledPseudo( false ), "disabled": createDisabledPseudo( true ), "checked": function( elem ) { // In CSS3, :checked should return both checked and selected elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked var nodeName = elem.nodeName.toLowerCase(); return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); }, "selected": function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } return elem.selected === true; }, // Contents "empty": function( elem ) { // http://www.w3.org/TR/selectors/#empty-pseudo // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), // but not by others (comment: 8; processing instruction: 7; etc.) // nodeType < 6 works because attributes (2) do not appear as children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { if ( elem.nodeType < 6 ) { return false; } } return true; }, "parent": function( elem ) { return !Expr.pseudos["empty"]( elem ); }, // Element/input types "header": function( elem ) { return rheader.test( elem.nodeName ); }, "input": function( elem ) { return rinputs.test( elem.nodeName ); }, "button": function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === "button" || name === "button"; }, "text": function( elem ) { var attr; return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && // Support: IE<8 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); }, // Position-in-collection "first": createPositionalPseudo(function() { return [ 0 ]; }), "last": createPositionalPseudo(function( matchIndexes, length ) { return [ length - 1 ]; }), "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { return [ argument < 0 ? argument + length : argument ]; }), "even": createPositionalPseudo(function( matchIndexes, length ) { var i = 0; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "odd": createPositionalPseudo(function( matchIndexes, length ) { var i = 1; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; --i >= 0; ) { matchIndexes.push( i ); } return matchIndexes; }), "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; ++i < length; ) { matchIndexes.push( i ); } return matchIndexes; }) } }; Expr.pseudos["nth"] = Expr.pseudos["eq"]; // Add button/input type pseudos for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { Expr.pseudos[ i ] = createInputPseudo( i ); } for ( i in { submit: true, reset: true } ) { Expr.pseudos[ i ] = createButtonPseudo( i ); } // Easy API for creating new setFilters function setFilters() {} setFilters.prototype = Expr.filters = Expr.pseudos; Expr.setFilters = new setFilters(); tokenize = Sizzle.tokenize = function( selector, parseOnly ) { var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[ selector + " " ]; if ( cached ) { return parseOnly ? 0 : cached.slice( 0 ); } soFar = selector; groups = []; preFilters = Expr.preFilter; while ( soFar ) { // Comma and first run if ( !matched || (match = rcomma.exec( soFar )) ) { if ( match ) { // Don't consume trailing commas as valid soFar = soFar.slice( match[0].length ) || soFar; } groups.push( (tokens = []) ); } matched = false; // Combinators if ( (match = rcombinators.exec( soFar )) ) { matched = match.shift(); tokens.push({ value: matched, // Cast descendant combinators to space type: match[0].replace( rtrim, " " ) }); soFar = soFar.slice( matched.length ); } // Filters for ( type in Expr.filter ) { if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || (match = preFilters[ type ]( match ))) ) { matched = match.shift(); tokens.push({ value: matched, type: type, matches: match }); soFar = soFar.slice( matched.length ); } } if ( !matched ) { break; } } // Return the length of the invalid excess // if we're just parsing // Otherwise, throw an error or return tokens return parseOnly ? soFar.length : soFar ? Sizzle.error( selector ) : // Cache the tokens tokenCache( selector, groups ).slice( 0 ); }; function toSelector( tokens ) { var i = 0, len = tokens.length, selector = ""; for ( ; i < len; i++ ) { selector += tokens[i].value; } return selector; } function addCombinator( matcher, combinator, base ) { var dir = combinator.dir, skip = combinator.next, key = skip || dir, checkNonElements = base && key === "parentNode", doneName = done++; return combinator.first ? // Check against closest ancestor/preceding element function( elem, context, xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { return matcher( elem, context, xml ); } } return false; } : // Check against all ancestor/preceding elements function( elem, context, xml ) { var oldCache, uniqueCache, outerCache, newCache = [ dirruns, doneName ]; // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching if ( xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { if ( matcher( elem, context, xml ) ) { return true; } } } } else { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { outerCache = elem[ expando ] || (elem[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); if ( skip && skip === elem.nodeName.toLowerCase() ) { elem = elem[ dir ] || elem; } else if ( (oldCache = uniqueCache[ key ]) && oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { // Assign to newCache so results back-propagate to previous elements return (newCache[ 2 ] = oldCache[ 2 ]); } else { // Reuse newcache so results back-propagate to previous elements uniqueCache[ key ] = newCache; // A match means we're done; a fail means we have to keep checking if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { return true; } } } } } return false; }; } function elementMatcher( matchers ) { return matchers.length > 1 ? function( elem, context, xml ) { var i = matchers.length; while ( i-- ) { if ( !matchers[i]( elem, context, xml ) ) { return false; } } return true; } : matchers[0]; } function multipleContexts( selector, contexts, results ) { var i = 0, len = contexts.length; for ( ; i < len; i++ ) { Sizzle( selector, contexts[i], results ); } return results; } function condense( unmatched, map, filter, context, xml ) { var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null; for ( ; i < len; i++ ) { if ( (elem = unmatched[i]) ) { if ( !filter || filter( elem, context, xml ) ) { newUnmatched.push( elem ); if ( mapped ) { map.push( i ); } } } } return newUnmatched; } function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { if ( postFilter && !postFilter[ expando ] ) { postFilter = setMatcher( postFilter ); } if ( postFinder && !postFinder[ expando ] ) { postFinder = setMatcher( postFinder, postSelector ); } return markFunction(function( seed, results, context, xml ) { var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, // Get initial elements from seed or context elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), // Prefilter to get matcher input, preserving a map for seed-results synchronization matcherIn = preFilter && ( seed || !selector ) ? condense( elems, preMap, preFilter, context, xml ) : elems, matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, postFinder || ( seed ? preFilter : preexisting || postFilter ) ? // ...intermediate processing is necessary [] : // ...otherwise use results directly results : matcherIn; // Find primary matches if ( matcher ) { matcher( matcherIn, matcherOut, context, xml ); } // Apply postFilter if ( postFilter ) { temp = condense( matcherOut, postMap ); postFilter( temp, [], context, xml ); // Un-match failing elements by moving them back to matcherIn i = temp.length; while ( i-- ) { if ( (elem = temp[i]) ) { matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); } } } if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { // Get the final matcherOut by condensing this intermediate into postFinder contexts temp = []; i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) ) { // Restore matcherIn since elem is not yet a final match temp.push( (matcherIn[i] = elem) ); } } postFinder( null, (matcherOut = []), temp, xml ); } // Move matched elements from seed to results to keep them synchronized i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) && (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { seed[temp] = !(results[temp] = elem); } } } // Add elements to results, through postFinder if defined } else { matcherOut = condense( matcherOut === results ? matcherOut.splice( preexisting, matcherOut.length ) : matcherOut ); if ( postFinder ) { postFinder( null, results, matcherOut, xml ); } else { push.apply( results, matcherOut ); } } }); } function matcherFromTokens( tokens ) { var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[ tokens[0].type ], implicitRelative = leadingRelative || Expr.relative[" "], i = leadingRelative ? 1 : 0, // The foundational matcher ensures that elements are reachable from top-level context(s) matchContext = addCombinator( function( elem ) { return elem === checkContext; }, implicitRelative, true ), matchAnyContext = addCombinator( function( elem ) { return indexOf( checkContext, elem ) > -1; }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( (checkContext = context).nodeType ? matchContext( elem, context, xml ) : matchAnyContext( elem, context, xml ) ); // Avoid hanging onto element (issue #299) checkContext = null; return ret; } ]; for ( ; i < len; i++ ) { if ( (matcher = Expr.relative[ tokens[i].type ]) ) { matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; } else { matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); // Return special upon seeing a positional matcher if ( matcher[ expando ] ) { // Find the next relative operator (if any) for proper handling j = ++i; for ( ; j < len; j++ ) { if ( Expr.relative[ tokens[j].type ] ) { break; } } return setMatcher( i > 1 && elementMatcher( matchers ), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*` tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) ).replace( rtrim, "$1" ), matcher, i < j && matcherFromTokens( tokens.slice( i, j ) ), j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), j < len && toSelector( tokens ) ); } matchers.push( matcher ); } } return elementMatcher( matchers ); } function matcherFromGroupMatchers( elementMatchers, setMatchers ) { var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function( seed, context, xml, results, outermost ) { var elem, j, matcher, matchedCount = 0, i = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, // We must always have either seed elements or outermost context elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), // Use integer dirruns iff this is the outermost matcher dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), len = elems.length; if ( outermost ) { outermostContext = context === document || context || outermost; } // Add elements passing elementMatchers directly to results // Support: IE<9, Safari // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id for ( ; i !== len && (elem = elems[i]) != null; i++ ) { if ( byElement && elem ) { j = 0; if ( !context && elem.ownerDocument !== document ) { setDocument( elem ); xml = !documentIsHTML; } while ( (matcher = elementMatchers[j++]) ) { if ( matcher( elem, context || document, xml) ) { results.push( elem ); break; } } if ( outermost ) { dirruns = dirrunsUnique; } } // Track unmatched elements for set filters if ( bySet ) { // They will have gone through all possible matchers if ( (elem = !matcher && elem) ) { matchedCount--; } // Lengthen the array for every element, matched or not if ( seed ) { unmatched.push( elem ); } } } // `i` is now the count of elements visited above, and adding it to `matchedCount` // makes the latter nonnegative. matchedCount += i; // Apply set filters to unmatched elements // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` // equals `i`), unless we didn't visit _any_ elements in the above loop because we have // no element matchers and no seed. // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that // case, which will result in a "00" `matchedCount` that differs from `i` but is also // numerically zero. if ( bySet && i !== matchedCount ) { j = 0; while ( (matcher = setMatchers[j++]) ) { matcher( unmatched, setMatched, context, xml ); } if ( seed ) { // Reintegrate element matches to eliminate the need for sorting if ( matchedCount > 0 ) { while ( i-- ) { if ( !(unmatched[i] || setMatched[i]) ) { setMatched[i] = pop.call( results ); } } } // Discard index placeholder values to get only actual matches setMatched = condense( setMatched ); } // Add matches to results push.apply( results, setMatched ); // Seedless set matches succeeding multiple successful matchers stipulate sorting if ( outermost && !seed && setMatched.length > 0 && ( matchedCount + setMatchers.length ) > 1 ) { Sizzle.uniqueSort( results ); } } // Override manipulation of globals by nested matchers if ( outermost ) { dirruns = dirrunsUnique; outermostContext = contextBackup; } return unmatched; }; return bySet ? markFunction( superMatcher ) : superMatcher; } compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { var i, setMatchers = [], elementMatchers = [], cached = compilerCache[ selector + " " ]; if ( !cached ) { // Generate a function of recursive functions that can be used to check each element if ( !match ) { match = tokenize( selector ); } i = match.length; while ( i-- ) { cached = matcherFromTokens( match[i] ); if ( cached[ expando ] ) { setMatchers.push( cached ); } else { elementMatchers.push( cached ); } } // Cache the compiled function cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); // Save selector and tokenization cached.selector = selector; } return cached; }; /** * A low-level selection function that works with Sizzle's compiled * selector functions * @param {String|Function} selector A selector or a pre-compiled * selector function built with Sizzle.compile * @param {Element} context * @param {Array} [results] * @param {Array} [seed] A set of elements to match against */ select = Sizzle.select = function( selector, context, results, seed ) { var i, tokens, token, type, find, compiled = typeof selector === "function" && selector, match = !seed && tokenize( (selector = compiled.selector || selector) ); results = results || []; // Try to minimize operations if there is only one selector in the list and no seed // (the latter of which guarantees us context) if ( match.length === 1 ) { // Reduce context if the leading compound selector is an ID tokens = match[0] = match[0].slice( 0 ); if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; if ( !context ) { return results; // Precompiled matchers will still verify ancestry, so step up a level } else if ( compiled ) { context = context.parentNode; } selector = selector.slice( tokens.shift().value.length ); } // Fetch a seed set for right-to-left matching i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; while ( i-- ) { token = tokens[i]; // Abort if we hit a combinator if ( Expr.relative[ (type = token.type) ] ) { break; } if ( (find = Expr.find[ type ]) ) { // Search, expanding context for leading sibling combinators if ( (seed = find( token.matches[0].replace( runescape, funescape ), rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context )) ) { // If seed is empty or no tokens remain, we can return early tokens.splice( i, 1 ); selector = seed.length && toSelector( tokens ); if ( !selector ) { push.apply( results, seed ); return results; } break; } } } } // Compile and execute a filtering function if one is not provided // Provide `match` to avoid retokenization if we modified the selector above ( compiled || compile( selector, match ) )( seed, context, !documentIsHTML, results, !context || rsibling.test( selector ) && testContext( context.parentNode ) || context ); return results; }; // One-time assignments // Sort stability support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; // Support: Chrome 14-35+ // Always assume duplicates if they aren't passed to the comparison function support.detectDuplicates = !!hasDuplicate; // Initialize against the default document setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // Detached nodes confoundingly follow *each other* support.sortDetached = assert(function( el ) { // Should return 1, but returns 4 (following) return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; }); // Support: IE<8 // Prevent attribute/property "interpolation" // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx if ( !assert(function( el ) { el.innerHTML = "<a href='#'></a>"; return el.firstChild.getAttribute("href") === "#" ; }) ) { addHandle( "type|href|height|width", function( elem, name, isXML ) { if ( !isXML ) { return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); } }); } // Support: IE<9 // Use defaultValue in place of getAttribute("value") if ( !support.attributes || !assert(function( el ) { el.innerHTML = "<input/>"; el.firstChild.setAttribute( "value", "" ); return el.firstChild.getAttribute( "value" ) === ""; }) ) { addHandle( "value", function( elem, name, isXML ) { if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { return elem.defaultValue; } }); } // Support: IE<9 // Use getAttributeNode to fetch booleans when getAttribute lies if ( !assert(function( el ) { return el.getAttribute("disabled") == null; }) ) { addHandle( booleans, function( elem, name, isXML ) { var val; if ( !isXML ) { return elem[ name ] === true ? name.toLowerCase() : (val = elem.getAttributeNode( name )) && val.specified ? val.value : null; } }); } return Sizzle; })( window ); jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; // Deprecated jQuery.expr[ ":" ] = jQuery.expr.pseudos; jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; jQuery.escapeSelector = Sizzle.escape; var dir = function( elem, dir, until ) { var matched = [], truncate = until !== undefined; while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { if ( elem.nodeType === 1 ) { if ( truncate && jQuery( elem ).is( until ) ) { break; } matched.push( elem ); } } return matched; }; var siblings = function( n, elem ) { var matched = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { matched.push( n ); } } return matched; }; var rneedsContext = jQuery.expr.match.needsContext; function nodeName( elem, name ) { return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); }; var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); // Implement the identical functionality for filter and not function winnow( elements, qualifier, not ) { if ( isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { return !!qualifier.call( elem, i, elem ) !== not; } ); } // Single element if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qualifier ) !== not; } ); } // Arraylike of elements (jQuery, arguments, Array) if ( typeof qualifier !== "string" ) { return jQuery.grep( elements, function( elem ) { return ( indexOf.call( qualifier, elem ) > -1 ) !== not; } ); } // Filtered directly for both simple and complex selectors return jQuery.filter( qualifier, elements, not ); } jQuery.filter = function( expr, elems, not ) { var elem = elems[ 0 ]; if ( not ) { expr = ":not(" + expr + ")"; } if ( elems.length === 1 && elem.nodeType === 1 ) { return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; } return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { return elem.nodeType === 1; } ) ); }; jQuery.fn.extend( { find: function( selector ) { var i, ret, len = this.length, self = this; if ( typeof selector !== "string" ) { return this.pushStack( jQuery( selector ).filter( function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } } ) ); } ret = this.pushStack( [] ); for ( i = 0; i < len; i++ ) { jQuery.find( selector, self[ i ], ret ); } return len > 1 ? jQuery.uniqueSort( ret ) : ret; }, filter: function( selector ) { return this.pushStack( winnow( this, selector || [], false ) ); }, not: function( selector ) { return this.pushStack( winnow( this, selector || [], true ) ); }, is: function( selector ) { return !!winnow( this, // If this is a positional/relative selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". typeof selector === "string" && rneedsContext.test( selector ) ? jQuery( selector ) : selector || [], false ).length; } } ); // Initialize a jQuery object // A central reference to the root jQuery(document) var rootjQuery, // A simple way to check for HTML strings // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) // Shortcut simple #id case for speed rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery.fn.init = function( selector, context, root ) { var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false) if ( !selector ) { return this; } // Method init() accepts an alternate rootjQuery // so migrate can support jQuery.sub (gh-2101) root = root || rootjQuery; // Handle HTML strings if ( typeof selector === "string" ) { if ( selector[ 0 ] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; } else { match = rquickExpr.exec( selector ); } // Match html or make sure no context is specified for #id if ( match && ( match[ 1 ] || !context ) ) { // HANDLE: $(html) -> $(array) if ( match[ 1 ] ) { context = context instanceof jQuery ? context[ 0 ] : context; // Option to run scripts is true for back-compat // Intentionally let the error be thrown if parseHTML is not present jQuery.merge( this, jQuery.parseHTML( match[ 1 ], context && context.nodeType ? context.ownerDocument || context : document, true ) ); // HANDLE: $(html, props) if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { for ( match in context ) { // Properties of context are called as methods if possible if ( isFunction( this[ match ] ) ) { this[ match ]( context[ match ] ); // ...and otherwise set as attributes } else { this.attr( match, context[ match ] ); } } } return this; // HANDLE: $(#id) } else { elem = document.getElementById( match[ 2 ] ); if ( elem ) { // Inject the element directly into the jQuery object this[ 0 ] = elem; this.length = 1; } return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return ( context || root ).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(DOMElement) } else if ( selector.nodeType ) { this[ 0 ] = selector; this.length = 1; return this; // HANDLE: $(function) // Shortcut for document ready } else if ( isFunction( selector ) ) { return root.ready !== undefined ? root.ready( selector ) : // Execute immediately if ready is not present selector( jQuery ); } return jQuery.makeArray( selector, this ); }; // Give the init function the jQuery prototype for later instantiation init.prototype = jQuery.fn; // Initialize central reference rootjQuery = jQuery( document ); var rparentsprev = /^(?:parents|prev(?:Until|All))/, // Methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.fn.extend( { has: function( target ) { var targets = jQuery( target, this ), l = targets.length; return this.filter( function() { var i = 0; for ( ; i < l; i++ ) { if ( jQuery.contains( this, targets[ i ] ) ) { return true; } } } ); }, closest: function( selectors, context ) { var cur, i = 0, l = this.length, matched = [], targets = typeof selectors !== "string" && jQuery( selectors ); // Positional selectors never match, since there's no _selection_ context if ( !rneedsContext.test( selectors ) ) { for ( ; i < l; i++ ) { for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { // Always skip document fragments if ( cur.nodeType < 11 && ( targets ? targets.index( cur ) > -1 : // Don't pass non-elements to Sizzle cur.nodeType === 1 && jQuery.find.matchesSelector( cur, selectors ) ) ) { matched.push( cur ); break; } } } } return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); }, // Determine the position of an element within the set index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; } // Index in selector if ( typeof elem === "string" ) { return indexOf.call( jQuery( elem ), this[ 0 ] ); } // Locate the position of the desired element return indexOf.call( this, // If it receives a jQuery object, the first element is used elem.jquery ? elem[ 0 ] : elem ); }, add: function( selector, context ) { return this.pushStack( jQuery.uniqueSort( jQuery.merge( this.get(), jQuery( selector, context ) ) ) ); }, addBack: function( selector ) { return this.add( selector == null ? this.prevObject : this.prevObject.filter( selector ) ); } } ); function sibling( cur, dir ) { while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} return cur; } jQuery.each( { parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { return dir( elem, "parentNode", until ); }, next: function( elem ) { return sibling( elem, "nextSibling" ); }, prev: function( elem ) { return sibling( elem, "previousSibling" ); }, nextAll: function( elem ) { return dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { return dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { return dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return siblings( ( elem.parentNode || {} ).firstChild, elem ); }, children: function( elem ) { return siblings( elem.firstChild ); }, contents: function( elem ) { if ( nodeName( elem, "iframe" ) ) { return elem.contentDocument; } // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only // Treat the template element as a regular one in browsers that // don't support it. if ( nodeName( elem, "template" ) ) { elem = elem.content || elem; } return jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var matched = jQuery.map( this, fn, until ); if ( name.slice( -5 ) !== "Until" ) { selector = until; } if ( selector && typeof selector === "string" ) { matched = jQuery.filter( selector, matched ); } if ( this.length > 1 ) { // Remove duplicates if ( !guaranteedUnique[ name ] ) { jQuery.uniqueSort( matched ); } // Reverse order for parents* and prev-derivatives if ( rparentsprev.test( name ) ) { matched.reverse(); } } return this.pushStack( matched ); }; } ); var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); // Convert String-formatted options into Object-formatted ones function createOptions( options ) { var object = {}; jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { object[ flag ] = true; } ); return object; } /* * Create a callback list using the following parameters: * * options: an optional list of space-separated options that will change how * the callback list behaves or a more traditional option object * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible options: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function( options ) { // Convert options from String-formatted to Object-formatted if needed // (we check in cache first) options = typeof options === "string" ? createOptions( options ) : jQuery.extend( {}, options ); var // Flag to know if list is currently firing firing, // Last fire value for non-forgettable lists memory, // Flag to know if list was already fired fired, // Flag to prevent firing locked, // Actual callback list list = [], // Queue of execution data for repeatable lists queue = [], // Index of currently firing callback (modified by add/remove as needed) firingIndex = -1, // Fire callbacks fire = function() { // Enforce single-firing locked = locked || options.once; // Execute callbacks for all pending executions, // respecting firingIndex overrides and runtime changes fired = firing = true; for ( ; queue.length; firingIndex = -1 ) { memory = queue.shift(); while ( ++firingIndex < list.length ) { // Run callback and check for early termination if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && options.stopOnFalse ) { // Jump to end and forget the data so .add doesn't re-fire firingIndex = list.length; memory = false; } } } // Forget the data if we're done with it if ( !options.memory ) { memory = false; } firing = false; // Clean up if we're done firing for good if ( locked ) { // Keep an empty list if we have data for future add calls if ( memory ) { list = []; // Otherwise, this object is spent } else { list = ""; } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { // If we have memory from a past run, we should fire after adding if ( memory && !firing ) { firingIndex = list.length - 1; queue.push( memory ); } ( function add( args ) { jQuery.each( args, function( _, arg ) { if ( isFunction( arg ) ) { if ( !options.unique || !self.has( arg ) ) { list.push( arg ); } } else if ( arg && arg.length && toType( arg ) !== "string" ) { // Inspect recursively add( arg ); } } ); } )( arguments ); if ( memory && !firing ) { fire(); } } return this; }, // Remove a callback from the list remove: function() { jQuery.each( arguments, function( _, arg ) { var index; while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { list.splice( index, 1 ); // Handle firing indexes if ( index <= firingIndex ) { firingIndex--; } } } ); return this; }, // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function( fn ) { return fn ? jQuery.inArray( fn, list ) > -1 : list.length > 0; }, // Remove all callbacks from the list empty: function() { if ( list ) { list = []; } return this; }, // Disable .fire and .add // Abort any current/pending executions // Clear all callbacks and values disable: function() { locked = queue = []; list = memory = ""; return this; }, disabled: function() { return !list; }, // Disable .fire // Also disable .add unless we have memory (since it would have no effect) // Abort any pending executions lock: function() { locked = queue = []; if ( !memory && !firing ) { list = memory = ""; } return this; }, locked: function() { return !!locked; }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { if ( !locked ) { args = args || []; args = [ context, args.slice ? args.slice() : args ]; queue.push( args ); if ( !firing ) { fire(); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!fired; } }; return self; }; function Identity( v ) { return v; } function Thrower( ex ) { throw ex; } function adoptValue( value, resolve, reject, noValue ) { var method; try { // Check for promise aspect first to privilege synchronous behavior if ( value && isFunction( ( method = value.promise ) ) ) { method.call( value ).done( resolve ).fail( reject ); // Other thenables } else if ( value && isFunction( ( method = value.then ) ) ) { method.call( value, resolve, reject ); // Other non-thenables } else { // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: // * false: [ value ].slice( 0 ) => resolve( value ) // * true: [ value ].slice( 1 ) => resolve() resolve.apply( undefined, [ value ].slice( noValue ) ); } // For Promises/A+, convert exceptions into rejections // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in // Deferred#then to conditionally suppress rejection. } catch ( value ) { // Support: Android 4.0 only // Strict mode functions invoked without .call/.apply get global-object context reject.apply( undefined, [ value ] ); } } jQuery.extend( { Deferred: function( func ) { var tuples = [ // action, add listener, callbacks, // ... .then handlers, argument index, [final state] [ "notify", "progress", jQuery.Callbacks( "memory" ), jQuery.Callbacks( "memory" ), 2 ], [ "resolve", "done", jQuery.Callbacks( "once memory" ), jQuery.Callbacks( "once memory" ), 0, "resolved" ], [ "reject", "fail", jQuery.Callbacks( "once memory" ), jQuery.Callbacks( "once memory" ), 1, "rejected" ] ], state = "pending", promise = { state: function() { return state; }, always: function() { deferred.done( arguments ).fail( arguments ); return this; }, "catch": function( fn ) { return promise.then( null, fn ); }, // Keep pipe for back-compat pipe: function( /* fnDone, fnFail, fnProgress */ ) { var fns = arguments; return jQuery.Deferred( function( newDefer ) { jQuery.each( tuples, function( i, tuple ) { // Map tuples (progress, done, fail) to arguments (done, fail, progress) var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; // deferred.progress(function() { bind to newDefer or newDefer.notify }) // deferred.done(function() { bind to newDefer or newDefer.resolve }) // deferred.fail(function() { bind to newDefer or newDefer.reject }) deferred[ tuple[ 1 ] ]( function() { var returned = fn && fn.apply( this, arguments ); if ( returned && isFunction( returned.promise ) ) { returned.promise() .progress( newDefer.notify ) .done( newDefer.resolve ) .fail( newDefer.reject ); } else { newDefer[ tuple[ 0 ] + "With" ]( this, fn ? [ returned ] : arguments ); } } ); } ); fns = null; } ).promise(); }, then: function( onFulfilled, onRejected, onProgress ) { var maxDepth = 0; function resolve( depth, deferred, handler, special ) { return function() { var that = this, args = arguments, mightThrow = function() { var returned, then; // Support: Promises/A+ section 2.3.3.3.3 // https://promisesaplus.com/#point-59 // Ignore double-resolution attempts if ( depth < maxDepth ) { return; } returned = handler.apply( that, args ); // Support: Promises/A+ section 2.3.1 // https://promisesaplus.com/#point-48 if ( returned === deferred.promise() ) { throw new TypeError( "Thenable self-resolution" ); } // Support: Promises/A+ sections 2.3.3.1, 3.5 // https://promisesaplus.com/#point-54 // https://promisesaplus.com/#point-75 // Retrieve `then` only once then = returned && // Support: Promises/A+ section 2.3.4 // https://promisesaplus.com/#point-64 // Only check objects and functions for thenability ( typeof returned === "object" || typeof returned === "function" ) && returned.then; // Handle a returned thenable if ( isFunction( then ) ) { // Special processors (notify) just wait for resolution if ( special ) { then.call( returned, resolve( maxDepth, deferred, Identity, special ), resolve( maxDepth, deferred, Thrower, special ) ); // Normal processors (resolve) also hook into progress } else { // ...and disregard older resolution values maxDepth++; then.call( returned, resolve( maxDepth, deferred, Identity, special ), resolve( maxDepth, deferred, Thrower, special ), resolve( maxDepth, deferred, Identity, deferred.notifyWith ) ); } // Handle all other returned values } else { // Only substitute handlers pass on context // and multiple values (non-spec behavior) if ( handler !== Identity ) { that = undefined; args = [ returned ]; } // Process the value(s) // Default process is resolve ( special || deferred.resolveWith )( that, args ); } }, // Only normal processors (resolve) catch and reject exceptions process = special ? mightThrow : function() { try { mightThrow(); } catch ( e ) { if ( jQuery.Deferred.exceptionHook ) { jQuery.Deferred.exceptionHook( e, process.stackTrace ); } // Support: Promises/A+ section 2.3.3.3.4.1 // https://promisesaplus.com/#point-61 // Ignore post-resolution exceptions if ( depth + 1 >= maxDepth ) { // Only substitute handlers pass on context // and multiple values (non-spec behavior) if ( handler !== Thrower ) { that = undefined; args = [ e ]; } deferred.rejectWith( that, args ); } } }; // Support: Promises/A+ section 2.3.3.3.1 // https://promisesaplus.com/#point-57 // Re-resolve promises immediately to dodge false rejection from // subsequent errors if ( depth ) { process(); } else { // Call an optional hook to record the stack, in case of exception // since it's otherwise lost when execution goes async if ( jQuery.Deferred.getStackHook ) { process.stackTrace = jQuery.Deferred.getStackHook(); } window.setTimeout( process ); } }; } return jQuery.Deferred( function( newDefer ) { // progress_handlers.add( ... ) tuples[ 0 ][ 3 ].add( resolve( 0, newDefer, isFunction( onProgress ) ? onProgress : Identity, newDefer.notifyWith ) ); // fulfilled_handlers.add( ... ) tuples[ 1 ][ 3 ].add( resolve( 0, newDefer, isFunction( onFulfilled ) ? onFulfilled : Identity ) ); // rejected_handlers.add( ... ) tuples[ 2 ][ 3 ].add( resolve( 0, newDefer, isFunction( onRejected ) ? onRejected : Thrower ) ); } ).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { return obj != null ? jQuery.extend( obj, promise ) : promise; } }, deferred = {}; // Add list-specific methods jQuery.each( tuples, function( i, tuple ) { var list = tuple[ 2 ], stateString = tuple[ 5 ]; // promise.progress = list.add // promise.done = list.add // promise.fail = list.add promise[ tuple[ 1 ] ] = list.add; // Handle state if ( stateString ) { list.add( function() { // state = "resolved" (i.e., fulfilled) // state = "rejected" state = stateString; }, // rejected_callbacks.disable // fulfilled_callbacks.disable tuples[ 3 - i ][ 2 ].disable, // rejected_handlers.disable // fulfilled_handlers.disable tuples[ 3 - i ][ 3 ].disable, // progress_callbacks.lock tuples[ 0 ][ 2 ].lock, // progress_handlers.lock tuples[ 0 ][ 3 ].lock ); } // progress_handlers.fire // fulfilled_handlers.fire // rejected_handlers.fire list.add( tuple[ 3 ].fire ); // deferred.notify = function() { deferred.notifyWith(...) } // deferred.resolve = function() { deferred.resolveWith(...) } // deferred.reject = function() { deferred.rejectWith(...) } deferred[ tuple[ 0 ] ] = function() { deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); return this; }; // deferred.notifyWith = list.fireWith // deferred.resolveWith = list.fireWith // deferred.rejectWith = list.fireWith deferred[ tuple[ 0 ] + "With" ] = list.fireWith; } ); // Make the deferred a promise promise.promise( deferred ); // Call given func if any if ( func ) { func.call( deferred, deferred ); } // All done! return deferred; }, // Deferred helper when: function( singleValue ) { var // count of uncompleted subordinates remaining = arguments.length, // count of unprocessed arguments i = remaining, // subordinate fulfillment data resolveContexts = Array( i ), resolveValues = slice.call( arguments ), // the master Deferred master = jQuery.Deferred(), // subordinate callback factory updateFunc = function( i ) { return function( value ) { resolveContexts[ i ] = this; resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; if ( !( --remaining ) ) { master.resolveWith( resolveContexts, resolveValues ); } }; }; // Single- and empty arguments are adopted like Promise.resolve if ( remaining <= 1 ) { adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, !remaining ); // Use .then() to unwrap secondary thenables (cf. gh-3000) if ( master.state() === "pending" || isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { return master.then(); } } // Multiple arguments are aggregated like Promise.all array elements while ( i-- ) { adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); } return master.promise(); } } ); // These usually indicate a programmer mistake during development, // warn about them ASAP rather than swallowing them by default. var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; jQuery.Deferred.exceptionHook = function( error, stack ) { // Support: IE 8 - 9 only // Console exists when dev tools are open, which can happen at any time if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); } }; jQuery.readyException = function( error ) { window.setTimeout( function() { throw error; } ); }; // The deferred used on DOM ready var readyList = jQuery.Deferred(); jQuery.fn.ready = function( fn ) { readyList .then( fn ) // Wrap jQuery.readyException in a function so that the lookup // happens at the time of error handling instead of callback // registration. .catch( function( error ) { jQuery.readyException( error ); } ); return this; }; jQuery.extend( { // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Handle when the DOM is ready ready: function( wait ) { // Abort if there are pending holds or we're already ready if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { return; } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.resolveWith( document, [ jQuery ] ); } } ); jQuery.ready.then = readyList.then; // The ready event handler and self cleanup method function completed() { document.removeEventListener( "DOMContentLoaded", completed ); window.removeEventListener( "load", completed ); jQuery.ready(); } // Catch cases where $(document).ready() is called // after the browser event has already occurred. // Support: IE <=9 - 10 only // Older IE sometimes signals "interactive" too soon if ( document.readyState === "complete" || ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { // Handle it asynchronously to allow scripts the opportunity to delay ready window.setTimeout( jQuery.ready ); } else { // Use the handy event callback document.addEventListener( "DOMContentLoaded", completed ); // A fallback to window.onload, that will always work window.addEventListener( "load", completed ); } // Multifunctional method to get and set values of a collection // The value/s can optionally be executed if it's a function var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { var i = 0, len = elems.length, bulk = key == null; // Sets many values if ( toType( key ) === "object" ) { chainable = true; for ( i in key ) { access( elems, fn, i, key[ i ], true, emptyGet, raw ); } // Sets one value } else if ( value !== undefined ) { chainable = true; if ( !isFunction( value ) ) { raw = true; } if ( bulk ) { // Bulk operations run against the entire set if ( raw ) { fn.call( elems, value ); fn = null; // ...except when executing function values } else { bulk = fn; fn = function( elem, key, value ) { return bulk.call( jQuery( elem ), value ); }; } } if ( fn ) { for ( ; i < len; i++ ) { fn( elems[ i ], key, raw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) ) ); } } } if ( chainable ) { return elems; } // Gets if ( bulk ) { return fn.call( elems ); } return len ? fn( elems[ 0 ], key ) : emptyGet; }; // Matches dashed string for camelizing var rmsPrefix = /^-ms-/, rdashAlpha = /-([a-z])/g; // Used by camelCase as callback to replace() function fcamelCase( all, letter ) { return letter.toUpperCase(); } // Convert dashed to camelCase; used by the css and data modules // Support: IE <=9 - 11, Edge 12 - 15 // Microsoft forgot to hump their vendor prefix (#9572) function camelCase( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); } var acceptData = function( owner ) { // Accepts only: // - Node // - Node.ELEMENT_NODE // - Node.DOCUMENT_NODE // - Object // - Any return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); }; function Data() { this.expando = jQuery.expando + Data.uid++; } Data.uid = 1; Data.prototype = { cache: function( owner ) { // Check if the owner object already has a cache var value = owner[ this.expando ]; // If not, create one if ( !value ) { value = {}; // We can accept data for non-element nodes in modern browsers, // but we should not, see #8335. // Always return an empty object. if ( acceptData( owner ) ) { // If it is a node unlikely to be stringify-ed or looped over // use plain assignment if ( owner.nodeType ) { owner[ this.expando ] = value; // Otherwise secure it in a non-enumerable property // configurable must be true to allow the property to be // deleted when data is removed } else { Object.defineProperty( owner, this.expando, { value: value, configurable: true } ); } } } return value; }, set: function( owner, data, value ) { var prop, cache = this.cache( owner ); // Handle: [ owner, key, value ] args // Always use camelCase key (gh-2257) if ( typeof data === "string" ) { cache[ camelCase( data ) ] = value; // Handle: [ owner, { properties } ] args } else { // Copy the properties one-by-one to the cache object for ( prop in data ) { cache[ camelCase( prop ) ] = data[ prop ]; } } return cache; }, get: function( owner, key ) { return key === undefined ? this.cache( owner ) : // Always use camelCase key (gh-2257) owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; }, access: function( owner, key, value ) { // In cases where either: // // 1. No key was specified // 2. A string key was specified, but no value provided // // Take the "read" path and allow the get method to determine // which value to return, respectively either: // // 1. The entire cache object // 2. The data stored at the key // if ( key === undefined || ( ( key && typeof key === "string" ) && value === undefined ) ) { return this.get( owner, key ); } // When the key is not a string, or both a key and value // are specified, set or extend (existing objects) with either: // // 1. An object of properties // 2. A key and value // this.set( owner, key, value ); // Since the "set" path can have two possible entry points // return the expected data based on which path was taken[*] return value !== undefined ? value : key; }, remove: function( owner, key ) { var i, cache = owner[ this.expando ]; if ( cache === undefined ) { return; } if ( key !== undefined ) { // Support array or space separated string of keys if ( Array.isArray( key ) ) { // If key is an array of keys... // We always set camelCase keys, so remove that. key = key.map( camelCase ); } else { key = camelCase( key ); // If a key with the spaces exists, use it. // Otherwise, create an array by matching non-whitespace key = key in cache ? [ key ] : ( key.match( rnothtmlwhite ) || [] ); } i = key.length; while ( i-- ) { delete cache[ key[ i ] ]; } } // Remove the expando if there's no more data if ( key === undefined || jQuery.isEmptyObject( cache ) ) { // Support: Chrome <=35 - 45 // Webkit & Blink performance suffers when deleting properties // from DOM nodes, so set to undefined instead // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) if ( owner.nodeType ) { owner[ this.expando ] = undefined; } else { delete owner[ this.expando ]; } } }, hasData: function( owner ) { var cache = owner[ this.expando ]; return cache !== undefined && !jQuery.isEmptyObject( cache ); } }; var dataPriv = new Data(); var dataUser = new Data(); // Implementation Summary // // 1. Enforce API surface and semantic compatibility with 1.9.x branch // 2. Improve the module's maintainability by reducing the storage // paths to a single mechanism. // 3. Use the same single mechanism to support "private" and "user" data. // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) // 5. Avoid exposing implementation details on user objects (eg. expando properties) // 6. Provide a clear path for implementation upgrade to WeakMap in 2014 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /[A-Z]/g; function getData( data ) { if ( data === "true" ) { return true; } if ( data === "false" ) { return false; } if ( data === "null" ) { return null; } // Only convert to a number if it doesn't change the string if ( data === +data + "" ) { return +data; } if ( rbrace.test( data ) ) { return JSON.parse( data ); } return data; } function dataAttr( elem, key, data ) { var name; // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { data = getData( data ); } catch ( e ) {} // Make sure we set the data so it isn't changed later dataUser.set( elem, key, data ); } else { data = undefined; } } return data; } jQuery.extend( { hasData: function( elem ) { return dataUser.hasData( elem ) || dataPriv.hasData( elem ); }, data: function( elem, name, data ) { return dataUser.access( elem, name, data ); }, removeData: function( elem, name ) { dataUser.remove( elem, name ); }, // TODO: Now that all calls to _data and _removeData have been replaced // with direct calls to dataPriv methods, these can be deprecated. _data: function( elem, name, data ) { return dataPriv.access( elem, name, data ); }, _removeData: function( elem, name ) { dataPriv.remove( elem, name ); } } ); jQuery.fn.extend( { data: function( key, value ) { var i, name, data, elem = this[ 0 ], attrs = elem && elem.attributes; // Gets all values if ( key === undefined ) { if ( this.length ) { data = dataUser.get( elem ); if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { i = attrs.length; while ( i-- ) { // Support: IE 11 only // The attrs elements can be null (#14894) if ( attrs[ i ] ) { name = attrs[ i ].name; if ( name.indexOf( "data-" ) === 0 ) { name = camelCase( name.slice( 5 ) ); dataAttr( elem, name, data[ name ] ); } } } dataPriv.set( elem, "hasDataAttrs", true ); } } return data; } // Sets multiple values if ( typeof key === "object" ) { return this.each( function() { dataUser.set( this, key ); } ); } return access( this, function( value ) { var data; // The calling jQuery object (element matches) is not empty // (and therefore has an element appears at this[ 0 ]) and the // `value` parameter was not undefined. An empty jQuery object // will result in `undefined` for elem = this[ 0 ] which will // throw an exception if an attempt to read a data cache is made. if ( elem && value === undefined ) { // Attempt to get data from the cache // The key will always be camelCased in Data data = dataUser.get( elem, key ); if ( data !== undefined ) { return data; } // Attempt to "discover" the data in // HTML5 custom data-* attrs data = dataAttr( elem, key ); if ( data !== undefined ) { return data; } // We tried really hard, but the data doesn't exist. return; } // Set the data... this.each( function() { // We always store the camelCased key dataUser.set( this, key, value ); } ); }, null, value, arguments.length > 1, null, true ); }, removeData: function( key ) { return this.each( function() { dataUser.remove( this, key ); } ); } } ); jQuery.extend( { queue: function( elem, type, data ) { var queue; if ( elem ) { type = ( type || "fx" ) + "queue"; queue = dataPriv.get( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { if ( !queue || Array.isArray( data ) ) { queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); } else { queue.push( data ); } } return queue || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks( elem, type ), next = function() { jQuery.dequeue( elem, type ); }; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); startLength--; } if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift( "inprogress" ); } // Clear up the last queue stop function delete hooks.stop; fn.call( elem, next, hooks ); } if ( !startLength && hooks ) { hooks.empty.fire(); } }, // Not public - generate a queueHooks object, or return the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { empty: jQuery.Callbacks( "once memory" ).add( function() { dataPriv.remove( elem, [ type + "queue", key ] ); } ) } ); } } ); jQuery.fn.extend( { queue: function( type, data ) { var setter = 2; if ( typeof type !== "string" ) { data = type; type = "fx"; setter--; } if ( arguments.length < setter ) { return jQuery.queue( this[ 0 ], type ); } return data === undefined ? this : this.each( function() { var queue = jQuery.queue( this, type, data ); // Ensure a hooks for this queue jQuery._queueHooks( this, type ); if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { jQuery.dequeue( this, type ); } } ); }, dequeue: function( type ) { return this.each( function() { jQuery.dequeue( this, type ); } ); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, obj ) { var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } }; if ( typeof type !== "string" ) { obj = type; type = undefined; } type = type || "fx"; while ( i-- ) { tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); if ( tmp && tmp.empty ) { count++; tmp.empty.add( resolve ); } } resolve(); return defer.promise( obj ); } } ); var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; var isHiddenWithinTree = function( elem, el ) { // isHiddenWithinTree might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; // Inline style trumps all return elem.style.display === "none" || elem.style.display === "" && // Otherwise, check computed style // Support: Firefox <=43 - 45 // Disconnected elements can have computed display: none, so first confirm that elem is // in the document. jQuery.contains( elem.ownerDocument, elem ) && jQuery.css( elem, "display" ) === "none"; }; var swap = function( elem, options, callback, args ) { var ret, name, old = {}; // Remember the old values, and insert the new ones for ( name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } ret = callback.apply( elem, args || [] ); // Revert the old values for ( name in options ) { elem.style[ name ] = old[ name ]; } return ret; }; function adjustCSS( elem, prop, valueParts, tween ) { var adjusted, scale, maxIterations = 20, currentValue = tween ? function() { return tween.cur(); } : function() { return jQuery.css( elem, prop, "" ); }, initial = currentValue(), unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), // Starting value computation is required for potential unit mismatches initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && rcssNum.exec( jQuery.css( elem, prop ) ); if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { // Support: Firefox <=54 // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) initial = initial / 2; // Trust units reported by jQuery.css unit = unit || initialInUnit[ 3 ]; // Iteratively approximate from a nonzero starting point initialInUnit = +initial || 1; while ( maxIterations-- ) { // Evaluate and update our best guess (doubling guesses that zero out). // Finish if the scale equals or crosses 1 (making the old*new product non-positive). jQuery.style( elem, prop, initialInUnit + unit ); if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { maxIterations = 0; } initialInUnit = initialInUnit / scale; } initialInUnit = initialInUnit * 2; jQuery.style( elem, prop, initialInUnit + unit ); // Make sure we update the tween properties later on valueParts = valueParts || []; } if ( valueParts ) { initialInUnit = +initialInUnit || +initial || 0; // Apply relative offset (+=/-=) if specified adjusted = valueParts[ 1 ] ? initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : +valueParts[ 2 ]; if ( tween ) { tween.unit = unit; tween.start = initialInUnit; tween.end = adjusted; } } return adjusted; } var defaultDisplayMap = {}; function getDefaultDisplay( elem ) { var temp, doc = elem.ownerDocument, nodeName = elem.nodeName, display = defaultDisplayMap[ nodeName ]; if ( display ) { return display; } temp = doc.body.appendChild( doc.createElement( nodeName ) ); display = jQuery.css( temp, "display" ); temp.parentNode.removeChild( temp ); if ( display === "none" ) { display = "block"; } defaultDisplayMap[ nodeName ] = display; return display; } function showHide( elements, show ) { var display, elem, values = [], index = 0, length = elements.length; // Determine new display value for elements that need to change for ( ; index < length; index++ ) { elem = elements[ index ]; if ( !elem.style ) { continue; } display = elem.style.display; if ( show ) { // Since we force visibility upon cascade-hidden elements, an immediate (and slow) // check is required in this first loop unless we have a nonempty display value (either // inline or about-to-be-restored) if ( display === "none" ) { values[ index ] = dataPriv.get( elem, "display" ) || null; if ( !values[ index ] ) { elem.style.display = ""; } } if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { values[ index ] = getDefaultDisplay( elem ); } } else { if ( display !== "none" ) { values[ index ] = "none"; // Remember what we're overwriting dataPriv.set( elem, "display", display ); } } } // Set the display of the elements in a second loop to avoid constant reflow for ( index = 0; index < length; index++ ) { if ( values[ index ] != null ) { elements[ index ].style.display = values[ index ]; } } return elements; } jQuery.fn.extend( { show: function() { return showHide( this, true ); }, hide: function() { return showHide( this ); }, toggle: function( state ) { if ( typeof state === "boolean" ) { return state ? this.show() : this.hide(); } return this.each( function() { if ( isHiddenWithinTree( this ) ) { jQuery( this ).show(); } else { jQuery( this ).hide(); } } ); } } ); var rcheckableType = ( /^(?:checkbox|radio)$/i ); var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); // We have to close these tags to support XHTML (#13200) var wrapMap = { // Support: IE <=9 only option: [ 1, "<select multiple='multiple'>", "</select>" ], // XHTML parsers do not magically insert elements in the // same way that tag soup parsers do. So we cannot shorten // this by omitting <tbody> or other required elements. thead: [ 1, "<table>", "</table>" ], col: [ 2, "<table><colgroup>", "</colgroup></table>" ], tr: [ 2, "<table><tbody>", "</tbody></table>" ], td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], _default: [ 0, "", "" ] }; // Support: IE <=9 only wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; function getAll( context, tag ) { // Support: IE <=9 - 11 only // Use typeof to avoid zero-argument method invocation on host objects (#15151) var ret; if ( typeof context.getElementsByTagName !== "undefined" ) { ret = context.getElementsByTagName( tag || "*" ); } else if ( typeof context.querySelectorAll !== "undefined" ) { ret = context.querySelectorAll( tag || "*" ); } else { ret = []; } if ( tag === undefined || tag && nodeName( context, tag ) ) { return jQuery.merge( [ context ], ret ); } return ret; } // Mark scripts as having already been evaluated function setGlobalEval( elems, refElements ) { var i = 0, l = elems.length; for ( ; i < l; i++ ) { dataPriv.set( elems[ i ], "globalEval", !refElements || dataPriv.get( refElements[ i ], "globalEval" ) ); } } var rhtml = /<|&#?\w+;/; function buildFragment( elems, context, scripts, selection, ignored ) { var elem, tmp, tag, wrap, contains, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, l = elems.length; for ( ; i < l; i++ ) { elem = elems[ i ]; if ( elem || elem === 0 ) { // Add nodes directly if ( toType( elem ) === "object" ) { // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); // Convert non-html into a text node } else if ( !rhtml.test( elem ) ) { nodes.push( context.createTextNode( elem ) ); // Convert html into DOM nodes } else { tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); // Deserialize a standard representation tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); wrap = wrapMap[ tag ] || wrapMap._default; tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; // Descend through wrappers to the right content j = wrap[ 0 ]; while ( j-- ) { tmp = tmp.lastChild; } // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, tmp.childNodes ); // Remember the top-level container tmp = fragment.firstChild; // Ensure the created nodes are orphaned (#12392) tmp.textContent = ""; } } } // Remove wrapper from fragment fragment.textContent = ""; i = 0; while ( ( elem = nodes[ i++ ] ) ) { // Skip elements already in the context collection (trac-4087) if ( selection && jQuery.inArray( elem, selection ) > -1 ) { if ( ignored ) { ignored.push( elem ); } continue; } contains = jQuery.contains( elem.ownerDocument, elem ); // Append to fragment tmp = getAll( fragment.appendChild( elem ), "script" ); // Preserve script evaluation history if ( contains ) { setGlobalEval( tmp ); } // Capture executables if ( scripts ) { j = 0; while ( ( elem = tmp[ j++ ] ) ) { if ( rscriptType.test( elem.type || "" ) ) { scripts.push( elem ); } } } } return fragment; } ( function() { var fragment = document.createDocumentFragment(), div = fragment.appendChild( document.createElement( "div" ) ), input = document.createElement( "input" ); // Support: Android 4.0 - 4.3 only // Check state lost if the name is set (#11217) // Support: Windows Web Apps (WWA) // `name` and `type` must use .setAttribute for WWA (#14901) input.setAttribute( "type", "radio" ); input.setAttribute( "checked", "checked" ); input.setAttribute( "name", "t" ); div.appendChild( input ); // Support: Android <=4.1 only // Older WebKit doesn't clone checked state correctly in fragments support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; // Support: IE <=11 only // Make sure textarea (and checkbox) defaultValue is properly cloned div.innerHTML = "<textarea>x</textarea>"; support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; } )(); var documentElement = document.documentElement; var rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, rtypenamespace = /^([^.]*)(?:\.(.+)|)/; function returnTrue() { return true; } function returnFalse() { return false; } // Support: IE <=9 only // See #13393 for more info function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } } function on( elem, types, selector, data, fn, one ) { var origFn, type; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // ( types-Object, data ) data = data || selector; selector = undefined; } for ( type in types ) { on( elem, type, selector, data, types[ type ], one ); } return elem; } if ( data == null && fn == null ) { // ( types, fn ) fn = selector; data = selector = undefined; } else if ( fn == null ) { if ( typeof selector === "string" ) { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if ( fn === false ) { fn = returnFalse; } else if ( !fn ) { return elem; } if ( one === 1 ) { origFn = fn; fn = function( event ) { // Can use an empty set, since event contains the info jQuery().off( event ); return origFn.apply( this, arguments ); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); } return elem.each( function() { jQuery.event.add( this, types, fn, data, selector ); } ); } /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { global: {}, add: function( elem, types, handler, data, selector ) { var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get( elem ); // Don't attach events to noData or text/comment nodes (but allow plain objects) if ( !elemData ) { return; } // Caller can pass in an object of custom data in lieu of the handler if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; selector = handleObjIn.selector; } // Ensure that invalid selectors throw exceptions at attach time // Evaluate against documentElement in case elem is a non-element node (e.g., document) if ( selector ) { jQuery.find.matchesSelector( documentElement, selector ); } // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first if ( !( events = elemData.events ) ) { events = elemData.events = {}; } if ( !( eventHandle = elemData.handle ) ) { eventHandle = elemData.handle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply( elem, arguments ) : undefined; }; } // Handle multiple events separated by a space types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[ t ] ) || []; type = origType = tmp[ 1 ]; namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // There *must* be a type, no attaching namespace-only handlers if ( !type ) { continue; } // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; // If selector defined, determine special event api type, otherwise given type type = ( selector ? special.delegateType : special.bindType ) || type; // Update special based on newly reset type special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend( { type: type, origType: origType, data: data, handler: handler, guid: handler.guid, selector: selector, needsContext: selector && jQuery.expr.match.needsContext.test( selector ), namespace: namespaces.join( "." ) }, handleObjIn ); // Init the event handler queue if we're the first if ( !( handlers = events[ type ] ) ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener if the special events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if ( selector ) { handlers.splice( handlers.delegateCount++, 0, handleObj ); } else { handlers.push( handleObj ); } // Keep track of which events have ever been used, for event optimization jQuery.event.global[ type ] = true; } }, // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { var j, origCount, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); if ( !elemData || !( events = elemData.events ) ) { return; } // Once for each type.namespace in types; type may be omitted types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[ t ] ) || []; type = origType = tmp[ 1 ]; namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // Unbind all events (on this namespace, if provided) for the element if ( !type ) { for ( type in events ) { jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); } continue; } special = jQuery.event.special[ type ] || {}; type = ( selector ? special.delegateType : special.bindType ) || type; handlers = events[ type ] || []; tmp = tmp[ 2 ] && new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); // Remove matching events origCount = j = handlers.length; while ( j-- ) { handleObj = handlers[ j ]; if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !tmp || tmp.test( handleObj.namespace ) ) && ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { handlers.splice( j, 1 ); if ( handleObj.selector ) { handlers.delegateCount--; } if ( special.remove ) { special.remove.call( elem, handleObj ); } } } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( origCount && !handlers.length ) { if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } delete events[ type ]; } } // Remove data and the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { dataPriv.remove( elem, "handle events" ); } }, dispatch: function( nativeEvent ) { // Make a writable jQuery.Event from the native event object var event = jQuery.event.fix( nativeEvent ); var i, j, ret, matched, handleObj, handlerQueue, args = new Array( arguments.length ), handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[ 0 ] = event; for ( i = 1; i < arguments.length; i++ ) { args[ i ] = arguments[ i ]; } event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { return; } // Determine handlers handlerQueue = jQuery.event.handlers.call( this, event, handlers ); // Run delegates first; they may want to stop propagation beneath us i = 0; while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { event.currentTarget = matched.elem; j = 0; while ( ( handleObj = matched.handlers[ j++ ] ) && !event.isImmediatePropagationStopped() ) { // Triggered event must either 1) have no namespace, or 2) have namespace(s) // a subset or equal to those in the bound event (both can have no namespace). if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || handleObj.handler ).apply( matched.elem, args ); if ( ret !== undefined ) { if ( ( event.result = ret ) === false ) { event.preventDefault(); event.stopPropagation(); } } } } } // Call the postDispatch hook for the mapped type if ( special.postDispatch ) { special.postDispatch.call( this, event ); } return event.result; }, handlers: function( event, handlers ) { var i, handleObj, sel, matchedHandlers, matchedSelectors, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; // Find delegate handlers if ( delegateCount && // Support: IE <=9 // Black-hole SVG <use> instance trees (trac-13180) cur.nodeType && // Support: Firefox <=42 // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click // Support: IE 11 only // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) !( event.type === "click" && event.button >= 1 ) ) { for ( ; cur !== this; cur = cur.parentNode || this ) { // Don't check non-elements (#13208) // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { matchedHandlers = []; matchedSelectors = {}; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; // Don't conflict with Object.prototype properties (#13203) sel = handleObj.selector + " "; if ( matchedSelectors[ sel ] === undefined ) { matchedSelectors[ sel ] = handleObj.needsContext ? jQuery( sel, this ).index( cur ) > -1 : jQuery.find( sel, this, null, [ cur ] ).length; } if ( matchedSelectors[ sel ] ) { matchedHandlers.push( handleObj ); } } if ( matchedHandlers.length ) { handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); } } } } // Add the remaining (directly-bound) handlers cur = this; if ( delegateCount < handlers.length ) { handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); } return handlerQueue; }, addProp: function( name, hook ) { Object.defineProperty( jQuery.Event.prototype, name, { enumerable: true, configurable: true, get: isFunction( hook ) ? function() { if ( this.originalEvent ) { return hook( this.originalEvent ); } } : function() { if ( this.originalEvent ) { return this.originalEvent[ name ]; } }, set: function( value ) { Object.defineProperty( this, name, { enumerable: true, configurable: true, writable: true, value: value } ); } } ); }, fix: function( originalEvent ) { return originalEvent[ jQuery.expando ] ? originalEvent : new jQuery.Event( originalEvent ); }, special: { load: { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, focus: { // Fire native event if possible so blur/focus sequence is correct trigger: function() { if ( this !== safeActiveElement() && this.focus ) { this.focus(); return false; } }, delegateType: "focusin" }, blur: { trigger: function() { if ( this === safeActiveElement() && this.blur ) { this.blur(); return false; } }, delegateType: "focusout" }, click: { // For checkbox, fire native event so checked state will be right trigger: function() { if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) { this.click(); return false; } }, // For cross-browser consistency, don't fire native .click() on links _default: function( event ) { return nodeName( event.target, "a" ); } }, beforeunload: { postDispatch: function( event ) { // Support: Firefox 20+ // Firefox doesn't alert if the returnValue field is not set. if ( event.result !== undefined && event.originalEvent ) { event.originalEvent.returnValue = event.result; } } } } }; jQuery.removeEvent = function( elem, type, handle ) { // This "if" is needed for plain objects if ( elem.removeEventListener ) { elem.removeEventListener( type, handle ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !( this instanceof jQuery.Event ) ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && // Support: Android <=2.3 only src.returnValue === false ? returnTrue : returnFalse; // Create target properties // Support: Safari <=6 - 7 only // Target should not be a text node (#504, #13143) this.target = ( src.target && src.target.nodeType === 3 ) ? src.target.parentNode : src.target; this.currentTarget = src.currentTarget; this.relatedTarget = src.relatedTarget; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || Date.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { constructor: jQuery.Event, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, isSimulated: false, preventDefault: function() { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; if ( e && !this.isSimulated ) { e.preventDefault(); } }, stopPropagation: function() { var e = this.originalEvent; this.isPropagationStopped = returnTrue; if ( e && !this.isSimulated ) { e.stopPropagation(); } }, stopImmediatePropagation: function() { var e = this.originalEvent; this.isImmediatePropagationStopped = returnTrue; if ( e && !this.isSimulated ) { e.stopImmediatePropagation(); } this.stopPropagation(); } }; // Includes all common event props including KeyEvent and MouseEvent specific props jQuery.each( { altKey: true, bubbles: true, cancelable: true, changedTouches: true, ctrlKey: true, detail: true, eventPhase: true, metaKey: true, pageX: true, pageY: true, shiftKey: true, view: true, "char": true, charCode: true, key: true, keyCode: true, button: true, buttons: true, clientX: true, clientY: true, offsetX: true, offsetY: true, pointerId: true, pointerType: true, screenX: true, screenY: true, targetTouches: true, toElement: true, touches: true, which: function( event ) { var button = event.button; // Add which for key events if ( event.which == null && rkeyEvent.test( event.type ) ) { return event.charCode != null ? event.charCode : event.keyCode; } // Add which for click: 1 === left; 2 === middle; 3 === right if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { if ( button & 1 ) { return 1; } if ( button & 2 ) { return 3; } if ( button & 4 ) { return 2; } return 0; } return event.which; } }, jQuery.event.addProp ); // Create mouseenter/leave events using mouseover/out and event-time checks // so that event delegation works in jQuery. // Do the same for pointerenter/pointerleave and pointerover/pointerout // // Support: Safari 7 only // Safari sends mouseenter too often; see: // https://bugs.chromium.org/p/chromium/issues/detail?id=470258 // for the description of the bug (it existed in older Chrome versions as well). jQuery.each( { mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function( orig, fix ) { jQuery.event.special[ orig ] = { delegateType: fix, bindType: fix, handle: function( event ) { var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; // For mouseenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = fix; } return ret; } }; } ); jQuery.fn.extend( { on: function( types, selector, data, fn ) { return on( this, types, selector, data, fn ); }, one: function( types, selector, data, fn ) { return on( this, types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { var handleObj, type; if ( types && types.preventDefault && types.handleObj ) { // ( event ) dispatched jQuery.Event handleObj = types.handleObj; jQuery( types.delegateTarget ).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { // ( types-object [, selector] ) for ( type in types ) { this.off( type, selector, types[ type ] ); } return this; } if ( selector === false || typeof selector === "function" ) { // ( types [, fn] ) fn = selector; selector = undefined; } if ( fn === false ) { fn = returnFalse; } return this.each( function() { jQuery.event.remove( this, types, fn, selector ); } ); } } ); var /* eslint-disable max-len */ // See https://github.com/eslint/eslint/issues/3229 rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, /* eslint-enable */ // Support: IE <=10 - 11, Edge 12 - 13 only // In IE/Edge using regex groups here causes severe slowdowns. // See https://connect.microsoft.com/IE/feedback/details/1736512/ rnoInnerhtml = /<script|<style|<link/i, // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; // Prefer a tbody over its parent table for containing new rows function manipulationTarget( elem, content ) { if ( nodeName( elem, "table" ) && nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { return jQuery( elem ).children( "tbody" )[ 0 ] || elem; } return elem; } // Replace/restore the type attribute of script elements for safe DOM manipulation function disableScript( elem ) { elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; return elem; } function restoreScript( elem ) { if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { elem.type = elem.type.slice( 5 ); } else { elem.removeAttribute( "type" ); } return elem; } function cloneCopyEvent( src, dest ) { var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; if ( dest.nodeType !== 1 ) { return; } // 1. Copy private data: events, handlers, etc. if ( dataPriv.hasData( src ) ) { pdataOld = dataPriv.access( src ); pdataCur = dataPriv.set( dest, pdataOld ); events = pdataOld.events; if ( events ) { delete pdataCur.handle; pdataCur.events = {}; for ( type in events ) { for ( i = 0, l = events[ type ].length; i < l; i++ ) { jQuery.event.add( dest, type, events[ type ][ i ] ); } } } } // 2. Copy user data if ( dataUser.hasData( src ) ) { udataOld = dataUser.access( src ); udataCur = jQuery.extend( {}, udataOld ); dataUser.set( dest, udataCur ); } } // Fix IE bugs, see support tests function fixInput( src, dest ) { var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button. if ( nodeName === "input" && rcheckableType.test( src.type ) ) { dest.checked = src.checked; // Fails to return the selected option to the default selected state when cloning options } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } } function domManip( collection, args, callback, ignored ) { // Flatten any nested arrays args = concat.apply( [], args ); var fragment, first, scripts, hasScripts, node, doc, i = 0, l = collection.length, iNoClone = l - 1, value = args[ 0 ], valueIsFunction = isFunction( value ); // We can't cloneNode fragments that contain checked, in WebKit if ( valueIsFunction || ( l > 1 && typeof value === "string" && !support.checkClone && rchecked.test( value ) ) ) { return collection.each( function( index ) { var self = collection.eq( index ); if ( valueIsFunction ) { args[ 0 ] = value.call( this, index, self.html() ); } domManip( self, args, callback, ignored ); } ); } if ( l ) { fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); first = fragment.firstChild; if ( fragment.childNodes.length === 1 ) { fragment = first; } // Require either new content or an interest in ignored elements to invoke the callback if ( first || ignored ) { scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); hasScripts = scripts.length; // Use the original fragment for the last item // instead of the first because it can end up // being emptied incorrectly in certain situations (#8070). for ( ; i < l; i++ ) { node = fragment; if ( i !== iNoClone ) { node = jQuery.clone( node, true, true ); // Keep references to cloned scripts for later restoration if ( hasScripts ) { // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( scripts, getAll( node, "script" ) ); } } callback.call( collection[ i ], node, i ); } if ( hasScripts ) { doc = scripts[ scripts.length - 1 ].ownerDocument; // Reenable scripts jQuery.map( scripts, restoreScript ); // Evaluate executable scripts on first document insertion for ( i = 0; i < hasScripts; i++ ) { node = scripts[ i ]; if ( rscriptType.test( node.type || "" ) && !dataPriv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { // Optional AJAX dependency, but won't run scripts if not present if ( jQuery._evalUrl ) { jQuery._evalUrl( node.src ); } } else { DOMEval( node.textContent.replace( rcleanScript, "" ), doc, node ); } } } } } } return collection; } function remove( elem, selector, keepData ) { var node, nodes = selector ? jQuery.filter( selector, elem ) : elem, i = 0; for ( ; ( node = nodes[ i ] ) != null; i++ ) { if ( !keepData && node.nodeType === 1 ) { jQuery.cleanData( getAll( node ) ); } if ( node.parentNode ) { if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { setGlobalEval( getAll( node, "script" ) ); } node.parentNode.removeChild( node ); } } return elem; } jQuery.extend( { htmlPrefilter: function( html ) { return html.replace( rxhtmlTag, "<$1></$2>" ); }, clone: function( elem, dataAndEvents, deepDataAndEvents ) { var i, l, srcElements, destElements, clone = elem.cloneNode( true ), inPage = jQuery.contains( elem.ownerDocument, elem ); // Fix IE cloning issues if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 destElements = getAll( clone ); srcElements = getAll( elem ); for ( i = 0, l = srcElements.length; i < l; i++ ) { fixInput( srcElements[ i ], destElements[ i ] ); } } // Copy the events from the original to the clone if ( dataAndEvents ) { if ( deepDataAndEvents ) { srcElements = srcElements || getAll( elem ); destElements = destElements || getAll( clone ); for ( i = 0, l = srcElements.length; i < l; i++ ) { cloneCopyEvent( srcElements[ i ], destElements[ i ] ); } } else { cloneCopyEvent( elem, clone ); } } // Preserve script evaluation history destElements = getAll( clone, "script" ); if ( destElements.length > 0 ) { setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); } // Return the cloned set return clone; }, cleanData: function( elems ) { var data, elem, type, special = jQuery.event.special, i = 0; for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { if ( acceptData( elem ) ) { if ( ( data = elem[ dataPriv.expando ] ) ) { if ( data.events ) { for ( type in data.events ) { if ( special[ type ] ) { jQuery.event.remove( elem, type ); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent( elem, type, data.handle ); } } } // Support: Chrome <=35 - 45+ // Assign undefined instead of using delete, see Data#remove elem[ dataPriv.expando ] = undefined; } if ( elem[ dataUser.expando ] ) { // Support: Chrome <=35 - 45+ // Assign undefined instead of using delete, see Data#remove elem[ dataUser.expando ] = undefined; } } } } } ); jQuery.fn.extend( { detach: function( selector ) { return remove( this, selector, true ); }, remove: function( selector ) { return remove( this, selector ); }, text: function( value ) { return access( this, function( value ) { return value === undefined ? jQuery.text( this ) : this.empty().each( function() { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { this.textContent = value; } } ); }, null, value, arguments.length ); }, append: function() { return domManip( this, arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.appendChild( elem ); } } ); }, prepend: function() { return domManip( this, arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.insertBefore( elem, target.firstChild ); } } ); }, before: function() { return domManip( this, arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this ); } } ); }, after: function() { return domManip( this, arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this.nextSibling ); } } ); }, empty: function() { var elem, i = 0; for ( ; ( elem = this[ i ] ) != null; i++ ) { if ( elem.nodeType === 1 ) { // Prevent memory leaks jQuery.cleanData( getAll( elem, false ) ); // Remove any remaining nodes elem.textContent = ""; } } return this; }, clone: function( dataAndEvents, deepDataAndEvents ) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map( function() { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); } ); }, html: function( value ) { return access( this, function( value ) { var elem = this[ 0 ] || {}, i = 0, l = this.length; if ( value === undefined && elem.nodeType === 1 ) { return elem.innerHTML; } // See if we can take a shortcut and just use innerHTML if ( typeof value === "string" && !rnoInnerhtml.test( value ) && !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { value = jQuery.htmlPrefilter( value ); try { for ( ; i < l; i++ ) { elem = this[ i ] || {}; // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); elem.innerHTML = value; } } elem = 0; // If using innerHTML throws an exception, use the fallback method } catch ( e ) {} } if ( elem ) { this.empty().append( value ); } }, null, value, arguments.length ); }, replaceWith: function() { var ignored = []; // Make the changes, replacing each non-ignored context element with the new content return domManip( this, arguments, function( elem ) { var parent = this.parentNode; if ( jQuery.inArray( this, ignored ) < 0 ) { jQuery.cleanData( getAll( this ) ); if ( parent ) { parent.replaceChild( elem, this ); } } // Force callback invocation }, ignored ); } } ); jQuery.each( { appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var elems, ret = [], insert = jQuery( selector ), last = insert.length - 1, i = 0; for ( ; i <= last; i++ ) { elems = i === last ? this : this.clone( true ); jQuery( insert[ i ] )[ original ]( elems ); // Support: Android <=4.0 only, PhantomJS 1 only // .get() because push.apply(_, arraylike) throws on ancient WebKit push.apply( ret, elems.get() ); } return this.pushStack( ret ); }; } ); var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); var getStyles = function( elem ) { // Support: IE <=11 only, Firefox <=30 (#15098, #14150) // IE throws on elements created in popups // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" var view = elem.ownerDocument.defaultView; if ( !view || !view.opener ) { view = window; } return view.getComputedStyle( elem ); }; var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); ( function() { // Executing both pixelPosition & boxSizingReliable tests require only one layout // so they're executed at the same time to save the second computation. function computeStyleTests() { // This is a singleton, we need to execute it only once if ( !div ) { return; } container.style.cssText = "position:absolute;left:-11111px;width:60px;" + "margin-top:1px;padding:0;border:0"; div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + "margin:auto;border:1px;padding:1px;" + "width:60%;top:1%"; documentElement.appendChild( container ).appendChild( div ); var divStyle = window.getComputedStyle( div ); pixelPositionVal = divStyle.top !== "1%"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 // Some styles come back with percentage values, even though they shouldn't div.style.right = "60%"; pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; // Support: IE 9 - 11 only // Detect misreporting of content dimensions for box-sizing:border-box elements boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; // Support: IE 9 only // Detect overflow:scroll screwiness (gh-3699) div.style.position = "absolute"; scrollboxSizeVal = div.offsetWidth === 36 || "absolute"; documentElement.removeChild( container ); // Nullify the div so it wouldn't be stored in the memory and // it will also be a sign that checks already performed div = null; } function roundPixelMeasures( measure ) { return Math.round( parseFloat( measure ) ); } var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, reliableMarginLeftVal, container = document.createElement( "div" ), div = document.createElement( "div" ); // Finish early in limited (non-browser) environments if ( !div.style ) { return; } // Support: IE <=9 - 11 only // Style of cloned element affects source element cloned (#8908) div.style.backgroundClip = "content-box"; div.cloneNode( true ).style.backgroundClip = ""; support.clearCloneStyle = div.style.backgroundClip === "content-box"; jQuery.extend( support, { boxSizingReliable: function() { computeStyleTests(); return boxSizingReliableVal; }, pixelBoxStyles: function() { computeStyleTests(); return pixelBoxStylesVal; }, pixelPosition: function() { computeStyleTests(); return pixelPositionVal; }, reliableMarginLeft: function() { computeStyleTests(); return reliableMarginLeftVal; }, scrollboxSize: function() { computeStyleTests(); return scrollboxSizeVal; } } ); } )(); function curCSS( elem, name, computed ) { var width, minWidth, maxWidth, ret, // Support: Firefox 51+ // Retrieving style before computed somehow // fixes an issue with getting wrong values // on detached elements style = elem.style; computed = computed || getStyles( elem ); // getPropertyValue is needed for: // .css('filter') (IE 9 only, #12537) // .css('--customProperty) (#3144) if ( computed ) { ret = computed.getPropertyValue( name ) || computed[ name ]; if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { ret = jQuery.style( elem, name ); } // A tribute to the "awesome hack by Dean Edwards" // Android Browser returns percentage for some values, // but width seems to be reliably pixels. // This is against the CSSOM draft spec: // https://drafts.csswg.org/cssom/#resolved-values if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { // Remember the original values width = style.width; minWidth = style.minWidth; maxWidth = style.maxWidth; // Put in the new values to get a computed value out style.minWidth = style.maxWidth = style.width = ret; ret = computed.width; // Revert the changed values style.width = width; style.minWidth = minWidth; style.maxWidth = maxWidth; } } return ret !== undefined ? // Support: IE <=9 - 11 only // IE returns zIndex value as an integer. ret + "" : ret; } function addGetHookIf( conditionFn, hookFn ) { // Define the hook, we'll check on the first run if it's really needed. return { get: function() { if ( conditionFn() ) { // Hook not needed (or it's not possible to use it due // to missing dependency), remove it. delete this.get; return; } // Hook needed; redefine it so that the support test is not executed again. return ( this.get = hookFn ).apply( this, arguments ); } }; } var // Swappable if display is none or starts with table // except "table", "table-cell", or "table-caption" // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display rdisplayswap = /^(none|table(?!-c[ea]).+)/, rcustomProp = /^--/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = { letterSpacing: "0", fontWeight: "400" }, cssPrefixes = [ "Webkit", "Moz", "ms" ], emptyStyle = document.createElement( "div" ).style; // Return a css property mapped to a potentially vendor prefixed property function vendorPropName( name ) { // Shortcut for names that are not vendor prefixed if ( name in emptyStyle ) { return name; } // Check for vendor prefixed names var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( name in emptyStyle ) { return name; } } } // Return a property mapped along what jQuery.cssProps suggests or to // a vendor prefixed property. function finalPropName( name ) { var ret = jQuery.cssProps[ name ]; if ( !ret ) { ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; } return ret; } function setPositiveNumber( elem, value, subtract ) { // Any relative (+/-) values have already been // normalized at this point var matches = rcssNum.exec( value ); return matches ? // Guard against undefined "subtract", e.g., when used as in cssHooks Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : value; } function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { var i = dimension === "width" ? 1 : 0, extra = 0, delta = 0; // Adjustment may not be necessary if ( box === ( isBorderBox ? "border" : "content" ) ) { return 0; } for ( ; i < 4; i += 2 ) { // Both box models exclude margin if ( box === "margin" ) { delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); } // If we get here with a content-box, we're seeking "padding" or "border" or "margin" if ( !isBorderBox ) { // Add padding delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); // For "border" or "margin", add border if ( box !== "padding" ) { delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); // But still keep track of it otherwise } else { extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } // If we get here with a border-box (content + padding + border), we're seeking "content" or // "padding" or "margin" } else { // For "content", subtract padding if ( box === "content" ) { delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); } // For "content" or "padding", subtract border if ( box !== "margin" ) { delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } } // Account for positive content-box scroll gutter when requested by providing computedVal if ( !isBorderBox && computedVal >= 0 ) { // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border // Assuming integer scroll gutter, subtract the rest and round down delta += Math.max( 0, Math.ceil( elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - computedVal - delta - extra - 0.5 ) ); } return delta; } function getWidthOrHeight( elem, dimension, extra ) { // Start with computed style var styles = getStyles( elem ), val = curCSS( elem, dimension, styles ), isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box", valueIsBorderBox = isBorderBox; // Support: Firefox <=54 // Return a confounding non-pixel value or feign ignorance, as appropriate. if ( rnumnonpx.test( val ) ) { if ( !extra ) { return val; } val = "auto"; } // Check for style in case a browser which returns unreliable values // for getComputedStyle silently falls back to the reliable elem.style valueIsBorderBox = valueIsBorderBox && ( support.boxSizingReliable() || val === elem.style[ dimension ] ); // Fall back to offsetWidth/offsetHeight when value is "auto" // This happens for inline elements with no explicit setting (gh-3571) // Support: Android <=4.1 - 4.3 only // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) if ( val === "auto" || !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) { val = elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ]; // offsetWidth/offsetHeight provide border-box values valueIsBorderBox = true; } // Normalize "" and auto val = parseFloat( val ) || 0; // Adjust for the element's box model return ( val + boxModelAdjustment( elem, dimension, extra || ( isBorderBox ? "border" : "content" ), valueIsBorderBox, styles, // Provide the current computed size to request scroll gutter calculation (gh-3589) val ) ) + "px"; } jQuery.extend( { // Add in style property hooks for overriding the default // behavior of getting and setting a style property cssHooks: { opacity: { get: function( elem, computed ) { if ( computed ) { // We should always get a number back from opacity var ret = curCSS( elem, "opacity" ); return ret === "" ? "1" : ret; } } } }, // Don't automatically add "px" to these possibly-unitless properties cssNumber: { "animationIterationCount": true, "columnCount": true, "fillOpacity": true, "flexGrow": true, "flexShrink": true, "fontWeight": true, "lineHeight": true, "opacity": true, "order": true, "orphans": true, "widows": true, "zIndex": true, "zoom": true }, // Add in properties whose names you wish to fix before // setting or getting the value cssProps: {}, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { // Don't set styles on text and comment nodes if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { return; } // Make sure that we're working with the right name var ret, type, hooks, origName = camelCase( name ), isCustomProp = rcustomProp.test( name ), style = elem.style; // Make sure that we're working with the right name. We don't // want to query the value if it is a CSS custom property // since they are user-defined. if ( !isCustomProp ) { name = finalPropName( origName ); } // Gets hook for the prefixed version, then unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // Check if we're setting a value if ( value !== undefined ) { type = typeof value; // Convert "+=" or "-=" to relative numbers (#7345) if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { value = adjustCSS( elem, name, ret ); // Fixes bug #9237 type = "number"; } // Make sure that null and NaN values aren't set (#7116) if ( value == null || value !== value ) { return; } // If a number was passed in, add the unit (except for certain CSS properties) if ( type === "number" ) { value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); } // background-* props affect original clone's values if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { style[ name ] = "inherit"; } // If a hook was provided, use that value, otherwise just set the specified value if ( !hooks || !( "set" in hooks ) || ( value = hooks.set( elem, value, extra ) ) !== undefined ) { if ( isCustomProp ) { style.setProperty( name, value ); } else { style[ name ] = value; } } } else { // If a hook was provided get the non-computed value from there if ( hooks && "get" in hooks && ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { return ret; } // Otherwise just get the value from the style object return style[ name ]; } }, css: function( elem, name, extra, styles ) { var val, num, hooks, origName = camelCase( name ), isCustomProp = rcustomProp.test( name ); // Make sure that we're working with the right name. We don't // want to modify the value if it is a CSS custom property // since they are user-defined. if ( !isCustomProp ) { name = finalPropName( origName ); } // Try prefixed name followed by the unprefixed name hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // If a hook was provided get the computed value from there if ( hooks && "get" in hooks ) { val = hooks.get( elem, true, extra ); } // Otherwise, if a way to get the computed value exists, use that if ( val === undefined ) { val = curCSS( elem, name, styles ); } // Convert "normal" to computed value if ( val === "normal" && name in cssNormalTransform ) { val = cssNormalTransform[ name ]; } // Make numeric if forced or a qualifier was provided and val looks numeric if ( extra === "" || extra ) { num = parseFloat( val ); return extra === true || isFinite( num ) ? num || 0 : val; } return val; } } ); jQuery.each( [ "height", "width" ], function( i, dimension ) { jQuery.cssHooks[ dimension ] = { get: function( elem, computed, extra ) { if ( computed ) { // Certain elements can have dimension info if we invisibly show them // but it must have a current display style that would benefit return rdisplayswap.test( jQuery.css( elem, "display" ) ) && // Support: Safari 8+ // Table columns in Safari have non-zero offsetWidth & zero // getBoundingClientRect().width unless display is changed. // Support: IE <=11 only // Running getBoundingClientRect on a disconnected node // in IE throws an error. ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? swap( elem, cssShow, function() { return getWidthOrHeight( elem, dimension, extra ); } ) : getWidthOrHeight( elem, dimension, extra ); } }, set: function( elem, value, extra ) { var matches, styles = getStyles( elem ), isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box", subtract = extra && boxModelAdjustment( elem, dimension, extra, isBorderBox, styles ); // Account for unreliable border-box dimensions by comparing offset* to computed and // faking a content-box to get border and padding (gh-3699) if ( isBorderBox && support.scrollboxSize() === styles.position ) { subtract -= Math.ceil( elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - parseFloat( styles[ dimension ] ) - boxModelAdjustment( elem, dimension, "border", false, styles ) - 0.5 ); } // Convert to pixels if value adjustment is needed if ( subtract && ( matches = rcssNum.exec( value ) ) && ( matches[ 3 ] || "px" ) !== "px" ) { elem.style[ dimension ] = value; value = jQuery.css( elem, dimension ); } return setPositiveNumber( elem, value, subtract ); } }; } ); jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, function( elem, computed ) { if ( computed ) { return ( parseFloat( curCSS( elem, "marginLeft" ) ) || elem.getBoundingClientRect().left - swap( elem, { marginLeft: 0 }, function() { return elem.getBoundingClientRect().left; } ) ) + "px"; } } ); // These hooks are used by animate to expand properties jQuery.each( { margin: "", padding: "", border: "Width" }, function( prefix, suffix ) { jQuery.cssHooks[ prefix + suffix ] = { expand: function( value ) { var i = 0, expanded = {}, // Assumes a single number if not a string parts = typeof value === "string" ? value.split( " " ) : [ value ]; for ( ; i < 4; i++ ) { expanded[ prefix + cssExpand[ i ] + suffix ] = parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; } return expanded; } }; if ( prefix !== "margin" ) { jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; } } ); jQuery.fn.extend( { css: function( name, value ) { return access( this, function( elem, name, value ) { var styles, len, map = {}, i = 0; if ( Array.isArray( name ) ) { styles = getStyles( elem ); len = name.length; for ( ; i < len; i++ ) { map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); } return map; } return value !== undefined ? jQuery.style( elem, name, value ) : jQuery.css( elem, name ); }, name, value, arguments.length > 1 ); } } ); function Tween( elem, options, prop, end, easing ) { return new Tween.prototype.init( elem, options, prop, end, easing ); } jQuery.Tween = Tween; Tween.prototype = { constructor: Tween, init: function( elem, options, prop, end, easing, unit ) { this.elem = elem; this.prop = prop; this.easing = easing || jQuery.easing._default; this.options = options; this.start = this.now = this.cur(); this.end = end; this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); }, cur: function() { var hooks = Tween.propHooks[ this.prop ]; return hooks && hooks.get ? hooks.get( this ) : Tween.propHooks._default.get( this ); }, run: function( percent ) { var eased, hooks = Tween.propHooks[ this.prop ]; if ( this.options.duration ) { this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); } else { this.pos = eased = percent; } this.now = ( this.end - this.start ) * eased + this.start; if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); } if ( hooks && hooks.set ) { hooks.set( this ); } else { Tween.propHooks._default.set( this ); } return this; } }; Tween.prototype.init.prototype = Tween.prototype; Tween.propHooks = { _default: { get: function( tween ) { var result; // Use a property on the element directly when it is not a DOM element, // or when there is no matching style property that exists. if ( tween.elem.nodeType !== 1 || tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { return tween.elem[ tween.prop ]; } // Passing an empty string as a 3rd parameter to .css will automatically // attempt a parseFloat and fallback to a string if the parse fails. // Simple values such as "10px" are parsed to Float; // complex values such as "rotate(1rad)" are returned as-is. result = jQuery.css( tween.elem, tween.prop, "" ); // Empty strings, null, undefined and "auto" are converted to 0. return !result || result === "auto" ? 0 : result; }, set: function( tween ) { // Use step hook for back compat. // Use cssHook if its there. // Use .style if available and use plain properties where available. if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); } else if ( tween.elem.nodeType === 1 && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { tween.elem[ tween.prop ] = tween.now; } } } }; // Support: IE <=9 only // Panic based approach to setting things on disconnected nodes Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { set: function( tween ) { if ( tween.elem.nodeType && tween.elem.parentNode ) { tween.elem[ tween.prop ] = tween.now; } } }; jQuery.easing = { linear: function( p ) { return p; }, swing: function( p ) { return 0.5 - Math.cos( p * Math.PI ) / 2; }, _default: "swing" }; jQuery.fx = Tween.prototype.init; // Back compat <1.8 extension point jQuery.fx.step = {}; var fxNow, inProgress, rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/; function schedule() { if ( inProgress ) { if ( document.hidden === false && window.requestAnimationFrame ) { window.requestAnimationFrame( schedule ); } else { window.setTimeout( schedule, jQuery.fx.interval ); } jQuery.fx.tick(); } } // Animations created synchronously will run synchronously function createFxNow() { window.setTimeout( function() { fxNow = undefined; } ); return ( fxNow = Date.now() ); } // Generate parameters to create a standard animation function genFx( type, includeWidth ) { var which, i = 0, attrs = { height: type }; // If we include width, step value is 1 to do all cssExpand values, // otherwise step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; for ( ; i < 4; i += 2 - includeWidth ) { which = cssExpand[ i ]; attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; } if ( includeWidth ) { attrs.opacity = attrs.width = type; } return attrs; } function createTween( value, prop, animation ) { var tween, collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), index = 0, length = collection.length; for ( ; index < length; index++ ) { if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { // We're done with this property return tween; } } } function defaultPrefilter( elem, props, opts ) { var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHiddenWithinTree( elem ), dataShow = dataPriv.get( elem, "fxshow" ); // Queue-skipping animations hijack the fx hooks if ( !opts.queue ) { hooks = jQuery._queueHooks( elem, "fx" ); if ( hooks.unqueued == null ) { hooks.unqueued = 0; oldfire = hooks.empty.fire; hooks.empty.fire = function() { if ( !hooks.unqueued ) { oldfire(); } }; } hooks.unqueued++; anim.always( function() { // Ensure the complete handler is called before this completes anim.always( function() { hooks.unqueued--; if ( !jQuery.queue( elem, "fx" ).length ) { hooks.empty.fire(); } } ); } ); } // Detect show/hide animations for ( prop in props ) { value = props[ prop ]; if ( rfxtypes.test( value ) ) { delete props[ prop ]; toggle = toggle || value === "toggle"; if ( value === ( hidden ? "hide" : "show" ) ) { // Pretend to be hidden if this is a "show" and // there is still data from a stopped show/hide if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { hidden = true; // Ignore all other no-op show/hide data } else { continue; } } orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); } } // Bail out if this is a no-op like .hide().hide() propTween = !jQuery.isEmptyObject( props ); if ( !propTween && jQuery.isEmptyObject( orig ) ) { return; } // Restrict "overflow" and "display" styles during box animations if ( isBox && elem.nodeType === 1 ) { // Support: IE <=9 - 11, Edge 12 - 15 // Record all 3 overflow attributes because IE does not infer the shorthand // from identically-valued overflowX and overflowY and Edge just mirrors // the overflowX value there. opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; // Identify a display type, preferring old show/hide data over the CSS cascade restoreDisplay = dataShow && dataShow.display; if ( restoreDisplay == null ) { restoreDisplay = dataPriv.get( elem, "display" ); } display = jQuery.css( elem, "display" ); if ( display === "none" ) { if ( restoreDisplay ) { display = restoreDisplay; } else { // Get nonempty value(s) by temporarily forcing visibility showHide( [ elem ], true ); restoreDisplay = elem.style.display || restoreDisplay; display = jQuery.css( elem, "display" ); showHide( [ elem ] ); } } // Animate inline elements as inline-block if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { if ( jQuery.css( elem, "float" ) === "none" ) { // Restore the original display value at the end of pure show/hide animations if ( !propTween ) { anim.done( function() { style.display = restoreDisplay; } ); if ( restoreDisplay == null ) { display = style.display; restoreDisplay = display === "none" ? "" : display; } } style.display = "inline-block"; } } } if ( opts.overflow ) { style.overflow = "hidden"; anim.always( function() { style.overflow = opts.overflow[ 0 ]; style.overflowX = opts.overflow[ 1 ]; style.overflowY = opts.overflow[ 2 ]; } ); } // Implement show/hide animations propTween = false; for ( prop in orig ) { // General show/hide setup for this element animation if ( !propTween ) { if ( dataShow ) { if ( "hidden" in dataShow ) { hidden = dataShow.hidden; } } else { dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); } // Store hidden/visible for toggle so `.stop().toggle()` "reverses" if ( toggle ) { dataShow.hidden = !hidden; } // Show elements before animating them if ( hidden ) { showHide( [ elem ], true ); } /* eslint-disable no-loop-func */ anim.done( function() { /* eslint-enable no-loop-func */ // The final step of a "hide" animation is actually hiding the element if ( !hidden ) { showHide( [ elem ] ); } dataPriv.remove( elem, "fxshow" ); for ( prop in orig ) { jQuery.style( elem, prop, orig[ prop ] ); } } ); } // Per-property setup propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); if ( !( prop in dataShow ) ) { dataShow[ prop ] = propTween.start; if ( hidden ) { propTween.end = propTween.start; propTween.start = 0; } } } } function propFilter( props, specialEasing ) { var index, name, easing, value, hooks; // camelCase, specialEasing and expand cssHook pass for ( index in props ) { name = camelCase( index ); easing = specialEasing[ name ]; value = props[ index ]; if ( Array.isArray( value ) ) { easing = value[ 1 ]; value = props[ index ] = value[ 0 ]; } if ( index !== name ) { props[ name ] = value; delete props[ index ]; } hooks = jQuery.cssHooks[ name ]; if ( hooks && "expand" in hooks ) { value = hooks.expand( value ); delete props[ name ]; // Not quite $.extend, this won't overwrite existing keys. // Reusing 'index' because we have the correct "name" for ( index in value ) { if ( !( index in props ) ) { props[ index ] = value[ index ]; specialEasing[ index ] = easing; } } } else { specialEasing[ name ] = easing; } } } function Animation( elem, properties, options ) { var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery.Deferred().always( function() { // Don't match elem in the :animated selector delete tick.elem; } ), tick = function() { if ( stopped ) { return false; } var currentTime = fxNow || createFxNow(), remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), // Support: Android 2.3 only // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) temp = remaining / animation.duration || 0, percent = 1 - temp, index = 0, length = animation.tweens.length; for ( ; index < length; index++ ) { animation.tweens[ index ].run( percent ); } deferred.notifyWith( elem, [ animation, percent, remaining ] ); // If there's more to do, yield if ( percent < 1 && length ) { return remaining; } // If this was an empty animation, synthesize a final progress notification if ( !length ) { deferred.notifyWith( elem, [ animation, 1, 0 ] ); } // Resolve the animation and report its conclusion deferred.resolveWith( elem, [ animation ] ); return false; }, animation = deferred.promise( { elem: elem, props: jQuery.extend( {}, properties ), opts: jQuery.extend( true, { specialEasing: {}, easing: jQuery.easing._default }, options ), originalProperties: properties, originalOptions: options, startTime: fxNow || createFxNow(), duration: options.duration, tweens: [], createTween: function( prop, end ) { var tween = jQuery.Tween( elem, animation.opts, prop, end, animation.opts.specialEasing[ prop ] || animation.opts.easing ); animation.tweens.push( tween ); return tween; }, stop: function( gotoEnd ) { var index = 0, // If we are going to the end, we want to run all the tweens // otherwise we skip this part length = gotoEnd ? animation.tweens.length : 0; if ( stopped ) { return this; } stopped = true; for ( ; index < length; index++ ) { animation.tweens[ index ].run( 1 ); } // Resolve when we played the last frame; otherwise, reject if ( gotoEnd ) { deferred.notifyWith( elem, [ animation, 1, 0 ] ); deferred.resolveWith( elem, [ animation, gotoEnd ] ); } else { deferred.rejectWith( elem, [ animation, gotoEnd ] ); } return this; } } ), props = animation.props; propFilter( props, animation.opts.specialEasing ); for ( ; index < length; index++ ) { result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); if ( result ) { if ( isFunction( result.stop ) ) { jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = result.stop.bind( result ); } return result; } } jQuery.map( props, createTween, animation ); if ( isFunction( animation.opts.start ) ) { animation.opts.start.call( elem, animation ); } // Attach callbacks from options animation .progress( animation.opts.progress ) .done( animation.opts.done, animation.opts.complete ) .fail( animation.opts.fail ) .always( animation.opts.always ); jQuery.fx.timer( jQuery.extend( tick, { elem: elem, anim: animation, queue: animation.opts.queue } ) ); return animation; } jQuery.Animation = jQuery.extend( Animation, { tweeners: { "*": [ function( prop, value ) { var tween = this.createTween( prop, value ); adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); return tween; } ] }, tweener: function( props, callback ) { if ( isFunction( props ) ) { callback = props; props = [ "*" ]; } else { props = props.match( rnothtmlwhite ); } var prop, index = 0, length = props.length; for ( ; index < length; index++ ) { prop = props[ index ]; Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; Animation.tweeners[ prop ].unshift( callback ); } }, prefilters: [ defaultPrefilter ], prefilter: function( callback, prepend ) { if ( prepend ) { Animation.prefilters.unshift( callback ); } else { Animation.prefilters.push( callback ); } } } ); jQuery.speed = function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { complete: fn || !fn && easing || isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && !isFunction( easing ) && easing }; // Go to the end state if fx are off if ( jQuery.fx.off ) { opt.duration = 0; } else { if ( typeof opt.duration !== "number" ) { if ( opt.duration in jQuery.fx.speeds ) { opt.duration = jQuery.fx.speeds[ opt.duration ]; } else { opt.duration = jQuery.fx.speeds._default; } } } // Normalize opt.queue - true/undefined/null -> "fx" if ( opt.queue == null || opt.queue === true ) { opt.queue = "fx"; } // Queueing opt.old = opt.complete; opt.complete = function() { if ( isFunction( opt.old ) ) { opt.old.call( this ); } if ( opt.queue ) { jQuery.dequeue( this, opt.queue ); } }; return opt; }; jQuery.fn.extend( { fadeTo: function( speed, to, easing, callback ) { // Show any hidden elements after setting opacity to 0 return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() // Animate to the value specified .end().animate( { opacity: to }, speed, easing, callback ); }, animate: function( prop, speed, easing, callback ) { var empty = jQuery.isEmptyObject( prop ), optall = jQuery.speed( speed, easing, callback ), doAnimation = function() { // Operate on a copy of prop so per-property easing won't be lost var anim = Animation( this, jQuery.extend( {}, prop ), optall ); // Empty animations, or finishing resolves immediately if ( empty || dataPriv.get( this, "finish" ) ) { anim.stop( true ); } }; doAnimation.finish = doAnimation; return empty || optall.queue === false ? this.each( doAnimation ) : this.queue( optall.queue, doAnimation ); }, stop: function( type, clearQueue, gotoEnd ) { var stopQueue = function( hooks ) { var stop = hooks.stop; delete hooks.stop; stop( gotoEnd ); }; if ( typeof type !== "string" ) { gotoEnd = clearQueue; clearQueue = type; type = undefined; } if ( clearQueue && type !== false ) { this.queue( type || "fx", [] ); } return this.each( function() { var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, data = dataPriv.get( this ); if ( index ) { if ( data[ index ] && data[ index ].stop ) { stopQueue( data[ index ] ); } } else { for ( index in data ) { if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { stopQueue( data[ index ] ); } } } for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && ( type == null || timers[ index ].queue === type ) ) { timers[ index ].anim.stop( gotoEnd ); dequeue = false; timers.splice( index, 1 ); } } // Start the next in the queue if the last step wasn't forced. // Timers currently will call their complete callbacks, which // will dequeue but only if they were gotoEnd. if ( dequeue || !gotoEnd ) { jQuery.dequeue( this, type ); } } ); }, finish: function( type ) { if ( type !== false ) { type = type || "fx"; } return this.each( function() { var index, data = dataPriv.get( this ), queue = data[ type + "queue" ], hooks = data[ type + "queueHooks" ], timers = jQuery.timers, length = queue ? queue.length : 0; // Enable finishing flag on private data data.finish = true; // Empty the queue first jQuery.queue( this, type, [] ); if ( hooks && hooks.stop ) { hooks.stop.call( this, true ); } // Look for any active animations, and finish them for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && timers[ index ].queue === type ) { timers[ index ].anim.stop( true ); timers.splice( index, 1 ); } } // Look for any animations in the old queue and finish them for ( index = 0; index < length; index++ ) { if ( queue[ index ] && queue[ index ].finish ) { queue[ index ].finish.call( this ); } } // Turn off finishing flag delete data.finish; } ); } } ); jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { var cssFn = jQuery.fn[ name ]; jQuery.fn[ name ] = function( speed, easing, callback ) { return speed == null || typeof speed === "boolean" ? cssFn.apply( this, arguments ) : this.animate( genFx( name, true ), speed, easing, callback ); }; } ); // Generate shortcuts for custom animations jQuery.each( { slideDown: genFx( "show" ), slideUp: genFx( "hide" ), slideToggle: genFx( "toggle" ), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function( name, props ) { jQuery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); }; } ); jQuery.timers = []; jQuery.fx.tick = function() { var timer, i = 0, timers = jQuery.timers; fxNow = Date.now(); for ( ; i < timers.length; i++ ) { timer = timers[ i ]; // Run the timer and safely remove it when done (allowing for external removal) if ( !timer() && timers[ i ] === timer ) { timers.splice( i--, 1 ); } } if ( !timers.length ) { jQuery.fx.stop(); } fxNow = undefined; }; jQuery.fx.timer = function( timer ) { jQuery.timers.push( timer ); jQuery.fx.start(); }; jQuery.fx.interval = 13; jQuery.fx.start = function() { if ( inProgress ) { return; } inProgress = true; schedule(); }; jQuery.fx.stop = function() { inProgress = null; }; jQuery.fx.speeds = { slow: 600, fast: 200, // Default speed _default: 400 }; // Based off of the plugin by Clint Helfers, with permission. // https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ jQuery.fn.delay = function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; type = type || "fx"; return this.queue( type, function( next, hooks ) { var timeout = window.setTimeout( next, time ); hooks.stop = function() { window.clearTimeout( timeout ); }; } ); }; ( function() { var input = document.createElement( "input" ), select = document.createElement( "select" ), opt = select.appendChild( document.createElement( "option" ) ); input.type = "checkbox"; // Support: Android <=4.3 only // Default value for a checkbox should be "on" support.checkOn = input.value !== ""; // Support: IE <=11 only // Must access selectedIndex to make default options select support.optSelected = opt.selected; // Support: IE <=11 only // An input loses its value after becoming a radio input = document.createElement( "input" ); input.value = "t"; input.type = "radio"; support.radioValue = input.value === "t"; } )(); var boolHook, attrHandle = jQuery.expr.attrHandle; jQuery.fn.extend( { attr: function( name, value ) { return access( this, jQuery.attr, name, value, arguments.length > 1 ); }, removeAttr: function( name ) { return this.each( function() { jQuery.removeAttr( this, name ); } ); } } ); jQuery.extend( { attr: function( elem, name, value ) { var ret, hooks, nType = elem.nodeType; // Don't get/set attributes on text, comment and attribute nodes if ( nType === 3 || nType === 8 || nType === 2 ) { return; } // Fallback to prop when attributes are not supported if ( typeof elem.getAttribute === "undefined" ) { return jQuery.prop( elem, name, value ); } // Attribute hooks are determined by the lowercase version // Grab necessary hook if one is defined if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { hooks = jQuery.attrHooks[ name.toLowerCase() ] || ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); } if ( value !== undefined ) { if ( value === null ) { jQuery.removeAttr( elem, name ); return; } if ( hooks && "set" in hooks && ( ret = hooks.set( elem, value, name ) ) !== undefined ) { return ret; } elem.setAttribute( name, value + "" ); return value; } if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { return ret; } ret = jQuery.find.attr( elem, name ); // Non-existent attributes return null, we normalize to undefined return ret == null ? undefined : ret; }, attrHooks: { type: { set: function( elem, value ) { if ( !support.radioValue && value === "radio" && nodeName( elem, "input" ) ) { var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { elem.value = val; } return value; } } } }, removeAttr: function( elem, value ) { var name, i = 0, // Attribute names can contain non-HTML whitespace characters // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 attrNames = value && value.match( rnothtmlwhite ); if ( attrNames && elem.nodeType === 1 ) { while ( ( name = attrNames[ i++ ] ) ) { elem.removeAttribute( name ); } } } } ); // Hooks for boolean attributes boolHook = { set: function( elem, value, name ) { if ( value === false ) { // Remove boolean attributes when set to false jQuery.removeAttr( elem, name ); } else { elem.setAttribute( name, name ); } return name; } }; jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { var getter = attrHandle[ name ] || jQuery.find.attr; attrHandle[ name ] = function( elem, name, isXML ) { var ret, handle, lowercaseName = name.toLowerCase(); if ( !isXML ) { // Avoid an infinite loop by temporarily removing this function from the getter handle = attrHandle[ lowercaseName ]; attrHandle[ lowercaseName ] = ret; ret = getter( elem, name, isXML ) != null ? lowercaseName : null; attrHandle[ lowercaseName ] = handle; } return ret; }; } ); var rfocusable = /^(?:input|select|textarea|button)$/i, rclickable = /^(?:a|area)$/i; jQuery.fn.extend( { prop: function( name, value ) { return access( this, jQuery.prop, name, value, arguments.length > 1 ); }, removeProp: function( name ) { return this.each( function() { delete this[ jQuery.propFix[ name ] || name ]; } ); } } ); jQuery.extend( { prop: function( elem, name, value ) { var ret, hooks, nType = elem.nodeType; // Don't get/set properties on text, comment and attribute nodes if ( nType === 3 || nType === 8 || nType === 2 ) { return; } if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { // Fix name and attach hooks name = jQuery.propFix[ name ] || name; hooks = jQuery.propHooks[ name ]; } if ( value !== undefined ) { if ( hooks && "set" in hooks && ( ret = hooks.set( elem, value, name ) ) !== undefined ) { return ret; } return ( elem[ name ] = value ); } if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { return ret; } return elem[ name ]; }, propHooks: { tabIndex: { get: function( elem ) { // Support: IE <=9 - 11 only // elem.tabIndex doesn't always return the // correct value when it hasn't been explicitly set // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ // Use proper attribute retrieval(#12072) var tabindex = jQuery.find.attr( elem, "tabindex" ); if ( tabindex ) { return parseInt( tabindex, 10 ); } if ( rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ) { return 0; } return -1; } } }, propFix: { "for": "htmlFor", "class": "className" } } ); // Support: IE <=11 only // Accessing the selectedIndex property // forces the browser to respect setting selected // on the option // The getter ensures a default option is selected // when in an optgroup // eslint rule "no-unused-expressions" is disabled for this code // since it considers such accessions noop if ( !support.optSelected ) { jQuery.propHooks.selected = { get: function( elem ) { /* eslint no-unused-expressions: "off" */ var parent = elem.parentNode; if ( parent && parent.parentNode ) { parent.parentNode.selectedIndex; } return null; }, set: function( elem ) { /* eslint no-unused-expressions: "off" */ var parent = elem.parentNode; if ( parent ) { parent.selectedIndex; if ( parent.parentNode ) { parent.parentNode.selectedIndex; } } } }; } jQuery.each( [ "tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable" ], function() { jQuery.propFix[ this.toLowerCase() ] = this; } ); // Strip and collapse whitespace according to HTML spec // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace function stripAndCollapse( value ) { var tokens = value.match( rnothtmlwhite ) || []; return tokens.join( " " ); } function getClass( elem ) { return elem.getAttribute && elem.getAttribute( "class" ) || ""; } function classesToArray( value ) { if ( Array.isArray( value ) ) { return value; } if ( typeof value === "string" ) { return value.match( rnothtmlwhite ) || []; } return []; } jQuery.fn.extend( { addClass: function( value ) { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; if ( isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); } ); } classes = classesToArray( value ); if ( classes.length ) { while ( ( elem = this[ i++ ] ) ) { curValue = getClass( elem ); cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); if ( cur ) { j = 0; while ( ( clazz = classes[ j++ ] ) ) { if ( cur.indexOf( " " + clazz + " " ) < 0 ) { cur += clazz + " "; } } // Only assign if different to avoid unneeded rendering. finalValue = stripAndCollapse( cur ); if ( curValue !== finalValue ) { elem.setAttribute( "class", finalValue ); } } } } return this; }, removeClass: function( value ) { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; if ( isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); } ); } if ( !arguments.length ) { return this.attr( "class", "" ); } classes = classesToArray( value ); if ( classes.length ) { while ( ( elem = this[ i++ ] ) ) { curValue = getClass( elem ); // This expression is here for better compressibility (see addClass) cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); if ( cur ) { j = 0; while ( ( clazz = classes[ j++ ] ) ) { // Remove *all* instances while ( cur.indexOf( " " + clazz + " " ) > -1 ) { cur = cur.replace( " " + clazz + " ", " " ); } } // Only assign if different to avoid unneeded rendering. finalValue = stripAndCollapse( cur ); if ( curValue !== finalValue ) { elem.setAttribute( "class", finalValue ); } } } } return this; }, toggleClass: function( value, stateVal ) { var type = typeof value, isValidValue = type === "string" || Array.isArray( value ); if ( typeof stateVal === "boolean" && isValidValue ) { return stateVal ? this.addClass( value ) : this.removeClass( value ); } if ( isFunction( value ) ) { return this.each( function( i ) { jQuery( this ).toggleClass( value.call( this, i, getClass( this ), stateVal ), stateVal ); } ); } return this.each( function() { var className, i, self, classNames; if ( isValidValue ) { // Toggle individual class names i = 0; self = jQuery( this ); classNames = classesToArray( value ); while ( ( className = classNames[ i++ ] ) ) { // Check each className given, space separated list if ( self.hasClass( className ) ) { self.removeClass( className ); } else { self.addClass( className ); } } // Toggle whole class name } else if ( value === undefined || type === "boolean" ) { className = getClass( this ); if ( className ) { // Store className if set dataPriv.set( this, "__className__", className ); } // If the element has a class name or if we're passed `false`, // then remove the whole classname (if there was one, the above saved it). // Otherwise bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. if ( this.setAttribute ) { this.setAttribute( "class", className || value === false ? "" : dataPriv.get( this, "__className__" ) || "" ); } } } ); }, hasClass: function( selector ) { var className, elem, i = 0; className = " " + selector + " "; while ( ( elem = this[ i++ ] ) ) { if ( elem.nodeType === 1 && ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { return true; } } return false; } } ); var rreturn = /\r/g; jQuery.fn.extend( { val: function( value ) { var hooks, ret, valueIsFunction, elem = this[ 0 ]; if ( !arguments.length ) { if ( elem ) { hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; if ( hooks && "get" in hooks && ( ret = hooks.get( elem, "value" ) ) !== undefined ) { return ret; } ret = elem.value; // Handle most common string cases if ( typeof ret === "string" ) { return ret.replace( rreturn, "" ); } // Handle cases where value is null/undef or number return ret == null ? "" : ret; } return; } valueIsFunction = isFunction( value ); return this.each( function( i ) { var val; if ( this.nodeType !== 1 ) { return; } if ( valueIsFunction ) { val = value.call( this, i, jQuery( this ).val() ); } else { val = value; } // Treat null/undefined as ""; convert numbers to string if ( val == null ) { val = ""; } else if ( typeof val === "number" ) { val += ""; } else if ( Array.isArray( val ) ) { val = jQuery.map( val, function( value ) { return value == null ? "" : value + ""; } ); } hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; // If set returns undefined, fall back to normal setting if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { this.value = val; } } ); } } ); jQuery.extend( { valHooks: { option: { get: function( elem ) { var val = jQuery.find.attr( elem, "value" ); return val != null ? val : // Support: IE <=10 - 11 only // option.text throws exceptions (#14686, #14858) // Strip and collapse whitespace // https://html.spec.whatwg.org/#strip-and-collapse-whitespace stripAndCollapse( jQuery.text( elem ) ); } }, select: { get: function( elem ) { var value, option, i, options = elem.options, index = elem.selectedIndex, one = elem.type === "select-one", values = one ? null : [], max = one ? index + 1 : options.length; if ( index < 0 ) { i = max; } else { i = one ? index : 0; } // Loop through all the selected options for ( ; i < max; i++ ) { option = options[ i ]; // Support: IE <=9 only // IE8-9 doesn't update selected after form reset (#2551) if ( ( option.selected || i === index ) && // Don't return options that are disabled or in a disabled optgroup !option.disabled && ( !option.parentNode.disabled || !nodeName( option.parentNode, "optgroup" ) ) ) { // Get the specific value for the option value = jQuery( option ).val(); // We don't need an array for one selects if ( one ) { return value; } // Multi-Selects return an array values.push( value ); } } return values; }, set: function( elem, value ) { var optionSet, option, options = elem.options, values = jQuery.makeArray( value ), i = options.length; while ( i-- ) { option = options[ i ]; /* eslint-disable no-cond-assign */ if ( option.selected = jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) { optionSet = true; } /* eslint-enable no-cond-assign */ } // Force browsers to behave consistently when non-matching value is set if ( !optionSet ) { elem.selectedIndex = -1; } return values; } } } } ); // Radios and checkboxes getter/setter jQuery.each( [ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { set: function( elem, value ) { if ( Array.isArray( value ) ) { return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); } } }; if ( !support.checkOn ) { jQuery.valHooks[ this ].get = function( elem ) { return elem.getAttribute( "value" ) === null ? "on" : elem.value; }; } } ); // Return jQuery for attributes-only inclusion support.focusin = "onfocusin" in window; var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, stopPropagationCallback = function( e ) { e.stopPropagation(); }; jQuery.extend( jQuery.event, { trigger: function( event, data, elem, onlyHandlers ) { var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, eventPath = [ elem || document ], type = hasOwn.call( event, "type" ) ? event.type : event, namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; cur = lastElement = tmp = elem = elem || document; // Don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } // focus/blur morphs to focusin/out; ensure we're not firing them right now if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { return; } if ( type.indexOf( "." ) > -1 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split( "." ); type = namespaces.shift(); namespaces.sort(); } ontype = type.indexOf( ":" ) < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string event = event[ jQuery.expando ] ? event : new jQuery.Event( type, typeof event === "object" && event ); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) event.isTrigger = onlyHandlers ? 2 : 3; event.namespace = namespaces.join( "." ); event.rnamespace = event.namespace ? new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : null; // Clean up the event in case it is being reused event.result = undefined; if ( !event.target ) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data == null ? [ event ] : jQuery.makeArray( data, [ event ] ); // Allow special events to draw outside the lines special = jQuery.event.special[ type ] || {}; if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { bubbleType = special.delegateType || type; if ( !rfocusMorph.test( bubbleType + type ) ) { cur = cur.parentNode; } for ( ; cur; cur = cur.parentNode ) { eventPath.push( cur ); tmp = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if ( tmp === ( elem.ownerDocument || document ) ) { eventPath.push( tmp.defaultView || tmp.parentWindow || window ); } } // Fire handlers on the event path i = 0; while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { lastElement = cur; event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && dataPriv.get( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } // Native handler handle = ontype && cur[ ontype ]; if ( handle && handle.apply && acceptData( cur ) ) { event.result = handle.apply( cur, data ); if ( event.result === false ) { event.preventDefault(); } } } event.type = type; // If nobody prevented the default action, do it now if ( !onlyHandlers && !event.isDefaultPrevented() ) { if ( ( !special._default || special._default.apply( eventPath.pop(), data ) === false ) && acceptData( elem ) ) { // Call a native DOM method on the target with the same name as the event. // Don't do default actions on window, that's where global variables be (#6170) if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method tmp = elem[ ontype ]; if ( tmp ) { elem[ ontype ] = null; } // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; if ( event.isPropagationStopped() ) { lastElement.addEventListener( type, stopPropagationCallback ); } elem[ type ](); if ( event.isPropagationStopped() ) { lastElement.removeEventListener( type, stopPropagationCallback ); } jQuery.event.triggered = undefined; if ( tmp ) { elem[ ontype ] = tmp; } } } } return event.result; }, // Piggyback on a donor event to simulate a different one // Used only for `focus(in | out)` events simulate: function( type, elem, event ) { var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true } ); jQuery.event.trigger( e, null, elem ); } } ); jQuery.fn.extend( { trigger: function( type, data ) { return this.each( function() { jQuery.event.trigger( type, data, this ); } ); }, triggerHandler: function( type, data ) { var elem = this[ 0 ]; if ( elem ) { return jQuery.event.trigger( type, data, elem, true ); } } } ); // Support: Firefox <=44 // Firefox doesn't have focus(in | out) events // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 // // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 // focus(in | out) events fire after focus & blur events, // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 if ( !support.focusin ) { jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler on the document while someone wants focusin/focusout var handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); }; jQuery.event.special[ fix ] = { setup: function() { var doc = this.ownerDocument || this, attaches = dataPriv.access( doc, fix ); if ( !attaches ) { doc.addEventListener( orig, handler, true ); } dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); }, teardown: function() { var doc = this.ownerDocument || this, attaches = dataPriv.access( doc, fix ) - 1; if ( !attaches ) { doc.removeEventListener( orig, handler, true ); dataPriv.remove( doc, fix ); } else { dataPriv.access( doc, fix, attaches ); } } }; } ); } var location = window.location; var nonce = Date.now(); var rquery = ( /\?/ ); // Cross-browser xml parsing jQuery.parseXML = function( data ) { var xml; if ( !data || typeof data !== "string" ) { return null; } // Support: IE 9 - 11 only // IE throws on parseFromString with invalid input. try { xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); } catch ( e ) { xml = undefined; } if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { jQuery.error( "Invalid XML: " + data ); } return xml; }; var rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i; function buildParams( prefix, obj, traditional, add ) { var name; if ( Array.isArray( obj ) ) { // Serialize array item. jQuery.each( obj, function( i, v ) { if ( traditional || rbracket.test( prefix ) ) { // Treat each array item as a scalar. add( prefix, v ); } else { // Item is non-scalar (array or object), encode its numeric index. buildParams( prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", v, traditional, add ); } } ); } else if ( !traditional && toType( obj ) === "object" ) { // Serialize object item. for ( name in obj ) { buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); } } else { // Serialize scalar item. add( prefix, obj ); } } // Serialize an array of form elements or a set of // key/values into a query string jQuery.param = function( a, traditional ) { var prefix, s = [], add = function( key, valueOrFunction ) { // If value is a function, invoke it and use its return value var value = isFunction( valueOrFunction ) ? valueOrFunction() : valueOrFunction; s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value == null ? "" : value ); }; // If an array was passed in, assume that it is an array of form elements. if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { // Serialize the form elements jQuery.each( a, function() { add( this.name, this.value ); } ); } else { // If traditional, encode the "old" way (the way 1.3.2 or older // did it), otherwise encode params recursively. for ( prefix in a ) { buildParams( prefix, a[ prefix ], traditional, add ); } } // Return the resulting serialization return s.join( "&" ); }; jQuery.fn.extend( { serialize: function() { return jQuery.param( this.serializeArray() ); }, serializeArray: function() { return this.map( function() { // Can add propHook for "elements" to filter or add form elements var elements = jQuery.prop( this, "elements" ); return elements ? jQuery.makeArray( elements ) : this; } ) .filter( function() { var type = this.type; // Use .is( ":disabled" ) so that fieldset[disabled] works return this.name && !jQuery( this ).is( ":disabled" ) && rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && ( this.checked || !rcheckableType.test( type ) ); } ) .map( function( i, elem ) { var val = jQuery( this ).val(); if ( val == null ) { return null; } if ( Array.isArray( val ) ) { return jQuery.map( val, function( val ) { return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; } ); } return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; } ).get(); } } ); var r20 = /%20/g, rhash = /#.*$/, rantiCache = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport * - AFTER param serialization (s.data is a string if s.processData is true) * 3) key is the dataType * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */ prefilters = {}, /* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */ transports = {}, // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression allTypes = "*/".concat( "*" ), // Anchor tag for parsing the document origin originAnchor = document.createElement( "a" ); originAnchor.href = location.href; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; if ( isFunction( func ) ) { // For each dataType in the dataTypeExpression while ( ( dataType = dataTypes[ i++ ] ) ) { // Prepend if requested if ( dataType[ 0 ] === "+" ) { dataType = dataType.slice( 1 ) || "*"; ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); // Otherwise append } else { ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); } } } }; } // Base inspection function for prefilters and transports function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { var inspected = {}, seekingTransport = ( structure === transports ); function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { options.dataTypes.unshift( dataTypeOrTransport ); inspect( dataTypeOrTransport ); return false; } else if ( seekingTransport ) { return !( selected = dataTypeOrTransport ); } } ); return selected; } return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); } // A special extend for ajax options // that takes "flat" options (not to be deep extended) // Fixes #9887 function ajaxExtend( target, src ) { var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } return target; } /* Handles responses to an ajax request: * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process while ( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); } } // Check if we're dealing with a known content-type if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { dataTypes.unshift( type ); break; } } } // Check to see if we have a response for the expected dataType if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { // Try convertible dataTypes for ( type in responses ) { if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { finalDataType = type; break; } if ( !firstDataType ) { firstDataType = type; } } // Or just use first one finalDataType = finalDataType || firstDataType; } // If we found a dataType // We add the dataType to the list if needed // and return the corresponding response if ( finalDataType ) { if ( finalDataType !== dataTypes[ 0 ] ) { dataTypes.unshift( finalDataType ); } return responses[ finalDataType ]; } } /* Chain conversions given the request and the original response * Also sets the responseXXX fields on the jqXHR instance */ function ajaxConvert( s, response, jqXHR, isSuccess ) { var conv2, current, conv, tmp, prev, converters = {}, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.converters ) { converters[ conv.toLowerCase() ] = s.converters[ conv ]; } } current = dataTypes.shift(); // Convert to each sequential dataType while ( current ) { if ( s.responseFields[ current ] ) { jqXHR[ s.responseFields[ current ] ] = response; } // Apply the dataFilter if provided if ( !prev && isSuccess && s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } prev = current; current = dataTypes.shift(); if ( current ) { // There's only work to do if current dataType is non-auto if ( current === "*" ) { current = prev; // Convert response if prev dataType is non-auto and differs from current } else if ( prev !== "*" && prev !== current ) { // Seek a direct converter conv = converters[ prev + " " + current ] || converters[ "* " + current ]; // If none found, seek a pair if ( !conv ) { for ( conv2 in converters ) { // If conv2 outputs current tmp = conv2.split( " " ); if ( tmp[ 1 ] === current ) { // If prev can be converted to accepted input conv = converters[ prev + " " + tmp[ 0 ] ] || converters[ "* " + tmp[ 0 ] ]; if ( conv ) { // Condense equivalence converters if ( conv === true ) { conv = converters[ conv2 ]; // Otherwise, insert the intermediate dataType } else if ( converters[ conv2 ] !== true ) { current = tmp[ 0 ]; dataTypes.unshift( tmp[ 1 ] ); } break; } } } } // Apply converter (if not an equivalence) if ( conv !== true ) { // Unless errors are allowed to bubble, catch and return them if ( conv && s.throws ) { response = conv( response ); } else { try { response = conv( response ); } catch ( e ) { return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; } } } } } } return { state: "success", data: response }; } jQuery.extend( { // Counter for holding the number of active queries active: 0, // Last-Modified header cache for next request lastModified: {}, etag: {}, ajaxSettings: { url: location.href, type: "GET", isLocal: rlocalProtocol.test( location.protocol ), global: true, processData: true, async: true, contentType: "application/x-www-form-urlencoded; charset=UTF-8", /* timeout: 0, data: null, dataType: null, username: null, password: null, cache: null, throws: false, traditional: false, headers: {}, */ accepts: { "*": allTypes, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ }, responseFields: { xml: "responseXML", text: "responseText", json: "responseJSON" }, // Data converters // Keys separate source (or catchall "*") and destination types with a single space converters: { // Convert anything to text "* text": String, // Text to html (true = no transformation) "text html": true, // Evaluate text as a json expression "text json": JSON.parse, // Parse text as xml "text xml": jQuery.parseXML }, // For options that shouldn't be deep extended: // you can add your own custom options here if // and when you create one that shouldn't be // deep extended (see ajaxExtend) flatOptions: { url: true, context: true } }, // Creates a full fledged settings object into target // with both ajaxSettings and settings fields. // If target is omitted, writes into ajaxSettings. ajaxSetup: function( target, settings ) { return settings ? // Building a settings object ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : // Extending ajaxSettings ajaxExtend( jQuery.ajaxSettings, target ); }, ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), ajaxTransport: addToPrefiltersOrTransports( transports ), // Main method ajax: function( url, options ) { // If url is an object, simulate pre-1.5 signature if ( typeof url === "object" ) { options = url; url = undefined; } // Force options to be an object options = options || {}; var transport, // URL without anti-cache param cacheURL, // Response headers responseHeadersString, responseHeaders, // timeout handle timeoutTimer, // Url cleanup var urlAnchor, // Request state (becomes false upon send and true upon completion) completed, // To know if global events are to be dispatched fireGlobals, // Loop variable i, // uncached part of the url uncached, // Create the final options object s = jQuery.ajaxSetup( {}, options ), // Callbacks context callbackContext = s.context || s, // Context for global events is callbackContext if it is a DOM node or jQuery collection globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? jQuery( callbackContext ) : jQuery.event, // Deferreds deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks( "once memory" ), // Status-dependent callbacks statusCode = s.statusCode || {}, // Headers (they are sent all at once) requestHeaders = {}, requestHeadersNames = {}, // Default abort message strAbort = "canceled", // Fake xhr jqXHR = { readyState: 0, // Builds headers hashtable if needed getResponseHeader: function( key ) { var match; if ( completed ) { if ( !responseHeaders ) { responseHeaders = {}; while ( ( match = rheaders.exec( responseHeadersString ) ) ) { responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; } } match = responseHeaders[ key.toLowerCase() ]; } return match == null ? null : match; }, // Raw string getAllResponseHeaders: function() { return completed ? responseHeadersString : null; }, // Caches the header setRequestHeader: function( name, value ) { if ( completed == null ) { name = requestHeadersNames[ name.toLowerCase() ] = requestHeadersNames[ name.toLowerCase() ] || name; requestHeaders[ name ] = value; } return this; }, // Overrides response content-type header overrideMimeType: function( type ) { if ( completed == null ) { s.mimeType = type; } return this; }, // Status-dependent callbacks statusCode: function( map ) { var code; if ( map ) { if ( completed ) { // Execute the appropriate callbacks jqXHR.always( map[ jqXHR.status ] ); } else { // Lazy-add the new callbacks in a way that preserves old ones for ( code in map ) { statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; } } } return this; }, // Cancel the request abort: function( statusText ) { var finalText = statusText || strAbort; if ( transport ) { transport.abort( finalText ); } done( 0, finalText ); return this; } }; // Attach deferreds deferred.promise( jqXHR ); // Add protocol if not provided (prefilters might expect it) // Handle falsy url in the settings object (#10093: consistency with old signature) // We also use the url parameter if available s.url = ( ( url || s.url || location.href ) + "" ) .replace( rprotocol, location.protocol + "//" ); // Alias method option to type as per ticket #12004 s.type = options.method || options.type || s.method || s.type; // Extract dataTypes list s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; // A cross-domain request is in order when the origin doesn't match the current origin. if ( s.crossDomain == null ) { urlAnchor = document.createElement( "a" ); // Support: IE <=8 - 11, Edge 12 - 15 // IE throws exception on accessing the href property if url is malformed, // e.g. http://example.com:80x/ try { urlAnchor.href = s.url; // Support: IE <=8 - 11 only // Anchor's host property isn't correctly set when s.url is relative urlAnchor.href = urlAnchor.href; s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host; } catch ( e ) { // If there is an error parsing the URL, assume it is crossDomain, // it can be rejected by the transport if it is invalid s.crossDomain = true; } } // Convert data if not already a string if ( s.data && s.processData && typeof s.data !== "string" ) { s.data = jQuery.param( s.data, s.traditional ); } // Apply prefilters inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // If request was aborted inside a prefilter, stop there if ( completed ) { return jqXHR; } // We can fire global events as of now if asked to // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) fireGlobals = jQuery.event && s.global; // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { jQuery.event.trigger( "ajaxStart" ); } // Uppercase the type s.type = s.type.toUpperCase(); // Determine if request has content s.hasContent = !rnoContent.test( s.type ); // Save the URL in case we're toying with the If-Modified-Since // and/or If-None-Match header later on // Remove hash to simplify url manipulation cacheURL = s.url.replace( rhash, "" ); // More options handling for requests with no content if ( !s.hasContent ) { // Remember the hash so we can put it back uncached = s.url.slice( cacheURL.length ); // If data is available and should be processed, append data to url if ( s.data && ( s.processData || typeof s.data === "string" ) ) { cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; // #9682: remove data so that it's not used in an eventual retry delete s.data; } // Add or update anti-cache param if needed if ( s.cache === false ) { cacheURL = cacheURL.replace( rantiCache, "$1" ); uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; } // Put hash and anti-cache on the URL that will be requested (gh-1732) s.url = cacheURL + uncached; // Change '%20' to '+' if this is encoded form body content (gh-2658) } else if ( s.data && s.processData && ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { s.data = s.data.replace( r20, "+" ); } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { if ( jQuery.lastModified[ cacheURL ] ) { jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); } if ( jQuery.etag[ cacheURL ] ) { jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); } } // Set the correct header, if data is being sent if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { jqXHR.setRequestHeader( "Content-Type", s.contentType ); } // Set the Accepts header for the server, depending on the dataType jqXHR.setRequestHeader( "Accept", s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? s.accepts[ s.dataTypes[ 0 ] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); // Check for headers option for ( i in s.headers ) { jqXHR.setRequestHeader( i, s.headers[ i ] ); } // Allow custom headers/mimetypes and early abort if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { // Abort if not done already and return return jqXHR.abort(); } // Aborting is no longer a cancellation strAbort = "abort"; // Install callbacks on deferreds completeDeferred.add( s.complete ); jqXHR.done( s.success ); jqXHR.fail( s.error ); // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); // If no transport, we auto-abort if ( !transport ) { done( -1, "No Transport" ); } else { jqXHR.readyState = 1; // Send global event if ( fireGlobals ) { globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); } // If request was aborted inside ajaxSend, stop there if ( completed ) { return jqXHR; } // Timeout if ( s.async && s.timeout > 0 ) { timeoutTimer = window.setTimeout( function() { jqXHR.abort( "timeout" ); }, s.timeout ); } try { completed = false; transport.send( requestHeaders, done ); } catch ( e ) { // Rethrow post-completion exceptions if ( completed ) { throw e; } // Propagate others as results done( -1, e ); } } // Callback for when everything is done function done( status, nativeStatusText, responses, headers ) { var isSuccess, success, error, response, modified, statusText = nativeStatusText; // Ignore repeat invocations if ( completed ) { return; } completed = true; // Clear timeout if it exists if ( timeoutTimer ) { window.clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection // (no matter how long the jqXHR object will be used) transport = undefined; // Cache response headers responseHeadersString = headers || ""; // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; // Determine if successful isSuccess = status >= 200 && status < 300 || status === 304; // Get response data if ( responses ) { response = ajaxHandleResponses( s, jqXHR, responses ); } // Convert no matter what (that way responseXXX fields are always set) response = ajaxConvert( s, response, jqXHR, isSuccess ); // If successful, handle type chaining if ( isSuccess ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { modified = jqXHR.getResponseHeader( "Last-Modified" ); if ( modified ) { jQuery.lastModified[ cacheURL ] = modified; } modified = jqXHR.getResponseHeader( "etag" ); if ( modified ) { jQuery.etag[ cacheURL ] = modified; } } // if no content if ( status === 204 || s.type === "HEAD" ) { statusText = "nocontent"; // if not modified } else if ( status === 304 ) { statusText = "notmodified"; // If we have data, let's convert it } else { statusText = response.state; success = response.data; error = response.error; isSuccess = !error; } } else { // Extract error from statusText and normalize for non-aborts error = statusText; if ( status || !statusText ) { statusText = "error"; if ( status < 0 ) { status = 0; } } } // Set data for the fake xhr object jqXHR.status = status; jqXHR.statusText = ( nativeStatusText || statusText ) + ""; // Success/Error if ( isSuccess ) { deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); } else { deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); } // Status-dependent callbacks jqXHR.statusCode( statusCode ); statusCode = undefined; if ( fireGlobals ) { globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", [ jqXHR, s, isSuccess ? success : error ] ); } // Complete completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // Handle the global AJAX counter if ( !( --jQuery.active ) ) { jQuery.event.trigger( "ajaxStop" ); } } } return jqXHR; }, getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); }, getScript: function( url, callback ) { return jQuery.get( url, undefined, callback, "script" ); } } ); jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // Shift arguments if data argument was omitted if ( isFunction( data ) ) { type = type || callback; callback = data; data = undefined; } // The url can be an options object (which then must have .url) return jQuery.ajax( jQuery.extend( { url: url, type: method, dataType: type, data: data, success: callback }, jQuery.isPlainObject( url ) && url ) ); }; } ); jQuery._evalUrl = function( url ) { return jQuery.ajax( { url: url, // Make this explicit, since user can override this through ajaxSetup (#11264) type: "GET", dataType: "script", cache: true, async: false, global: false, "throws": true } ); }; jQuery.fn.extend( { wrapAll: function( html ) { var wrap; if ( this[ 0 ] ) { if ( isFunction( html ) ) { html = html.call( this[ 0 ] ); } // The elements to wrap the target around wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); if ( this[ 0 ].parentNode ) { wrap.insertBefore( this[ 0 ] ); } wrap.map( function() { var elem = this; while ( elem.firstElementChild ) { elem = elem.firstElementChild; } return elem; } ).append( this ); } return this; }, wrapInner: function( html ) { if ( isFunction( html ) ) { return this.each( function( i ) { jQuery( this ).wrapInner( html.call( this, i ) ); } ); } return this.each( function() { var self = jQuery( this ), contents = self.contents(); if ( contents.length ) { contents.wrapAll( html ); } else { self.append( html ); } } ); }, wrap: function( html ) { var htmlIsFunction = isFunction( html ); return this.each( function( i ) { jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); } ); }, unwrap: function( selector ) { this.parent( selector ).not( "body" ).each( function() { jQuery( this ).replaceWith( this.childNodes ); } ); return this; } } ); jQuery.expr.pseudos.hidden = function( elem ) { return !jQuery.expr.pseudos.visible( elem ); }; jQuery.expr.pseudos.visible = function( elem ) { return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); }; jQuery.ajaxSettings.xhr = function() { try { return new window.XMLHttpRequest(); } catch ( e ) {} }; var xhrSuccessStatus = { // File protocol always yields status code 0, assume 200 0: 200, // Support: IE <=9 only // #1450: sometimes IE returns 1223 when it should be 204 1223: 204 }, xhrSupported = jQuery.ajaxSettings.xhr(); support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); support.ajax = xhrSupported = !!xhrSupported; jQuery.ajaxTransport( function( options ) { var callback, errorCallback; // Cross domain only allowed if supported through XMLHttpRequest if ( support.cors || xhrSupported && !options.crossDomain ) { return { send: function( headers, complete ) { var i, xhr = options.xhr(); xhr.open( options.type, options.url, options.async, options.username, options.password ); // Apply custom fields if provided if ( options.xhrFields ) { for ( i in options.xhrFields ) { xhr[ i ] = options.xhrFields[ i ]; } } // Override mime type if needed if ( options.mimeType && xhr.overrideMimeType ) { xhr.overrideMimeType( options.mimeType ); } // X-Requested-With header // For cross-domain requests, seeing as conditions for a preflight are // akin to a jigsaw puzzle, we simply never set it to be sure. // (it can always be set on a per-request basis or even using ajaxSetup) // For same-domain requests, won't change header if already provided. if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { headers[ "X-Requested-With" ] = "XMLHttpRequest"; } // Set headers for ( i in headers ) { xhr.setRequestHeader( i, headers[ i ] ); } // Callback callback = function( type ) { return function() { if ( callback ) { callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null; if ( type === "abort" ) { xhr.abort(); } else if ( type === "error" ) { // Support: IE <=9 only // On a manual native abort, IE9 throws // errors on any property access that is not readyState if ( typeof xhr.status !== "number" ) { complete( 0, "error" ); } else { complete( // File: protocol always yields status 0; see #8605, #14207 xhr.status, xhr.statusText ); } } else { complete( xhrSuccessStatus[ xhr.status ] || xhr.status, xhr.statusText, // Support: IE <=9 only // IE9 has no XHR2 but throws on binary (trac-11426) // For XHR2 non-text, let the caller handle it (gh-2498) ( xhr.responseType || "text" ) !== "text" || typeof xhr.responseText !== "string" ? { binary: xhr.response } : { text: xhr.responseText }, xhr.getAllResponseHeaders() ); } } }; }; // Listen to events xhr.onload = callback(); errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); // Support: IE 9 only // Use onreadystatechange to replace onabort // to handle uncaught aborts if ( xhr.onabort !== undefined ) { xhr.onabort = errorCallback; } else { xhr.onreadystatechange = function() { // Check readyState before timeout as it changes if ( xhr.readyState === 4 ) { // Allow onerror to be called first, // but that will not handle a native abort // Also, save errorCallback to a variable // as xhr.onerror cannot be accessed window.setTimeout( function() { if ( callback ) { errorCallback(); } } ); } }; } // Create the abort callback callback = callback( "abort" ); try { // Do send the request (this may raise an exception) xhr.send( options.hasContent && options.data || null ); } catch ( e ) { // #14683: Only rethrow if this hasn't been notified as an error yet if ( callback ) { throw e; } } }, abort: function() { if ( callback ) { callback(); } } }; } } ); // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) jQuery.ajaxPrefilter( function( s ) { if ( s.crossDomain ) { s.contents.script = false; } } ); // Install script dataType jQuery.ajaxSetup( { accepts: { script: "text/javascript, application/javascript, " + "application/ecmascript, application/x-ecmascript" }, contents: { script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function( text ) { jQuery.globalEval( text ); return text; } } } ); // Handle cache's special case and crossDomain jQuery.ajaxPrefilter( "script", function( s ) { if ( s.cache === undefined ) { s.cache = false; } if ( s.crossDomain ) { s.type = "GET"; } } ); // Bind script tag hack transport jQuery.ajaxTransport( "script", function( s ) { // This transport only deals with cross domain requests if ( s.crossDomain ) { var script, callback; return { send: function( _, complete ) { script = jQuery( "<script>" ).prop( { charset: s.scriptCharset, src: s.url } ).on( "load error", callback = function( evt ) { script.remove(); callback = null; if ( evt ) { complete( evt.type === "error" ? 404 : 200, evt.type ); } } ); // Use native DOM manipulation to avoid our domManip AJAX trickery document.head.appendChild( script[ 0 ] ); }, abort: function() { if ( callback ) { callback(); } } }; } } ); var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/; // Default jsonp settings jQuery.ajaxSetup( { jsonp: "callback", jsonpCallback: function() { var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); this[ callback ] = true; return callback; } } ); // Detect, normalize options and install callbacks for jsonp requests jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? "url" : typeof s.data === "string" && ( s.contentType || "" ) .indexOf( "application/x-www-form-urlencoded" ) === 0 && rjsonp.test( s.data ) && "data" ); // Handle iff the expected data type is "jsonp" or we have a parameter to set if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { // Get callback name, remembering preexisting value associated with it callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback; // Insert callback into url or form data if ( jsonProp ) { s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); } else if ( s.jsonp !== false ) { s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; } // Use data converter to retrieve json after script execution s.converters[ "script json" ] = function() { if ( !responseContainer ) { jQuery.error( callbackName + " was not called" ); } return responseContainer[ 0 ]; }; // Force json dataType s.dataTypes[ 0 ] = "json"; // Install callback overwritten = window[ callbackName ]; window[ callbackName ] = function() { responseContainer = arguments; }; // Clean-up function (fires after converters) jqXHR.always( function() { // If previous value didn't exist - remove it if ( overwritten === undefined ) { jQuery( window ).removeProp( callbackName ); // Otherwise restore preexisting value } else { window[ callbackName ] = overwritten; } // Save back as free if ( s[ callbackName ] ) { // Make sure that re-using the options doesn't screw things around s.jsonpCallback = originalSettings.jsonpCallback; // Save the callback name for future use oldCallbacks.push( callbackName ); } // Call if it was a function and we have a response if ( responseContainer && isFunction( overwritten ) ) { overwritten( responseContainer[ 0 ] ); } responseContainer = overwritten = undefined; } ); // Delegate to script return "script"; } } ); // Support: Safari 8 only // In Safari 8 documents created via document.implementation.createHTMLDocument // collapse sibling forms: the second one becomes a child of the first one. // Because of that, this security measure has to be disabled in Safari 8. // https://bugs.webkit.org/show_bug.cgi?id=137337 support.createHTMLDocument = ( function() { var body = document.implementation.createHTMLDocument( "" ).body; body.innerHTML = "<form></form><form></form>"; return body.childNodes.length === 2; } )(); // Argument "data" should be string of html // context (optional): If specified, the fragment will be created in this context, // defaults to document // keepScripts (optional): If true, will include scripts passed in the html string jQuery.parseHTML = function( data, context, keepScripts ) { if ( typeof data !== "string" ) { return []; } if ( typeof context === "boolean" ) { keepScripts = context; context = false; } var base, parsed, scripts; if ( !context ) { // Stop scripts or inline event handlers from being executed immediately // by using document.implementation if ( support.createHTMLDocument ) { context = document.implementation.createHTMLDocument( "" ); // Set the base href for the created document // so any parsed elements with URLs // are based on the document's URL (gh-2965) base = context.createElement( "base" ); base.href = document.location.href; context.head.appendChild( base ); } else { context = document; } } parsed = rsingleTag.exec( data ); scripts = !keepScripts && []; // Single tag if ( parsed ) { return [ context.createElement( parsed[ 1 ] ) ]; } parsed = buildFragment( [ data ], context, scripts ); if ( scripts && scripts.length ) { jQuery( scripts ).remove(); } return jQuery.merge( [], parsed.childNodes ); }; /** * Load a url into a page */ jQuery.fn.load = function( url, params, callback ) { var selector, type, response, self = this, off = url.indexOf( " " ); if ( off > -1 ) { selector = stripAndCollapse( url.slice( off ) ); url = url.slice( 0, off ); } // If it's a function if ( isFunction( params ) ) { // We assume that it's the callback callback = params; params = undefined; // Otherwise, build a param string } else if ( params && typeof params === "object" ) { type = "POST"; } // If we have elements to modify, make the request if ( self.length > 0 ) { jQuery.ajax( { url: url, // If "type" variable is undefined, then "GET" method will be used. // Make value of this field explicit since // user can override it through ajaxSetup method type: type || "GET", dataType: "html", data: params } ).done( function( responseText ) { // Save response for use in complete callback response = arguments; self.html( selector ? // If a selector was specified, locate the right elements in a dummy div // Exclude scripts to avoid IE 'Permission Denied' errors jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : // Otherwise use the full result responseText ); // If the request succeeds, this function gets "data", "status", "jqXHR" // but they are ignored because response was set above. // If it fails, this function gets "jqXHR", "status", "error" } ).always( callback && function( jqXHR, status ) { self.each( function() { callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); } ); } ); } return this; }; // Attach a bunch of functions for handling common AJAX events jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) { jQuery.fn[ type ] = function( fn ) { return this.on( type, fn ); }; } ); jQuery.expr.pseudos.animated = function( elem ) { return jQuery.grep( jQuery.timers, function( fn ) { return elem === fn.elem; } ).length; }; jQuery.offset = { setOffset: function( elem, options, i ) { var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, position = jQuery.css( elem, "position" ), curElem = jQuery( elem ), props = {}; // Set position first, in-case top/left are set even on static elem if ( position === "static" ) { elem.style.position = "relative"; } curOffset = curElem.offset(); curCSSTop = jQuery.css( elem, "top" ); curCSSLeft = jQuery.css( elem, "left" ); calculatePosition = ( position === "absolute" || position === "fixed" ) && ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1; // Need to be able to calculate position if either // top or left is auto and position is either absolute or fixed if ( calculatePosition ) { curPosition = curElem.position(); curTop = curPosition.top; curLeft = curPosition.left; } else { curTop = parseFloat( curCSSTop ) || 0; curLeft = parseFloat( curCSSLeft ) || 0; } if ( isFunction( options ) ) { // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) options = options.call( elem, i, jQuery.extend( {}, curOffset ) ); } if ( options.top != null ) { props.top = ( options.top - curOffset.top ) + curTop; } if ( options.left != null ) { props.left = ( options.left - curOffset.left ) + curLeft; } if ( "using" in options ) { options.using.call( elem, props ); } else { curElem.css( props ); } } }; jQuery.fn.extend( { // offset() relates an element's border box to the document origin offset: function( options ) { // Preserve chaining for setter if ( arguments.length ) { return options === undefined ? this : this.each( function( i ) { jQuery.offset.setOffset( this, options, i ); } ); } var rect, win, elem = this[ 0 ]; if ( !elem ) { return; } // Return zeros for disconnected and hidden (display: none) elements (gh-2310) // Support: IE <=11 only // Running getBoundingClientRect on a // disconnected node in IE throws an error if ( !elem.getClientRects().length ) { return { top: 0, left: 0 }; } // Get document-relative position by adding viewport scroll to viewport-relative gBCR rect = elem.getBoundingClientRect(); win = elem.ownerDocument.defaultView; return { top: rect.top + win.pageYOffset, left: rect.left + win.pageXOffset }; }, // position() relates an element's margin box to its offset parent's padding box // This corresponds to the behavior of CSS absolute positioning position: function() { if ( !this[ 0 ] ) { return; } var offsetParent, offset, doc, elem = this[ 0 ], parentOffset = { top: 0, left: 0 }; // position:fixed elements are offset from the viewport, which itself always has zero offset if ( jQuery.css( elem, "position" ) === "fixed" ) { // Assume position:fixed implies availability of getBoundingClientRect offset = elem.getBoundingClientRect(); } else { offset = this.offset(); // Account for the *real* offset parent, which can be the document or its root element // when a statically positioned element is identified doc = elem.ownerDocument; offsetParent = elem.offsetParent || doc.documentElement; while ( offsetParent && ( offsetParent === doc.body || offsetParent === doc.documentElement ) && jQuery.css( offsetParent, "position" ) === "static" ) { offsetParent = offsetParent.parentNode; } if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) { // Incorporate borders into its offset, since they are outside its content origin parentOffset = jQuery( offsetParent ).offset(); parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true ); parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true ); } } // Subtract parent offsets and element margins return { top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true ) }; }, // This method will return documentElement in the following cases: // 1) For the element inside the iframe without offsetParent, this method will return // documentElement of the parent window // 2) For the hidden or detached element // 3) For body or html element, i.e. in case of the html node - it will return itself // // but those exceptions were never presented as a real life use-cases // and might be considered as more preferable results. // // This logic, however, is not guaranteed and can change at any point in the future offsetParent: function() { return this.map( function() { var offsetParent = this.offsetParent; while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) { offsetParent = offsetParent.offsetParent; } return offsetParent || documentElement; } ); } } ); // Create scrollLeft and scrollTop methods jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { var top = "pageYOffset" === prop; jQuery.fn[ method ] = function( val ) { return access( this, function( elem, method, val ) { // Coalesce documents and windows var win; if ( isWindow( elem ) ) { win = elem; } else if ( elem.nodeType === 9 ) { win = elem.defaultView; } if ( val === undefined ) { return win ? win[ prop ] : elem[ method ]; } if ( win ) { win.scrollTo( !top ? val : win.pageXOffset, top ? val : win.pageYOffset ); } else { elem[ method ] = val; } }, method, val, arguments.length ); }; } ); // Support: Safari <=7 - 9.1, Chrome <=37 - 49 // Add the top/left cssHooks using jQuery.fn.position // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 // Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347 // getComputedStyle returns percent when specified for top/left/bottom/right; // rather than make the css module depend on the offset module, just check for it here jQuery.each( [ "top", "left" ], function( i, prop ) { jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, function( elem, computed ) { if ( computed ) { computed = curCSS( elem, prop ); // If curCSS returns percentage, fallback to offset return rnumnonpx.test( computed ) ? jQuery( elem ).position()[ prop ] + "px" : computed; } } ); } ); // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { // Margin is only for outerHeight, outerWidth jQuery.fn[ funcName ] = function( margin, value ) { var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); return access( this, function( elem, type, value ) { var doc; if ( isWindow( elem ) ) { // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729) return funcName.indexOf( "outer" ) === 0 ? elem[ "inner" + name ] : elem.document.documentElement[ "client" + name ]; } // Get document width or height if ( elem.nodeType === 9 ) { doc = elem.documentElement; // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], // whichever is greatest return Math.max( elem.body[ "scroll" + name ], doc[ "scroll" + name ], elem.body[ "offset" + name ], doc[ "offset" + name ], doc[ "client" + name ] ); } return value === undefined ? // Get width or height on the element, requesting but not forcing parseFloat jQuery.css( elem, type, extra ) : // Set width or height on the element jQuery.style( elem, type, value, extra ); }, type, chainable ? margin : undefined, chainable ); }; } ); } ); jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup contextmenu" ).split( " " ), function( i, name ) { // Handle event binding jQuery.fn[ name ] = function( data, fn ) { return arguments.length > 0 ? this.on( name, null, data, fn ) : this.trigger( name ); }; } ); jQuery.fn.extend( { hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); } } ); jQuery.fn.extend( { bind: function( types, data, fn ) { return this.on( types, null, data, fn ); }, unbind: function( types, fn ) { return this.off( types, null, fn ); }, delegate: function( selector, types, data, fn ) { return this.on( types, selector, data, fn ); }, undelegate: function( selector, types, fn ) { // ( namespace ) or ( selector, types [, fn] ) return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); } } ); // Bind a function to a context, optionally partially applying any // arguments. // jQuery.proxy is deprecated to promote standards (specifically Function#bind) // However, it is not slated for removal any time soon jQuery.proxy = function( fn, context ) { var tmp, args, proxy; if ( typeof context === "string" ) { tmp = fn[ context ]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if ( !isFunction( fn ) ) { return undefined; } // Simulated bind args = slice.call( arguments, 2 ); proxy = function() { return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || jQuery.guid++; return proxy; }; jQuery.holdReady = function( hold ) { if ( hold ) { jQuery.readyWait++; } else { jQuery.ready( true ); } }; jQuery.isArray = Array.isArray; jQuery.parseJSON = JSON.parse; jQuery.nodeName = nodeName; jQuery.isFunction = isFunction; jQuery.isWindow = isWindow; jQuery.camelCase = camelCase; jQuery.type = toType; jQuery.now = Date.now; jQuery.isNumeric = function( obj ) { // As of jQuery 3.0, isNumeric is limited to // strings and numbers (primitives or objects) // that can be coerced to finite numbers (gh-2662) var type = jQuery.type( obj ); return ( type === "number" || type === "string" ) && // parseFloat NaNs numeric-cast false positives ("") // ...but misinterprets leading-number strings, particularly hex literals ("0x...") // subtraction forces infinities to NaN !isNaN( obj - parseFloat( obj ) ); }; // Register as a named AMD module, since jQuery can be concatenated with other // files that may use define, but not via a proper concatenation script that // understands anonymous AMD modules. A named AMD is safest and most robust // way to register. Lowercase jquery is used because AMD module names are // derived from file names, and jQuery is normally delivered in a lowercase // file name. Do this after creating the global so that if an AMD module wants // to call noConflict to hide this version of jQuery, it will work. // Note that for maximum portability, libraries that are not jQuery should // declare themselves as anonymous modules, and avoid setting a global if an // AMD loader is present. jQuery is a special case. For more information, see // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon if ( typeof define === "function" && define.amd ) { define( "jquery", [], function() { return jQuery; } ); } var // Map over jQuery in case of overwrite _jQuery = window.jQuery, // Map over the $ in case of overwrite _$ = window.$; jQuery.noConflict = function( deep ) { if ( window.$ === jQuery ) { window.$ = _$; } if ( deep && window.jQuery === jQuery ) { window.jQuery = _jQuery; } return jQuery; }; // Expose jQuery and $ identifiers, even in AMD // (#7102#comment:10, https://github.com/jquery/jquery/pull/557) // and CommonJS for browser emulators (#13566) if ( !noGlobal ) { window.jQuery = window.$ = jQuery; } return jQuery; } );
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_static/pygments.css
pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight { background: #f8f8f8; } .highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ .highlight .err { border: 1px solid #FF0000 } /* Error */ .highlight .k { color: #008000; font-weight: bold } /* Keyword */ .highlight .o { color: #666666 } /* Operator */ .highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ .highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ .highlight .cp { color: #9C6500 } /* Comment.Preproc */ .highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ .highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ .highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ .highlight .gd { color: #A00000 } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #E40000 } /* Generic.Error */ .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ .highlight .gi { color: #008400 } /* Generic.Inserted */ .highlight .go { color: #717171 } /* Generic.Output */ .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ .highlight .gt { color: #0044DD } /* Generic.Traceback */ .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008000 } /* Keyword.Pseudo */ .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #B00040 } /* Keyword.Type */ .highlight .m { color: #666666 } /* Literal.Number */ .highlight .s { color: #BA2121 } /* Literal.String */ .highlight .na { color: #687822 } /* Name.Attribute */ .highlight .nb { color: #008000 } /* Name.Builtin */ .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ .highlight .no { color: #880000 } /* Name.Constant */ .highlight .nd { color: #AA22FF } /* Name.Decorator */ .highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ .highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0000FF } /* Name.Function */ .highlight .nl { color: #767600 } /* Name.Label */ .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #19177C } /* Name.Variable */ .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #666666 } /* Literal.Number.Bin */ .highlight .mf { color: #666666 } /* Literal.Number.Float */ .highlight .mh { color: #666666 } /* Literal.Number.Hex */ .highlight .mi { color: #666666 } /* Literal.Number.Integer */ .highlight .mo { color: #666666 } /* Literal.Number.Oct */ .highlight .sa { color: #BA2121 } /* Literal.String.Affix */ .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ .highlight .sc { color: #BA2121 } /* Literal.String.Char */ .highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ .highlight .s2 { color: #BA2121 } /* Literal.String.Double */ .highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ .highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ .highlight .sx { color: #008000 } /* Literal.String.Other */ .highlight .sr { color: #A45A77 } /* Literal.String.Regex */ .highlight .s1 { color: #BA2121 } /* Literal.String.Single */ .highlight .ss { color: #19177C } /* Literal.String.Symbol */ .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0000FF } /* Name.Function.Magic */ .highlight .vc { color: #19177C } /* Name.Variable.Class */ .highlight .vg { color: #19177C } /* Name.Variable.Global */ .highlight .vi { color: #19177C } /* Name.Variable.Instance */ .highlight .vm { color: #19177C } /* Name.Variable.Magic */ .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_static/documentation_options.js
var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), VERSION: '0.0.0', LANGUAGE: 'None', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt', NAVIGATION_WITH_KEYS: false, };
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_static/css/badge_only.css
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_static/css/theme.css
html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .eqno .headerlink:before,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before,.wy-nav-top a,.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .eqno .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a button.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-left.toctree-expand,.wy-menu-vertical li button.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .eqno .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a button.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-right.toctree-expand,.wy-menu-vertical li button.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .eqno .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a button.pull-left.toctree-expand,.wy-menu-vertical li.on a button.pull-left.toctree-expand,.wy-menu-vertical li button.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .eqno .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a button.pull-right.toctree-expand,.wy-menu-vertical li.on a button.pull-right.toctree-expand,.wy-menu-vertical li button.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before,.icon-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before,.icon-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before,.icon-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:""}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before,.icon-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before,.icon-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:""}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before,.icon-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before,.icon-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before,.wy-menu-vertical li button.toctree-expand:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before,.icon-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content .eqno .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content .eqno a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content p a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li a button.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content .eqno .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content p .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li button.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content .eqno .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a button.toctree-expand,.btn .wy-menu-vertical li.on a button.toctree-expand,.btn .wy-menu-vertical li button.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content .eqno .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a button.toctree-expand,.nav .wy-menu-vertical li.on a button.toctree-expand,.nav .wy-menu-vertical li button.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .eqno .btn .headerlink,.rst-content .eqno .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p .btn .headerlink,.rst-content p .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn button.toctree-expand,.wy-menu-vertical li.current>a .btn button.toctree-expand,.wy-menu-vertical li.current>a .nav button.toctree-expand,.wy-menu-vertical li .nav button.toctree-expand,.wy-menu-vertical li.on a .btn button.toctree-expand,.wy-menu-vertical li.on a .nav button.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .eqno .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li button.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .eqno .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li button.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .eqno .btn .fa-large.headerlink,.rst-content .eqno .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p .btn .fa-large.headerlink,.rst-content p .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn button.fa-large.toctree-expand,.wy-menu-vertical li .nav button.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .eqno .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li button.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .eqno .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li button.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .eqno .btn .fa-spin.headerlink,.rst-content .eqno .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p .btn .fa-spin.headerlink,.rst-content p .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn button.fa-spin.toctree-expand,.wy-menu-vertical li .nav button.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content .eqno .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li button.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content .eqno .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li button.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content .eqno .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li button.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content .eqno .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini button.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:"";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.rst-content .toctree-wrapper ol li p:last-child,.rst-content .toctree-wrapper ol li ul,.rst-content section ol.arabic li ul,.rst-content section ol li p:last-child,.rst-content section ol li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol.arabic li ul li,.rst-content .section ol li ul li,.rst-content .toctree-wrapper ol.arabic li ul li,.rst-content .toctree-wrapper ol li ul li,.rst-content section ol.arabic li ul li,.rst-content section ol li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:""}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs li{display:inline-block}.wy-breadcrumbs li.wy-breadcrumbs-aside{float:right}.wy-breadcrumbs li a{display:inline-block;padding:5px}.wy-breadcrumbs li a:first-child{padding-left:0}.rst-content .wy-breadcrumbs li tt,.wy-breadcrumbs li .rst-content tt,.wy-breadcrumbs li code{padding:5px;border:none;background:none}.rst-content .wy-breadcrumbs li tt.literal,.wy-breadcrumbs li .rst-content tt.literal,.wy-breadcrumbs li code.literal{color:#404040}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li button.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d;border:none;background:none;padding:0}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover button.toctree-expand,.wy-menu-vertical li.on a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 button.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 button.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover button.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active button.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#2980b9;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em;max-width:100%}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search>a:hover{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.version{margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:""}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:""}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .eqno .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content .eqno .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li button.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version button.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}.rst-content .toctree-wrapper>p.caption,.rst-content h1,.rst-content h2,.rst-content h3,.rst-content h4,.rst-content h5,.rst-content h6{margin-bottom:24px}.rst-content img{max-width:100%;height:auto}.rst-content div.figure,.rst-content figure{margin-bottom:24px}.rst-content div.figure .caption-text,.rst-content figure .caption-text{font-style:italic}.rst-content div.figure p:last-child.caption,.rst-content figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center,.rst-content figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img,.rst-content section>a>img,.rst-content section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:"\f08e";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp,.rst-content div.highlight span.linenos{user-select:none;pointer-events:none}.rst-content div.highlight span.linenos{display:inline-block;padding-left:0;padding-right:12px;margin-right:12px;border-right:1px solid #e6e9ea}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li,.rst-content .toctree-wrapper ol.loweralpha,.rst-content .toctree-wrapper ol.loweralpha>li,.rst-content section ol.loweralpha,.rst-content section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li,.rst-content .toctree-wrapper ol.upperalpha,.rst-content .toctree-wrapper ol.upperalpha>li,.rst-content section ol.upperalpha,.rst-content section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*,.rst-content .toctree-wrapper ol li>*,.rst-content .toctree-wrapper ul li>*,.rst-content section ol li>*,.rst-content section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child,.rst-content .toctree-wrapper ol li>:first-child,.rst-content .toctree-wrapper ul li>:first-child,.rst-content section ol li>:first-child,.rst-content section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child,.rst-content .toctree-wrapper ol li>p,.rst-content .toctree-wrapper ol li>p:last-child,.rst-content .toctree-wrapper ul li>p,.rst-content .toctree-wrapper ul li>p:last-child,.rst-content section ol li>p,.rst-content section ol li>p:last-child,.rst-content section ul li>p,.rst-content section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child,.rst-content .toctree-wrapper ol li>p:only-child,.rst-content .toctree-wrapper ol li>p:only-child:last-child,.rst-content .toctree-wrapper ul li>p:only-child,.rst-content .toctree-wrapper ul li>p:only-child:last-child,.rst-content section ol li>p:only-child,.rst-content section ol li>p:only-child:last-child,.rst-content section ul li>p:only-child,.rst-content section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul,.rst-content .toctree-wrapper ol li>ol,.rst-content .toctree-wrapper ol li>ul,.rst-content .toctree-wrapper ul li>ol,.rst-content .toctree-wrapper ul li>ul,.rst-content section ol li>ol,.rst-content section ol li>ul,.rst-content section ul li>ol,.rst-content section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul,.rst-content .toctree-wrapper ol.simple li>*,.rst-content .toctree-wrapper ol.simple li ol,.rst-content .toctree-wrapper ol.simple li ul,.rst-content .toctree-wrapper ul.simple li>*,.rst-content .toctree-wrapper ul.simple li ol,.rst-content .toctree-wrapper ul.simple li ul,.rst-content section ol.simple li>*,.rst-content section ol.simple li ol,.rst-content section ol.simple li ul,.rst-content section ul.simple li>*,.rst-content section ul.simple li ol,.rst-content section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink{opacity:0;font-size:14px;font-family:FontAwesome;margin-left:.5em}.rst-content .code-block-caption .headerlink:focus,.rst-content .code-block-caption:hover .headerlink,.rst-content .eqno .headerlink:focus,.rst-content .eqno:hover .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink:focus,.rst-content .toctree-wrapper>p.caption:hover .headerlink,.rst-content dl dt .headerlink:focus,.rst-content dl dt:hover .headerlink,.rst-content h1 .headerlink:focus,.rst-content h1:hover .headerlink,.rst-content h2 .headerlink:focus,.rst-content h2:hover .headerlink,.rst-content h3 .headerlink:focus,.rst-content h3:hover .headerlink,.rst-content h4 .headerlink:focus,.rst-content h4:hover .headerlink,.rst-content h5 .headerlink:focus,.rst-content h5:hover .headerlink,.rst-content h6 .headerlink:focus,.rst-content h6:hover .headerlink,.rst-content p.caption .headerlink:focus,.rst-content p.caption:hover .headerlink,.rst-content p .headerlink:focus,.rst-content p:hover .headerlink,.rst-content table>caption .headerlink:focus,.rst-content table>caption:hover .headerlink{opacity:1}.rst-content .btn:focus{outline:2px solid}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .hlist{width:100%}.rst-content dl dt span.classifier:before{content:" : "}.rst-content dl dt span.classifier-delimiter{display:none!important}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.field-list>dt:after,html.writer-html5 .rst-content dl.footnote>dt:after{content:":"}html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.footnote>dt>span.brackets{margin-right:.5rem}html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:"["}html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:"]"}html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{font-style:italic}html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.footnote>dd p,html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{font-size:inherit;line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px;max-width:100%}html.writer-html4 .rst-content dl:not(.docutils) .k,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .k{font-style:italic}html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel{border:1px solid #7fbbe3;background:#e7f2fa;font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format("woff2"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format("woff");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format("woff2"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format("woff");font-display:block}
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_static/js/html5shiv.min.js
/** * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */ !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_static/js/html5shiv-printshiv.min.js
/** * @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */ !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document);
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_static/js/badge_only.js
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}});
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros/docs/html/_static/js/theme.js
!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div class='wy-table-responsive'></div>"),n("table.docutils.footnote").wrap("<div class='wy-table-responsive footnote'></div>"),n("table.docutils.citation").wrap("<div class='wy-table-responsive citation'></div>"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n('<button class="toctree-expand" title="Open/close menu"></button>'),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,t){var i=(new Date).getTime(),o=Math.max(0,16-(i-n)),r=window.setTimeout((function(){e(i+o)}),o);return n=i+o,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()}).call(window)},function(n,e){n.exports=jQuery},function(n,e,t){}]);
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/README.md
# Spot ROS Driver ![CP Spot](cp_spot.jpg) ## Documentation Check-out the usage and user documentation [HERE](http://www.clearpathrobotics.com/assets/guides/melodic/spot-ros/)
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_description/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3) project(spot_description) find_package(catkin REQUIRED COMPONENTS) catkin_package() include_directories( ${catkin_INCLUDE_DIRS} )
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_description/package.xml
<?xml version="1.0"?> <package format="2"> <name>spot_description</name> <version>0.0.0</version> <description>The spot_description package</description> <maintainer email="[email protected]">Dave Niewinski</maintainer> <license>BSD</license> <buildtool_depend>catkin</buildtool_depend> <exec_depend>robot_state_publisher</exec_depend> <exec_depend>urdf</exec_depend> <exec_depend>xacro</exec_depend> <export> </export> </package>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_description/launch/description.launch
<launch> <param name="robot_description" command="$(find xacro)/xacro $(find spot_description)/urdf/spot.urdf.xacro --inorder" /> <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" /> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_description/urdf/spot.urdf.xacro
<?xml version="1.0" ?> <robot name="spot" xmlns:xacro="http://www.ros.org/wiki/xacro"> <link name="body"> <visual> <geometry> <mesh filename="package://spot_description/meshes/body.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/body_collision.stl" /> </geometry> </collision> </link> <link name="base_link"/> <joint name="base_link_joint" type="fixed"> <origin xyz="0 0 0" rpy="0 0 0" /> <parent link="body" /> <child link="base_link" /> </joint> <link name="front_rail"/> <joint name="front_rail_joint" type="fixed"> <origin xyz="0.223 0 0.0805" rpy="0 0 0" /> <parent link="body" /> <child link="front_rail" /> </joint> <link name="rear_rail"/> <joint name="rear_rail_joint" type="fixed"> <origin xyz="-0.223 0 0.0805" rpy="0 0 0" /> <parent link="body" /> <child link="rear_rail" /> </joint> <link name="front_left_hip"> <visual> <geometry> <mesh filename="package://spot_description/meshes/front_left_hip.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/front_left_hip_collision.stl" /> </geometry> </collision> </link> <joint name="front_left_hip_x" type="revolute"> <origin xyz="0.29785 0.05500 0.00000" rpy="0 0 0" /> <axis xyz="1 0 0" /> <parent link="body" /> <child link="front_left_hip" /> <limit effort="1000" velocity="1000.00" lower="-0.78539816339744827899" upper="0.78539816339744827899" /> </joint> <link name="front_left_upper_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/front_left_upper_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/front_left_upper_leg_collision.stl" /> </geometry> </collision> </link> <joint name="front_left_hip_y" type="revolute"> <origin xyz="0.0 0.110945 0.0" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="front_left_hip" /> <child link="front_left_upper_leg" /> <limit effort="1000" velocity="1000.00" lower="-0.89884456477707963539" upper="2.2951079663725435509" /> </joint> <link name="front_left_lower_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/front_left_lower_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/front_left_lower_leg_collision.stl" /> </geometry> </collision> </link> <joint name="front_left_knee" type="revolute"> <origin xyz="0.025 0.000 -0.3205" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="front_left_upper_leg" /> <child link="front_left_lower_leg" /> <limit effort="1000" velocity="1000.00" lower="-2.7929" upper="-0.254801" /> </joint> <link name="front_right_hip"> <visual> <geometry> <mesh filename="package://spot_description/meshes/front_right_hip.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/front_right_hip_collision.stl" /> </geometry> </collision> </link> <joint name="front_right_hip_x" type="revolute"> <origin xyz="0.29785 -0.05500 0.00000" rpy="0 0 0" /> <axis xyz="1 0 0" /> <parent link="body" /> <child link="front_right_hip" /> <limit effort="1000" velocity="1000.00" lower="-0.78539816339744827899" upper="0.78539816339744827899" /> </joint> <link name="front_right_upper_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/front_right_upper_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/front_right_upper_leg_collision.stl" /> </geometry> </collision> </link> <joint name="front_right_hip_y" type="revolute"> <origin xyz="0.0 -0.110945 0.0" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="front_right_hip" /> <child link="front_right_upper_leg" /> <limit effort="1000" velocity="1000.00" lower="-0.89884456477707963539" upper="2.2951079663725435509" /> </joint> <link name="front_right_lower_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/front_right_lower_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/front_right_lower_leg_collision.stl" /> </geometry> </collision> </link> <joint name="front_right_knee" type="revolute"> <origin xyz="0.025 0.000 -0.3205" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="front_right_upper_leg" /> <child link="front_right_lower_leg" /> <limit effort="1000" velocity="1000.00" lower="-2.7929" upper="-0.247563" /> </joint> <link name="rear_left_hip"> <visual> <geometry> <mesh filename="package://spot_description/meshes/rear_left_hip.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/rear_left_hip_collision.stl" /> </geometry> </collision> </link> <joint name="rear_left_hip_x" type="revolute"> <origin xyz="-0.29785 0.05500 0.00000" rpy="0 0 0" /> <axis xyz="1 0 0" /> <parent link="body" /> <child link="rear_left_hip" /> <limit effort="1000" velocity="1000.00" lower="-0.78539816339744827899" upper="0.78539816339744827899" /> </joint> <link name="rear_left_upper_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/rear_left_upper_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/rear_left_upper_leg_collision.stl" /> </geometry> </collision> </link> <joint name="rear_left_hip_y" type="revolute"> <origin xyz="0.0 0.110945 0.0" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="rear_left_hip" /> <child link="rear_left_upper_leg" /> <limit effort="1000" velocity="1000.00" lower="-0.89884456477707963539" upper="2.2951079663725435509" /> </joint> <link name="rear_left_lower_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/rear_left_lower_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/rear_left_lower_leg_collision.stl" /> </geometry> </collision> </link> <joint name="rear_left_knee" type="revolute"> <origin xyz="0.025 0.000 -0.3205" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="rear_left_upper_leg" /> <child link="rear_left_lower_leg" /> <limit effort="1000" velocity="1000.00" lower="-2.7929" upper="-0.267153" /> </joint> <link name="rear_right_hip"> <visual> <geometry> <mesh filename="package://spot_description/meshes/rear_right_hip.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/rear_right_hip_collision.stl" /> </geometry> </collision> </link> <joint name="rear_right_hip_x" type="revolute"> <origin xyz="-0.29785 -0.05500 0.00000" rpy="0 0 0" /> <axis xyz="1 0 0" /> <parent link="body" /> <child link="rear_right_hip" /> <limit effort="1000" velocity="1000.00" lower="-0.78539816339744827899" upper="0.78539816339744827899" /> </joint> <link name="rear_right_upper_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/rear_right_upper_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/rear_right_upper_leg_collision.stl" /> </geometry> </collision> </link> <joint name="rear_right_hip_y" type="revolute"> <origin xyz="0.0 -0.110945 0.0" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="rear_right_hip" /> <child link="rear_right_upper_leg" /> <limit effort="1000" velocity="1000.00" lower="-0.89884456477707963539" upper="2.2951079663725435509" /> </joint> <link name="rear_right_lower_leg"> <visual> <geometry> <mesh filename="package://spot_description/meshes/rear_right_lower_leg.dae" /> </geometry> </visual> <collision> <geometry> <mesh filename="package://spot_description/meshes/rear_right_lower_leg_collision.stl" /> </geometry> </collision> </link> <joint name="rear_right_knee" type="revolute"> <origin xyz="0.025 0.000 -0.3205" rpy="0 0 0" /> <axis xyz="0 1 0" /> <parent link="rear_right_upper_leg" /> <child link="rear_right_lower_leg" /> <limit effort="1000" velocity="1000.00" lower="-2.7929" upper="-0.257725" /> </joint> <!-- Optional custom includes. --> <xacro:include filename="$(optenv SPOT_URDF_EXTRAS empty.urdf)" /> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_description/urdf/empty.urdf
<robot> <!-- This file is a placeholder which is included by default from spot.urdf.xacro. If a robot is being customized and requires additional URDF, set the SPOT_URDF_EXTRAS environment variable to the full path of the file you would like included. --> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_msgs/CMakeLists.txt
cmake_minimum_required(VERSION 3.0.2) project(spot_msgs) find_package(catkin REQUIRED COMPONENTS geometry_msgs nav_msgs sensor_msgs std_msgs message_generation ) add_message_files( FILES BatteryStateArray.msg BehaviorFault.msg EStopStateArray.msg FootStateArray.msg LeaseArray.msg LeaseOwner.msg Metrics.msg SystemFault.msg WiFiState.msg BatteryState.msg BehaviorFaultState.msg EStopState.msg Feedback.msg FootState.msg Lease.msg LeaseResource.msg PowerState.msg SystemFaultState.msg ) generate_messages( DEPENDENCIES std_msgs geometry_msgs ) catkin_package( CATKIN_DEPENDS message_runtime ) include_directories( ${catkin_INCLUDE_DIRS} )
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_msgs/package.xml
<?xml version="1.0"?> <package format="2"> <name>spot_msgs</name> <version>0.0.0</version> <description>The spot_msgs package</description> <maintainer email="[email protected]">Dave Niewinski</maintainer> <license>BSD</license> <buildtool_depend>catkin</buildtool_depend> <build_depend>geometry_msgs</build_depend> <build_depend>nav_msgs</build_depend> <build_depend>sensor_msgs</build_depend> <build_depend>std_msgs</build_depend> <exec_depend>geometry_msgs</exec_depend> <exec_depend>nav_msgs</exec_depend> <exec_depend>sensor_msgs</exec_depend> <exec_depend>std_msgs</exec_depend> <build_depend>message_generation</build_depend> <exec_depend>message_runtime</exec_depend> <export> </export> </package>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_viz/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3) project(spot_viz) find_package(catkin REQUIRED COMPONENTS) catkin_package() include_directories( ${catkin_INCLUDE_DIRS} )
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_viz/package.xml
<?xml version="1.0"?> <package format="2"> <name>spot_viz</name> <version>0.0.0</version> <description>The spot_viz package</description> <maintainer email="[email protected]">Dave Niewinski</maintainer> <license>BSD</license> <buildtool_depend>catkin</buildtool_depend> <exec_depend>joint_state_publisher</exec_depend> <exec_depend>joint_state_publisher_gui</exec_depend> <exec_depend>rviz</exec_depend> <export> </export> </package>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_viz/launch/view_robot.launch
<launch> <node name="rviz" pkg="rviz" type="rviz" args="-d $(find spot_viz)/rviz/robot.rviz" /> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_viz/launch/view_model.launch
<launch> <include file="$(find spot_description)/launch/description.launch"/> <node name="joint_state_publisher_gui" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" /> <node name="rviz" pkg="rviz" type="rviz" args="-d $(find spot_viz)/rviz/model.rviz" /> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_viz/rviz/robot.rviz
Panels: - Class: rviz/Displays Help Height: 0 Name: Displays Property Tree Widget: Expanded: - /Global Options1 - /Status1 Splitter Ratio: 0.5 Tree Height: 853 - Class: rviz/Selection Name: Selection - Class: rviz/Tool Properties Expanded: - /2D Pose Estimate1 - /2D Nav Goal1 - /Publish Point1 Name: Tool Properties Splitter Ratio: 0.588679016 - Class: rviz/Views Expanded: - /Current View1 Name: Views Splitter Ratio: 0.5 - Class: rviz/Time Experimental: false Name: Time SyncMode: 0 SyncSource: FrontLeftDepthCloud Toolbars: toolButtonStyle: 2 Visualization Manager: Class: "" Displays: - Alpha: 0.5 Cell Size: 1 Class: rviz/Grid Color: 160; 160; 164 Enabled: true Line Style: Line Width: 0.0299999993 Value: Lines Name: Grid Normal Cell Count: 0 Offset: X: 0 Y: 0 Z: 0 Plane: XY Plane Cell Count: 10 Reference Frame: <Fixed Frame> Value: true - Alpha: 1 Class: rviz/RobotModel Collision Enabled: false Enabled: true Links: All Links Enabled: true Expand Joint Details: false Expand Link Details: false Expand Tree: false Link Tree Style: Links in Alphabetic Order body: Alpha: 1 Show Axes: false Show Trail: false Value: true front_left_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true front_left_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true front_left_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true front_right_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true front_right_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true front_right_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_left_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_left_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_left_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_right_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_right_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_right_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true Name: RobotModel Robot Description: robot_description TF Prefix: "" Update Interval: 0 Value: true Visual Enabled: true - Class: rviz/TF Enabled: true Frame Timeout: 15 Frames: All Enabled: true back: Value: true back_fisheye: Value: true body: Value: true front_left_hip: Value: true front_left_lower_leg: Value: true front_left_upper_leg: Value: true front_right_hip: Value: true front_right_lower_leg: Value: true front_right_upper_leg: Value: true frontleft: Value: true frontleft_fisheye: Value: true frontright: Value: true frontright_fisheye: Value: true gpe: Value: true head: Value: true left: Value: true left_fisheye: Value: true odom: Value: true rear_left_hip: Value: true rear_left_lower_leg: Value: true rear_left_upper_leg: Value: true rear_right_hip: Value: true rear_right_lower_leg: Value: true rear_right_upper_leg: Value: true right: Value: true right_fisheye: Value: true vision: Value: true Marker Scale: 0.25 Name: TF Show Arrows: true Show Axes: true Show Names: true Tree: body: front_left_hip: front_left_upper_leg: front_left_lower_leg: {} front_right_hip: front_right_upper_leg: front_right_lower_leg: {} head: back: back_fisheye: {} frontleft: frontleft_fisheye: {} frontright: frontright_fisheye: {} left: left_fisheye: {} right: right_fisheye: {} odom: gpe: {} rear_left_hip: rear_left_upper_leg: rear_left_lower_leg: {} rear_right_hip: rear_right_upper_leg: rear_right_lower_leg: {} vision: {} Update Interval: 0 Value: true - Class: rviz/Group Displays: - Alpha: 1 Auto Size: Auto Size Factor: 1 Value: true Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 2.45363283 Min Value: -0.155580759 Value: true Axis: Z Channel Name: intensity Class: rviz/DepthCloud Color: 255; 255; 255 Color Image Topic: "" Color Transformer: AxisColor Color Transport Hint: raw Decay Time: 0 Depth Map Topic: /spot/depth/frontleft/image Depth Map Transport Hint: raw Enabled: true Invert Rainbow: false Max Color: 255; 255; 255 Max Intensity: 4096 Min Color: 0; 0; 0 Min Intensity: 0 Name: FrontLeftDepthCloud Occlusion Compensation: Occlusion Time-Out: 30 Value: false Position Transformer: XYZ Queue Size: 5 Selectable: true Size (Pixels): 3 Style: Flat Squares Topic Filter: true Use Fixed Frame: true Use rainbow: true Value: true - Alpha: 1 Auto Size: Auto Size Factor: 1 Value: true Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 2.612113 Min Value: -0.112739921 Value: true Axis: Z Channel Name: intensity Class: rviz/DepthCloud Color: 255; 255; 255 Color Image Topic: "" Color Transformer: AxisColor Color Transport Hint: raw Decay Time: 0 Depth Map Topic: /spot/depth/frontright/image Depth Map Transport Hint: raw Enabled: true Invert Rainbow: false Max Color: 255; 255; 255 Max Intensity: 4096 Min Color: 0; 0; 0 Min Intensity: 0 Name: FrontRightDepthCloud Occlusion Compensation: Occlusion Time-Out: 30 Value: false Position Transformer: XYZ Queue Size: 5 Selectable: true Size (Pixels): 3 Style: Flat Squares Topic Filter: true Use Fixed Frame: true Use rainbow: true Value: true - Alpha: 1 Auto Size: Auto Size Factor: 1 Value: true Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 1.41352618 Min Value: -0.128979474 Value: true Axis: Z Channel Name: intensity Class: rviz/DepthCloud Color: 255; 255; 255 Color Image Topic: "" Color Transformer: AxisColor Color Transport Hint: raw Decay Time: 0 Depth Map Topic: /spot/depth/left/image Depth Map Transport Hint: raw Enabled: true Invert Rainbow: false Max Color: 255; 255; 255 Max Intensity: 4096 Min Color: 0; 0; 0 Min Intensity: 0 Name: LeftDepthCloud Occlusion Compensation: Occlusion Time-Out: 30 Value: false Position Transformer: XYZ Queue Size: 5 Selectable: true Size (Pixels): 3 Style: Flat Squares Topic Filter: true Use Fixed Frame: true Use rainbow: true Value: true - Alpha: 1 Auto Size: Auto Size Factor: 1 Value: true Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 1.45274436 Min Value: -0.124786079 Value: true Axis: Z Channel Name: intensity Class: rviz/DepthCloud Color: 255; 255; 255 Color Image Topic: "" Color Transformer: AxisColor Color Transport Hint: raw Decay Time: 0 Depth Map Topic: /spot/depth/right/image Depth Map Transport Hint: raw Enabled: true Invert Rainbow: false Max Color: 255; 255; 255 Max Intensity: 4096 Min Color: 0; 0; 0 Min Intensity: 0 Name: RightDepthCloud Occlusion Compensation: Occlusion Time-Out: 30 Value: false Position Transformer: XYZ Queue Size: 5 Selectable: true Size (Pixels): 3 Style: Flat Squares Topic Filter: true Use Fixed Frame: true Use rainbow: true Value: true - Alpha: 1 Auto Size: Auto Size Factor: 1 Value: true Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 0.655641437 Min Value: -0.0852906406 Value: true Axis: Z Channel Name: intensity Class: rviz/DepthCloud Color: 255; 255; 255 Color Image Topic: "" Color Transformer: AxisColor Color Transport Hint: raw Decay Time: 0 Depth Map Topic: /spot/depth/back/image Depth Map Transport Hint: raw Enabled: true Invert Rainbow: false Max Color: 255; 255; 255 Max Intensity: 4096 Min Color: 0; 0; 0 Min Intensity: 0 Name: RearDepthCloud Occlusion Compensation: Occlusion Time-Out: 30 Value: false Position Transformer: XYZ Queue Size: 5 Selectable: true Size (Pixels): 3 Style: Flat Squares Topic Filter: true Use Fixed Frame: true Use rainbow: true Value: true Enabled: true Name: DepthClouds - Class: rviz/InteractiveMarkers Enable Transparency: true Enabled: true Name: InteractiveMarkers Show Axes: false Show Descriptions: true Show Visual Aids: false Update Topic: /twist_marker_server/update Value: true - Class: rviz/TF Enabled: false Frame Timeout: 15 Frames: All Enabled: true Marker Scale: 1 Name: TF Show Arrows: true Show Axes: true Show Names: true Tree: {} Update Interval: 0 Value: false Enabled: true Global Options: Background Color: 48; 48; 48 Default Light: true Fixed Frame: odom Frame Rate: 30 Name: root Tools: - Class: rviz/Interact Hide Inactive Objects: true - Class: rviz/MoveCamera - Class: rviz/Select - Class: rviz/FocusCamera - Class: rviz/Measure - Class: rviz/SetInitialPose Topic: /initialpose - Class: rviz/SetGoal Topic: /move_base_simple/goal - Class: rviz/PublishPoint Single click: true Topic: /clicked_point Value: true Views: Current: Class: rviz/Orbit Distance: 4.59715652 Enable Stereo Rendering: Stereo Eye Separation: 0.0599999987 Stereo Focal Distance: 1 Swap Stereo Eyes: false Value: false Focal Point: X: -0.143477932 Y: 0.615365922 Z: 0.880245864 Focal Shape Fixed Size: false Focal Shape Size: 0.0500000007 Invert Z Axis: false Name: Current View Near Clip Distance: 0.00999999978 Pitch: 0.530398846 Target Frame: <Fixed Frame> Value: Orbit (rviz) Yaw: 4.32234859 Saved: ~ Window Geometry: Displays: collapsed: false Height: 1056 Hide Left Dock: false Hide Right Dock: true QMainWindow State: 000000ff00000000fd0000000400000000000002ad00000396fc0200000011fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006100fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000002800000396000000d700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e006700000002300000018e0000000000000000fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000000000000000fb0000000a0049006d00610067006501000002f4000000ca0000000000000000fb0000000a0049006d00610067006501000002f4000000ca0000000000000000fb0000000a0049006d006100670065000000013f000000660000000000000000fb0000000a0049006d0061006700650000000164000000940000000000000000fb0000000a0049006d00610067006500000001a3000000e80000000000000000fc00000227000001970000000000fffffffa000000000100000002fb0000000a0049006d0061006700650000000000ffffffff0000000000000000fb0000000a0049006d0061006700650000000000000002ad0000000000000000000000010000010f00000396fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000002800000396000000ad00fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000073f0000003efc0100000002fb0000000800540069006d006501000000000000073f0000030000fffffffb0000000800540069006d006501000000000000045000000000000000000000048c0000039600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 Selection: collapsed: false Time: collapsed: false Tool Properties: collapsed: false Views: collapsed: true Width: 1855 X: 65 Y: 24
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_viz/rviz/model.rviz
Panels: - Class: rviz/Displays Help Height: 78 Name: Displays Property Tree Widget: Expanded: ~ Splitter Ratio: 0.5 Tree Height: 843 - Class: rviz/Selection Name: Selection - Class: rviz/Tool Properties Expanded: ~ Name: Tool Properties Splitter Ratio: 0.588679016 Toolbars: toolButtonStyle: 2 Visualization Manager: Class: "" Displays: - Alpha: 0.5 Cell Size: 1 Class: rviz/Grid Color: 160; 160; 164 Enabled: true Line Style: Line Width: 0.0299999993 Value: Lines Name: Grid Normal Cell Count: 0 Offset: X: 0 Y: 0 Z: 0 Plane: XY Plane Cell Count: 10 Reference Frame: <Fixed Frame> Value: true - Alpha: 1 Class: rviz/RobotModel Collision Enabled: false Enabled: true Links: All Links Enabled: true Expand Joint Details: false Expand Link Details: false Expand Tree: false Link Tree Style: Links in Alphabetic Order body: Alpha: 1 Show Axes: false Show Trail: false Value: true front_left_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true front_left_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true front_left_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true front_right_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true front_right_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true front_right_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_left_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_left_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_left_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_right_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_right_lower_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true rear_right_upper_leg: Alpha: 1 Show Axes: false Show Trail: false Value: true Name: RobotModel Robot Description: robot_description TF Prefix: "" Update Interval: 0 Value: true Visual Enabled: true - Class: rviz/TF Enabled: true Frame Timeout: 15 Frames: All Enabled: true body: Value: true front_left_hip: Value: true front_left_lower_leg: Value: true front_left_upper_leg: Value: true front_right_hip: Value: true front_right_lower_leg: Value: true front_right_upper_leg: Value: true rear_left_hip: Value: true rear_left_lower_leg: Value: true rear_left_upper_leg: Value: true rear_right_hip: Value: true rear_right_lower_leg: Value: true rear_right_upper_leg: Value: true Marker Scale: 0.5 Name: TF Show Arrows: true Show Axes: true Show Names: true Tree: body: front_left_hip: front_left_upper_leg: front_left_lower_leg: {} front_right_hip: front_right_upper_leg: front_right_lower_leg: {} rear_left_hip: rear_left_upper_leg: rear_left_lower_leg: {} rear_right_hip: rear_right_upper_leg: rear_right_lower_leg: {} Update Interval: 0 Value: true Enabled: true Global Options: Background Color: 48; 48; 48 Default Light: true Fixed Frame: body Frame Rate: 30 Name: root Tools: - Class: rviz/MoveCamera Value: true Views: Current: Class: rviz/Orbit Distance: 2.17706323 Enable Stereo Rendering: Stereo Eye Separation: 0.0599999987 Stereo Focal Distance: 1 Swap Stereo Eyes: false Value: false Focal Point: X: -0.00677506765 Y: -0.0620601736 Z: -0.0469833091 Focal Shape Fixed Size: true Focal Shape Size: 0.0500000007 Invert Z Axis: false Name: Current View Near Clip Distance: 0.00999999978 Pitch: 0.680397511 Target Frame: <Fixed Frame> Value: Orbit (rviz) Yaw: 4.65039492 Saved: ~ Window Geometry: Displays: collapsed: false Height: 1056 Hide Left Dock: false Hide Right Dock: false QMainWindow State: 000000ff00000000fd00000004000000000000016a000003dafc0200000005fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006100fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c0061007900730100000028000003da000000d700ffffff000000010000010f0000023cfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a0056006900650077007301000000280000023c0000000000000000fb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004a00000003efc0100000002fb0000000800540069006d00650000000000000004a00000000000000000fb0000000800540069006d00650100000000000004500000000000000000000005cf000003da00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 Selection: collapsed: false Tool Properties: collapsed: false Width: 1855 X: 65 Y: 24
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_driver/rosdoc.yaml
- builder: sphinx sphinx_root_dir: doc
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_driver/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3) project(spot_driver) find_package(catkin REQUIRED COMPONENTS) catkin_package() include_directories( ${catkin_INCLUDE_DIRS} )
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_driver/package.xml
<?xml version="1.0"?> <package format="2"> <name>spot_driver</name> <version>0.0.0</version> <description>The spot_driver package</description> <maintainer email="[email protected]">Dave Niewinski</maintainer> <license>BSD</license> <buildtool_depend>catkin</buildtool_depend> <exec_depend>spot_msgs</exec_depend> <exec_depend>std_srvs</exec_depend> <exec_depend>tf2_msgs</exec_depend> <exec_depend>geometry_msgs</exec_depend> <exec_depend>sensor_msgs</exec_depend> <exec_depend>rospy</exec_depend> <export> <rosdoc config="rosdoc.yaml" /> </export> </package>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/BostonDynamics/spot_ros-CHAMP/spot_driver/launch/control.launch
<launch> <node pkg="interactive_marker_twist_server" type="marker_server" name="twist_marker_server" > <rosparam command="load" file="$(find spot_driver)/config/planar.yaml" /> <param name="link_name" value="body" /> <param name="robot_name" value="spot" /> </node> </launch>