file_path
stringlengths
21
224
content
stringlengths
0
80.8M
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/a1_description/urdf/a1.urdf
<?xml version="1.0" encoding="utf-8"?> <!-- =================================================================================== --> <!-- | This document was autogenerated by xacro from robot.xacro | --> <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | --> <!-- =================================================================================== --> <robot name="a1_description"> <!-- dynamics inertial value --> <!-- trunk --> <!-- <xacro:property name="trunk_mass" value="5.660"/> <xacro:property name="trunk_com_x" value="0.012731"/> <xacro:property name="trunk_com_y" value="0.002186"/> <xacro:property name="trunk_com_z" value="0.000515"/> <xacro:property name="trunk_ixx" value="0.016839930"/> <xacro:property name="trunk_ixy" value="0.000083902"/> <xacro:property name="trunk_ixz" value="0.000597679"/> <xacro:property name="trunk_iyy" value="0.056579028"/> <xacro:property name="trunk_iyz" value="0.000025134"/> <xacro:property name="trunk_izz" value="0.064713601"/> --> <material name="black"> <color rgba="0.0 0.0 0.0 1.0"/> </material> <material name="blue"> <color rgba="0.0 0.0 0.8 1.0"/> </material> <material name="green"> <color rgba="0.0 0.8 0.0 1.0"/> </material> <material name="grey"> <color rgba="0.2 0.2 0.2 1.0"/> </material> <material name="silver"> <color rgba="0.913725490196 0.913725490196 0.847058823529 1.0"/> </material> <material name="orange"> <color rgba="1.0 0.423529411765 0.0392156862745 1.0"/> </material> <material name="brown"> <color rgba="0.870588235294 0.811764705882 0.764705882353 1.0"/> </material> <material name="red"> <color rgba="0.8 0.0 0.0 1.0"/> </material> <material name="white"> <color rgba="1.0 1.0 1.0 1.0"/> </material> <!-- ros_control plugin --> <gazebo> <plugin filename="libgazebo_ros_control.so" name="gazebo_ros_control"> <robotNamespace>/a1_gazebo</robotNamespace> <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType> </plugin> </gazebo> <!-- Show the trajectory of trunk center. --> <gazebo> <plugin filename="libLinkPlot3DPlugin.so" name="3dplotTrunk"> <frequency>10</frequency> <plot> <link>base</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Yellow</material> </plot> </plugin> </gazebo> <!-- Show the trajectory of foot. You can add another trajectory about another foot. --> <gazebo> <plugin filename="libLinkPlot3DPlugin.so" name="3dplot"> <frequency>1000</frequency> <plot> <link>FR_calf</link> <pose>0 0 -0.2 0 0 0</pose> <material>Gazebo/Yellow</material> </plot> </plugin> </gazebo> <gazebo> <plugin filename="libgazebo_ros_force.so" name="gazebo_ros_force"> <bodyName>trunk</bodyName> <topicName>/apply_force/trunk</topicName> </plugin> </gazebo> <gazebo reference="imu_link"> <gravity>true</gravity> <sensor name="imu_sensor" type="imu"> <always_on>true</always_on> <update_rate>1000</update_rate> <visualize>true</visualize> <topic>__default_topic__</topic> <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin"> <topicName>trunk_imu</topicName> <bodyName>imu_link</bodyName> <updateRateHZ>1000.0</updateRateHZ> <gaussianNoise>0.0</gaussianNoise> <xyzOffset>0 0 0</xyzOffset> <rpyOffset>0 0 0</rpyOffset> <frameName>imu_link</frameName> </plugin> <pose>0 0 0 0 0 0</pose> </sensor> </gazebo> <!-- Foot contacts. --> <gazebo reference="FR_calf"> <sensor name="FR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>FR_calf_fixed_joint_lump__FR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="FL_calf"> <sensor name="FL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>FL_calf_fixed_joint_lump__FL_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RR_calf"> <sensor name="RR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>RR_calf_fixed_joint_lump__RR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RL_calf"> <sensor name="RL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>RL_calf_fixed_joint_lump__RL_foot_collision_1</collision> </contact> </sensor> </gazebo> <!-- Visualization of Foot contacts. --> <gazebo reference="FR_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>FR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="FL_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>FL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RR_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>RR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RL_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>RL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="base"> <material>Gazebo/Green</material> <turnGravityOff>false</turnGravityOff> </gazebo> <gazebo reference="trunk"> <mu1>0.2</mu1> <mu2>0.2</mu2> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="stick_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/White</material> </gazebo> <gazebo reference="imu_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/Red</material> </gazebo> <!-- FL leg --> <gazebo reference="FL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- FR leg --> <gazebo reference="FR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RL leg --> <gazebo reference="RL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RR leg --> <gazebo reference="RR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- <xacro:include filename="$(find a1_gazebo)/launch/stairs.urdf.xacro"/> --> <!-- <xacro:stairs stairs="15" xpos="0" ypos="0" zpos="0" /> --> <!-- Debug mode will hung up the robot, use "true" or "false" to switch it. --> <!-- <xacro:if value="$(arg DEBUG)"> <link name="world"/> <joint name="base_static_joint" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="base"/> </joint> </xacro:if> --> <link name="base"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> </visual> </link> <joint name="floating_base" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="base"/> <child link="trunk"/> </joint> <link name="trunk"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://a1_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.267 0.194 0.114"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0041 -0.0005"/> <mass value="6.0"/> <inertia ixx="0.0158533" ixy="-3.66e-05" ixz="-6.11e-05" iyy="0.0377999" iyz="-2.75e-05" izz="0.0456542"/> </inertial> </link> <joint name="imu_joint" type="fixed"> <parent link="trunk"/> <child link="imu_link"/> <origin rpy="0 0 0" xyz="0 0 0"/> </joint> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> <material name="red"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> </link> <joint name="FR_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="0.1805 -0.047 0"/> <parent link="trunk"/> <child link="FR_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="33.5" lower="-0.802851455917" upper="0.802851455917" velocity="21"/> </joint> <link name="FR_hip"> <visual> <origin rpy="3.14159265359 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://a1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.57079632679 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.04" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.003311 -0.000635 3.1e-05"/> <mass value="0.696"/> <inertia ixx="0.000469246" ixy="9.409e-06" ixz="-3.42e-07" iyy="0.00080749" iyz="4.66e-07" izz="0.000552929"/> </inertial> </link> <joint name="FR_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 -0.081 0"/> <parent link="FR_hip"/> <child link="FR_thigh_shoulder"/> </joint> <!-- this link is only for collision --> <link name="FR_thigh_shoulder"> <collision> <origin rpy="1.57079632679 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.032" radius="0.041"/> </geometry> </collision> </link> <joint name="FR_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 -0.0838 0"/> <parent link="FR_hip"/> <child link="FR_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="33.5" lower="-1.0471975512" upper="4.18879020479" velocity="21"/> </joint> <link name="FR_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://a1_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.1"/> <geometry> <box size="0.2 0.0245 0.034"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.003237 0.022327 -0.027326"/> <mass value="1.013"/> <inertia ixx="0.005529065" ixy="-4.825e-06" ixz="0.000343869" iyy="0.005139339" iyz="-2.2448e-05" izz="0.001367788"/> </inertial> </link> <joint name="FR_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.2"/> <parent link="FR_thigh"/> <child link="FR_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="33.5" lower="-2.69653369433" upper="-0.916297857297" velocity="21"/> </joint> <link name="FR_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://a1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.1"/> <geometry> <box size="0.2 0.016 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.006435 0.0 -0.107388"/> <mass value="0.166"/> <inertia ixx="0.002997972" ixy="0.0" ixz="-0.000141163" iyy="0.003014022" iyz="0.0" izz="3.2426e-05"/> </inertial> </link> <joint name="FR_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.2"/> <parent link="FR_calf"/> <child link="FR_foot"/> </joint> <link name="FR_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.01"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.02"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="9.6e-06" ixy="0.0" ixz="0.0" iyy="9.6e-06" iyz="0.0" izz="9.6e-06"/> </inertial> </link> <transmission name="FR_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FR_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FR_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="FL_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="0.1805 0.047 0"/> <parent link="trunk"/> <child link="FL_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="33.5" lower="-0.802851455917" upper="0.802851455917" velocity="21"/> </joint> <link name="FL_hip"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://a1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.57079632679 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.04" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.003311 0.000635 3.1e-05"/> <mass value="0.696"/> <inertia ixx="0.000469246" ixy="-9.409e-06" ixz="-3.42e-07" iyy="0.00080749" iyz="-4.66e-07" izz="0.000552929"/> </inertial> </link> <joint name="FL_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0.081 0"/> <parent link="FL_hip"/> <child link="FL_thigh_shoulder"/> </joint> <!-- this link is only for collision --> <link name="FL_thigh_shoulder"> <collision> <origin rpy="1.57079632679 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.032" radius="0.041"/> </geometry> </collision> </link> <joint name="FL_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0.0838 0"/> <parent link="FL_hip"/> <child link="FL_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="33.5" lower="-1.0471975512" upper="4.18879020479" velocity="21"/> </joint> <link name="FL_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://a1_description/meshes/thigh.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.1"/> <geometry> <box size="0.2 0.0245 0.034"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.003237 -0.022327 -0.027326"/> <mass value="1.013"/> <inertia ixx="0.005529065" ixy="4.825e-06" ixz="0.000343869" iyy="0.005139339" iyz="2.2448e-05" izz="0.001367788"/> </inertial> </link> <joint name="FL_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.2"/> <parent link="FL_thigh"/> <child link="FL_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="33.5" lower="-2.69653369433" upper="-0.916297857297" velocity="21"/> </joint> <link name="FL_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://a1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.1"/> <geometry> <box size="0.2 0.016 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.006435 0.0 -0.107388"/> <mass value="0.166"/> <inertia ixx="0.002997972" ixy="0.0" ixz="-0.000141163" iyy="0.003014022" iyz="0.0" izz="3.2426e-05"/> </inertial> </link> <joint name="FL_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.2"/> <parent link="FL_calf"/> <child link="FL_foot"/> </joint> <link name="FL_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.01"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.02"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="9.6e-06" ixy="0.0" ixz="0.0" iyy="9.6e-06" iyz="0.0" izz="9.6e-06"/> </inertial> </link> <transmission name="FL_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FL_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FL_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="RR_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="-0.1805 -0.047 0"/> <parent link="trunk"/> <child link="RR_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="33.5" lower="-0.802851455917" upper="0.802851455917" velocity="21"/> </joint> <link name="RR_hip"> <visual> <origin rpy="3.14159265359 3.14159265359 0" xyz="0 0 0"/> <geometry> <mesh filename="package://a1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.57079632679 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.04" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.003311 -0.000635 3.1e-05"/> <mass value="0.696"/> <inertia ixx="0.000469246" ixy="-9.409e-06" ixz="3.42e-07" iyy="0.00080749" iyz="4.66e-07" izz="0.000552929"/> </inertial> </link> <joint name="RR_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 -0.081 0"/> <parent link="RR_hip"/> <child link="RR_thigh_shoulder"/> </joint> <!-- this link is only for collision --> <link name="RR_thigh_shoulder"> <collision> <origin rpy="1.57079632679 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.032" radius="0.041"/> </geometry> </collision> </link> <joint name="RR_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 -0.0838 0"/> <parent link="RR_hip"/> <child link="RR_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="33.5" lower="-1.0471975512" upper="4.18879020479" velocity="21"/> </joint> <link name="RR_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://a1_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.1"/> <geometry> <box size="0.2 0.0245 0.034"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.003237 0.022327 -0.027326"/> <mass value="1.013"/> <inertia ixx="0.005529065" ixy="-4.825e-06" ixz="0.000343869" iyy="0.005139339" iyz="-2.2448e-05" izz="0.001367788"/> </inertial> </link> <joint name="RR_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.2"/> <parent link="RR_thigh"/> <child link="RR_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="33.5" lower="-2.69653369433" upper="-0.916297857297" velocity="21"/> </joint> <link name="RR_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://a1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.1"/> <geometry> <box size="0.2 0.016 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.006435 0.0 -0.107388"/> <mass value="0.166"/> <inertia ixx="0.002997972" ixy="0.0" ixz="-0.000141163" iyy="0.003014022" iyz="0.0" izz="3.2426e-05"/> </inertial> </link> <joint name="RR_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.2"/> <parent link="RR_calf"/> <child link="RR_foot"/> </joint> <link name="RR_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.01"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.02"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="9.6e-06" ixy="0.0" ixz="0.0" iyy="9.6e-06" iyz="0.0" izz="9.6e-06"/> </inertial> </link> <transmission name="RR_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RR_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RR_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="RL_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="-0.1805 0.047 0"/> <parent link="trunk"/> <child link="RL_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="33.5" lower="-0.802851455917" upper="0.802851455917" velocity="21"/> </joint> <link name="RL_hip"> <visual> <origin rpy="0 3.14159265359 0" xyz="0 0 0"/> <geometry> <mesh filename="package://a1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.57079632679 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.04" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.003311 0.000635 3.1e-05"/> <mass value="0.696"/> <inertia ixx="0.000469246" ixy="9.409e-06" ixz="3.42e-07" iyy="0.00080749" iyz="-4.66e-07" izz="0.000552929"/> </inertial> </link> <joint name="RL_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0.081 0"/> <parent link="RL_hip"/> <child link="RL_thigh_shoulder"/> </joint> <!-- this link is only for collision --> <link name="RL_thigh_shoulder"> <collision> <origin rpy="1.57079632679 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.032" radius="0.041"/> </geometry> </collision> </link> <joint name="RL_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0.0838 0"/> <parent link="RL_hip"/> <child link="RL_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="33.5" lower="-1.0471975512" upper="4.18879020479" velocity="21"/> </joint> <link name="RL_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://a1_description/meshes/thigh.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.1"/> <geometry> <box size="0.2 0.0245 0.034"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.003237 -0.022327 -0.027326"/> <mass value="1.013"/> <inertia ixx="0.005529065" ixy="4.825e-06" ixz="0.000343869" iyy="0.005139339" iyz="2.2448e-05" izz="0.001367788"/> </inertial> </link> <joint name="RL_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.2"/> <parent link="RL_thigh"/> <child link="RL_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="33.5" lower="-2.69653369433" upper="-0.916297857297" velocity="21"/> </joint> <link name="RL_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://a1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.1"/> <geometry> <box size="0.2 0.016 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.006435 0.0 -0.107388"/> <mass value="0.166"/> <inertia ixx="0.002997972" ixy="0.0" ixz="-0.000141163" iyy="0.003014022" iyz="0.0" izz="3.2426e-05"/> </inertial> </link> <joint name="RL_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.2"/> <parent link="RL_calf"/> <child link="RL_foot"/> </joint> <link name="RL_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.01"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.02"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="9.6e-06" ixy="0.0" ixz="0.0" iyy="9.6e-06" iyz="0.0" izz="9.6e-06"/> </inertial> </link> <transmission name="RL_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RL_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RL_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <!-- <xacro:stairs stairs="15" xpos="0" ypos="2.0" zpos="0" /> --> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/aliengo_description/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3) project(aliengo_description) find_package(catkin REQUIRED COMPONENTS genmsg roscpp std_msgs tf ) catkin_package( CATKIN_DEPENDS ) include_directories( # include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} )
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/aliengo_description/package.xml
<?xml version="1.0"?> <package format="2"> <name>aliengo_description</name> <version>0.0.0</version> <description>The aliengo_description package</description> <maintainer email="aliengo@unitree.cc">unitree</maintainer> <license>TODO</license> <buildtool_depend>catkin</buildtool_depend> <depend>roscpp</depend> <depend>std_msgs</depend> </package>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/aliengo_description/launch/check_joint.rviz
Panels: - Class: rviz/Displays Help Height: 78 Name: Displays Property Tree Widget: Expanded: - /Global Options1 Splitter Ratio: 0.5 Tree Height: 420 - 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: "" 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 FL_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true Link Tree Style: Links in Alphabetic Order RL_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true base: Alpha: 1 Show Axes: false Show Trail: false Value: true imu_link: Alpha: 1 Show Axes: false Show Trail: false Value: true trunk: 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/Axes Enabled: false Length: 1 Name: Axes Radius: 0.10000000149011612 Reference Frame: <Fixed Frame> Value: false - 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: 238; 238; 238 Default Light: true Fixed Frame: base 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: 1.4732182025909424 Enable Stereo Rendering: Stereo Eye Separation: 0.05999999865889549 Stereo Focal Distance: 1 Swap Stereo Eyes: false Value: false Focal Point: X: 0.0760490670800209 Y: 0.11421932280063629 Z: -0.1576911211013794 Focal Shape Fixed Size: false Focal Shape Size: 0.05000000074505806 Invert Z Axis: false Name: Current View Near Clip Distance: 0.009999999776482582 Pitch: 0.49979713559150696 Target Frame: <Fixed Frame> Value: Orbit (rviz) Yaw: 5.093583106994629 Saved: ~ Window Geometry: Displays: collapsed: false Height: 627 Hide Left Dock: false Hide Right Dock: false QMainWindow State: 000000ff00000000fd00000004000000000000016a0000022ffc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c00610079007301000000270000022f000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00430061006d00650072006101000001be000001900000000000000000000000010000010f000002e2fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730000000028000002e2000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000006400000003efc0100000002fb0000000800540069006d0065000000000000000640000002eb00fffffffb0000000800540069006d00650100000000000004500000000000000000000002e40000022f00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 Selection: collapsed: false Time: collapsed: false Tool Properties: collapsed: false Views: collapsed: false Width: 1108 X: 812 Y: 241
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/aliengo_description/launch/aliengo_rviz.launch
<launch> <arg name="user_debug" default="false"/> <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find aliengo_description)/xacro/robot.xacro' DEBUG:=$(arg user_debug)"/> <!-- for higher robot_state_publisher average rate--> <!-- <param name="rate" value="1000"/> --> <!-- send fake joint values --> <node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher"> <param name="use_gui" value="TRUE"/> </node> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher"> <param name="publish_frequency" type="double" value="1000.0"/> </node> <node pkg="rviz" type="rviz" name="rviz" respawn="false" output="screen" args="-d $(find aliengo_description)/launch/check_joint.rviz"/> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/aliengo_description/xacro/materials.xacro
<?xml version="1.0"?> <robot> <material name="black"> <color rgba="0.0 0.0 0.0 1.0"/> </material> <material name="blue"> <color rgba="0.0 0.0 0.8 1.0"/> </material> <material name="green"> <color rgba="0.0 0.8 0.0 1.0"/> </material> <material name="grey"> <color rgba="0.2 0.2 0.2 1.0"/> </material> <material name="silver"> <color rgba="${233/255} ${233/255} ${216/255} 1.0"/> </material> <material name="orange"> <color rgba="${255/255} ${108/255} ${10/255} 1.0"/> </material> <material name="brown"> <color rgba="${222/255} ${207/255} ${195/255} 1.0"/> </material> <material name="red"> <color rgba="0.8 0.0 0.0 1.0"/> </material> <material name="white"> <color rgba="1.0 1.0 1.0 1.0"/> </material> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/aliengo_description/xacro/transmission.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:macro name="leg_transmission" params="name"> <transmission name="${name}_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="${name}_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="${name}_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/aliengo_description/xacro/leg.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:include filename="$(find aliengo_description)/xacro/transmission.xacro"/> <xacro:macro name="leg" params="name mirror mirror_dae front_hind front_hind_dae *origin"> <joint name="${name}_hip_joint" type="revolute"> <xacro:insert_block name="origin"/> <parent link="trunk"/> <child link="${name}_hip"/> <axis xyz="1 0 0"/> <dynamics damping="${damping}" friction="${friction}"/> <xacro:if value="${(mirror_dae == True)}"> <limit effort="${hip_torque_max}" velocity="${hip_velocity_max}" lower="${hip_position_min}" upper="${hip_position_max}"/> </xacro:if> <xacro:if value="${(mirror_dae == False)}"> <limit effort="${hip_torque_max}" velocity="${hip_velocity_max}" lower="${-hip_position_max}" upper="${-hip_position_min}"/> </xacro:if> </joint> <link name="${name}_hip"> <visual> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == True)}"> <origin rpy="${PI} 0 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == False)}"> <origin rpy="0 ${PI} 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == False)}"> <origin rpy="${PI} ${PI} 0" xyz="0 0 0"/> </xacro:if> <geometry> <mesh filename="package://aliengo_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 ${hip_offset*mirror} 0"/> <geometry> <cylinder length="${hip_length}" radius="${hip_radius}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${hip_com_x*front_hind} ${hip_com_y*mirror} ${hip_com_z}"/> <mass value="${hip_mass}"/> <inertia ixx="${hip_ixx}" ixy="${hip_ixy*mirror*front_hind}" ixz="${hip_ixz*front_hind}" iyy="${hip_iyy}" iyz="${hip_iyz*mirror}" izz="${hip_izz}"/> </inertial> </link> <!-- <joint name="${name}_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 ${(thigh_shoulder_length/2.0+hip_offset)*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh_shoulder"/> </joint> --> <!-- this link is only for collision --> <!-- <link name="${name}_thigh_shoulder"> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="${thigh_shoulder_length}" radius="${thigh_shoulder_radius}"/> </geometry> </collision> </link> --> <joint name="${name}_thigh_joint" type="continuous"> <origin rpy="0 0 0" xyz="0 ${thigh_offset*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="${damping}" friction="${friction}"/> <limit effort="${thigh_torque_max}" velocity="${thigh_velocity_max}"/> </joint> <link name="${name}_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <xacro:if value="${mirror_dae == True}"> <mesh filename="package://aliengo_description/meshes/thigh.dae" scale="1 1 1"/> </xacro:if> <xacro:if value="${mirror_dae == False}"> <mesh filename="package://aliengo_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </xacro:if> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 ${-thigh_length/2.0}"/> <geometry> <box size="${thigh_length} ${thigh_width} ${thigh_height}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${thigh_com_x} ${thigh_com_y*mirror} ${thigh_com_z}"/> <mass value="${thigh_mass}"/> <inertia ixx="${thigh_ixx}" ixy="${thigh_ixy*mirror}" ixz="${thigh_ixz}" iyy="${thigh_iyy}" iyz="${thigh_iyz*mirror}" izz="${thigh_izz}"/> </inertial> </link> <joint name="${name}_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 ${-thigh_length}"/> <parent link="${name}_thigh"/> <child link="${name}_calf"/> <axis xyz="0 1 0"/> <dynamics damping="${damping}" friction="${friction}"/> <limit effort="${calf_torque_max}" velocity="${calf_velocity_max}" lower="${calf_position_min}" upper="${calf_position_max}"/> </joint> <link name="${name}_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 ${-calf_length/2.0}"/> <geometry> <box size="${calf_length} ${calf_width} ${calf_height}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${calf_com_x} ${calf_com_y} ${calf_com_z}"/> <mass value="${calf_mass}"/> <inertia ixx="${calf_ixx}" ixy="${calf_ixy}" ixz="${calf_ixz}" iyy="${calf_iyy}" iyz="${calf_iyz}" izz="${calf_izz}"/> </inertial> </link> <joint name="${name}_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 ${-(calf_length)}"/> <parent link="${name}_calf"/> <child link="${name}_foot"/> </joint> <link name="${name}_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="${foot_radius-0.01}"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="${foot_radius}"/> </geometry> </collision> <inertial> <mass value="${foot_mass}"/> <inertia ixx="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}" ixy="0.0" ixz="0.0" iyy="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}" iyz="0.0" izz="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}"/> </inertial> </link> <xacro:leg_transmission name="${name}"/> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/aliengo_description/xacro/aliengo.urdf
<?xml version="1.0" encoding="utf-8"?> <!-- =================================================================================== --> <!-- | This document was autogenerated by xacro from robot.xacro | --> <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | --> <!-- =================================================================================== --> <robot name="aliengo_description"> <material name="black"> <color rgba="0.0 0.0 0.0 1.0"/> </material> <material name="blue"> <color rgba="0.0 0.0 0.8 1.0"/> </material> <material name="green"> <color rgba="0.0 0.8 0.0 1.0"/> </material> <material name="grey"> <color rgba="0.2 0.2 0.2 1.0"/> </material> <material name="silver"> <color rgba="0.913725490196 0.913725490196 0.847058823529 1.0"/> </material> <material name="orange"> <color rgba="1.0 0.423529411765 0.0392156862745 1.0"/> </material> <material name="brown"> <color rgba="0.870588235294 0.811764705882 0.764705882353 1.0"/> </material> <material name="red"> <color rgba="0.8 0.0 0.0 1.0"/> </material> <material name="white"> <color rgba="1.0 1.0 1.0 1.0"/> </material> <!-- ros_control plugin --> <gazebo> <plugin filename="libgazebo_ros_control.so" name="gazebo_ros_control"> <robotNamespace>/aliengo_gazebo</robotNamespace> <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType> </plugin> </gazebo> <!-- Show the trajectory of trunk center. --> <gazebo> <plugin filename="libLinkPlot3DPlugin.so" name="3dplot"> <frequency>10</frequency> <plot> <link>base</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Yellow</material> </plot> </plugin> </gazebo> <!-- Show the trajectory of foot. You can add another trajectory about another foot. --> <!-- <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>100</frequency> <plot> <link>FL_foot</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Green</material> </plot> </plugin> </gazebo> --> <gazebo> <plugin filename="libgazebo_ros_force.so" name="gazebo_ros_force"> <bodyName>trunk</bodyName> <topicName>/apply_force/trunk</topicName> </plugin> </gazebo> <gazebo reference="imu_link"> <gravity>true</gravity> <sensor name="imu_sensor" type="imu"> <always_on>true</always_on> <update_rate>1000</update_rate> <visualize>true</visualize> <topic>__default_topic__</topic> <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin"> <topicName>trunk_imu</topicName> <bodyName>imu_link</bodyName> <updateRateHZ>1000.0</updateRateHZ> <gaussianNoise>0.0</gaussianNoise> <xyzOffset>0 0 0</xyzOffset> <rpyOffset>0 0 0</rpyOffset> <frameName>imu_link</frameName> </plugin> <pose>0 0 0 0 0 0</pose> </sensor> </gazebo> <!-- Foot contacts. --> <gazebo reference="FR_calf"> <sensor name="FR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>FR_calf_fixed_joint_lump__FR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="FL_calf"> <sensor name="FL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>FL_calf_fixed_joint_lump__FL_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RR_calf"> <sensor name="RR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>RR_calf_fixed_joint_lump__RR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RL_calf"> <sensor name="RL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>RL_calf_fixed_joint_lump__RL_foot_collision_1</collision> </contact> </sensor> </gazebo> <!-- Visualization of Foot contacts. --> <gazebo reference="FR_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>FR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="FL_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>FL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RR_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>RR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RL_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>RL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="base"> <material>Gazebo/Green</material> <turnGravityOff>false</turnGravityOff> </gazebo> <gazebo reference="trunk"> <mu1>0.2</mu1> <mu2>0.2</mu2> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="stick_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/White</material> </gazebo> <gazebo reference="imu_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/Red</material> </gazebo> <!-- FL leg --> <gazebo reference="FL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- FR leg --> <gazebo reference="FR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RL leg --> <gazebo reference="RL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RR leg --> <gazebo reference="RR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- Debug mode will hung up the robot, use "true" or "false" to switch it. --> <!-- <xacro:if value="$(arg DEBUG)"> <link name="world"/> <joint name="base_static_joint" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="base"/> </joint> </xacro:if> --> <link name="base"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> </visual> </link> <joint name="floating_base" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="base"/> <child link="trunk"/> </joint> <link name="trunk"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.647 0.15 0.112"/> </geometry> </collision> <!-- <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> </collision> --> <inertial> <origin rpy="0 0 0" xyz="0.008465 0.004045 -0.000763"/> <mass value="9.041"/> <inertia ixx="0.033260231" ixy="-0.000451628" ixz="0.000487603" iyy="0.16117211" iyz="4.8356e-05" izz="0.17460442"/> </inertial> </link> <joint name="imu_joint" type="fixed"> <parent link="trunk"/> <child link="imu_link"/> <origin rpy="0 0 0" xyz="0 0 0"/> </joint> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.000001" iyz="0" izz="0.0001"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> <material name="red"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> </link> <joint name="FR_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="0.2399 -0.051 0"/> <parent link="trunk"/> <child link="FR_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" lower="-1.2217304764" upper="1.2217304764" velocity="20"/> </joint> <link name="FR_hip"> <visual> <origin rpy="3.14159265359 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.57079632679 0 0" xyz="0 -0.083 0"/> <geometry> <cylinder length="0.0418" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.022191 -0.015144 -1.5e-05"/> <mass value="1.993"/> <inertia ixx="0.002903894" ixy="7.185e-05" ixz="-1.262e-06" iyy="0.004907517" iyz="1.75e-06" izz="0.005586944"/> </inertial> </link> <!-- <joint name="${name}_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 ${(thigh_shoulder_length/2.0+hip_offset)*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh_shoulder"/> </joint> --> <!-- this link is only for collision --> <!-- <link name="${name}_thigh_shoulder"> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="${thigh_shoulder_length}" radius="${thigh_shoulder_radius}"/> </geometry> </collision> </link> --> <joint name="FR_thigh_joint" type="continuous"> <origin rpy="0 0 0" xyz="0 -0.083 0"/> <parent link="FR_hip"/> <child link="FR_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" velocity="20"/> </joint> <link name="FR_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0374 0.043"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.005607 0.003877 -0.048199"/> <mass value="0.639"/> <inertia ixx="0.005666803" ixy="-3.597e-06" ixz="0.000491446" iyy="0.005847229" iyz="-1.0086e-05" izz="0.000369811"/> </inertial> </link> <joint name="FR_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="FR_thigh"/> <child link="FR_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="55" lower="-2.77507351067" upper="-0.645771823238" velocity="16"/> </joint> <link name="FR_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0208 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.002781 6.3e-05 -0.142518"/> <mass value="0.207"/> <inertia ixx="0.006341369" ixy="-3e-09" ixz="-8.7951e-05" iyy="0.006355157" iyz="-1.336e-06" izz="3.9188e-05"/> </inertial> </link> <joint name="FR_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="FR_calf"/> <child link="FR_foot"/> </joint> <link name="FR_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0165"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0265"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="1.6854e-05" ixy="0.0" ixz="0.0" iyy="1.6854e-05" iyz="0.0" izz="1.6854e-05"/> </inertial> </link> <transmission name="FR_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FR_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FR_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="FL_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="0.2399 0.051 0"/> <parent link="trunk"/> <child link="FL_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" lower="-1.2217304764" upper="1.2217304764" velocity="20"/> </joint> <link name="FL_hip"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.57079632679 0 0" xyz="0 0.083 0"/> <geometry> <cylinder length="0.0418" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.022191 0.015144 -1.5e-05"/> <mass value="1.993"/> <inertia ixx="0.002903894" ixy="-7.185e-05" ixz="-1.262e-06" iyy="0.004907517" iyz="-1.75e-06" izz="0.005586944"/> </inertial> </link> <!-- <joint name="${name}_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 ${(thigh_shoulder_length/2.0+hip_offset)*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh_shoulder"/> </joint> --> <!-- this link is only for collision --> <!-- <link name="${name}_thigh_shoulder"> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="${thigh_shoulder_length}" radius="${thigh_shoulder_radius}"/> </geometry> </collision> </link> --> <joint name="FL_thigh_joint" type="continuous"> <origin rpy="0 0 0" xyz="0 0.083 0"/> <parent link="FL_hip"/> <child link="FL_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" velocity="20"/> </joint> <link name="FL_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/thigh.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0374 0.043"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.005607 -0.003877 -0.048199"/> <mass value="0.639"/> <inertia ixx="0.005666803" ixy="3.597e-06" ixz="0.000491446" iyy="0.005847229" iyz="1.0086e-05" izz="0.000369811"/> </inertial> </link> <joint name="FL_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="FL_thigh"/> <child link="FL_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="55" lower="-2.77507351067" upper="-0.645771823238" velocity="16"/> </joint> <link name="FL_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0208 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.002781 6.3e-05 -0.142518"/> <mass value="0.207"/> <inertia ixx="0.006341369" ixy="-3e-09" ixz="-8.7951e-05" iyy="0.006355157" iyz="-1.336e-06" izz="3.9188e-05"/> </inertial> </link> <joint name="FL_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="FL_calf"/> <child link="FL_foot"/> </joint> <link name="FL_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0165"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0265"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="1.6854e-05" ixy="0.0" ixz="0.0" iyy="1.6854e-05" iyz="0.0" izz="1.6854e-05"/> </inertial> </link> <transmission name="FL_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FL_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FL_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="RR_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="-0.2399 -0.051 0"/> <parent link="trunk"/> <child link="RR_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" lower="-1.2217304764" upper="1.2217304764" velocity="20"/> </joint> <link name="RR_hip"> <visual> <origin rpy="3.14159265359 3.14159265359 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.57079632679 0 0" xyz="0 -0.083 0"/> <geometry> <cylinder length="0.0418" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.022191 -0.015144 -1.5e-05"/> <mass value="1.993"/> <inertia ixx="0.002903894" ixy="-7.185e-05" ixz="1.262e-06" iyy="0.004907517" iyz="1.75e-06" izz="0.005586944"/> </inertial> </link> <!-- <joint name="${name}_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 ${(thigh_shoulder_length/2.0+hip_offset)*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh_shoulder"/> </joint> --> <!-- this link is only for collision --> <!-- <link name="${name}_thigh_shoulder"> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="${thigh_shoulder_length}" radius="${thigh_shoulder_radius}"/> </geometry> </collision> </link> --> <joint name="RR_thigh_joint" type="continuous"> <origin rpy="0 0 0" xyz="0 -0.083 0"/> <parent link="RR_hip"/> <child link="RR_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" velocity="20"/> </joint> <link name="RR_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0374 0.043"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.005607 0.003877 -0.048199"/> <mass value="0.639"/> <inertia ixx="0.005666803" ixy="-3.597e-06" ixz="0.000491446" iyy="0.005847229" iyz="-1.0086e-05" izz="0.000369811"/> </inertial> </link> <joint name="RR_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="RR_thigh"/> <child link="RR_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="55" lower="-2.77507351067" upper="-0.645771823238" velocity="16"/> </joint> <link name="RR_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0208 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.002781 6.3e-05 -0.142518"/> <mass value="0.207"/> <inertia ixx="0.006341369" ixy="-3e-09" ixz="-8.7951e-05" iyy="0.006355157" iyz="-1.336e-06" izz="3.9188e-05"/> </inertial> </link> <joint name="RR_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="RR_calf"/> <child link="RR_foot"/> </joint> <link name="RR_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0165"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0265"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="1.6854e-05" ixy="0.0" ixz="0.0" iyy="1.6854e-05" iyz="0.0" izz="1.6854e-05"/> </inertial> </link> <transmission name="RR_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RR_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RR_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="RL_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="-0.2399 0.051 0"/> <parent link="trunk"/> <child link="RL_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" lower="-1.2217304764" upper="1.2217304764" velocity="20"/> </joint> <link name="RL_hip"> <visual> <origin rpy="0 3.14159265359 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.57079632679 0 0" xyz="0 0.083 0"/> <geometry> <cylinder length="0.0418" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.022191 0.015144 -1.5e-05"/> <mass value="1.993"/> <inertia ixx="0.002903894" ixy="7.185e-05" ixz="1.262e-06" iyy="0.004907517" iyz="-1.75e-06" izz="0.005586944"/> </inertial> </link> <!-- <joint name="${name}_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 ${(thigh_shoulder_length/2.0+hip_offset)*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh_shoulder"/> </joint> --> <!-- this link is only for collision --> <!-- <link name="${name}_thigh_shoulder"> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="${thigh_shoulder_length}" radius="${thigh_shoulder_radius}"/> </geometry> </collision> </link> --> <joint name="RL_thigh_joint" type="continuous"> <origin rpy="0 0 0" xyz="0 0.083 0"/> <parent link="RL_hip"/> <child link="RL_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" velocity="20"/> </joint> <link name="RL_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/thigh.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0374 0.043"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.005607 -0.003877 -0.048199"/> <mass value="0.639"/> <inertia ixx="0.005666803" ixy="3.597e-06" ixz="0.000491446" iyy="0.005847229" iyz="1.0086e-05" izz="0.000369811"/> </inertial> </link> <joint name="RL_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="RL_thigh"/> <child link="RL_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="55" lower="-2.77507351067" upper="-0.645771823238" velocity="16"/> </joint> <link name="RL_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0208 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.002781 6.3e-05 -0.142518"/> <mass value="0.207"/> <inertia ixx="0.006341369" ixy="-3e-09" ixz="-8.7951e-05" iyy="0.006355157" iyz="-1.336e-06" izz="3.9188e-05"/> </inertial> </link> <joint name="RL_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="RL_calf"/> <child link="RL_foot"/> </joint> <link name="RL_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0165"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0265"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="1.6854e-05" ixy="0.0" ixz="0.0" iyy="1.6854e-05" iyz="0.0" izz="1.6854e-05"/> </inertial> </link> <transmission name="RL_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RL_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RL_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <!-- <xacro:stairs stairs="15" xpos="0" ypos="2.0" zpos="0" /> --> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/aliengo_description/xacro/const.xacro
<?xml version="1.0"?> <robot name="aliengo_description" xmlns:xacro="http://www.ros.org/wiki/xacro"> <!-- Constants for robot dimensions --> <xacro:property name="PI" value="3.1415926535897931"/> <xacro:property name="stick_mass" value="0.00001"/> <!-- simplified collision value --> <xacro:property name="trunk_width" value="0.150"/> <xacro:property name="trunk_length" value="0.647"/> <xacro:property name="trunk_height" value="0.112"/> <xacro:property name="hip_radius" value="0.046"/> <xacro:property name="hip_length" value="0.0418"/> <xacro:property name="thigh_shoulder_radius" value="0.044"/> <xacro:property name="thigh_shoulder_length" value="0.08"/> <xacro:property name="thigh_width" value="0.0374"/> <xacro:property name="thigh_height" value="0.043"/> <xacro:property name="calf_width" value="0.0208"/> <xacro:property name="calf_height" value="0.016"/> <xacro:property name="foot_radius" value="0.0265"/> <xacro:property name="stick_radius" value="0.01"/> <xacro:property name="stick_length" value="0.2"/> <!-- kinematic value --> <xacro:property name="thigh_offset" value="0.0868"/> <xacro:property name="thigh_length" value="0.25"/> <xacro:property name="calf_length" value="0.25"/> <!-- leg offset from trunk center value --> <xacro:property name="leg_offset_x" value="0.2407"/> <xacro:property name="leg_offset_y" value="0.051"/> <xacro:property name="trunk_offset_z" value="0.01675"/> <xacro:property name="hip_offset" value="0.083"/> <!-- joint limits --> <xacro:property name="damping" value="0"/> <xacro:property name="friction" value="0"/> <xacro:property name="hip_position_max" value="${70*PI/180.0}"/> <xacro:property name="hip_position_min" value="${-70*PI/180.0}"/> <xacro:property name="hip_velocity_max" value="20"/> <xacro:property name="hip_torque_max" value="35.278"/> <xacro:property name="thigh_position_max" value="${240*PI/180.0}"/> <xacro:property name="thigh_position_min" value="${-120*PI/180.0}"/> <xacro:property name="thigh_velocity_max" value="20"/> <xacro:property name="thigh_torque_max" value="35.278"/> <xacro:property name="calf_position_max" value="${-37*PI/180.0}"/> <xacro:property name="calf_position_min" value="${-159*PI/180.0}"/> <xacro:property name="calf_velocity_max" value="15.89"/> <xacro:property name="calf_torque_max" value="44.4"/> <!-- dynamics inertial value total 22.0kg --> <!-- trunk --> <xacro:property name="trunk_mass" value="11.041"/> <xacro:property name="trunk_com_x" value="0.008465"/> <xacro:property name="trunk_com_y" value="0.004045"/> <xacro:property name="trunk_com_z" value="-0.000763"/> <xacro:property name="trunk_ixx" value="0.050874"/> <xacro:property name="trunk_ixy" value="-0.000451628"/> <xacro:property name="trunk_ixz" value="0.000487603"/> <xacro:property name="trunk_iyy" value="0.64036"/> <xacro:property name="trunk_iyz" value="0.000048356"/> <xacro:property name="trunk_izz" value="0.65655"/> <!-- hip (left front) --> <xacro:property name="hip_mass" value="1.993"/> <xacro:property name="hip_com_x" value="-0.022191"/> <xacro:property name="hip_com_y" value="0.015144"/> <xacro:property name="hip_com_z" value="-0.000015"/> <xacro:property name="hip_ixx" value="0.002903894"/> <xacro:property name="hip_ixy" value="-0.000071850"/> <xacro:property name="hip_ixz" value="-0.000001262"/> <xacro:property name="hip_iyy" value="0.004907517"/> <xacro:property name="hip_iyz" value="-0.00000175"/> <xacro:property name="hip_izz" value="0.005586944"/> <!-- thigh --> <xacro:property name="thigh_mass" value="0.639"/> <xacro:property name="thigh_com_x" value="-0.005607"/> <xacro:property name="thigh_com_y" value="-0.003877"/> <xacro:property name="thigh_com_z" value="-0.048199"/> <xacro:property name="thigh_ixx" value="0.005666803"/> <xacro:property name="thigh_ixy" value="0.000003597"/> <xacro:property name="thigh_ixz" value="0.000491446"/> <xacro:property name="thigh_iyy" value="0.005847229"/> <xacro:property name="thigh_iyz" value="0.000010086"/> <xacro:property name="thigh_izz" value="0.000369811"/> <!-- calf --> <xacro:property name="calf_mass" value="0.207"/> <xacro:property name="calf_com_x" value="0.002781"/> <xacro:property name="calf_com_y" value="0.000063"/> <xacro:property name="calf_com_z" value="-0.142518"/> <xacro:property name="calf_ixx" value="0.006341369"/> <xacro:property name="calf_ixy" value="-0.000000003"/> <xacro:property name="calf_ixz" value="-0.000087951"/> <xacro:property name="calf_iyy" value="0.006355157"/> <xacro:property name="calf_iyz" value="-0.000001336"/> <xacro:property name="calf_izz" value="0.000039188"/> <!-- foot --> <xacro:property name="foot_mass" value="0.06"/> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/aliengo_description/xacro/gazebo.xacro
<?xml version="1.0"?> <robot> <!-- ros_control plugin --> <gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <!-- <robotNamespace></robotNamespace> --> <!-- <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType> --> </plugin> </gazebo> <!-- Show the trajectory of trunk center. --> <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>10</frequency> <plot> <link>base</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Yellow</material> </plot> </plugin> </gazebo> <!-- Show the trajectory of foot. You can add another trajectory about another foot. --> <!-- <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>100</frequency> <plot> <link>FL_foot</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Green</material> </plot> </plugin> </gazebo> --> <gazebo> <plugin filename="libgazebo_ros_force.so" name="gazebo_ros_force"> <bodyName>trunk</bodyName> <topicName>/apply_force/trunk</topicName> </plugin> </gazebo> <!-- <gazebo reference="imu_link"> <gravity>true</gravity> <sensor name="imu_sensor" type="imu"> <always_on>true</always_on> <update_rate>1000</update_rate> <visualize>true</visualize> <topic>__default_topic__</topic> <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin"> <topicName>trunk_imu</topicName> <bodyName>imu_link</bodyName> <updateRateHZ>1000.0</updateRateHZ> <gaussianNoise>0.0</gaussianNoise> <xyzOffset>0 0 0</xyzOffset> <rpyOffset>0 0 0</rpyOffset> <frameName>imu_link</frameName> </plugin> <pose>0 0 0 0 0 0</pose> </sensor> </gazebo> --> <!-- Foot contacts. --> <gazebo reference="FR_calf"> <sensor name="FR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>FR_calf_fixed_joint_lump__FR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="FL_calf"> <sensor name="FL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>FL_calf_fixed_joint_lump__FL_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RR_calf"> <sensor name="RR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>RR_calf_fixed_joint_lump__RR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RL_calf"> <sensor name="RL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>RL_calf_fixed_joint_lump__RL_foot_collision_1</collision> </contact> </sensor> </gazebo> <!-- Visualization of Foot contacts. --> <gazebo reference="FR_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>FR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="FL_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>FL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RR_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>RR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RL_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>RL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="base"> <material>Gazebo/Green</material> <turnGravityOff>false</turnGravityOff> </gazebo> <gazebo reference="trunk"> <mu1>0.2</mu1> <mu2>0.2</mu2> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="stick_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/White</material> </gazebo> <gazebo reference="imu_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/Red</material> </gazebo> <!-- FL leg --> <gazebo reference="FL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- FR leg --> <gazebo reference="FR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RL leg --> <gazebo reference="RL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RR leg --> <gazebo reference="RR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/aliengo_description/xacro/aliengo.champ.urdf
<?xml version="1.0" encoding="utf-8"?> <!-- =================================================================================== --> <!-- | This document was autogenerated by xacro from robot.xacro | --> <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | --> <!-- =================================================================================== --> <robot name="aliengo_description"> <material name="black"> <color rgba="0.0 0.0 0.0 1.0"/> </material> <material name="blue"> <color rgba="0.0 0.0 0.8 1.0"/> </material> <material name="green"> <color rgba="0.0 0.8 0.0 1.0"/> </material> <material name="grey"> <color rgba="0.2 0.2 0.2 1.0"/> </material> <material name="silver"> <color rgba="0.913725490196 0.913725490196 0.847058823529 1.0"/> </material> <material name="orange"> <color rgba="1.0 0.423529411765 0.0392156862745 1.0"/> </material> <material name="brown"> <color rgba="0.870588235294 0.811764705882 0.764705882353 1.0"/> </material> <material name="red"> <color rgba="0.8 0.0 0.0 1.0"/> </material> <material name="white"> <color rgba="1.0 1.0 1.0 1.0"/> </material> <!-- ros_control plugin --> <gazebo> <plugin filename="libgazebo_ros_control.so" name="gazebo_ros_control"> <!-- <robotNamespace></robotNamespace> --> <!-- <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType> --> </plugin> </gazebo> <!-- Show the trajectory of trunk center. --> <gazebo> <plugin filename="libLinkPlot3DPlugin.so" name="3dplot"> <frequency>10</frequency> <plot> <link>base</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Yellow</material> </plot> </plugin> </gazebo> <!-- Show the trajectory of foot. You can add another trajectory about another foot. --> <!-- <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>100</frequency> <plot> <link>FL_foot</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Green</material> </plot> </plugin> </gazebo> --> <gazebo> <plugin filename="libgazebo_ros_force.so" name="gazebo_ros_force"> <bodyName>trunk</bodyName> <topicName>/apply_force/trunk</topicName> </plugin> </gazebo> <!-- <gazebo reference="imu_link"> <gravity>true</gravity> <sensor name="imu_sensor" type="imu"> <always_on>true</always_on> <update_rate>1000</update_rate> <visualize>true</visualize> <topic>__default_topic__</topic> <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin"> <topicName>trunk_imu</topicName> <bodyName>imu_link</bodyName> <updateRateHZ>1000.0</updateRateHZ> <gaussianNoise>0.0</gaussianNoise> <xyzOffset>0 0 0</xyzOffset> <rpyOffset>0 0 0</rpyOffset> <frameName>imu_link</frameName> </plugin> <pose>0 0 0 0 0 0</pose> </sensor> </gazebo> --> <!-- Foot contacts. --> <gazebo reference="FR_calf"> <sensor name="FR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>FR_calf_fixed_joint_lump__FR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="FL_calf"> <sensor name="FL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>FL_calf_fixed_joint_lump__FL_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RR_calf"> <sensor name="RR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>RR_calf_fixed_joint_lump__RR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RL_calf"> <sensor name="RL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>RL_calf_fixed_joint_lump__RL_foot_collision_1</collision> </contact> </sensor> </gazebo> <!-- Visualization of Foot contacts. --> <gazebo reference="FR_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>FR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="FL_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>FL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RR_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>RR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RL_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>RL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="base"> <material>Gazebo/Green</material> <turnGravityOff>false</turnGravityOff> </gazebo> <gazebo reference="trunk"> <mu1>0.2</mu1> <mu2>0.2</mu2> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="stick_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/White</material> </gazebo> <gazebo reference="imu_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/Red</material> </gazebo> <!-- FL leg --> <gazebo reference="FL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- FR leg --> <gazebo reference="FR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RL leg --> <gazebo reference="RL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RR leg --> <gazebo reference="RR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- Debug mode will hung up the robot, use "true" or "false" to switch it. --> <!-- <xacro:if value="$(arg DEBUG)"> <link name="world"/> <joint name="base_static_joint" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="base"/> </joint> </xacro:if> --> <link name="base"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> </visual> </link> <joint name="floating_base" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="base"/> <child link="trunk"/> </joint> <link name="trunk"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.647 0.15 0.112"/> </geometry> </collision> <!-- <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> </collision> --> <inertial> <origin rpy="0 0 0" xyz="0.008465 0.004045 -0.000763"/> <mass value="9.041"/> <inertia ixx="0.033260231" ixy="-0.000451628" ixz="0.000487603" iyy="0.16117211" iyz="4.8356e-05" izz="0.17460442"/> </inertial> </link> <!-- <joint name="imu_joint" type="fixed"> <parent link="trunk"/> <child link="imu_link"/> <origin rpy="0 0 0" xyz="0 0 0"/> </joint> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.000001" iyz="0" izz="0.0001"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> <material name="red"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> </link> --> <joint name="FR_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="0.2399 -0.051 0"/> <parent link="trunk"/> <child link="FR_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" lower="-1.2217304764" upper="1.2217304764" velocity="20"/> </joint> <link name="FR_hip"> <visual> <origin rpy="3.14159265359 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.57079632679 0 0" xyz="0 -0.083 0"/> <geometry> <cylinder length="0.0418" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.022191 -0.015144 -1.5e-05"/> <mass value="1.993"/> <inertia ixx="0.002903894" ixy="7.185e-05" ixz="-1.262e-06" iyy="0.004907517" iyz="1.75e-06" izz="0.005586944"/> </inertial> </link> <!-- <joint name="${name}_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 ${(thigh_shoulder_length/2.0+hip_offset)*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh_shoulder"/> </joint> --> <!-- this link is only for collision --> <!-- <link name="${name}_thigh_shoulder"> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="${thigh_shoulder_length}" radius="${thigh_shoulder_radius}"/> </geometry> </collision> </link> --> <joint name="FR_thigh_joint" type="continuous"> <origin rpy="0 0 0" xyz="0 -0.083 0"/> <parent link="FR_hip"/> <child link="FR_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" velocity="20"/> </joint> <link name="FR_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0374 0.043"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.005607 0.003877 -0.048199"/> <mass value="0.639"/> <inertia ixx="0.005666803" ixy="-3.597e-06" ixz="0.000491446" iyy="0.005847229" iyz="-1.0086e-05" izz="0.000369811"/> </inertial> </link> <joint name="FR_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="FR_thigh"/> <child link="FR_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="55" lower="-2.77507351067" upper="-0.645771823238" velocity="16"/> </joint> <link name="FR_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0208 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.002781 6.3e-05 -0.142518"/> <mass value="0.207"/> <inertia ixx="0.006341369" ixy="-3e-09" ixz="-8.7951e-05" iyy="0.006355157" iyz="-1.336e-06" izz="3.9188e-05"/> </inertial> </link> <joint name="FR_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="FR_calf"/> <child link="FR_foot"/> </joint> <link name="FR_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0165"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0265"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="1.6854e-05" ixy="0.0" ixz="0.0" iyy="1.6854e-05" iyz="0.0" izz="1.6854e-05"/> </inertial> </link> <transmission name="FR_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FR_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FR_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="FL_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="0.2399 0.051 0"/> <parent link="trunk"/> <child link="FL_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" lower="-1.2217304764" upper="1.2217304764" velocity="20"/> </joint> <link name="FL_hip"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.57079632679 0 0" xyz="0 0.083 0"/> <geometry> <cylinder length="0.0418" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.022191 0.015144 -1.5e-05"/> <mass value="1.993"/> <inertia ixx="0.002903894" ixy="-7.185e-05" ixz="-1.262e-06" iyy="0.004907517" iyz="-1.75e-06" izz="0.005586944"/> </inertial> </link> <!-- <joint name="${name}_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 ${(thigh_shoulder_length/2.0+hip_offset)*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh_shoulder"/> </joint> --> <!-- this link is only for collision --> <!-- <link name="${name}_thigh_shoulder"> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="${thigh_shoulder_length}" radius="${thigh_shoulder_radius}"/> </geometry> </collision> </link> --> <joint name="FL_thigh_joint" type="continuous"> <origin rpy="0 0 0" xyz="0 0.083 0"/> <parent link="FL_hip"/> <child link="FL_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" velocity="20"/> </joint> <link name="FL_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/thigh.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0374 0.043"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.005607 -0.003877 -0.048199"/> <mass value="0.639"/> <inertia ixx="0.005666803" ixy="3.597e-06" ixz="0.000491446" iyy="0.005847229" iyz="1.0086e-05" izz="0.000369811"/> </inertial> </link> <joint name="FL_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="FL_thigh"/> <child link="FL_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="55" lower="-2.77507351067" upper="-0.645771823238" velocity="16"/> </joint> <link name="FL_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0208 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.002781 6.3e-05 -0.142518"/> <mass value="0.207"/> <inertia ixx="0.006341369" ixy="-3e-09" ixz="-8.7951e-05" iyy="0.006355157" iyz="-1.336e-06" izz="3.9188e-05"/> </inertial> </link> <joint name="FL_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="FL_calf"/> <child link="FL_foot"/> </joint> <link name="FL_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0165"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0265"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="1.6854e-05" ixy="0.0" ixz="0.0" iyy="1.6854e-05" iyz="0.0" izz="1.6854e-05"/> </inertial> </link> <transmission name="FL_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FL_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FL_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="RR_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="-0.2399 -0.051 0"/> <parent link="trunk"/> <child link="RR_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" lower="-1.2217304764" upper="1.2217304764" velocity="20"/> </joint> <link name="RR_hip"> <visual> <origin rpy="3.14159265359 3.14159265359 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.57079632679 0 0" xyz="0 -0.083 0"/> <geometry> <cylinder length="0.0418" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.022191 -0.015144 -1.5e-05"/> <mass value="1.993"/> <inertia ixx="0.002903894" ixy="-7.185e-05" ixz="1.262e-06" iyy="0.004907517" iyz="1.75e-06" izz="0.005586944"/> </inertial> </link> <!-- <joint name="${name}_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 ${(thigh_shoulder_length/2.0+hip_offset)*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh_shoulder"/> </joint> --> <!-- this link is only for collision --> <!-- <link name="${name}_thigh_shoulder"> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="${thigh_shoulder_length}" radius="${thigh_shoulder_radius}"/> </geometry> </collision> </link> --> <joint name="RR_thigh_joint" type="continuous"> <origin rpy="0 0 0" xyz="0 -0.083 0"/> <parent link="RR_hip"/> <child link="RR_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" velocity="20"/> </joint> <link name="RR_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0374 0.043"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.005607 0.003877 -0.048199"/> <mass value="0.639"/> <inertia ixx="0.005666803" ixy="-3.597e-06" ixz="0.000491446" iyy="0.005847229" iyz="-1.0086e-05" izz="0.000369811"/> </inertial> </link> <joint name="RR_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="RR_thigh"/> <child link="RR_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="55" lower="-2.77507351067" upper="-0.645771823238" velocity="16"/> </joint> <link name="RR_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0208 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.002781 6.3e-05 -0.142518"/> <mass value="0.207"/> <inertia ixx="0.006341369" ixy="-3e-09" ixz="-8.7951e-05" iyy="0.006355157" iyz="-1.336e-06" izz="3.9188e-05"/> </inertial> </link> <joint name="RR_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="RR_calf"/> <child link="RR_foot"/> </joint> <link name="RR_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0165"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0265"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="1.6854e-05" ixy="0.0" ixz="0.0" iyy="1.6854e-05" iyz="0.0" izz="1.6854e-05"/> </inertial> </link> <transmission name="RR_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RR_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RR_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="RL_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="-0.2399 0.051 0"/> <parent link="trunk"/> <child link="RL_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" lower="-1.2217304764" upper="1.2217304764" velocity="20"/> </joint> <link name="RL_hip"> <visual> <origin rpy="0 3.14159265359 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.57079632679 0 0" xyz="0 0.083 0"/> <geometry> <cylinder length="0.0418" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.022191 0.015144 -1.5e-05"/> <mass value="1.993"/> <inertia ixx="0.002903894" ixy="7.185e-05" ixz="1.262e-06" iyy="0.004907517" iyz="-1.75e-06" izz="0.005586944"/> </inertial> </link> <!-- <joint name="${name}_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 ${(thigh_shoulder_length/2.0+hip_offset)*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh_shoulder"/> </joint> --> <!-- this link is only for collision --> <!-- <link name="${name}_thigh_shoulder"> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="${thigh_shoulder_length}" radius="${thigh_shoulder_radius}"/> </geometry> </collision> </link> --> <joint name="RL_thigh_joint" type="continuous"> <origin rpy="0 0 0" xyz="0 0.083 0"/> <parent link="RL_hip"/> <child link="RL_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="44" velocity="20"/> </joint> <link name="RL_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/thigh.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0374 0.043"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.005607 -0.003877 -0.048199"/> <mass value="0.639"/> <inertia ixx="0.005666803" ixy="3.597e-06" ixz="0.000491446" iyy="0.005847229" iyz="1.0086e-05" izz="0.000369811"/> </inertial> </link> <joint name="RL_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="RL_thigh"/> <child link="RL_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="55" lower="-2.77507351067" upper="-0.645771823238" velocity="16"/> </joint> <link name="RL_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.57079632679 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0208 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.002781 6.3e-05 -0.142518"/> <mass value="0.207"/> <inertia ixx="0.006341369" ixy="-3e-09" ixz="-8.7951e-05" iyy="0.006355157" iyz="-1.336e-06" izz="3.9188e-05"/> </inertial> </link> <joint name="RL_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="RL_calf"/> <child link="RL_foot"/> </joint> <link name="RL_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0165"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0265"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="1.6854e-05" ixy="0.0" ixz="0.0" iyy="1.6854e-05" iyz="0.0" izz="1.6854e-05"/> </inertial> </link> <transmission name="RL_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RL_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RL_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="hokuyo_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.0 0.096"/> <parent link="trunk"/> <child link="hokuyo_frame"/> </joint> <link name="hokuyo_frame"> <inertial> <mass value="0.270"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="2.632e-4" ixy="0" ixz="0" iyy="2.632e-4" iyz="0" izz="1.62e-4"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://hector_sensors_description/meshes/hokuyo_utm30lx/hokuyo_utm_30lx.dae"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 -0.0115"/> <geometry> <box size="0.058 0.058 0.087"/> <!--<mesh filename="package://hector_sensors_description/meshes/hokuyo_utm30lx/hokuyo_utm_30lx.stl"/>--> </geometry> </collision> </link> <gazebo reference="hokuyo_frame"> <sensor name="hokuyo" type="ray"> <always_on>true</always_on> <update_rate>30</update_rate> <pose>0 0 0 0 0 0</pose> <visualize>false</visualize> <ray> <scan> <horizontal> <samples>1040</samples> <resolution>1</resolution> <min_angle>2.26892802759</min_angle> <max_angle>-2.26892802759</max_angle> </horizontal> </scan> <range> <min>0.2</min> <max>30.0</max> <resolution>0.01</resolution> </range> <noise> <type>gaussian</type> <mean>0.0</mean> <stddev>0.004</stddev> </noise> </ray> <plugin filename="libgazebo_ros_laser.so" name="gazebo_ros_hokuyo_controller"> <topicName>scan</topicName> <frameName>hokuyo_frame</frameName> </plugin> </sensor> </gazebo> <joint name="camera_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.3235 0.0 -0.066"/> <parent link="trunk"/> <child link="camera_link"/> </joint> <link name="camera_link"> <inertial> <mass value="0.200"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="5.8083e-4" ixy="0" ixz="0" iyy="3.0833e-5" iyz="0" izz="5.9083e-4"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://hector_sensors_description/meshes/asus_camera/asus_camera_simple.dae"/> </geometry> </visual> <!-- <collision> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry> <box size="0.035 0.185 0.025"/> </geometry> </collision> --> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://hector_sensors_description/meshes/asus_camera/asus_camera_simple.dae"/> </geometry> </collision> </link> <joint name="camera_depth_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.049 0.0"/> <parent link="camera_link"/> <child link="camera_depth_frame"/> </joint> <link name="camera_depth_frame"/> <joint name="camera_depth_optical_joint" type="fixed"> <origin rpy="-1.57079632679 0.0 -1.57079632679" xyz="0 0 0"/> <parent link="camera_depth_frame"/> <child link="camera_depth_optical_frame"/> </joint> <link name="camera_depth_optical_frame"/> <joint name="camera_rgb_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.022 0.0"/> <parent link="camera_link"/> <child link="camera_rgb_frame"/> </joint> <link name="camera_rgb_frame"/> <joint name="camera_rgb_optical_joint" type="fixed"> <origin rpy="-1.57079632679 0.0 -1.57079632679" xyz="0 0 0"/> <parent link="camera_rgb_frame"/> <child link="camera_rgb_optical_frame"/> </joint> <link name="camera_rgb_optical_frame"/> <!-- ASUS Xtion PRO camera for simulation --> <gazebo reference="camera_depth_frame"> <sensor name="camera" type="depth"> <update_rate>20</update_rate> <camera> <horizontal_fov>1.09606677025</horizontal_fov> <image> <format>R8G8B8</format> <width>640</width> <height>480</height> </image> <clip> <near>0.5</near> <far>9</far> </clip> </camera> <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_camera_controller"> <imageTopicName>camera/rgb/image_raw</imageTopicName> <cameraInfoTopicName>camera/rgb/camera_info</cameraInfoTopicName> <depthImageTopicName>camera/depth/image_raw</depthImageTopicName> <depthImageCameraInfoTopicName>camera/depth/camera_info</depthImageCameraInfoTopicName> <pointCloudTopicName>camera/depth/points</pointCloudTopicName> <frameName>camera_depth_optical_frame</frameName> </plugin> </sensor> </gazebo> <gazebo> <plugin filename="libhector_gazebo_ros_imu.so" name="imu_controller"> <updateRate>50.0</updateRate> <bodyName>imu_link</bodyName> <topicName>imu/data</topicName> <accelDrift>0.005 0.005 0.005</accelDrift> <accelGaussianNoise>0.005 0.005 0.005</accelGaussianNoise> <rateDrift>0.005 0.005 0.005 </rateDrift> <rateGaussianNoise>0.005 0.005 0.005 </rateGaussianNoise> <headingDrift>0.005</headingDrift> <headingGaussianNoise>0.005</headingGaussianNoise> </plugin> </gazebo> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-09" ixy="0.0" ixz="0.0" iyy="1e-09" iyz="0.0" izz="1e-09"/> </inertial> </link> <joint name="imu_joint" type="fixed"> <parent link="trunk"/> <child link="imu_link"/> </joint> <!-- <xacro:include filename="$(find velodyne_description)/urdf/VLP-16.urdf.xacro"/> <xacro:VLP-16 parent="${base_name}" name="velodyne" topic="velodyne_points" hz="10" samples="1024" gpu="false" lasers="16" max_range="100"> <origin xyz="0 0 ${base_height / 2}" rpy="0 0 0" /> </xacro:VLP-16> <xacro:include filename="$(find champ_arm_description)/urdf/champ_arm.urdf.xacro" /> <xacro:champ_arm parent="${base_name}"> <origin xyz="0.07 0.0 ${base_height / 2}" rpy="0 0 0"/> </xacro:champ_arm> --> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/aliengo_description/xacro/stairs.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:property name="stair_length" value="0.640" /> <xacro:property name="stair_width" value="0.310" /> <xacro:property name="stair_height" value="0.170" /> <xacro:macro name="stairs" params="stairs xpos ypos zpos"> <joint name="stair_joint_origin" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="stair_link_${stairs}"/> </joint> <link name="stair_link_${stairs}"> <visual> <geometry> <box size="${stair_length} ${stair_width} ${stair_height}"/> </geometry> <material name="grey"/> <origin rpy="0 0 0" xyz="${xpos} ${ypos} ${zpos}"/> </visual> <collision> <geometry> <box size="${stair_length} ${stair_width} ${stair_height}"/> </geometry> </collision> <inertial> <mass value="0.80"/> <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100" /> </inertial> </link> <xacro:if value="${stairs}"> <xacro:stairs stairs="${stairs-1}" xpos="0" ypos="${ypos-stair_width/2}" zpos="${zpos+stair_height}"/> <joint name="stair_joint_${stairs}" type="fixed"> <parent link="stair_link_${stairs}"/> <child link="stair_link_${stairs-1}"/> </joint> </xacro:if> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/aliengo_description/xacro/robot.xacro
<?xml version="1.0"?> <robot name="aliengo_description" xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:include filename="$(find aliengo_description)/xacro/const.xacro"/> <xacro:include filename="$(find aliengo_description)/xacro/materials.xacro"/> <xacro:include filename="$(find aliengo_description)/xacro/leg.xacro"/> <xacro:include filename="$(find aliengo_description)/xacro/gazebo.xacro"/> <!-- Rollover Protection mode will add an additional stick on the top, use "true" or "false" to switch it. --> <xacro:property name="rolloverProtection" value="false"/> <!-- Debug mode will hung up the robot, use "true" or "false" to switch it. --> <!-- <xacro:if value="$(arg DEBUG)"> <link name="world"/> <joint name="base_static_joint" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="base"/> </joint> </xacro:if> --> <link name="base"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> </visual> </link> <joint name="floating_base" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="base"/> <child link="trunk"/> </joint> <link name="trunk"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="${trunk_length} ${trunk_width} ${trunk_height}"/> </geometry> </collision> <!-- <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> </collision> --> <inertial> <origin rpy="0 0 0" xyz="${trunk_com_x} ${trunk_com_y} ${trunk_com_z}"/> <mass value="${trunk_mass}"/> <inertia ixx="${trunk_ixx}" ixy="${trunk_ixy}" ixz="${trunk_ixz}" iyy="${trunk_iyy}" iyz="${trunk_iyz}" izz="${trunk_izz}"/> </inertial> </link> <xacro:if value="${(rolloverProtection == 'true')}"> <joint name="stick_joint" type="fixed"> <parent link="trunk"/> <child link="stick_link"/> <origin rpy="0 0 0" xyz="${0.18} 0 ${stick_length/2.0+0.08}"/> </joint> <link name="stick_link"> <visual> <geometry> <cylinder length="${stick_length}" radius="${stick_radius}"/> </geometry> <origin rpy="0 0 0" xyz="0 0 0"/> <material name="white"/> </visual> <collision> <geometry> <cylinder length="${stick_length}" radius="${stick_radius}"/> </geometry> <origin rpy="0 0 0" xyz="0 0 0"/> </collision> <inertial> <mass value="${stick_mass}"/> <inertia ixx="${stick_mass / 2.0 * (stick_radius*stick_radius)}" ixy="0.0" ixz="0.0" iyy="${stick_mass / 12.0 * (3*stick_radius*stick_radius + stick_length*stick_length)}" iyz="0.0" izz="${stick_mass / 12.0 * (3*stick_radius*stick_radius + stick_length*stick_length)}"/> </inertial> </link> </xacro:if> <!-- <joint name="imu_joint" type="fixed"> <parent link="trunk"/> <child link="imu_link"/> <origin rpy="0 0 0" xyz="0 0 0"/> </joint> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.000001" iyz="0" izz="0.0001"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> <material name="red"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> </link> --> <xacro:leg name="FR" mirror="-1" mirror_dae= "False" front_hind="1" front_hind_dae="True"> <origin rpy="0 0 0" xyz="${leg_offset_x} ${-leg_offset_y} 0"/> </xacro:leg> <xacro:leg name="FL" mirror="1" mirror_dae="True" front_hind="1" front_hind_dae="True"> <origin rpy="0 0 0" xyz="${leg_offset_x} ${leg_offset_y} 0"/> </xacro:leg> <xacro:leg name="RR" mirror="-1" mirror_dae="False" front_hind="-1" front_hind_dae="False"> <origin rpy="0 0 0" xyz="${-leg_offset_x} ${-leg_offset_y} 0"/> </xacro:leg> <xacro:leg name="RL" mirror="1" mirror_dae="True" front_hind="-1" front_hind_dae="False"> <origin rpy="0 0 0" xyz="${-leg_offset_x} ${leg_offset_y} 0"/> </xacro:leg> <!-- <xacro:stairs stairs="15" xpos="0" ypos="2.0" zpos="0" /> --> <xacro:include filename="$(find champ_description)/urdf/accessories.urdf.xacro" /> <xacro:accessories base_name="trunk" base_length="${trunk_length}" base_height="${trunk_height}" /> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/aliengo_description/config/robot_control.yaml
aliengo_gazebo: # Publish all joint states ----------------------------------- joint_state_controller: type: joint_state_controller/JointStateController publish_rate: 1000 # FL Controllers --------------------------------------- FL_hip_controller: type: unitree_legged_control/UnitreeJointController joint: FL_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} FL_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: FL_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} FL_calf_controller: type: unitree_legged_control/UnitreeJointController joint: FL_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # FR Controllers --------------------------------------- FR_hip_controller: type: unitree_legged_control/UnitreeJointController joint: FR_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} FR_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: FR_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} FR_calf_controller: type: unitree_legged_control/UnitreeJointController joint: FR_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # RL Controllers --------------------------------------- RL_hip_controller: type: unitree_legged_control/UnitreeJointController joint: RL_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} RL_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: RL_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} RL_calf_controller: type: unitree_legged_control/UnitreeJointController joint: RL_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # RR Controllers --------------------------------------- RR_hip_controller: type: unitree_legged_control/UnitreeJointController joint: RR_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} RR_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: RR_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} RR_calf_controller: type: unitree_legged_control/UnitreeJointController joint: RR_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0}
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/go1_description/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3) project(go1_description) find_package(catkin REQUIRED COMPONENTS genmsg roscpp std_msgs tf ) catkin_package( CATKIN_DEPENDS ) include_directories( # include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} )
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/go1_description/package.xml
<?xml version="1.0"?> <package format="2"> <name>go1_description</name> <version>0.0.0</version> <description>The go1_description package</description> <maintainer email="laikago@unitree.cc">unitree</maintainer> <license>TODO</license> <buildtool_depend>catkin</buildtool_depend> <depend>roscpp</depend> <depend>std_msgs</depend> </package>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/go1_description/launch/check_joint.rviz
Panels: - Class: rviz/Displays Help Height: 78 Name: Displays Property Tree Widget: Expanded: - /Global Options1 - /RobotModel1 Splitter Ratio: 0.5 Tree Height: 796 - 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: PointCloud2 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 FL_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_thigh_shoulder: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_thigh_shoulder: Alpha: 1 Show Axes: false Show Trail: false Value: true Link Tree Style: Links in Alphabetic Order RL_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_thigh_shoulder: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_thigh_shoulder: Alpha: 1 Show Axes: false Show Trail: false Value: true base: Alpha: 1 Show Axes: false Show Trail: false Value: true camera_chin: Alpha: 1 Show Axes: false Show Trail: false Value: true camera_face: Alpha: 1 Show Axes: false Show Trail: false Value: true camera_laserscan_link_left: Alpha: 1 Show Axes: false Show Trail: false camera_laserscan_link_right: Alpha: 1 Show Axes: false Show Trail: false camera_left: Alpha: 1 Show Axes: false Show Trail: false Value: true camera_optical_chin: Alpha: 1 Show Axes: false Show Trail: false camera_optical_face: Alpha: 1 Show Axes: false Show Trail: false camera_optical_left: Alpha: 1 Show Axes: false Show Trail: false camera_optical_rearDown: Alpha: 1 Show Axes: false Show Trail: false camera_optical_right: Alpha: 1 Show Axes: false Show Trail: false camera_rearDown: Alpha: 1 Show Axes: false Show Trail: false Value: true camera_right: Alpha: 1 Show Axes: false Show Trail: false Value: true imu_link: Alpha: 1 Show Axes: false Show Trail: false Value: true trunk: 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/Axes Enabled: false Length: 1 Name: Axes Radius: 0.10000000149011612 Reference Frame: <Fixed Frame> Value: false - 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 - Alpha: 1 Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 10 Min Value: -10 Value: true Axis: Z Channel Name: intensity Class: rviz/PointCloud2 Color: 255; 255; 255 Color Transformer: RGB8 Decay Time: 0 Enabled: false Invert Rainbow: false Max Color: 255; 255; 255 Max Intensity: 4096 Min Color: 0; 0; 0 Min Intensity: 0 Name: PointCloud2 Position Transformer: XYZ Queue Size: 10 Selectable: true Size (Pixels): 3 Size (m): 0.009999999776482582 Style: Flat Squares Topic: /cam1/point_cloud_face Unreliable: false Use Fixed Frame: true Use rainbow: true Value: false - Alpha: 1 Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 10 Min Value: -10 Value: true Axis: Z Channel Name: intensity Class: rviz/PointCloud2 Color: 255; 255; 255 Color Transformer: RGB8 Decay Time: 0 Enabled: false Invert Rainbow: false Max Color: 255; 255; 255 Max Intensity: 4096 Min Color: 0; 0; 0 Min Intensity: 0 Name: PointCloud2 Position Transformer: XYZ Queue Size: 10 Selectable: true Size (Pixels): 3 Size (m): 0.009999999776482582 Style: Flat Squares Topic: /cam2/point_cloud_chin Unreliable: false Use Fixed Frame: true Use rainbow: true Value: false - Alpha: 1 Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 10 Min Value: -10 Value: true Axis: Z Channel Name: intensity Class: rviz/PointCloud2 Color: 255; 255; 255 Color Transformer: RGB8 Decay Time: 0 Enabled: false Invert Rainbow: false Max Color: 255; 255; 255 Max Intensity: 4096 Min Color: 0; 0; 0 Min Intensity: 0 Name: PointCloud2 Position Transformer: XYZ Queue Size: 10 Selectable: true Size (Pixels): 3 Size (m): 0.009999999776482582 Style: Flat Squares Topic: /cam3/point_cloud_left Unreliable: false Use Fixed Frame: true Use rainbow: true Value: false - Alpha: 1 Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 10 Min Value: -10 Value: true Axis: Z Channel Name: intensity Class: rviz/PointCloud2 Color: 255; 255; 255 Color Transformer: RGB8 Decay Time: 0 Enabled: false Invert Rainbow: false Max Color: 255; 255; 255 Max Intensity: 4096 Min Color: 0; 0; 0 Min Intensity: 0 Name: PointCloud2 Position Transformer: XYZ Queue Size: 10 Selectable: true Size (Pixels): 3 Size (m): 0.009999999776482582 Style: Flat Squares Topic: /cam4/point_cloud_right Unreliable: false Use Fixed Frame: true Use rainbow: true Value: false - Alpha: 1 Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 10 Min Value: -10 Value: true Axis: Z Channel Name: intensity Class: rviz/PointCloud2 Color: 255; 255; 255 Color Transformer: RGB8 Decay Time: 0 Enabled: false Invert Rainbow: false Max Color: 255; 255; 255 Max Intensity: 4096 Min Color: 0; 0; 0 Min Intensity: 0 Name: PointCloud2 Position Transformer: XYZ Queue Size: 10 Selectable: true Size (Pixels): 3 Size (m): 0.009999999776482582 Style: Flat Squares Topic: /cam5/point_cloud_rearDown Unreliable: false Use Fixed Frame: true Use rainbow: true Value: false Enabled: true Global Options: Background Color: 238; 238; 238 Default Light: true Fixed Frame: base 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: /move_base_simple/goal - Class: rviz/PublishPoint Single click: true Topic: /clicked_point Value: true Views: Current: Class: rviz/Orbit Distance: 3.724609613418579 Enable Stereo Rendering: Stereo Eye Separation: 0.05999999865889549 Stereo Focal Distance: 1 Swap Stereo Eyes: false Value: false Focal Point: X: 0.29964715242385864 Y: -0.07829883694648743 Z: -0.04122250899672508 Focal Shape Fixed Size: false Focal Shape Size: 0.05000000074505806 Invert Z Axis: false Name: Current View Near Clip Distance: 0.009999999776482582 Pitch: 0.3647973835468292 Target Frame: <Fixed Frame> Value: Orbit (rviz) Yaw: 2.6735990047454834 Saved: ~ Window Geometry: Displays: collapsed: false Height: 1025 Hide Left Dock: false Hide Right Dock: false QMainWindow State: 000000ff00000000fd0000000400000000000001c7000003a7fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d000003a7000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00430061006d00650072006101000001be000001900000000000000000000000010000010f000002e2fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730000000028000002e2000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000006400000003efc0100000002fb0000000800540069006d0065000000000000000640000004f300fffffffb0000000800540069006d0065010000000000000450000000000000000000000570000003a700000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 Selection: collapsed: false Time: collapsed: false Tool Properties: collapsed: false Views: collapsed: false Width: 1853 X: 1987 Y: 27
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/go1_description/launch/go1_rviz.launch
<launch> <arg name="user_debug" default="false"/> <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find go1_description)/xacro/robot.xacro' DEBUG:=$(arg user_debug)"/> <!-- for higher robot_state_publisher average rate--> <!-- <param name="rate" value="1000"/> --> <!-- send fake joint values --> <node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher"> <param name="use_gui" value="TRUE"/> </node> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher"> <param name="publish_frequency" type="double" value="1000.0"/> </node> <node pkg="rviz" type="rviz" name="rviz" respawn="false" output="screen" args="-d $(find go1_description)/launch/check_joint.rviz"/> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/go1_description/xacro/materials.xacro
<?xml version="1.0"?> <robot> <material name="black"> <color rgba="0.0 0.0 0.0 1.0"/> </material> <material name="blue"> <color rgba="0.0 0.0 0.8 1.0"/> </material> <material name="green"> <color rgba="0.0 0.8 0.0 1.0"/> </material> <material name="grey"> <color rgba="0.2 0.2 0.2 1.0"/> </material> <material name="silver"> <color rgba="${233/255} ${233/255} ${216/255} 1.0"/> </material> <material name="orange"> <color rgba="${255/255} ${108/255} ${10/255} 1.0"/> </material> <material name="brown"> <color rgba="${222/255} ${207/255} ${195/255} 1.0"/> </material> <material name="red"> <color rgba="0.8 0.0 0.0 1.0"/> </material> <material name="white"> <color rgba="1.0 1.0 1.0 1.0"/> </material> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/go1_description/xacro/depthCamera.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:macro name="depthCamera" params="camID name *origin"> <joint name="camera_joint_${name}" type="fixed"> <xacro:insert_block name="origin"/> <parent link="trunk"/> <child link="camera_${name}"/> </joint> <link name="camera_${name}"> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/depthCamera.dae" scale="1 1 1"/> </geometry> </visual> <inertial> <mass value="1e-5" /> <origin xyz="0 0 0" rpy="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" /> </inertial> </link> <joint name="camera_optical_joint_${name}" type="fixed"> <origin xyz="0 0 0" rpy="${-pi/2} 0 ${-pi/2}"/> <parent link="camera_${name}"/> <child link="camera_optical_${name}"/> </joint> <link name="camera_optical_${name}"> </link> <gazebo reference="camera_${name}"> <!-- <material>Gazebo/Black</material> --> <sensor name="camera_${name}_camera" type="depth"> <update_rate>16</update_rate> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <clip> <near>0.1</near> <far>5</far> </clip> </camera> <plugin name="camera_${name}_controller" filename="libgazebo_ros_openni_kinect.so"> <baseline>0.025</baseline> <alwaysOn>true</alwaysOn> <updateRate>0.0</updateRate> <cameraName>camera_${name}_ir</cameraName> <imageTopicName>/camera_${name}/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_${name}/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_${name}/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_${name}/depth/camera_info</depthImageInfoTopicName> <!-- <pointCloudTopicName>/camera_${name}/depth/points</pointCloudTopicName> --> <pointCloudTopicName>/cam${camID}/point_cloud_${name}</pointCloudTopicName> <frameName>camera_optical_${name}</frameName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/go1_description/xacro/transmission.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:macro name="leg_transmission" params="name"> <transmission name="${name}_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="${name}_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="${name}_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/go1_description/xacro/ultraSound.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:macro name="ultraSound" params="name *origin"> <joint name="ultraSound_joint_${name}" type="fixed"> <xacro:insert_block name="origin"/> <parent link="trunk"/> <child link="ultraSound_${name}"/> </joint> <link name="ultraSound_${name}"> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/ultraSound.dae" scale="1 1 1"/> </geometry> <material name="black"/> </visual> <inertial> <mass value="1e-5" /> <origin xyz="0 0 0" rpy="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" /> </inertial> </link> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/go1_description/xacro/leg.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:include filename="$(find go1_description)/xacro/transmission.xacro"/> <xacro:macro name="leg" params="name mirror mirror_dae front_hind front_hind_dae *origin"> <joint name="${name}_hip_joint" type="revolute"> <xacro:insert_block name="origin"/> <parent link="trunk"/> <child link="${name}_hip"/> <axis xyz="1 0 0"/> <dynamics damping="${damping}" friction="${friction}"/> <xacro:if value="${(mirror_dae == True)}"> <limit effort="${hip_torque_max}" velocity="${hip_velocity_max}" lower="${hip_min*PI/180.0}" upper="${hip_max*PI/180.0}"/> </xacro:if> <xacro:if value="${(mirror_dae == False)}"> <limit effort="${hip_torque_max}" velocity="${hip_velocity_max}" lower="${-hip_max*PI/180.0}" upper="${-hip_min*PI/180.0}"/> </xacro:if> </joint> <link name="${name}_hip"> <visual> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == True)}"> <origin rpy="${PI} 0 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == False)}"> <origin rpy="0 ${PI} 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == False)}"> <origin rpy="${PI} ${PI} 0" xyz="0 0 0"/> </xacro:if> <geometry> <mesh filename="package://go1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="${hip_length}" radius="${hip_radius}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${hip_com_x*front_hind} ${hip_com_y*mirror} ${hip_com_z}"/> <mass value="${hip_mass}"/> <inertia ixx="${hip_ixx}" ixy="${hip_ixy*mirror*front_hind}" ixz="${hip_ixz*front_hind}" iyy="${hip_iyy}" iyz="${hip_iyz*mirror}" izz="${hip_izz}"/> </inertial> </link> <joint name="${name}_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 ${(hip_offset)*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh_shoulder"/> </joint> <!-- this link is only for collision --> <link name="${name}_thigh_shoulder"> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="${thigh_shoulder_length}" radius="${thigh_shoulder_radius}"/> </geometry> </collision> </link> <joint name="${name}_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 ${thigh_offset*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="${damping}" friction="${friction}"/> <limit effort="${thigh_torque_max}" velocity="${thigh_velocity_max}" lower="${thigh_min*PI/180.0}" upper="${thigh_max*PI/180.0}"/> </joint> <link name="${name}_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <xacro:if value="${mirror_dae == True}"> <mesh filename="package://go1_description/meshes/thigh.dae" scale="1 1 1"/> </xacro:if> <xacro:if value="${mirror_dae == False}"> <mesh filename="package://go1_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </xacro:if> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 ${-thigh_length/2.0}"/> <geometry> <box size="${thigh_length} ${thigh_width} ${thigh_height}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${thigh_com_x} ${thigh_com_y*mirror} ${thigh_com_z}"/> <mass value="${thigh_mass}"/> <inertia ixx="${thigh_ixx}" ixy="${thigh_ixy*mirror}" ixz="${thigh_ixz}" iyy="${thigh_iyy}" iyz="${thigh_iyz*mirror}" izz="${thigh_izz}"/> </inertial> </link> <joint name="${name}_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 ${-thigh_length}"/> <parent link="${name}_thigh"/> <child link="${name}_calf"/> <axis xyz="0 1 0"/> <dynamics damping="${damping}" friction="${friction}"/> <limit effort="${calf_torque_max}" velocity="${calf_velocity_max}" lower="${calf_min*PI/180.0}" upper="${calf_max*PI/180.0}"/> </joint> <link name="${name}_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 ${-calf_length/2.0}"/> <geometry> <box size="${calf_length} ${calf_width} ${calf_height}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${calf_com_x} ${calf_com_y} ${calf_com_z}"/> <mass value="${calf_mass}"/> <inertia ixx="${calf_ixx}" ixy="${calf_ixy}" ixz="${calf_ixz}" iyy="${calf_iyy}" iyz="${calf_iyz}" izz="${calf_izz}"/> </inertial> </link> <joint name="${name}_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 ${-(calf_length)}"/> <parent link="${name}_calf"/> <child link="${name}_foot"/> </joint> <link name="${name}_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="${foot_radius-0.01}"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="${foot_radius}"/> </geometry> </collision> <inertial> <mass value="${foot_mass}"/> <inertia ixx="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}" ixy="0.0" ixz="0.0" iyy="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}" iyz="0.0" izz="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}"/> </inertial> </link> <xacro:leg_transmission name="${name}"/> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/go1_description/xacro/const.xacro
<?xml version="1.0"?> <robot name="go1_description" xmlns:xacro="http://www.ros.org/wiki/xacro"> <!-- Constants for robot dimensions --> <xacro:property name="PI" value="3.1415926535897931"/> <xacro:property name="stick_mass" value="0.00001"/> <!-- simplified collision value --> <xacro:property name="trunk_width" value="0.0935"/> <xacro:property name="trunk_length" value="0.3762"/> <xacro:property name="trunk_height" value="0.114"/> <xacro:property name="hip_radius" value="0.046"/> <xacro:property name="hip_length" value="0.04"/> <xacro:property name="thigh_shoulder_radius" value="0.041"/> <xacro:property name="thigh_shoulder_length" value="0.032"/> <xacro:property name="thigh_width" value="0.0245"/> <xacro:property name="thigh_height" value="0.034"/> <xacro:property name="calf_width" value="0.016"/> <xacro:property name="calf_height" value="0.016"/> <xacro:property name="foot_radius" value="0.02"/> <xacro:property name="stick_radius" value="0.01"/> <xacro:property name="stick_length" value="0.2"/> <!-- kinematic value --> <xacro:property name="thigh_offset" value="0.08"/> <xacro:property name="thigh_length" value="0.213"/> <xacro:property name="calf_length" value="0.213"/> <!-- leg offset from trunk center value --> <xacro:property name="leg_offset_x" value="0.1881"/> <xacro:property name="leg_offset_y" value="0.04675"/> <!-- <xacro:property name="trunk_offset_z" value="0.01675"/> --> <xacro:property name="hip_offset" value="0.08"/> <!-- joint limits --> <xacro:property name="damping" value="0.01"/> <xacro:property name="friction" value="0.2"/> <xacro:property name="hip_max" value="60"/> <xacro:property name="hip_min" value="-60"/> <xacro:property name="hip_velocity_max" value="30.1"/> <xacro:property name="hip_torque_max" value="23.7"/> <xacro:property name="thigh_max" value="170"/> <xacro:property name="thigh_min" value="-38"/> <xacro:property name="thigh_velocity_max" value="30.1"/> <xacro:property name="thigh_torque_max" value="23.7"/> <xacro:property name="calf_max" value="-48"/> <xacro:property name="calf_min" value="-156"/> <xacro:property name="calf_velocity_max" value="30.1"/> <xacro:property name="calf_torque_max" value="23.7"/> <!-- dynamics inertial value total 12.84kg --> <!-- trunk --> <xacro:property name="trunk_mass" value="5.204"/> <xacro:property name="trunk_com_x" value="0.0223"/> <xacro:property name="trunk_com_y" value="0.002"/> <xacro:property name="trunk_com_z" value="-0.0005"/> <xacro:property name="trunk_ixx" value="0.0168352186"/> <xacro:property name="trunk_ixy" value="0.0004636141"/> <xacro:property name="trunk_ixz" value="0.0002367952"/> <xacro:property name="trunk_iyy" value="0.0656071082"/> <xacro:property name="trunk_iyz" value="0.000036671"/> <xacro:property name="trunk_izz" value="0.0742720659"/> <!-- hip (left front) --> <xacro:property name="hip_mass" value="0.591"/> <xacro:property name="hip_com_x" value="-0.00541"/> <xacro:property name="hip_com_y" value="-0.00074"/> <xacro:property name="hip_com_z" value="0.000006"/> <xacro:property name="hip_ixx" value="0.000374268192"/> <xacro:property name="hip_ixy" value="0.000036844422"/> <xacro:property name="hip_ixz" value="-0.000000986754"/> <xacro:property name="hip_iyy" value="0.000635923669"/> <xacro:property name="hip_iyz" value="-0.000001172894"/> <xacro:property name="hip_izz" value="0.000457647394"/> <!-- thigh --> <xacro:property name="thigh_mass" value="0.92"/> <xacro:property name="thigh_com_x" value="-0.003468"/> <xacro:property name="thigh_com_y" value="-0.018947"/> <xacro:property name="thigh_com_z" value="-0.032736"/> <xacro:property name="thigh_ixx" value="0.005851561134"/> <xacro:property name="thigh_ixy" value="0.000001783284"/> <xacro:property name="thigh_ixz" value="0.000328291374"/> <xacro:property name="thigh_iyy" value="0.005596155105"/> <xacro:property name="thigh_iyz" value="0.000021430713"/> <xacro:property name="thigh_izz" value="0.00107157026"/> <!-- calf --> <xacro:property name="calf_mass" value="0.131"/> <xacro:property name="calf_com_x" value="0.006286"/> <xacro:property name="calf_com_y" value="0.001307"/> <xacro:property name="calf_com_z" value="-0.122269"/> <xacro:property name="calf_ixx" value="0.002939186297"/> <xacro:property name="calf_ixy" value="0.000001440899"/> <xacro:property name="calf_ixz" value="-0.000105359550"/> <xacro:property name="calf_iyy" value="0.00295576935"/> <xacro:property name="calf_iyz" value="-0.000024397752"/> <xacro:property name="calf_izz" value="0.000030273372"/> <!-- foot --> <xacro:property name="foot_mass" value="0.06"/> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/go1_description/xacro/gazebo.xacro
<?xml version="1.0"?> <robot> <!-- ros_control plugin --> <gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <!-- <robotNamespace>/go1_gazebo</robotNamespace> --> <!-- <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType> --> </plugin> </gazebo> <!-- Show the trajectory of trunk center. --> <!-- <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>10</frequency> <plot> <link>base</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Yellow</material> </plot> </plugin> </gazebo> --> <!-- Show the trajectory of foot. You can add another trajectory about another foot. --> <!-- <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>100</frequency> <plot> <link>FL_foot</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Green</material> </plot> </plugin> </gazebo> --> <gazebo> <plugin filename="libgazebo_ros_force.so" name="gazebo_ros_force"> <bodyName>trunk</bodyName> <topicName>/apply_force/trunk</topicName> </plugin> </gazebo> <gazebo reference="imu_link"> <gravity>true</gravity> <sensor name="imu_sensor" type="imu"> <always_on>true</always_on> <update_rate>1000</update_rate> <visualize>true</visualize> <topic>__default_topic__</topic> <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin"> <topicName>trunk_imu</topicName> <bodyName>imu_link</bodyName> <updateRateHZ>1000.0</updateRateHZ> <gaussianNoise>0.0</gaussianNoise> <xyzOffset>0 0 0</xyzOffset> <rpyOffset>0 0 0</rpyOffset> <frameName>imu_link</frameName> </plugin> <pose>0 0 0 0 0 0</pose> </sensor> </gazebo> <!-- Depth camera --> <!-- <gazebo> <plugin name="camera_plugin" filename="libgazebo_ros_openni_kinect.so"> <baseline>0.025</baseline> <always_on>true</always_on> <updateRate>0.0</updateRate> <cameraName>unitree_camera_left</cameraName> <frameName>depthCamera_link_left</frameName> <imageTopicName>rgb/imageRaw_left</imageTopicName> <depthImageTopicName>depth/imageRaw_left</depthImageTopicName> <pointCloudTopicName>depth/points_left</pointCloudTopicName> <cameraInfoTopicName>rgb/cameraInfo_left</cameraInfoTopicName> <depthImageCameraInfoTopicName>depth/cameraInfo_left</depthImageCameraInfoTopicName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0.0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0.004</focalLength> <hackBaseline>0.0</hackBaseline> </plugin> </gazebo> --> <!-- <gazebo reference="depthCamera_link_left"> <sensor name="unitree_camera_left" type="depth_camera"> <update_rate>16</update_rate> <always_on>true</always_on> <visualize>true</visualize> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <depth_camera></depth_camera> <clip> <near>0.1</near> <far>100</far> </clip> </camera> <plugin name="camera_plugin" filename="libgazebo_ros_openni_kinect.so"> <baseline>0.025</baseline> <always_on>true</always_on> <updateRate>0.0</updateRate> <cameraName>unitree_camera_left</cameraName> <frameName>depthCamera_link_left</frameName> <imageTopicName>rgb/imageRaw_left</imageTopicName> <depthImageTopicName>depth/imageRaw_left</depthImageTopicName> <pointCloudTopicName>depth/points_left</pointCloudTopicName> <cameraInfoTopicName>rgb/cameraInfo_left</cameraInfoTopicName> <depthImageCameraInfoTopicName>depth/cameraInfo_left</depthImageCameraInfoTopicName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0.0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0.004</focalLength> <hackBaseline>0.0</hackBaseline> </plugin> </sensor> </gazebo> --> <gazebo reference="depthCamera_link_left"> <sensor name="camera_link_camera" type="depth"> <update_rate>20</update_rate> <camera> <horizontal_fov>1.047198</horizontal_fov> <image> <width>640</width> <height>480</height> <format>R8G8B8</format> </image> <clip> <near>0.05</near> <far>3</far> </clip> </camera> <plugin name="camera_link_controller" filename="libgazebo_ros_openni_kinect.so"> <baseline>0.2</baseline> <alwaysOn>true</alwaysOn> <updateRate>1.0</updateRate> <cameraName>camera_link_ir</cameraName> <imageTopicName>/camera_link/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_link/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_link/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_link/depth/camera_info</depthImageInfoTopicName> <pointCloudTopicName>/camera_link/depth/points</pointCloudTopicName> <frameName>depthCamera_link_left</frameName> <pointCloudCutoff>0.5</pointCloudCutoff> <pointCloudCutoffMax>3.0</pointCloudCutoffMax> <distortionK1>0.00000001</distortionK1> <distortionK2>0.00000001</distortionK2> <distortionK3>0.00000001</distortionK3> <distortionT1>0.00000001</distortionT1> <distortionT2>0.00000001</distortionT2> <CxPrime>0</CxPrime> <Cx>0</Cx> <Cy>0</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> <!-- Foot contacts. --> <gazebo reference="FR_calf"> <sensor name="FR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>FR_calf_fixed_joint_lump__FR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="FL_calf"> <sensor name="FL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>FL_calf_fixed_joint_lump__FL_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RR_calf"> <sensor name="RR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>RR_calf_fixed_joint_lump__RR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RL_calf"> <sensor name="RL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>RL_calf_fixed_joint_lump__RL_foot_collision_1</collision> </contact> </sensor> </gazebo> <!-- Visualization of Foot contacts. --> <gazebo reference="FR_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>FR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="FL_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>FL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RR_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>RR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RL_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>RL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="base"> <material>Gazebo/Green</material> <turnGravityOff>false</turnGravityOff> </gazebo> <gazebo reference="trunk"> <mu1>0.2</mu1> <mu2>0.2</mu2> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="stick_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/White</material> </gazebo> <gazebo reference="imu_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/Red</material> </gazebo> <!-- FL leg --> <gazebo reference="FL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- FR leg --> <gazebo reference="FR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RL leg --> <gazebo reference="RL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RR leg --> <gazebo reference="RR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/go1_description/xacro/go1.champ.urdf
<?xml version="1.0" ?> <!-- =================================================================================== --> <!-- | This document was autogenerated by xacro from robot.xacro | --> <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | --> <!-- =================================================================================== --> <robot name="go1_description"> <material name="black"> <color rgba="0.0 0.0 0.0 1.0"/> </material> <material name="blue"> <color rgba="0.0 0.0 0.8 1.0"/> </material> <material name="green"> <color rgba="0.0 0.8 0.0 1.0"/> </material> <material name="grey"> <color rgba="0.2 0.2 0.2 1.0"/> </material> <material name="silver"> <color rgba="0.9137254901960784 0.9137254901960784 0.8470588235294118 1.0"/> </material> <material name="orange"> <color rgba="1.0 0.4235294117647059 0.0392156862745098 1.0"/> </material> <material name="brown"> <color rgba="0.8705882352941177 0.8117647058823529 0.7647058823529411 1.0"/> </material> <material name="red"> <color rgba="0.8 0.0 0.0 1.0"/> </material> <material name="white"> <color rgba="1.0 1.0 1.0 1.0"/> </material> <!-- ros_control plugin --> <gazebo> <plugin filename="libgazebo_ros_control.so" name="gazebo_ros_control"> <!-- <robotNamespace>/go1_gazebo</robotNamespace> --> <!-- <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType> --> </plugin> </gazebo> <!-- Show the trajectory of trunk center. --> <!-- <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>10</frequency> <plot> <link>base</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Yellow</material> </plot> </plugin> </gazebo> --> <!-- Show the trajectory of foot. You can add another trajectory about another foot. --> <!-- <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>100</frequency> <plot> <link>FL_foot</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Green</material> </plot> </plugin> </gazebo> --> <gazebo> <plugin filename="libgazebo_ros_force.so" name="gazebo_ros_force"> <bodyName>trunk</bodyName> <topicName>/apply_force/trunk</topicName> </plugin> </gazebo> <gazebo reference="imu_link"> <gravity>true</gravity> <sensor name="imu_sensor" type="imu"> <always_on>true</always_on> <update_rate>1000</update_rate> <visualize>true</visualize> <topic>__default_topic__</topic> <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin"> <topicName>trunk_imu</topicName> <bodyName>imu_link</bodyName> <updateRateHZ>1000.0</updateRateHZ> <gaussianNoise>0.0</gaussianNoise> <xyzOffset>0 0 0</xyzOffset> <rpyOffset>0 0 0</rpyOffset> <frameName>imu_link</frameName> </plugin> <pose>0 0 0 0 0 0</pose> </sensor> </gazebo> <!-- Depth camera --> <!-- <gazebo> <plugin name="camera_plugin" filename="libgazebo_ros_openni_kinect.so"> <baseline>0.025</baseline> <always_on>true</always_on> <updateRate>0.0</updateRate> <cameraName>unitree_camera_left</cameraName> <frameName>depthCamera_link_left</frameName> <imageTopicName>rgb/imageRaw_left</imageTopicName> <depthImageTopicName>depth/imageRaw_left</depthImageTopicName> <pointCloudTopicName>depth/points_left</pointCloudTopicName> <cameraInfoTopicName>rgb/cameraInfo_left</cameraInfoTopicName> <depthImageCameraInfoTopicName>depth/cameraInfo_left</depthImageCameraInfoTopicName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0.0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0.004</focalLength> <hackBaseline>0.0</hackBaseline> </plugin> </gazebo> --> <!-- <gazebo reference="depthCamera_link_left"> <sensor name="unitree_camera_left" type="depth_camera"> <update_rate>16</update_rate> <always_on>true</always_on> <visualize>true</visualize> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <depth_camera></depth_camera> <clip> <near>0.1</near> <far>100</far> </clip> </camera> <plugin name="camera_plugin" filename="libgazebo_ros_openni_kinect.so"> <baseline>0.025</baseline> <always_on>true</always_on> <updateRate>0.0</updateRate> <cameraName>unitree_camera_left</cameraName> <frameName>depthCamera_link_left</frameName> <imageTopicName>rgb/imageRaw_left</imageTopicName> <depthImageTopicName>depth/imageRaw_left</depthImageTopicName> <pointCloudTopicName>depth/points_left</pointCloudTopicName> <cameraInfoTopicName>rgb/cameraInfo_left</cameraInfoTopicName> <depthImageCameraInfoTopicName>depth/cameraInfo_left</depthImageCameraInfoTopicName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0.0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0.004</focalLength> <hackBaseline>0.0</hackBaseline> </plugin> </sensor> </gazebo> --> <gazebo reference="depthCamera_link_left"> <sensor name="camera_link_camera" type="depth"> <update_rate>20</update_rate> <camera> <horizontal_fov>1.047198</horizontal_fov> <image> <width>640</width> <height>480</height> <format>R8G8B8</format> </image> <clip> <near>0.05</near> <far>3</far> </clip> </camera> <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_link_controller"> <baseline>0.2</baseline> <alwaysOn>true</alwaysOn> <updateRate>1.0</updateRate> <cameraName>camera_link_ir</cameraName> <imageTopicName>/camera_link/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_link/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_link/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_link/depth/camera_info</depthImageInfoTopicName> <pointCloudTopicName>/camera_link/depth/points</pointCloudTopicName> <frameName>depthCamera_link_left</frameName> <pointCloudCutoff>0.5</pointCloudCutoff> <pointCloudCutoffMax>3.0</pointCloudCutoffMax> <distortionK1>0.00000001</distortionK1> <distortionK2>0.00000001</distortionK2> <distortionK3>0.00000001</distortionK3> <distortionT1>0.00000001</distortionT1> <distortionT2>0.00000001</distortionT2> <CxPrime>0</CxPrime> <Cx>0</Cx> <Cy>0</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> <!-- Foot contacts. --> <gazebo reference="FR_calf"> <sensor name="FR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>FR_calf_fixed_joint_lump__FR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="FL_calf"> <sensor name="FL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>FL_calf_fixed_joint_lump__FL_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RR_calf"> <sensor name="RR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>RR_calf_fixed_joint_lump__RR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RL_calf"> <sensor name="RL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>RL_calf_fixed_joint_lump__RL_foot_collision_1</collision> </contact> </sensor> </gazebo> <!-- Visualization of Foot contacts. --> <gazebo reference="FR_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>FR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="FL_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>FL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RR_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>RR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RL_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>RL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="base"> <material>Gazebo/Green</material> <turnGravityOff>false</turnGravityOff> </gazebo> <gazebo reference="trunk"> <mu1>0.2</mu1> <mu2>0.2</mu2> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="stick_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/White</material> </gazebo> <gazebo reference="imu_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/Red</material> </gazebo> <!-- FL leg --> <gazebo reference="FL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- FR leg --> <gazebo reference="FR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RL leg --> <gazebo reference="RL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RR leg --> <gazebo reference="RR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- <xacro:include filename="$(find go1_gazebo)/launch/stairs.urdf.xacro"/> --> <!-- <xacro:stairs stairs="15" xpos="0" ypos="0" zpos="0" /> --> <!-- Debug mode will hung up the robot, use "true" or "false" to switch it. --> <!-- <xacro:if value="$(arg DEBUG)"> <link name="world"/> <joint name="base_static_joint" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="base"/> </joint> </xacro:if> --> <link name="base"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> </visual> </link> <joint name="floating_base" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="base"/> <child link="trunk"/> </joint> <link name="trunk"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.3762 0.0935 0.114"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0223 0.002 -0.0005"/> <mass value="5.204"/> <inertia ixx="0.0168352186" ixy="0.0004636141" ixz="0.0002367952" iyy="0.0656071082" iyz="3.6671e-05" izz="0.0742720659"/> </inertial> </link> <joint name="imu_joint" type="fixed"> <parent link="trunk"/> <child link="imu_link"/> <origin rpy="0 0 0" xyz="-0.01592 -0.06659 -0.00617"/> </joint> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> <!-- <material name="red"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> </link> <joint name="FR_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="0.1881 -0.04675 0"/> <parent link="trunk"/> <child link="FR_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-1.0471975511965976" upper="1.0471975511965976" velocity="30.1"/> </joint> <link name="FR_hip"> <visual> <origin rpy="3.141592653589793 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.04" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.00541 0.00074 6e-06"/> <mass value="0.591"/> <inertia ixx="0.000374268192" ixy="-3.6844422e-05" ixz="-9.86754e-07" iyy="0.000635923669" iyz="1.172894e-06" izz="0.000457647394"/> </inertial> </link> <joint name="FR_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 -0.08 0"/> <parent link="FR_hip"/> <child link="FR_thigh_shoulder"/> </joint> <!-- this link is only for collision --> <link name="FR_thigh_shoulder"> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.032" radius="0.041"/> </geometry> </collision> </link> <joint name="FR_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 -0.08 0"/> <parent link="FR_hip"/> <child link="FR_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-0.6632251157578452" upper="2.9670597283903604" velocity="30.1"/> </joint> <link name="FR_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.0245 0.034"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.003468 0.018947 -0.032736"/> <mass value="0.92"/> <inertia ixx="0.005851561134" ixy="-1.783284e-06" ixz="0.000328291374" iyy="0.005596155105" iyz="-2.1430713e-05" izz="0.00107157026"/> </inertial> </link> <joint name="FR_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="FR_thigh"/> <child link="FR_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-2.722713633111154" upper="-0.8377580409572781" velocity="30.1"/> </joint> <link name="FR_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.016 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.006286 0.001307 -0.122269"/> <mass value="0.131"/> <inertia ixx="0.002939186297" ixy="1.440899e-06" ixz="-0.00010535955" iyy="0.00295576935" iyz="-2.4397752e-05" izz="3.0273372e-05"/> </inertial> </link> <joint name="FR_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="FR_calf"/> <child link="FR_foot"/> </joint> <link name="FR_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.01"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.02"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="9.600000000000001e-06" ixy="0.0" ixz="0.0" iyy="9.600000000000001e-06" iyz="0.0" izz="9.600000000000001e-06"/> </inertial> </link> <transmission name="FR_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FR_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FR_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="FL_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="0.1881 0.04675 0"/> <parent link="trunk"/> <child link="FL_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-1.0471975511965976" upper="1.0471975511965976" velocity="30.1"/> </joint> <link name="FL_hip"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.04" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.00541 -0.00074 6e-06"/> <mass value="0.591"/> <inertia ixx="0.000374268192" ixy="3.6844422e-05" ixz="-9.86754e-07" iyy="0.000635923669" iyz="-1.172894e-06" izz="0.000457647394"/> </inertial> </link> <joint name="FL_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0.08 0"/> <parent link="FL_hip"/> <child link="FL_thigh_shoulder"/> </joint> <!-- this link is only for collision --> <link name="FL_thigh_shoulder"> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.032" radius="0.041"/> </geometry> </collision> </link> <joint name="FL_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0.08 0"/> <parent link="FL_hip"/> <child link="FL_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-0.6632251157578452" upper="2.9670597283903604" velocity="30.1"/> </joint> <link name="FL_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/thigh.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.0245 0.034"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.003468 -0.018947 -0.032736"/> <mass value="0.92"/> <inertia ixx="0.005851561134" ixy="1.783284e-06" ixz="0.000328291374" iyy="0.005596155105" iyz="2.1430713e-05" izz="0.00107157026"/> </inertial> </link> <joint name="FL_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="FL_thigh"/> <child link="FL_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-2.722713633111154" upper="-0.8377580409572781" velocity="30.1"/> </joint> <link name="FL_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.016 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.006286 0.001307 -0.122269"/> <mass value="0.131"/> <inertia ixx="0.002939186297" ixy="1.440899e-06" ixz="-0.00010535955" iyy="0.00295576935" iyz="-2.4397752e-05" izz="3.0273372e-05"/> </inertial> </link> <joint name="FL_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="FL_calf"/> <child link="FL_foot"/> </joint> <link name="FL_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.01"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.02"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="9.600000000000001e-06" ixy="0.0" ixz="0.0" iyy="9.600000000000001e-06" iyz="0.0" izz="9.600000000000001e-06"/> </inertial> </link> <transmission name="FL_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FL_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FL_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="RR_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="-0.1881 -0.04675 0"/> <parent link="trunk"/> <child link="RR_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-1.0471975511965976" upper="1.0471975511965976" velocity="30.1"/> </joint> <link name="RR_hip"> <visual> <origin rpy="3.141592653589793 3.141592653589793 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.04" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.00541 0.00074 6e-06"/> <mass value="0.591"/> <inertia ixx="0.000374268192" ixy="3.6844422e-05" ixz="9.86754e-07" iyy="0.000635923669" iyz="1.172894e-06" izz="0.000457647394"/> </inertial> </link> <joint name="RR_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 -0.08 0"/> <parent link="RR_hip"/> <child link="RR_thigh_shoulder"/> </joint> <!-- this link is only for collision --> <link name="RR_thigh_shoulder"> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.032" radius="0.041"/> </geometry> </collision> </link> <joint name="RR_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 -0.08 0"/> <parent link="RR_hip"/> <child link="RR_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-0.6632251157578452" upper="2.9670597283903604" velocity="30.1"/> </joint> <link name="RR_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.0245 0.034"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.003468 0.018947 -0.032736"/> <mass value="0.92"/> <inertia ixx="0.005851561134" ixy="-1.783284e-06" ixz="0.000328291374" iyy="0.005596155105" iyz="-2.1430713e-05" izz="0.00107157026"/> </inertial> </link> <joint name="RR_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="RR_thigh"/> <child link="RR_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-2.722713633111154" upper="-0.8377580409572781" velocity="30.1"/> </joint> <link name="RR_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.016 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.006286 0.001307 -0.122269"/> <mass value="0.131"/> <inertia ixx="0.002939186297" ixy="1.440899e-06" ixz="-0.00010535955" iyy="0.00295576935" iyz="-2.4397752e-05" izz="3.0273372e-05"/> </inertial> </link> <joint name="RR_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="RR_calf"/> <child link="RR_foot"/> </joint> <link name="RR_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.01"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.02"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="9.600000000000001e-06" ixy="0.0" ixz="0.0" iyy="9.600000000000001e-06" iyz="0.0" izz="9.600000000000001e-06"/> </inertial> </link> <transmission name="RR_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RR_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RR_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="RL_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="-0.1881 0.04675 0"/> <parent link="trunk"/> <child link="RL_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-1.0471975511965976" upper="1.0471975511965976" velocity="30.1"/> </joint> <link name="RL_hip"> <visual> <origin rpy="0 3.141592653589793 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.04" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.00541 -0.00074 6e-06"/> <mass value="0.591"/> <inertia ixx="0.000374268192" ixy="-3.6844422e-05" ixz="9.86754e-07" iyy="0.000635923669" iyz="-1.172894e-06" izz="0.000457647394"/> </inertial> </link> <joint name="RL_hip_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0.08 0"/> <parent link="RL_hip"/> <child link="RL_thigh_shoulder"/> </joint> <!-- this link is only for collision --> <link name="RL_thigh_shoulder"> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.032" radius="0.041"/> </geometry> </collision> </link> <joint name="RL_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0.08 0"/> <parent link="RL_hip"/> <child link="RL_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-0.6632251157578452" upper="2.9670597283903604" velocity="30.1"/> </joint> <link name="RL_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/thigh.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.0245 0.034"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.003468 -0.018947 -0.032736"/> <mass value="0.92"/> <inertia ixx="0.005851561134" ixy="1.783284e-06" ixz="0.000328291374" iyy="0.005596155105" iyz="2.1430713e-05" izz="0.00107157026"/> </inertial> </link> <joint name="RL_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="RL_thigh"/> <child link="RL_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-2.722713633111154" upper="-0.8377580409572781" velocity="30.1"/> </joint> <link name="RL_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.016 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.006286 0.001307 -0.122269"/> <mass value="0.131"/> <inertia ixx="0.002939186297" ixy="1.440899e-06" ixz="-0.00010535955" iyy="0.00295576935" iyz="-2.4397752e-05" izz="3.0273372e-05"/> </inertial> </link> <joint name="RL_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="RL_calf"/> <child link="RL_foot"/> </joint> <link name="RL_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.01"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.02"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="9.600000000000001e-06" ixy="0.0" ixz="0.0" iyy="9.600000000000001e-06" iyz="0.0" izz="9.600000000000001e-06"/> </inertial> </link> <transmission name="RL_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RL_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RL_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="camera_joint_face" type="fixed"> <origin rpy="3.141592653589793 0 0" xyz="0.2785 0.0125 0.0167"/> <parent link="trunk"/> <child link="camera_face"/> </joint> <link name="camera_face"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/depthCamera.dae" scale="1 1 1"/> </geometry> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="camera_optical_joint_face" type="fixed"> <origin rpy="-1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0"/> <parent link="camera_face"/> <child link="camera_optical_face"/> </joint> <link name="camera_optical_face"> </link> <gazebo reference="camera_face"> <!-- <material>Gazebo/Black</material> --> <sensor name="camera_face_camera" type="depth"> <update_rate>16</update_rate> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <clip> <near>0.1</near> <far>5</far> </clip> </camera> <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_face_controller"> <baseline>0.025</baseline> <alwaysOn>true</alwaysOn> <updateRate>0.0</updateRate> <cameraName>camera_face_ir</cameraName> <imageTopicName>/camera_face/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_face/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_face/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_face/depth/camera_info</depthImageInfoTopicName> <!-- <pointCloudTopicName>/camera_${name}/depth/points</pointCloudTopicName> --> <pointCloudTopicName>/cam1/point_cloud_face</pointCloudTopicName> <frameName>camera_optical_face</frameName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> <joint name="camera_joint_chin" type="fixed"> <origin rpy="3.141592653589793 1.5707963267948966 0" xyz="0.2522 0.0125 -0.0436"/> <parent link="trunk"/> <child link="camera_chin"/> </joint> <link name="camera_chin"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/depthCamera.dae" scale="1 1 1"/> </geometry> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="camera_optical_joint_chin" type="fixed"> <origin rpy="-1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0"/> <parent link="camera_chin"/> <child link="camera_optical_chin"/> </joint> <link name="camera_optical_chin"> </link> <gazebo reference="camera_chin"> <!-- <material>Gazebo/Black</material> --> <sensor name="camera_chin_camera" type="depth"> <update_rate>16</update_rate> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <clip> <near>0.1</near> <far>5</far> </clip> </camera> <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_chin_controller"> <baseline>0.025</baseline> <alwaysOn>true</alwaysOn> <updateRate>0.0</updateRate> <cameraName>camera_chin_ir</cameraName> <imageTopicName>/camera_chin/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_chin/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_chin/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_chin/depth/camera_info</depthImageInfoTopicName> <!-- <pointCloudTopicName>/camera_${name}/depth/points</pointCloudTopicName> --> <pointCloudTopicName>/cam2/point_cloud_chin</pointCloudTopicName> <frameName>camera_optical_chin</frameName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> <joint name="camera_joint_left" type="fixed"> <origin rpy="3.141592653589793 0.2618 1.5707963267948966" xyz="-0.066 0.082 -0.0176"/> <parent link="trunk"/> <child link="camera_left"/> </joint> <link name="camera_left"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/depthCamera.dae" scale="1 1 1"/> </geometry> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="camera_optical_joint_left" type="fixed"> <origin rpy="-1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0"/> <parent link="camera_left"/> <child link="camera_optical_left"/> </joint> <link name="camera_optical_left"> </link> <gazebo reference="camera_left"> <!-- <material>Gazebo/Black</material> --> <sensor name="camera_left_camera" type="depth"> <update_rate>16</update_rate> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <clip> <near>0.1</near> <far>5</far> </clip> </camera> <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_left_controller"> <baseline>0.025</baseline> <alwaysOn>true</alwaysOn> <updateRate>0.0</updateRate> <cameraName>camera_left_ir</cameraName> <imageTopicName>/camera_left/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_left/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_left/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_left/depth/camera_info</depthImageInfoTopicName> <!-- <pointCloudTopicName>/camera_${name}/depth/points</pointCloudTopicName> --> <pointCloudTopicName>/cam3/point_cloud_left</pointCloudTopicName> <frameName>camera_optical_left</frameName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> <joint name="camera_joint_right" type="fixed"> <origin rpy="3.141592653589793 0.2618 -1.5707963267948966" xyz="-0.041 -0.082 -0.0176"/> <parent link="trunk"/> <child link="camera_right"/> </joint> <link name="camera_right"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/depthCamera.dae" scale="1 1 1"/> </geometry> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="camera_optical_joint_right" type="fixed"> <origin rpy="-1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0"/> <parent link="camera_right"/> <child link="camera_optical_right"/> </joint> <link name="camera_optical_right"> </link> <gazebo reference="camera_right"> <!-- <material>Gazebo/Black</material> --> <sensor name="camera_right_camera" type="depth"> <update_rate>16</update_rate> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <clip> <near>0.1</near> <far>5</far> </clip> </camera> <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_right_controller"> <baseline>0.025</baseline> <alwaysOn>true</alwaysOn> <updateRate>0.0</updateRate> <cameraName>camera_right_ir</cameraName> <imageTopicName>/camera_right/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_right/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_right/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_right/depth/camera_info</depthImageInfoTopicName> <!-- <pointCloudTopicName>/camera_${name}/depth/points</pointCloudTopicName> --> <pointCloudTopicName>/cam4/point_cloud_right</pointCloudTopicName> <frameName>camera_optical_right</frameName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> <joint name="camera_joint_rearDown" type="fixed"> <origin rpy="3.141592653589793 1.5707963267948966 0" xyz="-0.0825 0.0125 -0.04365"/> <parent link="trunk"/> <child link="camera_rearDown"/> </joint> <link name="camera_rearDown"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/depthCamera.dae" scale="1 1 1"/> </geometry> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="camera_optical_joint_rearDown" type="fixed"> <origin rpy="-1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0"/> <parent link="camera_rearDown"/> <child link="camera_optical_rearDown"/> </joint> <link name="camera_optical_rearDown"> </link> <gazebo reference="camera_rearDown"> <!-- <material>Gazebo/Black</material> --> <sensor name="camera_rearDown_camera" type="depth"> <update_rate>16</update_rate> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <clip> <near>0.1</near> <far>5</far> </clip> </camera> <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_rearDown_controller"> <baseline>0.025</baseline> <alwaysOn>true</alwaysOn> <updateRate>0.0</updateRate> <cameraName>camera_rearDown_ir</cameraName> <imageTopicName>/camera_rearDown/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_rearDown/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_rearDown/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_rearDown/depth/camera_info</depthImageInfoTopicName> <!-- <pointCloudTopicName>/camera_${name}/depth/points</pointCloudTopicName> --> <pointCloudTopicName>/cam5/point_cloud_rearDown</pointCloudTopicName> <frameName>camera_optical_rearDown</frameName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> <joint name="camera_laserscan_joint_left" type="fixed"> <origin rpy="0 0.2618 0" xyz="0 0 0"/> <parent link="camera_left"/> <child link="camera_laserscan_link_left"/> </joint> <link name="camera_laserscan_link_left"> </link> <joint name="camera_laserscan_joint_right" type="fixed"> <origin rpy="0 0.2618 0" xyz="0 0 0"/> <parent link="camera_right"/> <child link="camera_laserscan_link_right"/> </joint> <link name="camera_laserscan_link_right"> </link> <joint name="ultraSound_joint_left" type="fixed"> <origin rpy="0 0.2618 1.5707963267948966" xyz="-0.0535 0.0826 0.00868"/> <parent link="trunk"/> <child link="ultraSound_left"/> </joint> <link name="ultraSound_left"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/ultraSound.dae" scale="1 1 1"/> </geometry> <material name="black"/> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="ultraSound_joint_right" type="fixed"> <origin rpy="0 0.2618 -1.5707963267948966" xyz="-0.0535 -0.0826 0.00868"/> <parent link="trunk"/> <child link="ultraSound_right"/> </joint> <link name="ultraSound_right"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/ultraSound.dae" scale="1 1 1"/> </geometry> <material name="black"/> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="ultraSound_joint_face" type="fixed"> <origin rpy="0 0 0" xyz="0.2747 0.0 -0.0088"/> <parent link="trunk"/> <child link="ultraSound_face"/> </joint> <link name="ultraSound_face"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/ultraSound.dae" scale="1 1 1"/> </geometry> <material name="black"/> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/go1_description/xacro/robot.xacro
<?xml version="1.0"?> <robot name="go1_description" xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:include filename="$(find go1_description)/xacro/const.xacro"/> <xacro:include filename="$(find go1_description)/xacro/materials.xacro"/> <xacro:include filename="$(find go1_description)/xacro/leg.xacro"/> <!-- <xacro:include filename="$(find go1_description)/xacro/stairs.xacro"/> --> <xacro:include filename="$(find go1_description)/xacro/gazebo.xacro"/> <xacro:include filename="$(find go1_description)/xacro/depthCamera.xacro"/> <xacro:include filename="$(find go1_description)/xacro/ultraSound.xacro"/> <!-- <xacro:include filename="$(find go1_gazebo)/launch/stairs.urdf.xacro"/> --> <!-- <xacro:stairs stairs="15" xpos="0" ypos="0" zpos="0" /> --> <!-- Rollover Protection mode will add an additional stick on the top, use "true" or "false" to switch it. --> <xacro:property name="rolloverProtection" value="false"/> <!-- Debug mode will hung up the robot, use "true" or "false" to switch it. --> <xacro:if value="$(arg DEBUG)"> <link name="world"/> <joint name="base_static_joint" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="base"/> </joint> </xacro:if> <link name="base"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> </visual> </link> <joint name="floating_base" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="base"/> <child link="trunk"/> </joint> <link name="trunk"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="${trunk_length} ${trunk_width} ${trunk_height}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${trunk_com_x} ${trunk_com_y} ${trunk_com_z}"/> <mass value="${trunk_mass}"/> <inertia ixx="${trunk_ixx}" ixy="${trunk_ixy}" ixz="${trunk_ixz}" iyy="${trunk_iyy}" iyz="${trunk_iyz}" izz="${trunk_izz}"/> </inertial> </link> <xacro:if value="${(rolloverProtection == 'true')}"> <joint name="stick_joint" type="fixed"> <parent link="trunk"/> <child link="stick_link"/> <origin rpy="0 0 0" xyz="${0.18} 0 ${stick_length/2.0+0.08}"/> </joint> <link name="stick_link"> <visual> <geometry> <cylinder length="${stick_length}" radius="${stick_radius}"/> </geometry> <origin rpy="0 0 0" xyz="0 0 0"/> <!-- <material name="white"/> --> </visual> <collision> <geometry> <cylinder length="${stick_length}" radius="${stick_radius}"/> </geometry> <origin rpy="0 0 0" xyz="0 0 0"/> </collision> <inertial> <mass value="${stick_mass}"/> <inertia ixx="${stick_mass / 2.0 * (stick_radius*stick_radius)}" ixy="0.0" ixz="0.0" iyy="${stick_mass / 12.0 * (3*stick_radius*stick_radius + stick_length*stick_length)}" iyz="0.0" izz="${stick_mass / 12.0 * (3*stick_radius*stick_radius + stick_length*stick_length)}"/> </inertial> </link> </xacro:if> <joint name="imu_joint" type="fixed"> <parent link="trunk"/> <child link="imu_link"/> <origin rpy="0 0 0" xyz="-0.01592 -0.06659 -0.00617"/> </joint> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> <!-- <material name="red"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> </link> <xacro:leg name="FR" mirror="-1" mirror_dae="False" front_hind="1" front_hind_dae="True"> <origin rpy="0 0 0" xyz="${leg_offset_x} ${-leg_offset_y} 0"/> </xacro:leg> <xacro:leg name="FL" mirror="1" mirror_dae="True" front_hind="1" front_hind_dae="True"> <origin rpy="0 0 0" xyz="${leg_offset_x} ${leg_offset_y} 0"/> </xacro:leg> <xacro:leg name="RR" mirror="-1" mirror_dae="False" front_hind="-1" front_hind_dae="False"> <origin rpy="0 0 0" xyz="${-leg_offset_x} ${-leg_offset_y} 0"/> </xacro:leg> <xacro:leg name="RL" mirror="1" mirror_dae="True" front_hind="-1" front_hind_dae="False"> <origin rpy="0 0 0" xyz="${-leg_offset_x} ${leg_offset_y} 0"/> </xacro:leg> <xacro:depthCamera camID="1" name="face"> <origin rpy="${PI} 0 0" xyz="0.2785 0.0125 0.0167"/> </xacro:depthCamera> <xacro:depthCamera camID="2" name="chin"> <origin rpy="${PI} ${PI/2} 0" xyz="0.2522 0.0125 -0.0436"/> </xacro:depthCamera> <xacro:depthCamera camID="3" name="left"> <origin rpy="${PI} 0.2618 ${PI/2}" xyz="-0.066 0.082 -0.0176"/> </xacro:depthCamera> <xacro:depthCamera camID="4" name="right"> <origin rpy="${PI} 0.2618 ${-PI/2}" xyz="-0.041 -0.082 -0.0176"/> </xacro:depthCamera> <xacro:depthCamera camID="5" name="rearDown"> <origin rpy="${PI} ${PI/2} 0" xyz="-0.0825 0.0125 -0.04365"/> </xacro:depthCamera> <joint name="camera_laserscan_joint_left" type="fixed"> <origin rpy="0 0.2618 0" xyz="0 0 0"/> <parent link="camera_left"/> <child link="camera_laserscan_link_left"/> </joint> <link name="camera_laserscan_link_left"> </link> <joint name="camera_laserscan_joint_right" type="fixed"> <origin rpy="0 0.2618 0" xyz="0 0 0"/> <parent link="camera_right"/> <child link="camera_laserscan_link_right"/> </joint> <link name="camera_laserscan_link_right"> </link> <xacro:ultraSound name="left"> <origin rpy="0 0.2618 ${PI/2}" xyz="-0.0535 0.0826 0.00868"/> </xacro:ultraSound> <xacro:ultraSound name="right"> <origin rpy="0 0.2618 ${-PI/2}" xyz="-0.0535 -0.0826 0.00868"/> </xacro:ultraSound> <xacro:ultraSound name="face"> <origin rpy="0 0 0" xyz="0.2747 0.0 -0.0088"/> </xacro:ultraSound> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/unitree_ros-CHAMP/robots/go1_description/config/robot_control.yaml
go1_gazebo: # Publish all joint states ----------------------------------- joint_state_controller: type: joint_state_controller/JointStateController publish_rate: 1000 # FL Controllers --------------------------------------- FL_hip_controller: type: unitree_legged_control/UnitreeJointController joint: FL_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} FL_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: FL_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} FL_calf_controller: type: unitree_legged_control/UnitreeJointController joint: FL_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # FR Controllers --------------------------------------- FR_hip_controller: type: unitree_legged_control/UnitreeJointController joint: FR_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} FR_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: FR_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} FR_calf_controller: type: unitree_legged_control/UnitreeJointController joint: FR_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # RL Controllers --------------------------------------- RL_hip_controller: type: unitree_legged_control/UnitreeJointController joint: RL_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} RL_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: RL_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} RL_calf_controller: type: unitree_legged_control/UnitreeJointController joint: RL_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # RR Controllers --------------------------------------- RR_hip_controller: type: unitree_legged_control/UnitreeJointController joint: RR_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} RR_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: RR_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} RR_calf_controller: type: unitree_legged_control/UnitreeJointController joint: RR_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0}
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/b1_description/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3) project(b1_description) find_package(catkin REQUIRED COMPONENTS genmsg roscpp std_msgs tf ) catkin_package( CATKIN_DEPENDS ) include_directories( # include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} )
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/b1_description/package.xml
<?xml version="1.0"?> <package format="2"> <name>b1_description</name> <version>0.0.0</version> <description>The b1_description package</description> <maintainer email="b1@unitree.cc">unitree</maintainer> <license>TODO</license> <buildtool_depend>catkin</buildtool_depend> <depend>roscpp</depend> <depend>std_msgs</depend> </package>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/b1_description/launch/check_joint.rviz
Panels: - Class: rviz/Displays Help Height: 78 Name: Displays Property Tree Widget: Expanded: - /Global Options1 - /RobotModel1 - /TF1/Frames1 Splitter Ratio: 0.5 Tree Height: 530 - 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 Name: Time SyncMode: 0 SyncSource: "" 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: 0.5 Class: rviz/RobotModel Collision Enabled: false Enabled: true Links: All Links Enabled: true Expand Joint Details: false Expand Link Details: false Expand Tree: false FL_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_calf_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_hip_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_thigh_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_calf_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_hip_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_thigh_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true Link Tree Style: Links in Alphabetic Order RL_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_calf_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_hip_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_thigh_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_calf_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_hip_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_thigh_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true base: Alpha: 1 Show Axes: false Show Trail: false Value: true imu_link: Alpha: 1 Show Axes: false Show Trail: false Value: true trunk: 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 - Alpha: 1 Class: rviz/Axes Enabled: false Length: 1 Name: Axes Radius: 0.10000000149011612 Reference Frame: <Fixed Frame> Show Trail: false Value: false - Class: rviz/TF Enabled: false Frame Timeout: 15 Frames: All Enabled: false 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: 238; 238; 238 Default Light: true Fixed Frame: base 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: /move_base_simple/goal - Class: rviz/PublishPoint Single click: true Topic: /clicked_point Value: true Views: Current: Class: rviz/Orbit Distance: 1.7572907209396362 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.18471483886241913 Y: -0.16858524084091187 Z: -0.1451287716627121 Focal Shape Fixed Size: false Focal Shape Size: 0.05000000074505806 Invert Z Axis: false Name: Current View Near Clip Distance: 0.009999999776482582 Pitch: 0.609795868396759 Target Frame: <Fixed Frame> Yaw: 4.128592014312744 Saved: ~ Window Geometry: Displays: collapsed: false Height: 759 Hide Left Dock: false Hide Right Dock: true QMainWindow State: 000000ff00000000fd0000000400000000000001b90000029dfc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d0000029d000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00430061006d00650072006101000001be000001900000000000000000000000010000010f000002e2fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730000000028000002e2000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000006400000003efc0100000002fb0000000800540069006d00650000000000000006400000042800fffffffb0000000800540069006d00650100000000000004500000000000000000000003ae0000029d00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 Selection: collapsed: false Time: collapsed: false Tool Properties: collapsed: false Views: collapsed: false Width: 1389 X: 472 Y: 122
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/b1_description/launch/b1_rviz.launch
<launch> <arg name="user_debug" default="false"/> <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find b1_description)/xacro/robot.xacro' DEBUG:=$(arg user_debug)"/> <!-- for higher robot_state_publisher average rate--> <!-- <param name="rate" value="1000"/> --> <!-- send fake joint values --> <!--<node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher"> <param name="use_gui" value="TRUE"/> </node>--> <node pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" name="joint_state_publisher"/> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher"> <param name="publish_frequency" type="double" value="1000.0"/> </node> <node pkg="rviz" type="rviz" name="rviz" respawn="false" output="screen" args="-d $(find b1_description)/launch/check_joint.rviz"/> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/b1_description/xacro/materials.xacro
<?xml version="1.0"?> <robot> <material name="black"> <color rgba="0.0 0.0 0.0 1.0"/> </material> <material name="blue"> <color rgba="0.0 0.0 0.8 1.0"/> </material> <material name="green"> <color rgba="0.0 0.8 0.0 1.0"/> </material> <material name="grey"> <color rgba="0.2 0.2 0.2 1.0"/> </material> <material name="silver"> <color rgba="${233/255} ${233/255} ${216/255} 1.0"/> </material> <material name="orange"> <color rgba="${255/255} ${108/255} ${10/255} 1.0"/> </material> <material name="brown"> <color rgba="${222/255} ${207/255} ${195/255} 1.0"/> </material> <material name="red"> <color rgba="0.8 0.0 0.0 1.0"/> </material> <material name="white"> <color rgba="1.0 1.0 1.0 1.0"/> </material> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/b1_description/xacro/b1.urdf
<?xml version="1.0" ?> <!-- =================================================================================== --> <!-- | This document was autogenerated by xacro from robot.xacro | --> <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | --> <!-- =================================================================================== --> <robot name="b1_description"> <material name="black"> <color rgba="0.0 0.0 0.0 1.0"/> </material> <material name="blue"> <color rgba="0.0 0.0 0.8 1.0"/> </material> <material name="green"> <color rgba="0.0 0.8 0.0 1.0"/> </material> <material name="grey"> <color rgba="0.2 0.2 0.2 1.0"/> </material> <material name="silver"> <color rgba="0.9137254901960784 0.9137254901960784 0.8470588235294118 1.0"/> </material> <material name="orange"> <color rgba="1.0 0.4235294117647059 0.0392156862745098 1.0"/> </material> <material name="brown"> <color rgba="0.8705882352941177 0.8117647058823529 0.7647058823529411 1.0"/> </material> <material name="red"> <color rgba="0.8 0.0 0.0 1.0"/> </material> <material name="white"> <color rgba="1.0 1.0 1.0 1.0"/> </material> <!-- ros_control plugin --> <gazebo> <plugin filename="libgazebo_ros_control.so" name="gazebo_ros_control"> <robotNamespace>/aliengo_gazebo</robotNamespace> <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType> </plugin> </gazebo> <!-- Show the trajectory of trunk center. --> <gazebo> <plugin filename="libLinkPlot3DPlugin.so" name="3dplot"> <frequency>10</frequency> <plot> <link>base</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Yellow</material> </plot> </plugin> </gazebo> <!-- Show the trajectory of foot. You can add another trajectory about another foot. --> <!-- <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>100</frequency> <plot> <link>FL_foot</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Green</material> </plot> </plugin> </gazebo> --> <gazebo> <plugin filename="libgazebo_ros_force.so" name="gazebo_ros_force"> <bodyName>trunk</bodyName> <topicName>/apply_force/trunk</topicName> </plugin> </gazebo> <gazebo reference="imu_link"> <gravity>true</gravity> <sensor name="imu_sensor" type="imu"> <always_on>true</always_on> <update_rate>1000</update_rate> <visualize>true</visualize> <topic>__default_topic__</topic> <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin"> <topicName>trunk_imu</topicName> <bodyName>imu_link</bodyName> <updateRateHZ>1000.0</updateRateHZ> <gaussianNoise>0.0</gaussianNoise> <xyzOffset>0 0 0</xyzOffset> <rpyOffset>0 0 0</rpyOffset> <frameName>imu_link</frameName> </plugin> <pose>0 0 0 0 0 0</pose> </sensor> </gazebo> <!-- Foot contacts. --> <gazebo reference="FR_calf"> <sensor name="FR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>FR_calf_fixed_joint_lump__FR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="FL_calf"> <sensor name="FL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>FL_calf_fixed_joint_lump__FL_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RR_calf"> <sensor name="RR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>RR_calf_fixed_joint_lump__RR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RL_calf"> <sensor name="RL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>RL_calf_fixed_joint_lump__RL_foot_collision_1</collision> </contact> </sensor> </gazebo> <!-- Visualization of Foot contacts. --> <gazebo reference="FR_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>FR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="FL_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>FL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RR_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>RR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RL_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>RL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="base"> <material>Gazebo/Green</material> <turnGravityOff>false</turnGravityOff> </gazebo> <gazebo reference="trunk"> <mu1>0.2</mu1> <mu2>0.2</mu2> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="stick_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/White</material> </gazebo> <gazebo reference="imu_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/Red</material> </gazebo> <!-- FL leg --> <gazebo reference="FL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- FR leg --> <gazebo reference="FR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RL leg --> <gazebo reference="RL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RR leg --> <gazebo reference="RR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- Rotor related joint and link is only for demonstrate location. --> <!-- Actually, the rotor will rotate and the joint is not fixed. Reduction ratio should be considered. --> <!-- Debug mode will hung up the robot, use "true" or "false" to switch it. --> <!-- <xacro:if value="$(arg DEBUG)"> <link name="world"/> <joint name="base_static_joint" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="base"/> </joint> </xacro:if> --> <link name="base"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> </visual> </link> <joint name="floating_base" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="base"/> <child link="trunk"/> </joint> <link name="trunk"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.647 0.3 0.15"/> </geometry> </collision> <!-- <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> </collision> --> <inertial> <origin rpy="0 0 0" xyz="0.008987 0.002243 0.003013"/> <mass value="25"/> <inertia ixx="0.183142146" ixy="-0.001379002" ixz="-0.027956055" iyy="0.756327752" iyz="0.000193774" izz="0.783777558"/> </inertial> </link> <joint name="imu_joint" type="fixed"> <parent link="trunk"/> <child link="imu_link"/> <origin rpy="0 0 0" xyz="0 0 0"/> </joint> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.000001" iyz="0" izz="0.0001"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> <material name="red"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> </link> <joint name="FR_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="0.3455 -0.072 0"/> <parent link="trunk"/> <child link="FR_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="91.0035" lower="-0.75" upper="0.75" velocity="19.69"/> </joint> <joint name="FR_hip_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.1955 -0.072 0"/> <parent link="trunk"/> <child link="FR_hip_rotor"/> </joint> <link name="FR_hip"> <visual> <origin rpy="3.141592653589793 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 -0.12675 0"/> <geometry> <cylinder length="0.04" radius="0.09"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.020298 -0.009758 0.000109"/> <mass value="2.1"/> <inertia ixx="0.00406608" ixy="0.000288071" ixz="-4.371e-06" iyy="0.008775259" iyz="-1.811e-06" izz="0.006060348"/> </inertial> </link> <link name="FR_hip_rotor"> <visual> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.199"/> <inertia ixx="0.00039249" ixy="0.0" ixz="0.0" iyy="0.000219397" iyz="0.0" izz="0.000219397"/> </inertial> </link> <joint name="FR_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 -0.12675 0"/> <parent link="FR_hip"/> <child link="FR_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="93.33" lower="-1.0" upper="3.5" velocity="23.32"/> </joint> <joint name="FR_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 -0.00935 0"/> <parent link="FR_hip"/> <child link="FR_thigh_rotor"/> </joint> <link name="FR_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.175"/> <geometry> <box size="0.35 0.05 0.08"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.000235 0.028704 -0.054169"/> <mass value="3.934"/> <inertia ixx="0.044459086" ixy="-0.000128738" ixz="-0.002343913" iyy="0.046023457" iyz="-0.006032996" izz="0.008696078"/> </inertial> </link> <link name="FR_thigh_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.266"/> <inertia ixx="0.000485657" ixy="0.0" ixz="0.0" iyy="0.00091885" iyz="0.0" izz="0.000485657"/> </inertial> </link> <joint name="FR_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.35"/> <parent link="FR_thigh"/> <child link="FR_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="140" lower="-2.6" upper="-0.6" velocity="15.55"/> </joint> <joint name="FR_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.0519 0"/> <parent link="FR_thigh"/> <child link="FR_calf_rotor"/> </joint> <link name="FR_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.175"/> <geometry> <box size="0.35 0.04 0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.005237 0.0 -0.202805"/> <mass value="0.857"/> <inertia ixx="0.015011003" ixy="5.2e-08" ixz="0.000250042" iyy="0.015159462" iyz="4.61e-07" izz="0.000375749"/> </inertial> </link> <link name="FR_calf_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.266"/> <inertia ixx="0.000485657" ixy="0.0" ixz="0.0" iyy="0.00091885" iyz="0.0" izz="0.000485657"/> </inertial> </link> <joint name="FR_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.35"/> <parent link="FR_calf"/> <child link="FR_foot"/> </joint> <link name="FR_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.03"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.04"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx="3.2000000000000005e-05" ixy="0.0" ixz="0.0" iyy="3.2000000000000005e-05" iyz="0.0" izz="3.2000000000000005e-05"/> </inertial> </link> <transmission name="FR_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FR_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FR_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="FL_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="0.3455 0.072 0"/> <parent link="trunk"/> <child link="FL_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="91.0035" lower="-0.75" upper="0.75" velocity="19.69"/> </joint> <joint name="FL_hip_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.1955 0.072 0"/> <parent link="trunk"/> <child link="FL_hip_rotor"/> </joint> <link name="FL_hip"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0.12675 0"/> <geometry> <cylinder length="0.04" radius="0.09"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.020298 0.009758 0.000109"/> <mass value="2.1"/> <inertia ixx="0.00406608" ixy="-0.000288071" ixz="-4.371e-06" iyy="0.008775259" iyz="1.811e-06" izz="0.006060348"/> </inertial> </link> <link name="FL_hip_rotor"> <visual> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.199"/> <inertia ixx="0.00039249" ixy="0.0" ixz="0.0" iyy="0.000219397" iyz="0.0" izz="0.000219397"/> </inertial> </link> <joint name="FL_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0.12675 0"/> <parent link="FL_hip"/> <child link="FL_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="93.33" lower="-1.0" upper="3.5" velocity="23.32"/> </joint> <joint name="FL_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.00935 0"/> <parent link="FL_hip"/> <child link="FL_thigh_rotor"/> </joint> <link name="FL_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/thigh.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.175"/> <geometry> <box size="0.35 0.05 0.08"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.000235 -0.028704 -0.054169"/> <mass value="3.934"/> <inertia ixx="0.044459086" ixy="0.000128738" ixz="-0.002343913" iyy="0.046023457" iyz="0.006032996" izz="0.008696078"/> </inertial> </link> <link name="FL_thigh_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.266"/> <inertia ixx="0.000485657" ixy="0.0" ixz="0.0" iyy="0.00091885" iyz="0.0" izz="0.000485657"/> </inertial> </link> <joint name="FL_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.35"/> <parent link="FL_thigh"/> <child link="FL_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="140" lower="-2.6" upper="-0.6" velocity="15.55"/> </joint> <joint name="FL_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 -0.0519 0"/> <parent link="FL_thigh"/> <child link="FL_calf_rotor"/> </joint> <link name="FL_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.175"/> <geometry> <box size="0.35 0.04 0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.005237 0.0 -0.202805"/> <mass value="0.857"/> <inertia ixx="0.015011003" ixy="5.2e-08" ixz="0.000250042" iyy="0.015159462" iyz="4.61e-07" izz="0.000375749"/> </inertial> </link> <link name="FL_calf_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.266"/> <inertia ixx="0.000485657" ixy="0.0" ixz="0.0" iyy="0.00091885" iyz="0.0" izz="0.000485657"/> </inertial> </link> <joint name="FL_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.35"/> <parent link="FL_calf"/> <child link="FL_foot"/> </joint> <link name="FL_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.03"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.04"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx="3.2000000000000005e-05" ixy="0.0" ixz="0.0" iyy="3.2000000000000005e-05" iyz="0.0" izz="3.2000000000000005e-05"/> </inertial> </link> <transmission name="FL_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FL_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FL_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="RR_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="-0.3455 -0.072 0"/> <parent link="trunk"/> <child link="RR_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="91.0035" lower="-0.75" upper="0.75" velocity="19.69"/> </joint> <joint name="RR_hip_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="-0.1955 -0.072 0"/> <parent link="trunk"/> <child link="RR_hip_rotor"/> </joint> <link name="RR_hip"> <visual> <origin rpy="3.141592653589793 3.141592653589793 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 -0.12675 0"/> <geometry> <cylinder length="0.04" radius="0.09"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.020298 -0.009758 0.000109"/> <mass value="2.1"/> <inertia ixx="0.00406608" ixy="-0.000288071" ixz="4.371e-06" iyy="0.008775259" iyz="-1.811e-06" izz="0.006060348"/> </inertial> </link> <link name="RR_hip_rotor"> <visual> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.199"/> <inertia ixx="0.00039249" ixy="0.0" ixz="0.0" iyy="0.000219397" iyz="0.0" izz="0.000219397"/> </inertial> </link> <joint name="RR_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 -0.12675 0"/> <parent link="RR_hip"/> <child link="RR_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="93.33" lower="-1.0" upper="3.5" velocity="23.32"/> </joint> <joint name="RR_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 -0.00935 0"/> <parent link="RR_hip"/> <child link="RR_thigh_rotor"/> </joint> <link name="RR_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.175"/> <geometry> <box size="0.35 0.05 0.08"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.000235 0.028704 -0.054169"/> <mass value="3.934"/> <inertia ixx="0.044459086" ixy="-0.000128738" ixz="-0.002343913" iyy="0.046023457" iyz="-0.006032996" izz="0.008696078"/> </inertial> </link> <link name="RR_thigh_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.266"/> <inertia ixx="0.000485657" ixy="0.0" ixz="0.0" iyy="0.00091885" iyz="0.0" izz="0.000485657"/> </inertial> </link> <joint name="RR_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.35"/> <parent link="RR_thigh"/> <child link="RR_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="140" lower="-2.6" upper="-0.6" velocity="15.55"/> </joint> <joint name="RR_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.0519 0"/> <parent link="RR_thigh"/> <child link="RR_calf_rotor"/> </joint> <link name="RR_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.175"/> <geometry> <box size="0.35 0.04 0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.005237 0.0 -0.202805"/> <mass value="0.857"/> <inertia ixx="0.015011003" ixy="5.2e-08" ixz="0.000250042" iyy="0.015159462" iyz="4.61e-07" izz="0.000375749"/> </inertial> </link> <link name="RR_calf_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.266"/> <inertia ixx="0.000485657" ixy="0.0" ixz="0.0" iyy="0.00091885" iyz="0.0" izz="0.000485657"/> </inertial> </link> <joint name="RR_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.35"/> <parent link="RR_calf"/> <child link="RR_foot"/> </joint> <link name="RR_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.03"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.04"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx="3.2000000000000005e-05" ixy="0.0" ixz="0.0" iyy="3.2000000000000005e-05" iyz="0.0" izz="3.2000000000000005e-05"/> </inertial> </link> <transmission name="RR_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RR_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RR_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="RL_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="-0.3455 0.072 0"/> <parent link="trunk"/> <child link="RL_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="91.0035" lower="-0.75" upper="0.75" velocity="19.69"/> </joint> <joint name="RL_hip_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="-0.1955 0.072 0"/> <parent link="trunk"/> <child link="RL_hip_rotor"/> </joint> <link name="RL_hip"> <visual> <origin rpy="0 3.141592653589793 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0.12675 0"/> <geometry> <cylinder length="0.04" radius="0.09"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.020298 0.009758 0.000109"/> <mass value="2.1"/> <inertia ixx="0.00406608" ixy="0.000288071" ixz="4.371e-06" iyy="0.008775259" iyz="1.811e-06" izz="0.006060348"/> </inertial> </link> <link name="RL_hip_rotor"> <visual> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.199"/> <inertia ixx="0.00039249" ixy="0.0" ixz="0.0" iyy="0.000219397" iyz="0.0" izz="0.000219397"/> </inertial> </link> <joint name="RL_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0.12675 0"/> <parent link="RL_hip"/> <child link="RL_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="93.33" lower="-1.0" upper="3.5" velocity="23.32"/> </joint> <joint name="RL_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.00935 0"/> <parent link="RL_hip"/> <child link="RL_thigh_rotor"/> </joint> <link name="RL_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/thigh.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.175"/> <geometry> <box size="0.35 0.05 0.08"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.000235 -0.028704 -0.054169"/> <mass value="3.934"/> <inertia ixx="0.044459086" ixy="0.000128738" ixz="-0.002343913" iyy="0.046023457" iyz="0.006032996" izz="0.008696078"/> </inertial> </link> <link name="RL_thigh_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.266"/> <inertia ixx="0.000485657" ixy="0.0" ixz="0.0" iyy="0.00091885" iyz="0.0" izz="0.000485657"/> </inertial> </link> <joint name="RL_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.35"/> <parent link="RL_thigh"/> <child link="RL_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="140" lower="-2.6" upper="-0.6" velocity="15.55"/> </joint> <joint name="RL_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 -0.0519 0"/> <parent link="RL_thigh"/> <child link="RL_calf_rotor"/> </joint> <link name="RL_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.175"/> <geometry> <box size="0.35 0.04 0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.005237 0.0 -0.202805"/> <mass value="0.857"/> <inertia ixx="0.015011003" ixy="5.2e-08" ixz="0.000250042" iyy="0.015159462" iyz="4.61e-07" izz="0.000375749"/> </inertial> </link> <link name="RL_calf_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.266"/> <inertia ixx="0.000485657" ixy="0.0" ixz="0.0" iyy="0.00091885" iyz="0.0" izz="0.000485657"/> </inertial> </link> <joint name="RL_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.35"/> <parent link="RL_calf"/> <child link="RL_foot"/> </joint> <link name="RL_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.03"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.04"/> </geometry> </collision> <inertial> <mass value="0.05"/> <inertia ixx="3.2000000000000005e-05" ixy="0.0" ixz="0.0" iyy="3.2000000000000005e-05" iyz="0.0" izz="3.2000000000000005e-05"/> </inertial> </link> <transmission name="RL_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RL_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RL_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <!-- <xacro:stairs stairs="15" xpos="0" ypos="2.0" zpos="0" /> --> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/b1_description/xacro/transmission.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:macro name="leg_transmission" params="name"> <transmission name="${name}_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="${name}_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="${name}_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/b1_description/xacro/leg.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:include filename="$(find b1_description)/xacro/transmission.xacro"/> <xacro:macro name="leg" params="name mirror mirror_dae front_hind front_hind_dae"> <joint name="${name}_hip_joint" type="revolute"> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="${leg_offset_x} ${-leg_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="${leg_offset_x} ${leg_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == False)}"> <origin rpy="0 0 0" xyz="${-leg_offset_x} ${-leg_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == False)}"> <origin rpy="0 0 0" xyz="${-leg_offset_x} ${leg_offset_y} 0"/> </xacro:if> <parent link="trunk"/> <child link="${name}_hip"/> <axis xyz="1 0 0"/> <dynamics damping="${damping}" friction="${friction}"/> <xacro:if value="${(mirror_dae == True)}"> <limit effort="${hip_torque_max}" velocity="${hip_velocity_max}" lower="${hip_position_min}" upper="${hip_position_max}"/> </xacro:if> <xacro:if value="${(mirror_dae == False)}"> <limit effort="${hip_torque_max}" velocity="${hip_velocity_max}" lower="${-hip_position_max}" upper="${-hip_position_min}"/> </xacro:if> </joint> <joint name="${name}_hip_rotor_joint" type="fixed"> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="${hip_rotor_offset_x} ${-hip_rotor_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="${hip_rotor_offset_x} ${hip_rotor_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == False)}"> <origin rpy="0 0 0" xyz="${-hip_rotor_offset_x} ${-hip_rotor_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == False)}"> <origin rpy="0 0 0" xyz="${-hip_rotor_offset_x} ${hip_rotor_offset_y} 0"/> </xacro:if> <parent link="trunk"/> <child link="${name}_hip_rotor"/> </joint> <link name="${name}_hip"> <visual> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == True)}"> <origin rpy="${PI} 0 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == False)}"> <origin rpy="0 ${PI} 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == False)}"> <origin rpy="${PI} ${PI} 0" xyz="0 0 0"/> </xacro:if> <geometry> <mesh filename="package://b1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 ${hip_offset*mirror} 0"/> <geometry> <cylinder length="${hip_length}" radius="${hip_radius}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${hip_com_x*front_hind} ${hip_com_y*mirror} ${hip_com_z}"/> <mass value="${hip_mass}"/> <inertia ixx="${hip_ixx}" ixy="${hip_ixy*mirror*front_hind}" ixz="${hip_ixz*front_hind}" iyy="${hip_iyy}" iyz="${hip_iyz*mirror}" izz="${hip_izz}"/> </inertial> </link> <link name="${name}_hip_rotor"> <visual> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${hip_rotor_com_x} ${hip_rotor_com_y} ${hip_rotor_com_z}"/> <mass value="${hip_rotor_mass}"/> <inertia ixx="${hip_rotor_ixx}" ixy="${hip_rotor_ixy}" ixz="${hip_rotor_ixz}" iyy="${hip_rotor_iyy}" iyz="${hip_rotor_iyz}" izz="${hip_rotor_izz}"/> </inertial> </link> <joint name="${name}_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 ${thigh_offset*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="${damping}" friction="${friction}"/> <limit effort="${thigh_torque_max}" velocity="${thigh_velocity_max}" lower="${thigh_position_min}" upper="${thigh_position_max}"/> </joint> <joint name="${name}_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="${thigh_rotor_offset_x} ${thigh_rotor_offset_y*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh_rotor"/> </joint> <link name="${name}_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <xacro:if value="${mirror_dae == True}"> <mesh filename="package://b1_description/meshes/thigh.dae" scale="1 1 1"/> </xacro:if> <xacro:if value="${mirror_dae == False}"> <mesh filename="package://b1_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </xacro:if> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 ${-thigh_length/2.0}"/> <geometry> <box size="${thigh_length} ${thigh_width} ${thigh_height}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${thigh_com_x} ${thigh_com_y*mirror} ${thigh_com_z}"/> <mass value="${thigh_mass}"/> <inertia ixx="${thigh_ixx}" ixy="${thigh_ixy*mirror}" ixz="${thigh_ixz}" iyy="${thigh_iyy}" iyz="${thigh_iyz*mirror}" izz="${thigh_izz}"/> </inertial> </link> <link name="${name}_thigh_rotor"> <visual> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${thigh_rotor_com_x} ${thigh_rotor_com_y} ${thigh_rotor_com_z}"/> <mass value="${thigh_rotor_mass}"/> <inertia ixx="${thigh_rotor_ixx}" ixy="${thigh_rotor_ixy}" ixz="${thigh_rotor_ixz}" iyy="${thigh_rotor_iyy}" iyz="${thigh_rotor_iyz}" izz="${thigh_rotor_izz}"/> </inertial> </link> <joint name="${name}_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 ${-thigh_length}"/> <parent link="${name}_thigh"/> <child link="${name}_calf"/> <axis xyz="0 1 0"/> <dynamics damping="${damping}" friction="${friction}"/> <limit effort="${calf_torque_max}" velocity="${calf_velocity_max}" lower="${calf_position_min}" upper="${calf_position_max}"/> </joint> <joint name="${name}_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="${calf_rotor_offset_x} ${calf_rotor_offset_y*mirror} 0"/> <parent link="${name}_thigh"/> <child link="${name}_calf_rotor"/> </joint> <link name="${name}_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 ${-calf_length/2.0}"/> <geometry> <box size="${calf_length} ${calf_width} ${calf_height}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${calf_com_x} ${calf_com_y} ${calf_com_z}"/> <mass value="${calf_mass}"/> <inertia ixx="${calf_ixx}" ixy="${calf_ixy}" ixz="${calf_ixz}" iyy="${calf_iyy}" iyz="${calf_iyz}" izz="${calf_izz}"/> </inertial> </link> <link name="${name}_calf_rotor"> <visual> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.05"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${calf_rotor_com_x} ${calf_rotor_com_y} ${calf_rotor_com_z}"/> <mass value="${calf_rotor_mass}"/> <inertia ixx="${calf_rotor_ixx}" ixy="${calf_rotor_ixy}" ixz="${calf_rotor_ixz}" iyy="${calf_rotor_iyy}" iyz="${calf_rotor_iyz}" izz="${calf_rotor_izz}"/> </inertial> </link> <joint name="${name}_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 ${-(calf_length)}"/> <parent link="${name}_calf"/> <child link="${name}_foot"/> </joint> <link name="${name}_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="${foot_radius-0.01}"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="${foot_radius}"/> </geometry> </collision> <inertial> <mass value="${foot_mass}"/> <inertia ixx="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}" ixy="0.0" ixz="0.0" iyy="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}" iyz="0.0" izz="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}"/> </inertial> </link> <xacro:leg_transmission name="${name}"/> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/b1_description/xacro/const.xacro
<?xml version="1.0"?> <robot name="b1_description" xmlns:xacro="http://www.ros.org/wiki/xacro"> <!-- Constants for robot dimensions --> <xacro:property name="PI" value="3.1415926535897931"/> <xacro:property name="stick_mass" value="0.00001"/> <!-- simplified collision value --> <xacro:property name="trunk_width" value="0.30"/> <xacro:property name="trunk_length" value="0.647"/> <xacro:property name="trunk_height" value="0.15"/> <xacro:property name="hip_radius" value="0.09"/> <xacro:property name="hip_length" value="0.04"/> <xacro:property name="thigh_shoulder_radius" value="0.044"/> <xacro:property name="thigh_shoulder_length" value="0.08"/> <xacro:property name="thigh_width" value="0.05"/> <xacro:property name="thigh_height" value="0.08"/> <xacro:property name="calf_width" value="0.04"/> <xacro:property name="calf_height" value="0.05"/> <xacro:property name="foot_radius" value="0.04"/> <xacro:property name="stick_radius" value="0.01"/> <xacro:property name="stick_length" value="0.2"/> <!-- kinematic value --> <xacro:property name="thigh_offset" value="0.12675"/> <xacro:property name="thigh_length" value="0.35"/> <xacro:property name="calf_length" value="0.35"/> <!-- leg offset from trunk center value --> <xacro:property name="leg_offset_x" value="0.3455"/> <xacro:property name="leg_offset_y" value="0.072"/> <xacro:property name="trunk_offset_z" value="0.01675"/> <xacro:property name="hip_offset" value="0.12675"/> <!-- offset of link and rotor locations (left front) --> <xacro:property name="hip_offset_x" value="0.3455"/> <xacro:property name="hip_offset_y" value="0.072"/> <xacro:property name="hip_offset_z" value="0.0"/> <xacro:property name="hip_rotor_offset_x" value="0.1955"/> <xacro:property name="hip_rotor_offset_y" value="0.072"/> <xacro:property name="hip_rotor_offset_z" value="0.0"/> <xacro:property name="thigh_offset_x" value="0"/> <xacro:property name="thigh_offset_y" value="0.12675"/> <xacro:property name="thigh_offset_z" value="0.0"/> <xacro:property name="thigh_rotor_offset_x" value="0.0"/> <xacro:property name="thigh_rotor_offset_y" value="0.00935"/> <xacro:property name="thigh_rotor_offset_z" value="0.0"/> <xacro:property name="calf_offset_x" value="0.0"/> <xacro:property name="calf_offset_y" value="0.0"/> <xacro:property name="calf_offset_z" value="-0.35"/> <xacro:property name="calf_rotor_offset_x" value="0.0"/> <xacro:property name="calf_rotor_offset_y" value="-0.0519"/> <xacro:property name="calf_rotor_offset_z" value="0.0"/> <!-- joint limits --> <xacro:property name="damping" value="0"/> <xacro:property name="friction" value="0"/> <xacro:property name="hip_position_max" value="0.75"/> <xacro:property name="hip_position_min" value="-0.75"/> <xacro:property name="hip_velocity_max" value="19.69"/> <xacro:property name="hip_torque_max" value="91.0035"/> <xacro:property name="thigh_position_max" value="3.5"/> <xacro:property name="thigh_position_min" value="-1.0"/> <xacro:property name="thigh_velocity_max" value="23.32"/> <xacro:property name="thigh_torque_max" value="93.33"/> <xacro:property name="calf_position_max" value="-0.6"/> <xacro:property name="calf_position_min" value="-2.6"/> <xacro:property name="calf_velocity_max" value="15.55"/> <xacro:property name="calf_torque_max" value="140"/> <!-- dynamics inertial value --> <!-- trunk --> <xacro:property name="trunk_mass" value="25"/> <xacro:property name="trunk_com_x" value="0.008987"/> <xacro:property name="trunk_com_y" value="0.002243"/> <xacro:property name="trunk_com_z" value="0.003013"/> <xacro:property name="trunk_ixx" value="0.183142146"/> <xacro:property name="trunk_ixy" value="-0.001379002"/> <xacro:property name="trunk_ixz" value="-0.027956055"/> <xacro:property name="trunk_iyy" value="0.756327752"/> <xacro:property name="trunk_iyz" value="0.000193774"/> <xacro:property name="trunk_izz" value="0.783777558"/> <!-- hip (left front) --> <xacro:property name="hip_mass" value="2.1"/> <xacro:property name="hip_com_x" value="-0.020298"/> <xacro:property name="hip_com_y" value="0.009758"/> <xacro:property name="hip_com_z" value="0.000109"/> <xacro:property name="hip_ixx" value="0.00406608"/> <xacro:property name="hip_ixy" value="-0.000288071"/> <xacro:property name="hip_ixz" value="-0.000004371"/> <xacro:property name="hip_iyy" value="0.008775259"/> <xacro:property name="hip_iyz" value="0.000001811"/> <xacro:property name="hip_izz" value="0.006060348"/> <xacro:property name="hip_rotor_mass" value="0.199"/> <xacro:property name="hip_rotor_com_x" value="0.0"/> <xacro:property name="hip_rotor_com_y" value="0.0"/> <xacro:property name="hip_rotor_com_z" value="0.0"/> <xacro:property name="hip_rotor_ixx" value="0.00039249"/> <xacro:property name="hip_rotor_ixy" value="0.0"/> <xacro:property name="hip_rotor_ixz" value="0.0"/> <xacro:property name="hip_rotor_iyy" value="0.000219397"/> <xacro:property name="hip_rotor_iyz" value="0.0"/> <xacro:property name="hip_rotor_izz" value="0.000219397"/> <!-- thigh --> <xacro:property name="thigh_mass" value="3.934"/> <xacro:property name="thigh_com_x" value="-0.000235"/> <xacro:property name="thigh_com_y" value="-0.028704"/> <xacro:property name="thigh_com_z" value="-0.054169"/> <xacro:property name="thigh_ixx" value="0.044459086"/> <xacro:property name="thigh_ixy" value="0.000128738"/> <xacro:property name="thigh_ixz" value="-0.002343913"/> <xacro:property name="thigh_iyy" value="0.046023457"/> <xacro:property name="thigh_iyz" value="0.006032996"/> <xacro:property name="thigh_izz" value="0.008696078"/> <xacro:property name="thigh_rotor_mass" value="0.266"/> <xacro:property name="thigh_rotor_com_x" value="0.0"/> <xacro:property name="thigh_rotor_com_y" value="0.0"/> <xacro:property name="thigh_rotor_com_z" value="0.0"/> <xacro:property name="thigh_rotor_ixx" value="0.000485657"/> <xacro:property name="thigh_rotor_ixy" value="0.0"/> <xacro:property name="thigh_rotor_ixz" value="0.0"/> <xacro:property name="thigh_rotor_iyy" value="0.00091885"/> <xacro:property name="thigh_rotor_iyz" value="0.0"/> <xacro:property name="thigh_rotor_izz" value="0.000485657"/> <!-- calf --> <xacro:property name="calf_mass" value="0.857"/> <xacro:property name="calf_com_x" value="0.005237"/> <xacro:property name="calf_com_y" value="0.0"/> <xacro:property name="calf_com_z" value="-0.202805"/> <xacro:property name="calf_ixx" value="0.015011003"/> <xacro:property name="calf_ixy" value="0.000000052"/> <xacro:property name="calf_ixz" value="0.000250042"/> <xacro:property name="calf_iyy" value="0.015159462"/> <xacro:property name="calf_iyz" value="0.000000461"/> <xacro:property name="calf_izz" value="0.000375749"/> <xacro:property name="calf_rotor_mass" value="0.266"/> <xacro:property name="calf_rotor_com_x" value="0.0"/> <xacro:property name="calf_rotor_com_y" value="0.0"/> <xacro:property name="calf_rotor_com_z" value="0.0"/> <xacro:property name="calf_rotor_ixx" value="0.000485657"/> <xacro:property name="calf_rotor_ixy" value="0.0"/> <xacro:property name="calf_rotor_ixz" value="0.0"/> <xacro:property name="calf_rotor_iyy" value="0.00091885"/> <xacro:property name="calf_rotor_iyz" value="0.0"/> <xacro:property name="calf_rotor_izz" value="0.000485657"/> <!-- foot --> <xacro:property name="foot_mass" value="0.05"/> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/b1_description/xacro/gazebo.xacro
<?xml version="1.0"?> <robot> <!-- ros_control plugin --> <gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <robotNamespace>/aliengo_gazebo</robotNamespace> <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType> </plugin> </gazebo> <!-- Show the trajectory of trunk center. --> <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>10</frequency> <plot> <link>base</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Yellow</material> </plot> </plugin> </gazebo> <!-- Show the trajectory of foot. You can add another trajectory about another foot. --> <!-- <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>100</frequency> <plot> <link>FL_foot</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Green</material> </plot> </plugin> </gazebo> --> <gazebo> <plugin filename="libgazebo_ros_force.so" name="gazebo_ros_force"> <bodyName>trunk</bodyName> <topicName>/apply_force/trunk</topicName> </plugin> </gazebo> <gazebo reference="imu_link"> <gravity>true</gravity> <sensor name="imu_sensor" type="imu"> <always_on>true</always_on> <update_rate>1000</update_rate> <visualize>true</visualize> <topic>__default_topic__</topic> <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin"> <topicName>trunk_imu</topicName> <bodyName>imu_link</bodyName> <updateRateHZ>1000.0</updateRateHZ> <gaussianNoise>0.0</gaussianNoise> <xyzOffset>0 0 0</xyzOffset> <rpyOffset>0 0 0</rpyOffset> <frameName>imu_link</frameName> </plugin> <pose>0 0 0 0 0 0</pose> </sensor> </gazebo> <!-- Foot contacts. --> <gazebo reference="FR_calf"> <sensor name="FR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>FR_calf_fixed_joint_lump__FR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="FL_calf"> <sensor name="FL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>FL_calf_fixed_joint_lump__FL_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RR_calf"> <sensor name="RR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>RR_calf_fixed_joint_lump__RR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RL_calf"> <sensor name="RL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>RL_calf_fixed_joint_lump__RL_foot_collision_1</collision> </contact> </sensor> </gazebo> <!-- Visualization of Foot contacts. --> <gazebo reference="FR_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>FR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="FL_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>FL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RR_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>RR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RL_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>RL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="base"> <material>Gazebo/Green</material> <turnGravityOff>false</turnGravityOff> </gazebo> <gazebo reference="trunk"> <mu1>0.2</mu1> <mu2>0.2</mu2> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="stick_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/White</material> </gazebo> <gazebo reference="imu_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/Red</material> </gazebo> <!-- FL leg --> <gazebo reference="FL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- FR leg --> <gazebo reference="FR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RL leg --> <gazebo reference="RL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RR leg --> <gazebo reference="RR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/b1_description/xacro/stairs.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:property name="stair_length" value="0.640" /> <xacro:property name="stair_width" value="0.310" /> <xacro:property name="stair_height" value="0.170" /> <xacro:macro name="stairs" params="stairs xpos ypos zpos"> <joint name="stair_joint_origin" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="stair_link_${stairs}"/> </joint> <link name="stair_link_${stairs}"> <visual> <geometry> <box size="${stair_length} ${stair_width} ${stair_height}"/> </geometry> <material name="grey"/> <origin rpy="0 0 0" xyz="${xpos} ${ypos} ${zpos}"/> </visual> <collision> <geometry> <box size="${stair_length} ${stair_width} ${stair_height}"/> </geometry> </collision> <inertial> <mass value="0.80"/> <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100" /> </inertial> </link> <xacro:if value="${stairs}"> <xacro:stairs stairs="${stairs-1}" xpos="0" ypos="${ypos-stair_width/2}" zpos="${zpos+stair_height}"/> <joint name="stair_joint_${stairs}" type="fixed"> <parent link="stair_link_${stairs}"/> <child link="stair_link_${stairs-1}"/> </joint> </xacro:if> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/b1_description/xacro/robot.xacro
<?xml version="1.0"?> <robot name="b1_description" xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:include filename="$(find b1_description)/xacro/const.xacro"/> <xacro:include filename="$(find b1_description)/xacro/materials.xacro"/> <xacro:include filename="$(find b1_description)/xacro/leg.xacro"/> <xacro:include filename="$(find b1_description)/xacro/gazebo.xacro"/> <!-- Rotor related joint and link is only for demonstrate location. --> <!-- Actually, the rotor will rotate and the joint is not fixed. Reduction ratio should be considered. --> <!-- Debug mode will hung up the robot, use "true" or "false" to switch it. --> <xacro:if value="$(arg DEBUG)"> <link name="world"/> <joint name="base_static_joint" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="base"/> </joint> </xacro:if> <link name="base"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> </visual> </link> <joint name="floating_base" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="base"/> <child link="trunk"/> </joint> <link name="trunk"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="${trunk_length} ${trunk_width} ${trunk_height}"/> </geometry> </collision> <!-- <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://b1_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> </collision> --> <inertial> <origin rpy="0 0 0" xyz="${trunk_com_x} ${trunk_com_y} ${trunk_com_z}"/> <mass value="${trunk_mass}"/> <inertia ixx="${trunk_ixx}" ixy="${trunk_ixy}" ixz="${trunk_ixz}" iyy="${trunk_iyy}" iyz="${trunk_iyz}" izz="${trunk_izz}"/> </inertial> </link> <joint name="imu_joint" type="fixed"> <parent link="trunk"/> <child link="imu_link"/> <origin rpy="0 0 0" xyz="0 0 0"/> </joint> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> <material name="red"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> </link> <xacro:leg name="FR" mirror="-1" mirror_dae= "False" front_hind="1" front_hind_dae="True" /> <xacro:leg name="FL" mirror="1" mirror_dae="True" front_hind="1" front_hind_dae="True" /> <xacro:leg name="RR" mirror="-1" mirror_dae="False" front_hind="-1" front_hind_dae="False" /> <xacro:leg name="RL" mirror="1" mirror_dae="True" front_hind="-1" front_hind_dae="False" /> <!-- <xacro:stairs stairs="15" xpos="0" ypos="2.0" zpos="0" /> --> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/b1_description/config/robot_control.yaml
b1_gazebo: # Publish all joint states ----------------------------------- joint_state_controller: type: joint_state_controller/JointStateController publish_rate: 1000 # FL Controllers --------------------------------------- FL_hip_controller: type: unitree_legged_control/UnitreeJointController joint: FL_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} FL_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: FL_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} FL_calf_controller: type: unitree_legged_control/UnitreeJointController joint: FL_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # FR Controllers --------------------------------------- FR_hip_controller: type: unitree_legged_control/UnitreeJointController joint: FR_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} FR_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: FR_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} FR_calf_controller: type: unitree_legged_control/UnitreeJointController joint: FR_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # RL Controllers --------------------------------------- RL_hip_controller: type: unitree_legged_control/UnitreeJointController joint: RL_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} RL_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: RL_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} RL_calf_controller: type: unitree_legged_control/UnitreeJointController joint: RL_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # RR Controllers --------------------------------------- RR_hip_controller: type: unitree_legged_control/UnitreeJointController joint: RR_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} RR_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: RR_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} RR_calf_controller: type: unitree_legged_control/UnitreeJointController joint: RR_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0}
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/aliengo_description/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3) project(aliengo_description) find_package(catkin REQUIRED COMPONENTS genmsg roscpp std_msgs tf ) catkin_package( CATKIN_DEPENDS ) include_directories( # include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} )
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/aliengo_description/package.xml
<?xml version="1.0"?> <package format="2"> <name>aliengo_description</name> <version>0.0.0</version> <description>The aliengo_description package</description> <maintainer email="aliengo@unitree.cc">unitree</maintainer> <license>TODO</license> <buildtool_depend>catkin</buildtool_depend> <depend>roscpp</depend> <depend>std_msgs</depend> </package>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/aliengo_description/launch/check_joint.rviz
Panels: - Class: rviz/Displays Help Height: 78 Name: Displays Property Tree Widget: Expanded: - /Global Options1 - /RobotModel1 Splitter Ratio: 0.5 Tree Height: 398 - 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 Name: Time SyncMode: 0 SyncSource: "" 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: 0.5 Class: rviz/RobotModel Collision Enabled: false Enabled: true Links: All Links Enabled: true Expand Joint Details: false Expand Link Details: false Expand Tree: false FL_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_calf_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_hip_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_thigh_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_calf_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_hip_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_thigh_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true Link Tree Style: Links in Alphabetic Order RL_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_calf_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_hip_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_thigh_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_calf_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_hip_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_thigh_rotor: Alpha: 1 Show Axes: false Show Trail: false Value: true base: Alpha: 1 Show Axes: false Show Trail: false Value: true imu_link: Alpha: 1 Show Axes: false Show Trail: false Value: true trunk: 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 - Alpha: 1 Class: rviz/Axes Enabled: false Length: 1 Name: Axes Radius: 0.10000000149011612 Reference Frame: <Fixed Frame> Show Trail: false 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: 238; 238; 238 Default Light: true Fixed Frame: base 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: /move_base_simple/goal - Class: rviz/PublishPoint Single click: true Topic: /clicked_point Value: true Views: Current: Class: rviz/Orbit Distance: 1.4732182025909424 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.0760490670800209 Y: 0.11421932280063629 Z: -0.1576911211013794 Focal Shape Fixed Size: false Focal Shape Size: 0.05000000074505806 Invert Z Axis: false Name: Current View Near Clip Distance: 0.009999999776482582 Pitch: 0.49979713559150696 Target Frame: <Fixed Frame> Yaw: 5.093583106994629 Saved: ~ Window Geometry: Displays: collapsed: false Height: 627 Hide Left Dock: false Hide Right Dock: false QMainWindow State: 000000ff00000000fd00000004000000000000016a00000219fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d00000219000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00430061006d00650072006101000001be000001900000000000000000000000010000010f000002e2fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730000000028000002e2000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000006400000003efc0100000002fb0000000800540069006d00650000000000000006400000042800fffffffb0000000800540069006d00650100000000000004500000000000000000000002e40000021900000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 Selection: collapsed: false Time: collapsed: false Tool Properties: collapsed: false Views: collapsed: false Width: 1108 X: 812 Y: 204
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/aliengo_description/launch/aliengo_rviz.launch
<launch> <arg name="user_debug" default="false"/> <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find aliengo_description)/xacro/robot.xacro' DEBUG:=$(arg user_debug)"/> <!-- for higher robot_state_publisher average rate--> <!-- <param name="rate" value="1000"/> --> <!-- send fake joint values --> <node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher"> <param name="use_gui" value="TRUE"/> </node> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher"> <param name="publish_frequency" type="double" value="1000.0"/> </node> <node pkg="rviz" type="rviz" name="rviz" respawn="false" output="screen" args="-d $(find aliengo_description)/launch/check_joint.rviz"/> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/aliengo_description/xacro/materials.xacro
<?xml version="1.0"?> <robot> <material name="black"> <color rgba="0.0 0.0 0.0 1.0"/> </material> <material name="blue"> <color rgba="0.0 0.0 0.8 1.0"/> </material> <material name="green"> <color rgba="0.0 0.8 0.0 1.0"/> </material> <material name="grey"> <color rgba="0.2 0.2 0.2 1.0"/> </material> <material name="silver"> <color rgba="${233/255} ${233/255} ${216/255} 1.0"/> </material> <material name="orange"> <color rgba="${255/255} ${108/255} ${10/255} 1.0"/> </material> <material name="brown"> <color rgba="${222/255} ${207/255} ${195/255} 1.0"/> </material> <material name="red"> <color rgba="0.8 0.0 0.0 1.0"/> </material> <material name="white"> <color rgba="1.0 1.0 1.0 1.0"/> </material> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/aliengo_description/xacro/transmission.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:macro name="leg_transmission" params="name"> <transmission name="${name}_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="${name}_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="${name}_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/aliengo_description/xacro/leg.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:include filename="$(find aliengo_description)/xacro/transmission.xacro"/> <xacro:macro name="leg" params="name mirror mirror_dae front_hind front_hind_dae"> <joint name="${name}_hip_joint" type="revolute"> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="${leg_offset_x} ${-leg_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="${leg_offset_x} ${leg_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == False)}"> <origin rpy="0 0 0" xyz="${-leg_offset_x} ${-leg_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == False)}"> <origin rpy="0 0 0" xyz="${-leg_offset_x} ${leg_offset_y} 0"/> </xacro:if> <parent link="trunk"/> <child link="${name}_hip"/> <axis xyz="1 0 0"/> <dynamics damping="${damping}" friction="${friction}"/> <xacro:if value="${(mirror_dae == True)}"> <limit effort="${hip_torque_max}" velocity="${hip_velocity_max}" lower="${hip_position_min}" upper="${hip_position_max}"/> </xacro:if> <xacro:if value="${(mirror_dae == False)}"> <limit effort="${hip_torque_max}" velocity="${hip_velocity_max}" lower="${-hip_position_max}" upper="${-hip_position_min}"/> </xacro:if> </joint> <joint name="${name}_hip_rotor_joint" type="fixed"> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="${hip_rotor_offset_x} ${-hip_rotor_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="${hip_rotor_offset_x} ${hip_rotor_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == False)}"> <origin rpy="0 0 0" xyz="${-hip_rotor_offset_x} ${-hip_rotor_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == False)}"> <origin rpy="0 0 0" xyz="${-hip_rotor_offset_x} ${hip_rotor_offset_y} 0"/> </xacro:if> <parent link="trunk"/> <child link="${name}_hip_rotor"/> </joint> <link name="${name}_hip"> <visual> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == True)}"> <origin rpy="${PI} 0 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == False)}"> <origin rpy="0 ${PI} 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == False)}"> <origin rpy="${PI} ${PI} 0" xyz="0 0 0"/> </xacro:if> <geometry> <mesh filename="package://aliengo_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 ${hip_offset*mirror} 0"/> <geometry> <cylinder length="${hip_length}" radius="${hip_radius}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${hip_com_x*front_hind} ${hip_com_y*mirror} ${hip_com_z}"/> <mass value="${hip_mass}"/> <inertia ixx="${hip_ixx}" ixy="${hip_ixy*mirror*front_hind}" ixz="${hip_ixz*front_hind}" iyy="${hip_iyy}" iyz="${hip_iyz*mirror}" izz="${hip_izz}"/> </inertial> </link> <link name="${name}_hip_rotor"> <visual> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${hip_rotor_com_x} ${hip_rotor_com_y} ${hip_rotor_com_z}"/> <mass value="${hip_rotor_mass}"/> <inertia ixx="${hip_rotor_ixx}" ixy="${hip_rotor_ixy}" ixz="${hip_rotor_ixz}" iyy="${hip_rotor_iyy}" iyz="${hip_rotor_iyz}" izz="${hip_rotor_izz}"/> </inertial> </link> <joint name="${name}_thigh_joint" type="continuous"> <origin rpy="0 0 0" xyz="0 ${thigh_offset*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="${damping}" friction="${friction}"/> <limit effort="${thigh_torque_max}" velocity="${thigh_velocity_max}"/> </joint> <joint name="${name}_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="${thigh_rotor_offset_x} ${thigh_rotor_offset_y*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh_rotor"/> </joint> <link name="${name}_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <xacro:if value="${mirror_dae == True}"> <mesh filename="package://aliengo_description/meshes/thigh.dae" scale="1 1 1"/> </xacro:if> <xacro:if value="${mirror_dae == False}"> <mesh filename="package://aliengo_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </xacro:if> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 ${-thigh_length/2.0}"/> <geometry> <box size="${thigh_length} ${thigh_width} ${thigh_height}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${thigh_com_x} ${thigh_com_y*mirror} ${thigh_com_z}"/> <mass value="${thigh_mass}"/> <inertia ixx="${thigh_ixx}" ixy="${thigh_ixy*mirror}" ixz="${thigh_ixz}" iyy="${thigh_iyy}" iyz="${thigh_iyz*mirror}" izz="${thigh_izz}"/> </inertial> </link> <link name="${name}_thigh_rotor"> <visual> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${thigh_rotor_com_x} ${thigh_rotor_com_y} ${thigh_rotor_com_z}"/> <mass value="${thigh_rotor_mass}"/> <inertia ixx="${thigh_rotor_ixx}" ixy="${thigh_rotor_ixy}" ixz="${thigh_rotor_ixz}" iyy="${thigh_rotor_iyy}" iyz="${thigh_rotor_iyz}" izz="${thigh_rotor_izz}"/> </inertial> </link> <joint name="${name}_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 ${-thigh_length}"/> <parent link="${name}_thigh"/> <child link="${name}_calf"/> <axis xyz="0 1 0"/> <dynamics damping="${damping}" friction="${friction}"/> <limit effort="${calf_torque_max}" velocity="${calf_velocity_max}" lower="${calf_position_min}" upper="${calf_position_max}"/> </joint> <joint name="${name}_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="${calf_rotor_offset_x} ${calf_rotor_offset_y*mirror} 0"/> <parent link="${name}_thigh"/> <child link="${name}_calf_rotor"/> </joint> <link name="${name}_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 ${-calf_length/2.0}"/> <geometry> <box size="${calf_length} ${calf_width} ${calf_height}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${calf_com_x} ${calf_com_y} ${calf_com_z}"/> <mass value="${calf_mass}"/> <inertia ixx="${calf_ixx}" ixy="${calf_ixy}" ixz="${calf_ixz}" iyy="${calf_iyy}" iyz="${calf_iyz}" izz="${calf_izz}"/> </inertial> </link> <link name="${name}_calf_rotor"> <visual> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${calf_rotor_com_x} ${calf_rotor_com_y} ${calf_rotor_com_z}"/> <mass value="${calf_rotor_mass}"/> <inertia ixx="${calf_rotor_ixx}" ixy="${calf_rotor_ixy}" ixz="${calf_rotor_ixz}" iyy="${calf_rotor_iyy}" iyz="${calf_rotor_iyz}" izz="${calf_rotor_izz}"/> </inertial> </link> <joint name="${name}_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 ${-(calf_length)}"/> <parent link="${name}_calf"/> <child link="${name}_foot"/> </joint> <link name="${name}_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="${foot_radius-0.01}"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="${foot_radius}"/> </geometry> </collision> <inertial> <mass value="${foot_mass}"/> <inertia ixx="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}" ixy="0.0" ixz="0.0" iyy="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}" iyz="0.0" izz="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}"/> </inertial> </link> <xacro:leg_transmission name="${name}"/> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/aliengo_description/xacro/const.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <!-- Constants for robot dimensions --> <xacro:property name="PI" value="3.1415926535897931"/> <xacro:property name="stick_mass" value="0.00001"/> <!-- simplified collision value --> <xacro:property name="trunk_width" value="0.150"/> <xacro:property name="trunk_length" value="0.647"/> <xacro:property name="trunk_height" value="0.112"/> <xacro:property name="hip_radius" value="0.046"/> <xacro:property name="hip_length" value="0.0418"/> <xacro:property name="thigh_shoulder_radius" value="0.044"/> <xacro:property name="thigh_shoulder_length" value="0.08"/> <xacro:property name="thigh_width" value="0.0374"/> <xacro:property name="thigh_height" value="0.043"/> <xacro:property name="calf_width" value="0.0208"/> <xacro:property name="calf_height" value="0.016"/> <xacro:property name="foot_radius" value="0.0265"/> <xacro:property name="stick_radius" value="0.01"/> <xacro:property name="stick_length" value="0.2"/> <!-- kinematic value --> <xacro:property name="thigh_offset" value="0.0868"/> <xacro:property name="thigh_length" value="0.25"/> <xacro:property name="calf_length" value="0.25"/> <!-- leg offset from trunk center value --> <xacro:property name="leg_offset_x" value="0.2407"/> <xacro:property name="leg_offset_y" value="0.051"/> <xacro:property name="trunk_offset_z" value="0.01675"/> <xacro:property name="hip_offset" value="0.083"/> <!-- offset of link and rotor locations (left front) --> <xacro:property name="hip_offset_x" value="0.2407"/> <xacro:property name="hip_offset_y" value="0.051"/> <xacro:property name="hip_offset_z" value="0.0"/> <xacro:property name="hip_rotor_offset_x" value="0.139985"/> <xacro:property name="hip_rotor_offset_y" value="0.051"/> <xacro:property name="hip_rotor_offset_z" value="0.0"/> <xacro:property name="thigh_offset_x" value="0"/> <xacro:property name="thigh_offset_y" value="0.0868"/> <xacro:property name="thigh_offset_z" value="0.0"/> <xacro:property name="thigh_rotor_offset_x" value="0.0"/> <xacro:property name="thigh_rotor_offset_y" value="0.0298"/> <xacro:property name="thigh_rotor_offset_z" value="0.0"/> <xacro:property name="calf_offset_x" value="0.0"/> <xacro:property name="calf_offset_y" value="0.0"/> <xacro:property name="calf_offset_z" value="-0.25"/> <xacro:property name="calf_rotor_offset_x" value="0.0"/> <xacro:property name="calf_rotor_offset_y" value="-0.0997"/> <xacro:property name="calf_rotor_offset_z" value="0.0"/> <!-- joint limits --> <xacro:property name="damping" value="0"/> <xacro:property name="friction" value="0"/> <xacro:property name="hip_position_max" value="${70*PI/180.0}"/> <xacro:property name="hip_position_min" value="${-70*PI/180.0}"/> <xacro:property name="hip_velocity_max" value="20"/> <xacro:property name="hip_torque_max" value="35.278"/> <xacro:property name="thigh_position_max" value="${240*PI/180.0}"/> <xacro:property name="thigh_position_min" value="${-120*PI/180.0}"/> <xacro:property name="thigh_velocity_max" value="20"/> <xacro:property name="thigh_torque_max" value="35.278"/> <xacro:property name="calf_position_max" value="${-37*PI/180.0}"/> <xacro:property name="calf_position_min" value="${-159*PI/180.0}"/> <xacro:property name="calf_velocity_max" value="15.89"/> <xacro:property name="calf_torque_max" value="44.4"/> <!-- dynamics inertial value total 23.0kg --> <!-- trunk --> <xacro:property name="trunk_mass" value="11.644"/> <xacro:property name="trunk_com_x" value="0.008811"/> <xacro:property name="trunk_com_y" value="0.003839"/> <xacro:property name="trunk_com_z" value="0.000273"/> <xacro:property name="trunk_ixx" value="0.051944892"/> <xacro:property name="trunk_ixy" value="0.001703617"/> <xacro:property name="trunk_ixz" value="0.000235941"/> <xacro:property name="trunk_iyy" value="0.24693924"/> <xacro:property name="trunk_iyz" value="0.000119783"/> <xacro:property name="trunk_izz" value="0.270948307"/> <!-- hip (left front) --> <xacro:property name="hip_mass" value="1.993"/> <xacro:property name="hip_com_x" value="-0.022191"/> <xacro:property name="hip_com_y" value="0.015144"/> <xacro:property name="hip_com_z" value="-0.000015"/> <xacro:property name="hip_ixx" value="0.002446735"/> <xacro:property name="hip_ixy" value="-0.00059805"/> <xacro:property name="hip_ixz" value="0.000001945"/> <xacro:property name="hip_iyy" value="0.003925876"/> <xacro:property name="hip_iyz" value="0.000001284"/> <xacro:property name="hip_izz" value="0.004148145"/> <xacro:property name="hip_rotor_mass" value="0.146"/> <xacro:property name="hip_rotor_com_x" value="0.0"/> <xacro:property name="hip_rotor_com_y" value="0.0"/> <xacro:property name="hip_rotor_com_z" value="0.0"/> <xacro:property name="hip_rotor_ixx" value="0.000138702"/> <xacro:property name="hip_rotor_ixy" value="0.0"/> <xacro:property name="hip_rotor_ixz" value="0.0"/> <xacro:property name="hip_rotor_iyy" value="0.000083352"/> <xacro:property name="hip_rotor_iyz" value="0.0"/> <xacro:property name="hip_rotor_izz" value="0.000083352"/> <!-- thigh --> <xacro:property name="thigh_mass" value="0.639"/> <xacro:property name="thigh_com_x" value="-0.005607"/> <xacro:property name="thigh_com_y" value="-0.003877"/> <xacro:property name="thigh_com_z" value="-0.048199"/> <xacro:property name="thigh_ixx" value="0.004173855"/> <xacro:property name="thigh_ixy" value="0.000010284"/> <xacro:property name="thigh_ixz" value="-0.000318874"/> <xacro:property name="thigh_iyy" value="0.004343802"/> <xacro:property name="thigh_iyz" value="0.000109233"/> <xacro:property name="thigh_izz" value="0.000340136"/> <xacro:property name="thigh_rotor_mass" value="0.146"/> <xacro:property name="thigh_rotor_com_x" value="0.0"/> <xacro:property name="thigh_rotor_com_y" value="0.0"/> <xacro:property name="thigh_rotor_com_z" value="0.0"/> <xacro:property name="thigh_rotor_ixx" value="0.000083352"/> <xacro:property name="thigh_rotor_ixy" value="0.0"/> <xacro:property name="thigh_rotor_ixz" value="0.0"/> <xacro:property name="thigh_rotor_iyy" value="0.000138702"/> <xacro:property name="thigh_rotor_iyz" value="0.0"/> <xacro:property name="thigh_rotor_izz" value="0.000083352"/> <!-- calf --> <xacro:property name="calf_mass" value="0.207"/> <xacro:property name="calf_com_x" value="0.002781"/> <xacro:property name="calf_com_y" value="0.000063"/> <xacro:property name="calf_com_z" value="-0.142518"/> <xacro:property name="calf_ixx" value="0.002129279"/> <xacro:property name="calf_ixy" value="0.000000039"/> <xacro:property name="calf_ixz" value="0.000005757"/> <xacro:property name="calf_iyy" value="0.002141463"/> <xacro:property name="calf_iyz" value="-0.000000516"/> <xacro:property name="calf_izz" value="0.000037583"/> <xacro:property name="calf_rotor_mass" value="0.132"/> <xacro:property name="calf_rotor_com_x" value="0.0"/> <xacro:property name="calf_rotor_com_y" value="0.0"/> <xacro:property name="calf_rotor_com_z" value="0.0"/> <xacro:property name="calf_rotor_ixx" value="0.000145463"/> <xacro:property name="calf_rotor_ixy" value="0.0"/> <xacro:property name="calf_rotor_ixz" value="0.0"/> <xacro:property name="calf_rotor_iyy" value="0.000133031"/> <xacro:property name="calf_rotor_iyz" value="0.0"/> <xacro:property name="calf_rotor_izz" value="0.000145463"/> <!-- foot --> <xacro:property name="foot_mass" value="0.06"/> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/aliengo_description/xacro/gazebo.xacro
<?xml version="1.0"?> <robot> <!-- ros_control plugin --> <gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <robotNamespace>/aliengo_gazebo</robotNamespace> <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType> </plugin> </gazebo> <!-- Show the trajectory of trunk center. --> <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>10</frequency> <plot> <link>base</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Yellow</material> </plot> </plugin> </gazebo> <!-- Show the trajectory of foot. You can add another trajectory about another foot. --> <!-- <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>100</frequency> <plot> <link>FL_foot</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Green</material> </plot> </plugin> </gazebo> --> <gazebo> <plugin filename="libgazebo_ros_force.so" name="gazebo_ros_force"> <bodyName>trunk</bodyName> <topicName>/apply_force/trunk</topicName> </plugin> </gazebo> <gazebo reference="imu_link"> <gravity>true</gravity> <sensor name="imu_sensor" type="imu"> <always_on>true</always_on> <update_rate>1000</update_rate> <visualize>true</visualize> <topic>__default_topic__</topic> <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin"> <topicName>trunk_imu</topicName> <bodyName>imu_link</bodyName> <updateRateHZ>1000.0</updateRateHZ> <gaussianNoise>0.0</gaussianNoise> <xyzOffset>0 0 0</xyzOffset> <rpyOffset>0 0 0</rpyOffset> <frameName>imu_link</frameName> </plugin> <pose>0 0 0 0 0 0</pose> </sensor> </gazebo> <!-- Foot contacts. --> <gazebo reference="FR_calf"> <sensor name="FR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>FR_calf_fixed_joint_lump__FR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="FL_calf"> <sensor name="FL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>FL_calf_fixed_joint_lump__FL_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RR_calf"> <sensor name="RR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>RR_calf_fixed_joint_lump__RR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RL_calf"> <sensor name="RL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>RL_calf_fixed_joint_lump__RL_foot_collision_1</collision> </contact> </sensor> </gazebo> <!-- Visualization of Foot contacts. --> <gazebo reference="FR_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>FR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="FL_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>FL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RR_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>RR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RL_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>RL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="base"> <material>Gazebo/Green</material> <turnGravityOff>false</turnGravityOff> </gazebo> <gazebo reference="trunk"> <mu1>0.2</mu1> <mu2>0.2</mu2> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="stick_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/White</material> </gazebo> <gazebo reference="imu_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/Red</material> </gazebo> <!-- FL leg --> <gazebo reference="FL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- FR leg --> <gazebo reference="FR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RL leg --> <gazebo reference="RL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RR leg --> <gazebo reference="RR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/aliengo_description/xacro/stairs.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:property name="stair_length" value="0.640" /> <xacro:property name="stair_width" value="0.310" /> <xacro:property name="stair_height" value="0.170" /> <xacro:macro name="stairs" params="stairs xpos ypos zpos"> <joint name="stair_joint_origin" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="stair_link_${stairs}"/> </joint> <link name="stair_link_${stairs}"> <visual> <geometry> <box size="${stair_length} ${stair_width} ${stair_height}"/> </geometry> <material name="grey"/> <origin rpy="0 0 0" xyz="${xpos} ${ypos} ${zpos}"/> </visual> <collision> <geometry> <box size="${stair_length} ${stair_width} ${stair_height}"/> </geometry> </collision> <inertial> <mass value="0.80"/> <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100" /> </inertial> </link> <xacro:if value="${stairs}"> <xacro:stairs stairs="${stairs-1}" xpos="0" ypos="${ypos-stair_width/2}" zpos="${zpos+stair_height}"/> <joint name="stair_joint_${stairs}" type="fixed"> <parent link="stair_link_${stairs}"/> <child link="stair_link_${stairs-1}"/> </joint> </xacro:if> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/aliengo_description/xacro/robot.xacro
<?xml version="1.0"?> <robot name="aliengo" xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:include filename="$(find aliengo_description)/xacro/const.xacro"/> <xacro:include filename="$(find aliengo_description)/xacro/materials.xacro"/> <xacro:include filename="$(find aliengo_description)/xacro/leg.xacro"/> <xacro:include filename="$(find aliengo_description)/xacro/gazebo.xacro"/> <!-- Rotor related joint and link is only for demonstrate location. --> <!-- Actually, the rotor will rotate and the joint is not fixed. Reduction ratio should be considered. --> <!-- Debug mode will hung up the robot, use "true" or "false" to switch it. --> <xacro:if value="$(arg DEBUG)"> <link name="world"/> <joint name="base_static_joint" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="base"/> </joint> </xacro:if> <link name="base"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> </visual> </link> <joint name="floating_base" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="base"/> <child link="trunk"/> </joint> <link name="trunk"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="${trunk_length} ${trunk_width} ${trunk_height}"/> </geometry> </collision> <!-- <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> </collision> --> <inertial> <origin rpy="0 0 0" xyz="${trunk_com_x} ${trunk_com_y} ${trunk_com_z}"/> <mass value="${trunk_mass}"/> <inertia ixx="${trunk_ixx}" ixy="${trunk_ixy}" ixz="${trunk_ixz}" iyy="${trunk_iyy}" iyz="${trunk_iyz}" izz="${trunk_izz}"/> </inertial> </link> <joint name="imu_joint" type="fixed"> <parent link="trunk"/> <child link="imu_link"/> <origin rpy="0 0 0" xyz="0 0 0"/> </joint> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> <material name="red"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> </link> <xacro:leg name="FR" mirror="-1" mirror_dae= "False" front_hind="1" front_hind_dae="True" /> <xacro:leg name="FL" mirror="1" mirror_dae="True" front_hind="1" front_hind_dae="True" /> <xacro:leg name="RR" mirror="-1" mirror_dae="False" front_hind="-1" front_hind_dae="False" /> <xacro:leg name="RL" mirror="1" mirror_dae="True" front_hind="-1" front_hind_dae="False" /> <!-- <xacro:stairs stairs="15" xpos="0" ypos="2.0" zpos="0" /> --> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/aliengo_description/config/robot_control.yaml
aliengo_gazebo: # Publish all joint states ----------------------------------- joint_state_controller: type: joint_state_controller/JointStateController publish_rate: 1000 # FL Controllers --------------------------------------- FL_hip_controller: type: unitree_legged_control/UnitreeJointController joint: FL_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} FL_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: FL_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} FL_calf_controller: type: unitree_legged_control/UnitreeJointController joint: FL_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # FR Controllers --------------------------------------- FR_hip_controller: type: unitree_legged_control/UnitreeJointController joint: FR_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} FR_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: FR_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} FR_calf_controller: type: unitree_legged_control/UnitreeJointController joint: FR_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # RL Controllers --------------------------------------- RL_hip_controller: type: unitree_legged_control/UnitreeJointController joint: RL_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} RL_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: RL_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} RL_calf_controller: type: unitree_legged_control/UnitreeJointController joint: RL_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # RR Controllers --------------------------------------- RR_hip_controller: type: unitree_legged_control/UnitreeJointController joint: RR_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} RR_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: RR_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} RR_calf_controller: type: unitree_legged_control/UnitreeJointController joint: RR_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0}
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/aliengo_description/urdf/aliengo.urdf
<?xml version="1.0" ?> <!-- =================================================================================== --> <!-- | This document was autogenerated by xacro from robot.xacro | --> <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | --> <!-- =================================================================================== --> <robot name="aliengo"> <material name="black"> <color rgba="0.0 0.0 0.0 1.0"/> </material> <material name="blue"> <color rgba="0.0 0.0 0.8 1.0"/> </material> <material name="green"> <color rgba="0.0 0.8 0.0 1.0"/> </material> <material name="grey"> <color rgba="0.2 0.2 0.2 1.0"/> </material> <material name="silver"> <color rgba="0.9137254901960784 0.9137254901960784 0.8470588235294118 1.0"/> </material> <material name="orange"> <color rgba="1.0 0.4235294117647059 0.0392156862745098 1.0"/> </material> <material name="brown"> <color rgba="0.8705882352941177 0.8117647058823529 0.7647058823529411 1.0"/> </material> <material name="red"> <color rgba="0.8 0.0 0.0 1.0"/> </material> <material name="white"> <color rgba="1.0 1.0 1.0 1.0"/> </material> <!-- ros_control plugin --> <gazebo> <plugin filename="libgazebo_ros_control.so" name="gazebo_ros_control"> <robotNamespace>/aliengo_gazebo</robotNamespace> <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType> </plugin> </gazebo> <!-- Show the trajectory of trunk center. --> <gazebo> <plugin filename="libLinkPlot3DPlugin.so" name="3dplot"> <frequency>10</frequency> <plot> <link>base</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Yellow</material> </plot> </plugin> </gazebo> <!-- Show the trajectory of foot. You can add another trajectory about another foot. --> <!-- <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>100</frequency> <plot> <link>FL_foot</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Green</material> </plot> </plugin> </gazebo> --> <gazebo> <plugin filename="libgazebo_ros_force.so" name="gazebo_ros_force"> <bodyName>trunk</bodyName> <topicName>/apply_force/trunk</topicName> </plugin> </gazebo> <gazebo reference="imu_link"> <gravity>true</gravity> <sensor name="imu_sensor" type="imu"> <always_on>true</always_on> <update_rate>1000</update_rate> <visualize>true</visualize> <topic>__default_topic__</topic> <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin"> <topicName>trunk_imu</topicName> <bodyName>imu_link</bodyName> <updateRateHZ>1000.0</updateRateHZ> <gaussianNoise>0.0</gaussianNoise> <xyzOffset>0 0 0</xyzOffset> <rpyOffset>0 0 0</rpyOffset> <frameName>imu_link</frameName> </plugin> <pose>0 0 0 0 0 0</pose> </sensor> </gazebo> <!-- Foot contacts. --> <gazebo reference="FR_calf"> <sensor name="FR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>FR_calf_fixed_joint_lump__FR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="FL_calf"> <sensor name="FL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>FL_calf_fixed_joint_lump__FL_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RR_calf"> <sensor name="RR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>RR_calf_fixed_joint_lump__RR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RL_calf"> <sensor name="RL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>RL_calf_fixed_joint_lump__RL_foot_collision_1</collision> </contact> </sensor> </gazebo> <!-- Visualization of Foot contacts. --> <gazebo reference="FR_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>FR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="FL_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>FL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RR_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>RR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RL_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>RL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="base"> <material>Gazebo/Green</material> <turnGravityOff>false</turnGravityOff> </gazebo> <gazebo reference="trunk"> <mu1>0.2</mu1> <mu2>0.2</mu2> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="stick_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/White</material> </gazebo> <gazebo reference="imu_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/Red</material> </gazebo> <!-- FL leg --> <gazebo reference="FL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- FR leg --> <gazebo reference="FR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RL leg --> <gazebo reference="RL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RR leg --> <gazebo reference="RR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- Rotor related joint and link is only for demonstrate location. --> <!-- Actually, the rotor will rotate and the joint is not fixed. Reduction ratio should be considered. --> <!-- Debug mode will hung up the robot, use "true" or "false" to switch it. --> <!-- <xacro:if value="$(arg DEBUG)"> <link name="world"/> <joint name="base_static_joint" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="base"/> </joint> </xacro:if> --> <link name="base"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> </visual> </link> <joint name="floating_base" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="base"/> <child link="trunk"/> </joint> <link name="trunk"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.647 0.15 0.112"/> </geometry> </collision> <!-- <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> </collision> --> <inertial> <origin rpy="0 0 0" xyz="0.008811 0.003839 0.000273"/> <mass value="11.644"/> <inertia ixx="0.051944892" ixy="0.001703617" ixz="0.000235941" iyy="0.24693924" iyz="0.000119783" izz="0.270948307"/> </inertial> </link> <joint name="imu_joint" type="fixed"> <parent link="trunk"/> <child link="imu_link"/> <origin rpy="0 0 0" xyz="0 0 0"/> </joint> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.000001" iyz="0" izz="0.0001"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> <material name="red"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> </link> <joint name="FR_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="0.2407 -0.051 0"/> <parent link="trunk"/> <child link="FR_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="35.278" lower="-1.2217304763960306" upper="1.2217304763960306" velocity="20"/> </joint> <joint name="FR_hip_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.139985 -0.051 0"/> <parent link="trunk"/> <child link="FR_hip_rotor"/> </joint> <link name="FR_hip"> <visual> <origin rpy="3.141592653589793 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 -0.083 0"/> <geometry> <cylinder length="0.0418" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.022191 -0.015144 -1.5e-05"/> <mass value="1.993"/> <inertia ixx="0.002446735" ixy="0.00059805" ixz="1.945e-06" iyy="0.003925876" iyz="-1.284e-06" izz="0.004148145"/> </inertial> </link> <link name="FR_hip_rotor"> <visual> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.146"/> <inertia ixx="0.000138702" ixy="0.0" ixz="0.0" iyy="8.3352e-05" iyz="0.0" izz="8.3352e-05"/> </inertial> </link> <joint name="FR_thigh_joint" type="continuous"> <origin rpy="0 0 0" xyz="0 -0.0868 0"/> <parent link="FR_hip"/> <child link="FR_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="35.278" velocity="20"/> </joint> <joint name="FR_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 -0.0298 0"/> <parent link="FR_hip"/> <child link="FR_thigh_rotor"/> </joint> <link name="FR_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0374 0.043"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.005607 0.003877 -0.048199"/> <mass value="0.639"/> <inertia ixx="0.004173855" ixy="-1.0284e-05" ixz="-0.000318874" iyy="0.004343802" iyz="-0.000109233" izz="0.000340136"/> </inertial> </link> <link name="FR_thigh_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.146"/> <inertia ixx="8.3352e-05" ixy="0.0" ixz="0.0" iyy="0.000138702" iyz="0.0" izz="8.3352e-05"/> </inertial> </link> <joint name="FR_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="FR_thigh"/> <child link="FR_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="44.4" lower="-2.775073510670984" upper="-0.6457718232379019" velocity="15.89"/> </joint> <joint name="FR_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.0997 0"/> <parent link="FR_thigh"/> <child link="FR_calf_rotor"/> </joint> <link name="FR_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0208 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.002781 6.3e-05 -0.142518"/> <mass value="0.207"/> <inertia ixx="0.002129279" ixy="3.9e-08" ixz="5.757e-06" iyy="0.002141463" iyz="-5.16e-07" izz="3.7583e-05"/> </inertial> </link> <link name="FR_calf_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.132"/> <inertia ixx="0.000145463" ixy="0.0" ixz="0.0" iyy="0.000133031" iyz="0.0" izz="0.000145463"/> </inertial> </link> <joint name="FR_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="FR_calf"/> <child link="FR_foot"/> </joint> <link name="FR_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0165"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0265"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="1.6853999999999998e-05" ixy="0.0" ixz="0.0" iyy="1.6853999999999998e-05" iyz="0.0" izz="1.6853999999999998e-05"/> </inertial> </link> <transmission name="FR_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FR_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FR_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="FL_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="0.2407 0.051 0"/> <parent link="trunk"/> <child link="FL_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="35.278" lower="-1.2217304763960306" upper="1.2217304763960306" velocity="20"/> </joint> <joint name="FL_hip_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.139985 0.051 0"/> <parent link="trunk"/> <child link="FL_hip_rotor"/> </joint> <link name="FL_hip"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0.083 0"/> <geometry> <cylinder length="0.0418" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.022191 0.015144 -1.5e-05"/> <mass value="1.993"/> <inertia ixx="0.002446735" ixy="-0.00059805" ixz="1.945e-06" iyy="0.003925876" iyz="1.284e-06" izz="0.004148145"/> </inertial> </link> <link name="FL_hip_rotor"> <visual> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.146"/> <inertia ixx="0.000138702" ixy="0.0" ixz="0.0" iyy="8.3352e-05" iyz="0.0" izz="8.3352e-05"/> </inertial> </link> <joint name="FL_thigh_joint" type="continuous"> <origin rpy="0 0 0" xyz="0 0.0868 0"/> <parent link="FL_hip"/> <child link="FL_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="35.278" velocity="20"/> </joint> <joint name="FL_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.0298 0"/> <parent link="FL_hip"/> <child link="FL_thigh_rotor"/> </joint> <link name="FL_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/thigh.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0374 0.043"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.005607 -0.003877 -0.048199"/> <mass value="0.639"/> <inertia ixx="0.004173855" ixy="1.0284e-05" ixz="-0.000318874" iyy="0.004343802" iyz="0.000109233" izz="0.000340136"/> </inertial> </link> <link name="FL_thigh_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.146"/> <inertia ixx="8.3352e-05" ixy="0.0" ixz="0.0" iyy="0.000138702" iyz="0.0" izz="8.3352e-05"/> </inertial> </link> <joint name="FL_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="FL_thigh"/> <child link="FL_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="44.4" lower="-2.775073510670984" upper="-0.6457718232379019" velocity="15.89"/> </joint> <joint name="FL_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 -0.0997 0"/> <parent link="FL_thigh"/> <child link="FL_calf_rotor"/> </joint> <link name="FL_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0208 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.002781 6.3e-05 -0.142518"/> <mass value="0.207"/> <inertia ixx="0.002129279" ixy="3.9e-08" ixz="5.757e-06" iyy="0.002141463" iyz="-5.16e-07" izz="3.7583e-05"/> </inertial> </link> <link name="FL_calf_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.132"/> <inertia ixx="0.000145463" ixy="0.0" ixz="0.0" iyy="0.000133031" iyz="0.0" izz="0.000145463"/> </inertial> </link> <joint name="FL_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="FL_calf"/> <child link="FL_foot"/> </joint> <link name="FL_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0165"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0265"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="1.6853999999999998e-05" ixy="0.0" ixz="0.0" iyy="1.6853999999999998e-05" iyz="0.0" izz="1.6853999999999998e-05"/> </inertial> </link> <transmission name="FL_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FL_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FL_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="RR_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="-0.2407 -0.051 0"/> <parent link="trunk"/> <child link="RR_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="35.278" lower="-1.2217304763960306" upper="1.2217304763960306" velocity="20"/> </joint> <joint name="RR_hip_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="-0.139985 -0.051 0"/> <parent link="trunk"/> <child link="RR_hip_rotor"/> </joint> <link name="RR_hip"> <visual> <origin rpy="3.141592653589793 3.141592653589793 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 -0.083 0"/> <geometry> <cylinder length="0.0418" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.022191 -0.015144 -1.5e-05"/> <mass value="1.993"/> <inertia ixx="0.002446735" ixy="-0.00059805" ixz="-1.945e-06" iyy="0.003925876" iyz="-1.284e-06" izz="0.004148145"/> </inertial> </link> <link name="RR_hip_rotor"> <visual> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.146"/> <inertia ixx="0.000138702" ixy="0.0" ixz="0.0" iyy="8.3352e-05" iyz="0.0" izz="8.3352e-05"/> </inertial> </link> <joint name="RR_thigh_joint" type="continuous"> <origin rpy="0 0 0" xyz="0 -0.0868 0"/> <parent link="RR_hip"/> <child link="RR_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="35.278" velocity="20"/> </joint> <joint name="RR_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 -0.0298 0"/> <parent link="RR_hip"/> <child link="RR_thigh_rotor"/> </joint> <link name="RR_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0374 0.043"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.005607 0.003877 -0.048199"/> <mass value="0.639"/> <inertia ixx="0.004173855" ixy="-1.0284e-05" ixz="-0.000318874" iyy="0.004343802" iyz="-0.000109233" izz="0.000340136"/> </inertial> </link> <link name="RR_thigh_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.146"/> <inertia ixx="8.3352e-05" ixy="0.0" ixz="0.0" iyy="0.000138702" iyz="0.0" izz="8.3352e-05"/> </inertial> </link> <joint name="RR_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="RR_thigh"/> <child link="RR_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="44.4" lower="-2.775073510670984" upper="-0.6457718232379019" velocity="15.89"/> </joint> <joint name="RR_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.0997 0"/> <parent link="RR_thigh"/> <child link="RR_calf_rotor"/> </joint> <link name="RR_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0208 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.002781 6.3e-05 -0.142518"/> <mass value="0.207"/> <inertia ixx="0.002129279" ixy="3.9e-08" ixz="5.757e-06" iyy="0.002141463" iyz="-5.16e-07" izz="3.7583e-05"/> </inertial> </link> <link name="RR_calf_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.132"/> <inertia ixx="0.000145463" ixy="0.0" ixz="0.0" iyy="0.000133031" iyz="0.0" izz="0.000145463"/> </inertial> </link> <joint name="RR_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="RR_calf"/> <child link="RR_foot"/> </joint> <link name="RR_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0165"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0265"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="1.6853999999999998e-05" ixy="0.0" ixz="0.0" iyy="1.6853999999999998e-05" iyz="0.0" izz="1.6853999999999998e-05"/> </inertial> </link> <transmission name="RR_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RR_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RR_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="RL_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="-0.2407 0.051 0"/> <parent link="trunk"/> <child link="RL_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0" friction="0"/> <limit effort="35.278" lower="-1.2217304763960306" upper="1.2217304763960306" velocity="20"/> </joint> <joint name="RL_hip_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="-0.139985 0.051 0"/> <parent link="trunk"/> <child link="RL_hip_rotor"/> </joint> <link name="RL_hip"> <visual> <origin rpy="0 3.141592653589793 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0.083 0"/> <geometry> <cylinder length="0.0418" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.022191 0.015144 -1.5e-05"/> <mass value="1.993"/> <inertia ixx="0.002446735" ixy="0.00059805" ixz="-1.945e-06" iyy="0.003925876" iyz="1.284e-06" izz="0.004148145"/> </inertial> </link> <link name="RL_hip_rotor"> <visual> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.146"/> <inertia ixx="0.000138702" ixy="0.0" ixz="0.0" iyy="8.3352e-05" iyz="0.0" izz="8.3352e-05"/> </inertial> </link> <joint name="RL_thigh_joint" type="continuous"> <origin rpy="0 0 0" xyz="0 0.0868 0"/> <parent link="RL_hip"/> <child link="RL_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="35.278" velocity="20"/> </joint> <joint name="RL_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.0298 0"/> <parent link="RL_hip"/> <child link="RL_thigh_rotor"/> </joint> <link name="RL_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/thigh.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0374 0.043"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.005607 -0.003877 -0.048199"/> <mass value="0.639"/> <inertia ixx="0.004173855" ixy="1.0284e-05" ixz="-0.000318874" iyy="0.004343802" iyz="0.000109233" izz="0.000340136"/> </inertial> </link> <link name="RL_thigh_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.146"/> <inertia ixx="8.3352e-05" ixy="0.0" ixz="0.0" iyy="0.000138702" iyz="0.0" izz="8.3352e-05"/> </inertial> </link> <joint name="RL_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="RL_thigh"/> <child link="RL_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0" friction="0"/> <limit effort="44.4" lower="-2.775073510670984" upper="-0.6457718232379019" velocity="15.89"/> </joint> <joint name="RL_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 -0.0997 0"/> <parent link="RL_thigh"/> <child link="RL_calf_rotor"/> </joint> <link name="RL_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://aliengo_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <material name="orange"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.125"/> <geometry> <box size="0.25 0.0208 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.002781 6.3e-05 -0.142518"/> <mass value="0.207"/> <inertia ixx="0.002129279" ixy="3.9e-08" ixz="5.757e-06" iyy="0.002141463" iyz="-5.16e-07" izz="3.7583e-05"/> </inertial> </link> <link name="RL_calf_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.132"/> <inertia ixx="0.000145463" ixy="0.0" ixz="0.0" iyy="0.000133031" iyz="0.0" izz="0.000145463"/> </inertial> </link> <joint name="RL_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.25"/> <parent link="RL_calf"/> <child link="RL_foot"/> </joint> <link name="RL_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0165"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.0265"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="1.6853999999999998e-05" ixy="0.0" ixz="0.0" iyy="1.6853999999999998e-05" iyz="0.0" izz="1.6853999999999998e-05"/> </inertial> </link> <transmission name="RL_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RL_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RL_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <!-- <xacro:stairs stairs="15" xpos="0" ypos="2.0" zpos="0" /> --> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/go1_description/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3) project(go1_description) find_package(catkin REQUIRED COMPONENTS genmsg roscpp std_msgs tf ) catkin_package( CATKIN_DEPENDS ) include_directories( # include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} )
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/go1_description/package.xml
<?xml version="1.0"?> <package format="2"> <name>go1_description</name> <version>0.0.0</version> <description>The go1_description package</description> <maintainer email="laikago@unitree.cc">unitree</maintainer> <license>TODO</license> <buildtool_depend>catkin</buildtool_depend> <depend>roscpp</depend> <depend>std_msgs</depend> </package>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/go1_description/launch/check_joint.rviz
Panels: - Class: rviz/Displays Help Height: 78 Name: Displays Property Tree Widget: Expanded: - /Global Options1 - /RobotModel1 Splitter Ratio: 0.5 Tree Height: 523 - 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 Name: Time SyncMode: 0 SyncSource: "" 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: 0.5 Class: rviz/RobotModel Collision Enabled: false Enabled: true Links: All Links Enabled: true Expand Joint Details: false Expand Link Details: false Expand Tree: false FL_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true FL_thigh_shoulder: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true FR_thigh_shoulder: Alpha: 1 Show Axes: false Show Trail: false Value: true Link Tree Style: Links in Alphabetic Order RL_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true RL_thigh_shoulder: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_calf: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_foot: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_hip: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_thigh: Alpha: 1 Show Axes: false Show Trail: false Value: true RR_thigh_shoulder: Alpha: 1 Show Axes: false Show Trail: false Value: true base: Alpha: 1 Show Axes: false Show Trail: false Value: true camera_chin: Alpha: 1 Show Axes: false Show Trail: false Value: true camera_face: Alpha: 1 Show Axes: false Show Trail: false Value: true camera_laserscan_link_left: Alpha: 1 Show Axes: false Show Trail: false camera_laserscan_link_right: Alpha: 1 Show Axes: false Show Trail: false camera_left: Alpha: 1 Show Axes: false Show Trail: false Value: true camera_optical_chin: Alpha: 1 Show Axes: false Show Trail: false camera_optical_face: Alpha: 1 Show Axes: false Show Trail: false camera_optical_left: Alpha: 1 Show Axes: false Show Trail: false camera_optical_rearDown: Alpha: 1 Show Axes: false Show Trail: false camera_optical_right: Alpha: 1 Show Axes: false Show Trail: false camera_rearDown: Alpha: 1 Show Axes: false Show Trail: false Value: true camera_right: Alpha: 1 Show Axes: false Show Trail: false Value: true imu_link: Alpha: 1 Show Axes: false Show Trail: false Value: true trunk: Alpha: 1 Show Axes: false Show Trail: false Value: true ultraSound_face: Alpha: 1 Show Axes: false Show Trail: false Value: true ultraSound_left: Alpha: 1 Show Axes: false Show Trail: false Value: true ultraSound_right: 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 - Alpha: 1 Class: rviz/Axes Enabled: false Length: 1 Name: Axes Radius: 0.10000000149011612 Reference Frame: <Fixed Frame> Show Trail: false 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 - Alpha: 1 Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 10 Min Value: -10 Value: true Axis: Z Channel Name: intensity Class: rviz/PointCloud2 Color: 255; 255; 255 Color Transformer: RGB8 Decay Time: 0 Enabled: false Invert Rainbow: false Max Color: 255; 255; 255 Min Color: 0; 0; 0 Name: PointCloud2 Position Transformer: XYZ Queue Size: 10 Selectable: true Size (Pixels): 3 Size (m): 0.009999999776482582 Style: Flat Squares Topic: /cam1/point_cloud_face Unreliable: false Use Fixed Frame: true Use rainbow: true Value: false - Alpha: 1 Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 10 Min Value: -10 Value: true Axis: Z Channel Name: intensity Class: rviz/PointCloud2 Color: 255; 255; 255 Color Transformer: RGB8 Decay Time: 0 Enabled: false Invert Rainbow: false Max Color: 255; 255; 255 Min Color: 0; 0; 0 Name: PointCloud2 Position Transformer: XYZ Queue Size: 10 Selectable: true Size (Pixels): 3 Size (m): 0.009999999776482582 Style: Flat Squares Topic: /cam2/point_cloud_chin Unreliable: false Use Fixed Frame: true Use rainbow: true Value: false - Alpha: 1 Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 10 Min Value: -10 Value: true Axis: Z Channel Name: intensity Class: rviz/PointCloud2 Color: 255; 255; 255 Color Transformer: RGB8 Decay Time: 0 Enabled: false Invert Rainbow: false Max Color: 255; 255; 255 Min Color: 0; 0; 0 Name: PointCloud2 Position Transformer: XYZ Queue Size: 10 Selectable: true Size (Pixels): 3 Size (m): 0.009999999776482582 Style: Flat Squares Topic: /cam3/point_cloud_left Unreliable: false Use Fixed Frame: true Use rainbow: true Value: false - Alpha: 1 Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 10 Min Value: -10 Value: true Axis: Z Channel Name: intensity Class: rviz/PointCloud2 Color: 255; 255; 255 Color Transformer: RGB8 Decay Time: 0 Enabled: false Invert Rainbow: false Max Color: 255; 255; 255 Min Color: 0; 0; 0 Name: PointCloud2 Position Transformer: XYZ Queue Size: 10 Selectable: true Size (Pixels): 3 Size (m): 0.009999999776482582 Style: Flat Squares Topic: /cam4/point_cloud_right Unreliable: false Use Fixed Frame: true Use rainbow: true Value: false - Alpha: 1 Autocompute Intensity Bounds: true Autocompute Value Bounds: Max Value: 10 Min Value: -10 Value: true Axis: Z Channel Name: intensity Class: rviz/PointCloud2 Color: 255; 255; 255 Color Transformer: RGB8 Decay Time: 0 Enabled: false Invert Rainbow: false Max Color: 255; 255; 255 Min Color: 0; 0; 0 Name: PointCloud2 Position Transformer: XYZ Queue Size: 10 Selectable: true Size (Pixels): 3 Size (m): 0.009999999776482582 Style: Flat Squares Topic: /cam5/point_cloud_rearDown Unreliable: false Use Fixed Frame: true Use rainbow: true Value: false Enabled: true Global Options: Background Color: 238; 238; 238 Default Light: true Fixed Frame: base 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: /move_base_simple/goal - Class: rviz/PublishPoint Single click: true Topic: /clicked_point Value: true Views: Current: Class: rviz/Orbit Distance: 1.0180186033248901 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.10819146782159805 Y: 0.02224866859614849 Z: -0.08825916796922684 Focal Shape Fixed Size: false Focal Shape Size: 0.05000000074505806 Invert Z Axis: false Name: Current View Near Clip Distance: 0.009999999776482582 Pitch: 0.3647974133491516 Target Frame: <Fixed Frame> Yaw: 4.123597621917725 Saved: ~ Window Geometry: Displays: collapsed: false Height: 752 Hide Left Dock: false Hide Right Dock: false QMainWindow State: 000000ff00000000fd0000000400000000000001c700000296fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d00000296000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00430061006d00650072006101000001be000001900000000000000000000000010000010f000002e2fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730000000028000002e2000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000006400000003efc0100000002fb0000000800540069006d00650000000000000006400000042800fffffffb0000000800540069006d006501000000000000045000000000000000000000039d0000029600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 Selection: collapsed: false Time: collapsed: false Tool Properties: collapsed: false Views: collapsed: false Width: 1386 X: 442 Y: 159
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/go1_description/launch/go1_rviz.launch
<launch> <arg name="user_debug" default="false"/> <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find go1_description)/xacro/robot.xacro' DEBUG:=$(arg user_debug)"/> <!-- for higher robot_state_publisher average rate--> <!-- <param name="rate" value="1000"/> --> <!-- send fake joint values --> <node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher"> <param name="use_gui" value="TRUE"/> </node> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher"> <param name="publish_frequency" type="double" value="1000.0"/> </node> <node pkg="rviz" type="rviz" name="rviz" respawn="false" output="screen" args="-d $(find go1_description)/launch/check_joint.rviz"/> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/go1_description/xacro/materials.xacro
<?xml version="1.0"?> <robot> <material name="black"> <color rgba="0.0 0.0 0.0 1.0"/> </material> <material name="blue"> <color rgba="0.0 0.0 0.8 1.0"/> </material> <material name="green"> <color rgba="0.0 0.8 0.0 1.0"/> </material> <material name="grey"> <color rgba="0.2 0.2 0.2 1.0"/> </material> <material name="silver"> <color rgba="${233/255} ${233/255} ${216/255} 1.0"/> </material> <material name="orange"> <color rgba="${255/255} ${108/255} ${10/255} 1.0"/> </material> <material name="brown"> <color rgba="${222/255} ${207/255} ${195/255} 1.0"/> </material> <material name="red"> <color rgba="0.8 0.0 0.0 1.0"/> </material> <material name="white"> <color rgba="1.0 1.0 1.0 1.0"/> </material> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/go1_description/xacro/depthCamera.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:macro name="depthCamera" params="camID name *origin"> <joint name="camera_joint_${name}" type="fixed"> <xacro:insert_block name="origin"/> <parent link="trunk"/> <child link="camera_${name}"/> </joint> <link name="camera_${name}"> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/depthCamera.dae" scale="1 1 1"/> </geometry> </visual> <inertial> <mass value="1e-5" /> <origin xyz="0 0 0" rpy="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" /> </inertial> </link> <joint name="camera_optical_joint_${name}" type="fixed"> <origin xyz="0 0 0" rpy="${-pi/2} 0 ${-pi/2}"/> <parent link="camera_${name}"/> <child link="camera_optical_${name}"/> </joint> <link name="camera_optical_${name}"> </link> <gazebo reference="camera_${name}"> <!-- <material>Gazebo/Black</material> --> <sensor name="camera_${name}_camera" type="depth"> <update_rate>16</update_rate> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <clip> <near>0.1</near> <far>5</far> </clip> </camera> <plugin name="camera_${name}_controller" filename="libgazebo_ros_openni_kinect.so"> <baseline>0.025</baseline> <alwaysOn>true</alwaysOn> <updateRate>0.0</updateRate> <cameraName>camera_${name}_ir</cameraName> <imageTopicName>/camera_${name}/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_${name}/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_${name}/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_${name}/depth/camera_info</depthImageInfoTopicName> <!-- <pointCloudTopicName>/camera_${name}/depth/points</pointCloudTopicName> --> <pointCloudTopicName>/cam${camID}/point_cloud_${name}</pointCloudTopicName> <frameName>camera_optical_${name}</frameName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/go1_description/xacro/transmission.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:macro name="leg_transmission" params="name"> <transmission name="${name}_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="${name}_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="${name}_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="${name}_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${name}_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/go1_description/xacro/ultraSound.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:macro name="ultraSound" params="name *origin"> <joint name="ultraSound_joint_${name}" type="fixed"> <xacro:insert_block name="origin"/> <parent link="trunk"/> <child link="ultraSound_${name}"/> </joint> <link name="ultraSound_${name}"> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/ultraSound.dae" scale="1 1 1"/> </geometry> <material name="black"/> </visual> <inertial> <mass value="1e-5" /> <origin xyz="0 0 0" rpy="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" /> </inertial> </link> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/go1_description/xacro/leg.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:include filename="$(find go1_description)/xacro/transmission.xacro"/> <xacro:macro name="leg" params="name mirror mirror_dae front_hind front_hind_dae"> <joint name="${name}_hip_joint" type="revolute"> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="${leg_offset_x} ${-leg_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="${leg_offset_x} ${leg_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == False)}"> <origin rpy="0 0 0" xyz="${-leg_offset_x} ${-leg_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == False)}"> <origin rpy="0 0 0" xyz="${-leg_offset_x} ${leg_offset_y} 0"/> </xacro:if> <parent link="trunk"/> <child link="${name}_hip"/> <axis xyz="1 0 0"/> <dynamics damping="${damping}" friction="${friction}"/> <xacro:if value="${(mirror_dae == True)}"> <limit effort="${hip_torque_max}" velocity="${hip_velocity_max}" lower="${hip_position_min}" upper="${hip_position_max}"/> </xacro:if> <xacro:if value="${(mirror_dae == False)}"> <limit effort="${hip_torque_max}" velocity="${hip_velocity_max}" lower="${-hip_position_max}" upper="${-hip_position_min}"/> </xacro:if> </joint> <joint name="${name}_hip_rotor_joint" type="fixed"> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="${hip_rotor_offset_x} ${-hip_rotor_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="${hip_rotor_offset_x} ${hip_rotor_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == False)}"> <origin rpy="0 0 0" xyz="${-hip_rotor_offset_x} ${-hip_rotor_offset_y} 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == False)}"> <origin rpy="0 0 0" xyz="${-hip_rotor_offset_x} ${hip_rotor_offset_y} 0"/> </xacro:if> <parent link="trunk"/> <child link="${name}_hip_rotor"/> </joint> <link name="${name}_hip"> <visual> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == True)}"> <origin rpy="0 0 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == True)}"> <origin rpy="${PI} 0 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == True) and (front_hind_dae == False)}"> <origin rpy="0 ${PI} 0" xyz="0 0 0"/> </xacro:if> <xacro:if value="${(mirror_dae == False) and (front_hind_dae == False)}"> <origin rpy="${PI} ${PI} 0" xyz="0 0 0"/> </xacro:if> <geometry> <mesh filename="package://go1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 ${hip_offset*mirror} 0"/> <geometry> <cylinder length="${hip_length}" radius="${hip_radius}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${hip_com_x*front_hind} ${hip_com_y*mirror} ${hip_com_z}"/> <mass value="${hip_mass}"/> <inertia ixx="${hip_ixx}" ixy="${hip_ixy*mirror*front_hind}" ixz="${hip_ixz*front_hind}" iyy="${hip_iyy}" iyz="${hip_iyz*mirror}" izz="${hip_izz}"/> </inertial> </link> <link name="${name}_hip_rotor"> <visual> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${hip_rotor_com_x} ${hip_rotor_com_y} ${hip_rotor_com_z}"/> <mass value="${hip_rotor_mass}"/> <inertia ixx="${hip_rotor_ixx}" ixy="${hip_rotor_ixy}" ixz="${hip_rotor_ixz}" iyy="${hip_rotor_iyy}" iyz="${hip_rotor_iyz}" izz="${hip_rotor_izz}"/> </inertial> </link> <joint name="${name}_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 ${thigh_offset*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="${damping}" friction="${friction}"/> <limit effort="${thigh_torque_max}" velocity="${thigh_velocity_max}" lower="${thigh_position_min}" upper="${thigh_position_max}"/> </joint> <joint name="${name}_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="${thigh_rotor_offset_x} ${thigh_rotor_offset_y*mirror} 0"/> <parent link="${name}_hip"/> <child link="${name}_thigh_rotor"/> </joint> <link name="${name}_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <xacro:if value="${mirror_dae == True}"> <mesh filename="package://go1_description/meshes/thigh.dae" scale="1 1 1"/> </xacro:if> <xacro:if value="${mirror_dae == False}"> <mesh filename="package://go1_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </xacro:if> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 ${-thigh_length/2.0}"/> <geometry> <box size="${thigh_length} ${thigh_width} ${thigh_height}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${thigh_com_x} ${thigh_com_y*mirror} ${thigh_com_z}"/> <mass value="${thigh_mass}"/> <inertia ixx="${thigh_ixx}" ixy="${thigh_ixy*mirror}" ixz="${thigh_ixz}" iyy="${thigh_iyy}" iyz="${thigh_iyz*mirror}" izz="${thigh_izz}"/> </inertial> </link> <link name="${name}_thigh_rotor"> <visual> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${thigh_rotor_com_x} ${thigh_rotor_com_y} ${thigh_rotor_com_z}"/> <mass value="${thigh_rotor_mass}"/> <inertia ixx="${thigh_rotor_ixx}" ixy="${thigh_rotor_ixy}" ixz="${thigh_rotor_ixz}" iyy="${thigh_rotor_iyy}" iyz="${thigh_rotor_iyz}" izz="${thigh_rotor_izz}"/> </inertial> </link> <joint name="${name}_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 ${-thigh_length}"/> <parent link="${name}_thigh"/> <child link="${name}_calf"/> <axis xyz="0 1 0"/> <dynamics damping="${damping}" friction="${friction}"/> <limit effort="${calf_torque_max}" velocity="${calf_velocity_max}" lower="${calf_position_min}" upper="${calf_position_max}"/> </joint> <joint name="${name}_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="${calf_rotor_offset_x} ${calf_rotor_offset_y*mirror} 0"/> <parent link="${name}_thigh"/> <child link="${name}_calf_rotor"/> </joint> <link name="${name}_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 ${PI/2.0} 0" xyz="0 0 ${-calf_length/2.0}"/> <geometry> <box size="${calf_length} ${calf_width} ${calf_height}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${calf_com_x} ${calf_com_y} ${calf_com_z}"/> <mass value="${calf_mass}"/> <inertia ixx="${calf_ixx}" ixy="${calf_ixy}" ixz="${calf_ixz}" iyy="${calf_iyy}" iyz="${calf_iyz}" izz="${calf_izz}"/> </inertial> </link> <link name="${name}_calf_rotor"> <visual> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${calf_rotor_com_x} ${calf_rotor_com_y} ${calf_rotor_com_z}"/> <mass value="${calf_rotor_mass}"/> <inertia ixx="${calf_rotor_ixx}" ixy="${calf_rotor_ixy}" ixz="${calf_rotor_ixz}" iyy="${calf_rotor_iyy}" iyz="${calf_rotor_iyz}" izz="${calf_rotor_izz}"/> </inertial> </link> <joint name="${name}_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 ${-(calf_length)}"/> <parent link="${name}_calf"/> <child link="${name}_foot"/> </joint> <link name="${name}_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="${foot_radius-0.01}"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="${foot_radius}"/> </geometry> </collision> <inertial> <mass value="${foot_mass}"/> <inertia ixx="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}" ixy="0.0" ixz="0.0" iyy="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}" iyz="0.0" izz="${(2*foot_mass)/5.0*(foot_radius*foot_radius)}"/> </inertial> </link> <xacro:leg_transmission name="${name}"/> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/go1_description/xacro/const.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> <!-- Constants for robot dimensions --> <xacro:property name="PI" value="3.1415926535897931"/> <xacro:property name="stick_mass" value="0.00001"/> <!-- simplified collision value --> <xacro:property name="trunk_width" value="0.0935"/> <xacro:property name="trunk_length" value="0.3762"/> <xacro:property name="trunk_height" value="0.114"/> <xacro:property name="hip_radius" value="0.046"/> <xacro:property name="hip_length" value="0.04"/> <xacro:property name="thigh_shoulder_radius" value="0.041"/> <xacro:property name="thigh_shoulder_length" value="0.032"/> <xacro:property name="thigh_width" value="0.0245"/> <xacro:property name="thigh_height" value="0.034"/> <xacro:property name="calf_width" value="0.016"/> <xacro:property name="calf_height" value="0.016"/> <xacro:property name="foot_radius" value="0.02"/> <xacro:property name="stick_radius" value="0.01"/> <xacro:property name="stick_length" value="0.2"/> <!-- kinematic value --> <xacro:property name="thigh_offset" value="0.08"/> <xacro:property name="thigh_length" value="0.213"/> <xacro:property name="calf_length" value="0.213"/> <!-- leg offset from trunk center value --> <xacro:property name="leg_offset_x" value="0.1881"/> <xacro:property name="leg_offset_y" value="0.04675"/> <!-- <xacro:property name="trunk_offset_z" value="0.01675"/> --> <xacro:property name="hip_offset" value="0.08"/> <!-- offset of link and rotor locations (left front) --> <xacro:property name="hip_offset_x" value="0.1881"/> <xacro:property name="hip_offset_y" value="0.04675"/> <xacro:property name="hip_offset_z" value="0.0"/> <xacro:property name="hip_rotor_offset_x" value="0.11215"/> <xacro:property name="hip_rotor_offset_y" value="0.04675"/> <xacro:property name="hip_rotor_offset_z" value="0.0"/> <xacro:property name="thigh_offset_x" value="0"/> <xacro:property name="thigh_offset_y" value="0.08"/> <xacro:property name="thigh_offset_z" value="0.0"/> <xacro:property name="thigh_rotor_offset_x" value="0.0"/> <xacro:property name="thigh_rotor_offset_y" value="-0.00015"/> <xacro:property name="thigh_rotor_offset_z" value="0.0"/> <xacro:property name="calf_offset_x" value="0.0"/> <xacro:property name="calf_offset_y" value="0.0"/> <xacro:property name="calf_offset_z" value="-0.213"/> <xacro:property name="calf_rotor_offset_x" value="0.0"/> <xacro:property name="calf_rotor_offset_y" value="-0.03235"/> <xacro:property name="calf_rotor_offset_z" value="0.0"/> <!-- joint limits --> <xacro:property name="damping" value="0.01"/> <xacro:property name="friction" value="0.2"/> <xacro:property name="hip_position_max" value="0.863"/> <xacro:property name="hip_position_min" value="-0.863"/> <xacro:property name="hip_velocity_max" value="30.1"/> <xacro:property name="hip_torque_max" value="23.7"/> <xacro:property name="thigh_position_max" value="4.501"/> <xacro:property name="thigh_position_min" value="-0.686"/> <xacro:property name="thigh_velocity_max" value="30.1"/> <xacro:property name="thigh_torque_max" value="23.7"/> <xacro:property name="calf_position_max" value="-0.888"/> <xacro:property name="calf_position_min" value="-2.818"/> <xacro:property name="calf_velocity_max" value="20.06"/> <xacro:property name="calf_torque_max" value="35.55"/> <!-- dynamics inertial value total 12.84kg --> <!-- trunk --> <xacro:property name="trunk_mass" value="5.204"/> <xacro:property name="trunk_com_x" value="0.0223"/> <xacro:property name="trunk_com_y" value="0.002"/> <xacro:property name="trunk_com_z" value="-0.0005"/> <xacro:property name="trunk_ixx" value="0.0168128557"/> <xacro:property name="trunk_ixy" value="-0.0002296769"/> <xacro:property name="trunk_ixz" value="-0.0002945293"/> <xacro:property name="trunk_iyy" value="0.063009565"/> <xacro:property name="trunk_iyz" value="-0.0000418731"/> <xacro:property name="trunk_izz" value="0.0716547275"/> <!-- hip (left front) --> <xacro:property name="hip_mass" value="0.591"/> <xacro:property name="hip_com_x" value="-0.005657"/> <xacro:property name="hip_com_y" value="-0.008752"/> <xacro:property name="hip_com_z" value="-0.000102"/> <xacro:property name="hip_ixx" value="0.000334008405"/> <xacro:property name="hip_ixy" value="-0.000010826066"/> <xacro:property name="hip_ixz" value="0.000001290732"/> <xacro:property name="hip_iyy" value="0.000619101213"/> <xacro:property name="hip_iyz" value="0.000001643194"/> <xacro:property name="hip_izz" value="0.00040057614"/> <xacro:property name="hip_rotor_mass" value="0.089"/> <xacro:property name="hip_rotor_com_x" value="0.0"/> <xacro:property name="hip_rotor_com_y" value="0.0"/> <xacro:property name="hip_rotor_com_z" value="0.0"/> <xacro:property name="hip_rotor_ixx" value="0.000111842"/> <xacro:property name="hip_rotor_ixy" value="0.0"/> <xacro:property name="hip_rotor_ixz" value="0.0"/> <xacro:property name="hip_rotor_iyy" value="0.000059647"/> <xacro:property name="hip_rotor_iyz" value="0.0"/> <xacro:property name="hip_rotor_izz" value="0.000059647"/> <!-- thigh --> <xacro:property name="thigh_mass" value="0.92"/> <xacro:property name="thigh_com_x" value="-0.003342"/> <xacro:property name="thigh_com_y" value="-0.018054"/> <xacro:property name="thigh_com_z" value="-0.033451"/> <xacro:property name="thigh_ixx" value="0.004431760472"/> <xacro:property name="thigh_ixy" value="0.000057496807"/> <xacro:property name="thigh_ixz" value="-0.000218457134"/> <xacro:property name="thigh_iyy" value="0.004485671726"/> <xacro:property name="thigh_iyz" value="0.000572001265"/> <xacro:property name="thigh_izz" value="0.000740309489"/> <xacro:property name="thigh_rotor_mass" value="0.089"/> <xacro:property name="thigh_rotor_com_x" value="0.0"/> <xacro:property name="thigh_rotor_com_y" value="0.0"/> <xacro:property name="thigh_rotor_com_z" value="0.0"/> <xacro:property name="thigh_rotor_ixx" value="0.000059647"/> <xacro:property name="thigh_rotor_ixy" value="0.0"/> <xacro:property name="thigh_rotor_ixz" value="0.0"/> <xacro:property name="thigh_rotor_iyy" value="0.000111842"/> <xacro:property name="thigh_rotor_iyz" value="0.0"/> <xacro:property name="thigh_rotor_izz" value="0.000059647"/> <!-- calf --> <xacro:property name="calf_mass" value="0.135862"/> <xacro:property name="calf_com_x" value="0.006197"/> <xacro:property name="calf_com_y" value="0.001408"/> <xacro:property name="calf_com_z" value="-0.116695"/> <xacro:property name="calf_ixx" value="0.001088793059"/> <xacro:property name="calf_ixy" value="-0.000000255679"/> <xacro:property name="calf_ixz" value="0.000007117814"/> <xacro:property name="calf_iyy" value="0.001100428748"/> <xacro:property name="calf_iyz" value="0.000002077264"/> <xacro:property name="calf_izz" value="0.000024787446"/> <xacro:property name="calf_rotor_mass" value="0.089"/> <xacro:property name="calf_rotor_com_x" value="0.0"/> <xacro:property name="calf_rotor_com_y" value="0.0"/> <xacro:property name="calf_rotor_com_z" value="0.0"/> <xacro:property name="calf_rotor_ixx" value="0.000059647"/> <xacro:property name="calf_rotor_ixy" value="0.0"/> <xacro:property name="calf_rotor_ixz" value="0.0"/> <xacro:property name="calf_rotor_iyy" value="0.000111842"/> <xacro:property name="calf_rotor_iyz" value="0.0"/> <xacro:property name="calf_rotor_izz" value="0.000059647"/> <!-- foot --> <xacro:property name="foot_mass" value="0.06"/> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/go1_description/xacro/gazebo.xacro
<?xml version="1.0"?> <robot> <!-- ros_control plugin --> <gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <robotNamespace>/go1_gazebo</robotNamespace> <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType> </plugin> </gazebo> <!-- Show the trajectory of trunk center. --> <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>10</frequency> <plot> <link>base</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Yellow</material> </plot> </plugin> </gazebo> <!-- Show the trajectory of foot. You can add another trajectory about another foot. --> <!-- <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>100</frequency> <plot> <link>FL_foot</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Green</material> </plot> </plugin> </gazebo> --> <gazebo> <plugin filename="libgazebo_ros_force.so" name="gazebo_ros_force"> <bodyName>trunk</bodyName> <topicName>/apply_force/trunk</topicName> </plugin> </gazebo> <gazebo reference="imu_link"> <gravity>true</gravity> <sensor name="imu_sensor" type="imu"> <always_on>true</always_on> <update_rate>1000</update_rate> <visualize>true</visualize> <topic>__default_topic__</topic> <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin"> <topicName>trunk_imu</topicName> <bodyName>imu_link</bodyName> <updateRateHZ>1000.0</updateRateHZ> <gaussianNoise>0.0</gaussianNoise> <xyzOffset>0 0 0</xyzOffset> <rpyOffset>0 0 0</rpyOffset> <frameName>imu_link</frameName> </plugin> <pose>0 0 0 0 0 0</pose> </sensor> </gazebo> <!-- Depth camera --> <!-- <gazebo> <plugin name="camera_plugin" filename="libgazebo_ros_openni_kinect.so"> <baseline>0.025</baseline> <always_on>true</always_on> <updateRate>0.0</updateRate> <cameraName>unitree_camera_left</cameraName> <frameName>depthCamera_link_left</frameName> <imageTopicName>rgb/imageRaw_left</imageTopicName> <depthImageTopicName>depth/imageRaw_left</depthImageTopicName> <pointCloudTopicName>depth/points_left</pointCloudTopicName> <cameraInfoTopicName>rgb/cameraInfo_left</cameraInfoTopicName> <depthImageCameraInfoTopicName>depth/cameraInfo_left</depthImageCameraInfoTopicName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0.0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0.004</focalLength> <hackBaseline>0.0</hackBaseline> </plugin> </gazebo> --> <!-- <gazebo reference="depthCamera_link_left"> <sensor name="unitree_camera_left" type="depth_camera"> <update_rate>16</update_rate> <always_on>true</always_on> <visualize>true</visualize> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <depth_camera></depth_camera> <clip> <near>0.1</near> <far>100</far> </clip> </camera> <plugin name="camera_plugin" filename="libgazebo_ros_openni_kinect.so"> <baseline>0.025</baseline> <always_on>true</always_on> <updateRate>0.0</updateRate> <cameraName>unitree_camera_left</cameraName> <frameName>depthCamera_link_left</frameName> <imageTopicName>rgb/imageRaw_left</imageTopicName> <depthImageTopicName>depth/imageRaw_left</depthImageTopicName> <pointCloudTopicName>depth/points_left</pointCloudTopicName> <cameraInfoTopicName>rgb/cameraInfo_left</cameraInfoTopicName> <depthImageCameraInfoTopicName>depth/cameraInfo_left</depthImageCameraInfoTopicName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0.0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0.004</focalLength> <hackBaseline>0.0</hackBaseline> </plugin> </sensor> </gazebo> --> <gazebo reference="depthCamera_link_left"> <sensor name="camera_link_camera" type="depth"> <update_rate>20</update_rate> <camera> <horizontal_fov>1.047198</horizontal_fov> <image> <width>640</width> <height>480</height> <format>R8G8B8</format> </image> <clip> <near>0.05</near> <far>3</far> </clip> </camera> <plugin name="camera_link_controller" filename="libgazebo_ros_openni_kinect.so"> <baseline>0.2</baseline> <alwaysOn>true</alwaysOn> <updateRate>1.0</updateRate> <cameraName>camera_link_ir</cameraName> <imageTopicName>/camera_link/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_link/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_link/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_link/depth/camera_info</depthImageInfoTopicName> <pointCloudTopicName>/camera_link/depth/points</pointCloudTopicName> <frameName>depthCamera_link_left</frameName> <pointCloudCutoff>0.5</pointCloudCutoff> <pointCloudCutoffMax>3.0</pointCloudCutoffMax> <distortionK1>0.00000001</distortionK1> <distortionK2>0.00000001</distortionK2> <distortionK3>0.00000001</distortionK3> <distortionT1>0.00000001</distortionT1> <distortionT2>0.00000001</distortionT2> <CxPrime>0</CxPrime> <Cx>0</Cx> <Cy>0</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> <!-- Foot contacts. --> <gazebo reference="FR_calf"> <sensor name="FR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>FR_calf_fixed_joint_lump__FR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="FL_calf"> <sensor name="FL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>FL_calf_fixed_joint_lump__FL_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RR_calf"> <sensor name="RR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>RR_calf_fixed_joint_lump__RR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RL_calf"> <sensor name="RL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin name="contactPlugin" filename="libunitreeFootContactPlugin.so"/> <contact> <collision>RL_calf_fixed_joint_lump__RL_foot_collision_1</collision> </contact> </sensor> </gazebo> <!-- Visualization of Foot contacts. --> <gazebo reference="FR_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>FR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="FL_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>FL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RR_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>RR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RL_foot"> <visual> <plugin name="drawForcePlugin" filename="libunitreeDrawForcePlugin.so"> <topicName>RL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="base"> <material>Gazebo/Green</material> <turnGravityOff>false</turnGravityOff> </gazebo> <gazebo reference="trunk"> <mu1>0.2</mu1> <mu2>0.2</mu2> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="stick_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/White</material> </gazebo> <gazebo reference="imu_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/Red</material> </gazebo> <!-- FL leg --> <gazebo reference="FL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- FR leg --> <gazebo reference="FR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RL leg --> <gazebo reference="RL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RR leg --> <gazebo reference="RR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/go1_description/xacro/robot.xacro
<?xml version="1.0"?> <robot name="go1" xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:arg name="DEBUG" default="false"/> <xacro:include filename="$(find go1_description)/xacro/const.xacro"/> <xacro:include filename="$(find go1_description)/xacro/materials.xacro"/> <xacro:include filename="$(find go1_description)/xacro/leg.xacro"/> <!-- <xacro:include filename="$(find go1_description)/xacro/stairs.xacro"/> --> <xacro:include filename="$(find go1_description)/xacro/gazebo.xacro"/> <xacro:include filename="$(find go1_description)/xacro/depthCamera.xacro"/> <xacro:include filename="$(find go1_description)/xacro/ultraSound.xacro"/> <!-- <xacro:include filename="$(find go1_gazebo)/launch/stairs.urdf.xacro"/> --> <!-- <xacro:stairs stairs="15" xpos="0" ypos="0" zpos="0" /> --> <!-- Rotor related joint and link is only for demonstrate location. --> <!-- Actually, the rotor will rotate and the joint is not fixed. Reduction ratio should be considered. --> <!-- Debug mode will hung up the robot, use "true" or "false" to switch it. --> <xacro:if value="$(arg DEBUG)"> <link name="world"/> <joint name="base_static_joint" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="base"/> </joint> </xacro:if> <link name="base"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> </visual> </link> <joint name="floating_base" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="base"/> <child link="trunk"/> </joint> <link name="trunk"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="${trunk_length} ${trunk_width} ${trunk_height}"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="${trunk_com_x} ${trunk_com_y} ${trunk_com_z}"/> <mass value="${trunk_mass}"/> <inertia ixx="${trunk_ixx}" ixy="${trunk_ixy}" ixz="${trunk_ixz}" iyy="${trunk_iyy}" iyz="${trunk_iyz}" izz="${trunk_izz}"/> </inertial> </link> <joint name="imu_joint" type="fixed"> <parent link="trunk"/> <child link="imu_link"/> <origin rpy="0 0 0" xyz="-0.01592 -0.06659 -0.00617"/> </joint> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> <!-- <material name="red"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> </link> <xacro:leg name="FR" mirror="-1" mirror_dae= "False" front_hind="1" front_hind_dae="True" /> <xacro:leg name="FL" mirror="1" mirror_dae="True" front_hind="1" front_hind_dae="True" /> <xacro:leg name="RR" mirror="-1" mirror_dae="False" front_hind="-1" front_hind_dae="False" /> <xacro:leg name="RL" mirror="1" mirror_dae="True" front_hind="-1" front_hind_dae="False" /> <xacro:depthCamera camID="1" name="face"> <origin rpy="${PI} 0 0" xyz="0.2785 0.0125 0.0167"/> </xacro:depthCamera> <xacro:depthCamera camID="2" name="chin"> <origin rpy="${PI} ${PI/2} 0" xyz="0.2522 0.0125 -0.0436"/> </xacro:depthCamera> <xacro:depthCamera camID="3" name="left"> <origin rpy="${PI} 0.2618 ${PI/2}" xyz="-0.066 0.082 -0.0176"/> </xacro:depthCamera> <xacro:depthCamera camID="4" name="right"> <origin rpy="${PI} 0.2618 ${-PI/2}" xyz="-0.041 -0.082 -0.0176"/> </xacro:depthCamera> <xacro:depthCamera camID="5" name="rearDown"> <origin rpy="${PI} ${PI/2} 0" xyz="-0.0825 0.0125 -0.04365"/> </xacro:depthCamera> <joint name="camera_laserscan_joint_left" type="fixed"> <origin rpy="0 0.2618 0" xyz="0 0 0"/> <parent link="camera_left"/> <child link="camera_laserscan_link_left"/> </joint> <link name="camera_laserscan_link_left"> </link> <joint name="camera_laserscan_joint_right" type="fixed"> <origin rpy="0 0.2618 0" xyz="0 0 0"/> <parent link="camera_right"/> <child link="camera_laserscan_link_right"/> </joint> <link name="camera_laserscan_link_right"> </link> <xacro:ultraSound name="left"> <origin rpy="0 0.2618 ${PI/2}" xyz="-0.0535 0.0826 0.00868"/> </xacro:ultraSound> <xacro:ultraSound name="right"> <origin rpy="0 0.2618 ${-PI/2}" xyz="-0.0535 -0.0826 0.00868"/> </xacro:ultraSound> <xacro:ultraSound name="face"> <origin rpy="0 0 0" xyz="0.2747 0.0 -0.0088"/> </xacro:ultraSound> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/go1_description/config/robot_control.yaml
go1_gazebo: # Publish all joint states ----------------------------------- joint_state_controller: type: joint_state_controller/JointStateController publish_rate: 1000 # FL Controllers --------------------------------------- FL_hip_controller: type: unitree_legged_control/UnitreeJointController joint: FL_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} FL_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: FL_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} FL_calf_controller: type: unitree_legged_control/UnitreeJointController joint: FL_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # FR Controllers --------------------------------------- FR_hip_controller: type: unitree_legged_control/UnitreeJointController joint: FR_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} FR_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: FR_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} FR_calf_controller: type: unitree_legged_control/UnitreeJointController joint: FR_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # RL Controllers --------------------------------------- RL_hip_controller: type: unitree_legged_control/UnitreeJointController joint: RL_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} RL_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: RL_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} RL_calf_controller: type: unitree_legged_control/UnitreeJointController joint: RL_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0} # RR Controllers --------------------------------------- RR_hip_controller: type: unitree_legged_control/UnitreeJointController joint: RR_hip_joint pid: {p: 100.0, i: 0.0, d: 5.0} RR_thigh_controller: type: unitree_legged_control/UnitreeJointController joint: RR_thigh_joint pid: {p: 300.0, i: 0.0, d: 8.0} RR_calf_controller: type: unitree_legged_control/UnitreeJointController joint: RR_calf_joint pid: {p: 300.0, i: 0.0, d: 8.0}
renanmb/Omniverse_legged_robotics/URDF-Descriptions/unitreerobotics/go1_description/urdf/go1.urdf
<?xml version="1.0" ?> <!-- =================================================================================== --> <!-- | This document was autogenerated by xacro from robot.xacro | --> <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | --> <!-- =================================================================================== --> <robot name="go1"> <material name="black"> <color rgba="0.0 0.0 0.0 1.0"/> </material> <material name="blue"> <color rgba="0.0 0.0 0.8 1.0"/> </material> <material name="green"> <color rgba="0.0 0.8 0.0 1.0"/> </material> <material name="grey"> <color rgba="0.2 0.2 0.2 1.0"/> </material> <material name="silver"> <color rgba="0.9137254901960784 0.9137254901960784 0.8470588235294118 1.0"/> </material> <material name="orange"> <color rgba="1.0 0.4235294117647059 0.0392156862745098 1.0"/> </material> <material name="brown"> <color rgba="0.8705882352941177 0.8117647058823529 0.7647058823529411 1.0"/> </material> <material name="red"> <color rgba="0.8 0.0 0.0 1.0"/> </material> <material name="white"> <color rgba="1.0 1.0 1.0 1.0"/> </material> <!-- ros_control plugin --> <gazebo> <plugin filename="libgazebo_ros_control.so" name="gazebo_ros_control"> <robotNamespace>/go1_gazebo</robotNamespace> <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType> </plugin> </gazebo> <!-- Show the trajectory of trunk center. --> <gazebo> <plugin filename="libLinkPlot3DPlugin.so" name="3dplot"> <frequency>10</frequency> <plot> <link>base</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Yellow</material> </plot> </plugin> </gazebo> <!-- Show the trajectory of foot. You can add another trajectory about another foot. --> <!-- <gazebo> <plugin name="3dplot" filename="libLinkPlot3DPlugin.so"> <frequency>100</frequency> <plot> <link>FL_foot</link> <pose>0 0 0 0 0 0</pose> <material>Gazebo/Green</material> </plot> </plugin> </gazebo> --> <gazebo> <plugin filename="libgazebo_ros_force.so" name="gazebo_ros_force"> <bodyName>trunk</bodyName> <topicName>/apply_force/trunk</topicName> </plugin> </gazebo> <gazebo reference="imu_link"> <gravity>true</gravity> <sensor name="imu_sensor" type="imu"> <always_on>true</always_on> <update_rate>1000</update_rate> <visualize>true</visualize> <topic>__default_topic__</topic> <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin"> <topicName>trunk_imu</topicName> <bodyName>imu_link</bodyName> <updateRateHZ>1000.0</updateRateHZ> <gaussianNoise>0.0</gaussianNoise> <xyzOffset>0 0 0</xyzOffset> <rpyOffset>0 0 0</rpyOffset> <frameName>imu_link</frameName> </plugin> <pose>0 0 0 0 0 0</pose> </sensor> </gazebo> <!-- Depth camera --> <!-- <gazebo> <plugin name="camera_plugin" filename="libgazebo_ros_openni_kinect.so"> <baseline>0.025</baseline> <always_on>true</always_on> <updateRate>0.0</updateRate> <cameraName>unitree_camera_left</cameraName> <frameName>depthCamera_link_left</frameName> <imageTopicName>rgb/imageRaw_left</imageTopicName> <depthImageTopicName>depth/imageRaw_left</depthImageTopicName> <pointCloudTopicName>depth/points_left</pointCloudTopicName> <cameraInfoTopicName>rgb/cameraInfo_left</cameraInfoTopicName> <depthImageCameraInfoTopicName>depth/cameraInfo_left</depthImageCameraInfoTopicName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0.0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0.004</focalLength> <hackBaseline>0.0</hackBaseline> </plugin> </gazebo> --> <!-- <gazebo reference="depthCamera_link_left"> <sensor name="unitree_camera_left" type="depth_camera"> <update_rate>16</update_rate> <always_on>true</always_on> <visualize>true</visualize> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <depth_camera></depth_camera> <clip> <near>0.1</near> <far>100</far> </clip> </camera> <plugin name="camera_plugin" filename="libgazebo_ros_openni_kinect.so"> <baseline>0.025</baseline> <always_on>true</always_on> <updateRate>0.0</updateRate> <cameraName>unitree_camera_left</cameraName> <frameName>depthCamera_link_left</frameName> <imageTopicName>rgb/imageRaw_left</imageTopicName> <depthImageTopicName>depth/imageRaw_left</depthImageTopicName> <pointCloudTopicName>depth/points_left</pointCloudTopicName> <cameraInfoTopicName>rgb/cameraInfo_left</cameraInfoTopicName> <depthImageCameraInfoTopicName>depth/cameraInfo_left</depthImageCameraInfoTopicName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0.0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0.004</focalLength> <hackBaseline>0.0</hackBaseline> </plugin> </sensor> </gazebo> --> <gazebo reference="depthCamera_link_left"> <sensor name="camera_link_camera" type="depth"> <update_rate>20</update_rate> <camera> <horizontal_fov>1.047198</horizontal_fov> <image> <width>640</width> <height>480</height> <format>R8G8B8</format> </image> <clip> <near>0.05</near> <far>3</far> </clip> </camera> <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_link_controller"> <baseline>0.2</baseline> <alwaysOn>true</alwaysOn> <updateRate>1.0</updateRate> <cameraName>camera_link_ir</cameraName> <imageTopicName>/camera_link/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_link/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_link/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_link/depth/camera_info</depthImageInfoTopicName> <pointCloudTopicName>/camera_link/depth/points</pointCloudTopicName> <frameName>depthCamera_link_left</frameName> <pointCloudCutoff>0.5</pointCloudCutoff> <pointCloudCutoffMax>3.0</pointCloudCutoffMax> <distortionK1>0.00000001</distortionK1> <distortionK2>0.00000001</distortionK2> <distortionK3>0.00000001</distortionK3> <distortionT1>0.00000001</distortionT1> <distortionT2>0.00000001</distortionT2> <CxPrime>0</CxPrime> <Cx>0</Cx> <Cy>0</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> <!-- Foot contacts. --> <gazebo reference="FR_calf"> <sensor name="FR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>FR_calf_fixed_joint_lump__FR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="FL_calf"> <sensor name="FL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>FL_calf_fixed_joint_lump__FL_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RR_calf"> <sensor name="RR_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>RR_calf_fixed_joint_lump__RR_foot_collision_1</collision> </contact> </sensor> </gazebo> <gazebo reference="RL_calf"> <sensor name="RL_foot_contact" type="contact"> <update_rate>100</update_rate> <plugin filename="libunitreeFootContactPlugin.so" name="contactPlugin"/> <contact> <collision>RL_calf_fixed_joint_lump__RL_foot_collision_1</collision> </contact> </sensor> </gazebo> <!-- Visualization of Foot contacts. --> <gazebo reference="FR_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>FR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="FL_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>FL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RR_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>RR_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="RL_foot"> <visual> <plugin filename="libunitreeDrawForcePlugin.so" name="drawForcePlugin"> <topicName>RL_foot_contact</topicName> </plugin> </visual> </gazebo> <gazebo reference="base"> <material>Gazebo/Green</material> <turnGravityOff>false</turnGravityOff> </gazebo> <gazebo reference="trunk"> <mu1>0.2</mu1> <mu2>0.2</mu2> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="stick_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/White</material> </gazebo> <gazebo reference="imu_link"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/Red</material> </gazebo> <!-- FL leg --> <gazebo reference="FL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- FR leg --> <gazebo reference="FR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="FR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="FR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="FR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RL leg --> <gazebo reference="RL_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RL_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RL_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RL_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- RR leg --> <gazebo reference="RR_hip"> <mu1>0.2</mu1> <mu2>0.2</mu2> <material>Gazebo/DarkGrey</material> </gazebo> <gazebo reference="RR_thigh"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <gazebo reference="RR_calf"> <mu1>0.2</mu1> <mu2>0.2</mu2> <self_collide>1</self_collide> </gazebo> <gazebo reference="RR_foot"> <mu1>0.6</mu1> <mu2>0.6</mu2> <self_collide>1</self_collide> <material>Gazebo/DarkGrey</material> <kp value="1000000.0"/> <kd value="1.0"/> </gazebo> <!-- <xacro:include filename="$(find go1_gazebo)/launch/stairs.urdf.xacro"/> --> <!-- <xacro:stairs stairs="15" xpos="0" ypos="0" zpos="0" /> --> <!-- Rotor related joint and link is only for demonstrate location. --> <!-- Actually, the rotor will rotate and the joint is not fixed. Reduction ratio should be considered. --> <!-- Debug mode will hung up the robot, use "true" or "false" to switch it. --> <!-- <xacro:if value="$(arg DEBUG)"> <link name="world"/> <joint name="base_static_joint" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="world"/> <child link="base"/> </joint> </xacro:if> --> <link name="base"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> </visual> </link> <joint name="floating_base" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="base"/> <child link="trunk"/> </joint> <link name="trunk"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/trunk.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.3762 0.0935 0.114"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0223 0.002 -0.0005"/> <mass value="5.204"/> <inertia ixx="0.0168128557" ixy="-0.0002296769" ixz="-0.0002945293" iyy="0.063009565" iyz="-4.18731e-05" izz="0.0716547275"/> </inertial> </link> <joint name="imu_joint" type="fixed"> <parent link="trunk"/> <child link="imu_link"/> <origin rpy="0 0 0" xyz="-0.01592 -0.06659 -0.00617"/> </joint> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size="0.001 0.001 0.001"/> </geometry> <!-- <material name="red"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> </link> <joint name="FR_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="0.1881 -0.04675 0"/> <parent link="trunk"/> <child link="FR_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-0.863" upper="0.863" velocity="30.1"/> </joint> <joint name="FR_hip_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.11215 -0.04675 0"/> <parent link="trunk"/> <child link="FR_hip_rotor"/> </joint> <link name="FR_hip"> <visual> <origin rpy="3.141592653589793 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 -0.08 0"/> <geometry> <cylinder length="0.04" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.005657 0.008752 -0.000102"/> <mass value="0.591"/> <inertia ixx="0.000334008405" ixy="1.0826066e-05" ixz="1.290732e-06" iyy="0.000619101213" iyz="-1.643194e-06" izz="0.00040057614"/> </inertial> </link> <link name="FR_hip_rotor"> <visual> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.089"/> <inertia ixx="0.000111842" ixy="0.0" ixz="0.0" iyy="5.9647e-05" iyz="0.0" izz="5.9647e-05"/> </inertial> </link> <joint name="FR_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 -0.08 0"/> <parent link="FR_hip"/> <child link="FR_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-0.686" upper="4.501" velocity="30.1"/> </joint> <joint name="FR_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.00015 0"/> <parent link="FR_hip"/> <child link="FR_thigh_rotor"/> </joint> <link name="FR_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.0245 0.034"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.003342 0.018054 -0.033451"/> <mass value="0.92"/> <inertia ixx="0.004431760472" ixy="-5.7496807e-05" ixz="-0.000218457134" iyy="0.004485671726" iyz="-0.000572001265" izz="0.000740309489"/> </inertial> </link> <link name="FR_thigh_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.089"/> <inertia ixx="5.9647e-05" ixy="0.0" ixz="0.0" iyy="0.000111842" iyz="0.0" izz="5.9647e-05"/> </inertial> </link> <joint name="FR_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="FR_thigh"/> <child link="FR_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="35.55" lower="-2.818" upper="-0.888" velocity="20.06"/> </joint> <joint name="FR_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.03235 0"/> <parent link="FR_thigh"/> <child link="FR_calf_rotor"/> </joint> <link name="FR_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.016 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.006197 0.001408 -0.116695"/> <mass value="0.135862"/> <inertia ixx="0.001088793059" ixy="-2.55679e-07" ixz="7.117814e-06" iyy="0.001100428748" iyz="2.077264e-06" izz="2.4787446e-05"/> </inertial> </link> <link name="FR_calf_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.089"/> <inertia ixx="5.9647e-05" ixy="0.0" ixz="0.0" iyy="0.000111842" iyz="0.0" izz="5.9647e-05"/> </inertial> </link> <joint name="FR_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="FR_calf"/> <child link="FR_foot"/> </joint> <link name="FR_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.01"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.02"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="9.600000000000001e-06" ixy="0.0" ixz="0.0" iyy="9.600000000000001e-06" iyz="0.0" izz="9.600000000000001e-06"/> </inertial> </link> <transmission name="FR_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FR_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FR_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FR_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FR_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="FL_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="0.1881 0.04675 0"/> <parent link="trunk"/> <child link="FL_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-0.863" upper="0.863" velocity="30.1"/> </joint> <joint name="FL_hip_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.11215 0.04675 0"/> <parent link="trunk"/> <child link="FL_hip_rotor"/> </joint> <link name="FL_hip"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0.08 0"/> <geometry> <cylinder length="0.04" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.005657 -0.008752 -0.000102"/> <mass value="0.591"/> <inertia ixx="0.000334008405" ixy="-1.0826066e-05" ixz="1.290732e-06" iyy="0.000619101213" iyz="1.643194e-06" izz="0.00040057614"/> </inertial> </link> <link name="FL_hip_rotor"> <visual> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.089"/> <inertia ixx="0.000111842" ixy="0.0" ixz="0.0" iyy="5.9647e-05" iyz="0.0" izz="5.9647e-05"/> </inertial> </link> <joint name="FL_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0.08 0"/> <parent link="FL_hip"/> <child link="FL_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-0.686" upper="4.501" velocity="30.1"/> </joint> <joint name="FL_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 -0.00015 0"/> <parent link="FL_hip"/> <child link="FL_thigh_rotor"/> </joint> <link name="FL_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/thigh.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.0245 0.034"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.003342 -0.018054 -0.033451"/> <mass value="0.92"/> <inertia ixx="0.004431760472" ixy="5.7496807e-05" ixz="-0.000218457134" iyy="0.004485671726" iyz="0.000572001265" izz="0.000740309489"/> </inertial> </link> <link name="FL_thigh_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.089"/> <inertia ixx="5.9647e-05" ixy="0.0" ixz="0.0" iyy="0.000111842" iyz="0.0" izz="5.9647e-05"/> </inertial> </link> <joint name="FL_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="FL_thigh"/> <child link="FL_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="35.55" lower="-2.818" upper="-0.888" velocity="20.06"/> </joint> <joint name="FL_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 -0.03235 0"/> <parent link="FL_thigh"/> <child link="FL_calf_rotor"/> </joint> <link name="FL_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.016 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.006197 0.001408 -0.116695"/> <mass value="0.135862"/> <inertia ixx="0.001088793059" ixy="-2.55679e-07" ixz="7.117814e-06" iyy="0.001100428748" iyz="2.077264e-06" izz="2.4787446e-05"/> </inertial> </link> <link name="FL_calf_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.089"/> <inertia ixx="5.9647e-05" ixy="0.0" ixz="0.0" iyy="0.000111842" iyz="0.0" izz="5.9647e-05"/> </inertial> </link> <joint name="FL_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="FL_calf"/> <child link="FL_foot"/> </joint> <link name="FL_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.01"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.02"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="9.600000000000001e-06" ixy="0.0" ixz="0.0" iyy="9.600000000000001e-06" iyz="0.0" izz="9.600000000000001e-06"/> </inertial> </link> <transmission name="FL_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FL_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="FL_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="FL_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="FL_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="RR_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="-0.1881 -0.04675 0"/> <parent link="trunk"/> <child link="RR_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-0.863" upper="0.863" velocity="30.1"/> </joint> <joint name="RR_hip_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="-0.11215 -0.04675 0"/> <parent link="trunk"/> <child link="RR_hip_rotor"/> </joint> <link name="RR_hip"> <visual> <origin rpy="3.141592653589793 3.141592653589793 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 -0.08 0"/> <geometry> <cylinder length="0.04" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.005657 0.008752 -0.000102"/> <mass value="0.591"/> <inertia ixx="0.000334008405" ixy="-1.0826066e-05" ixz="-1.290732e-06" iyy="0.000619101213" iyz="-1.643194e-06" izz="0.00040057614"/> </inertial> </link> <link name="RR_hip_rotor"> <visual> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.089"/> <inertia ixx="0.000111842" ixy="0.0" ixz="0.0" iyy="5.9647e-05" iyz="0.0" izz="5.9647e-05"/> </inertial> </link> <joint name="RR_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 -0.08 0"/> <parent link="RR_hip"/> <child link="RR_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-0.686" upper="4.501" velocity="30.1"/> </joint> <joint name="RR_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.00015 0"/> <parent link="RR_hip"/> <child link="RR_thigh_rotor"/> </joint> <link name="RR_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/thigh_mirror.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.0245 0.034"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.003342 0.018054 -0.033451"/> <mass value="0.92"/> <inertia ixx="0.004431760472" ixy="-5.7496807e-05" ixz="-0.000218457134" iyy="0.004485671726" iyz="-0.000572001265" izz="0.000740309489"/> </inertial> </link> <link name="RR_thigh_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.089"/> <inertia ixx="5.9647e-05" ixy="0.0" ixz="0.0" iyy="0.000111842" iyz="0.0" izz="5.9647e-05"/> </inertial> </link> <joint name="RR_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="RR_thigh"/> <child link="RR_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="35.55" lower="-2.818" upper="-0.888" velocity="20.06"/> </joint> <joint name="RR_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.03235 0"/> <parent link="RR_thigh"/> <child link="RR_calf_rotor"/> </joint> <link name="RR_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.016 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.006197 0.001408 -0.116695"/> <mass value="0.135862"/> <inertia ixx="0.001088793059" ixy="-2.55679e-07" ixz="7.117814e-06" iyy="0.001100428748" iyz="2.077264e-06" izz="2.4787446e-05"/> </inertial> </link> <link name="RR_calf_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.089"/> <inertia ixx="5.9647e-05" ixy="0.0" ixz="0.0" iyy="0.000111842" iyz="0.0" izz="5.9647e-05"/> </inertial> </link> <joint name="RR_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="RR_calf"/> <child link="RR_foot"/> </joint> <link name="RR_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.01"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.02"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="9.600000000000001e-06" ixy="0.0" ixz="0.0" iyy="9.600000000000001e-06" iyz="0.0" izz="9.600000000000001e-06"/> </inertial> </link> <transmission name="RR_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RR_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RR_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RR_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RR_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="RL_hip_joint" type="revolute"> <origin rpy="0 0 0" xyz="-0.1881 0.04675 0"/> <parent link="trunk"/> <child link="RL_hip"/> <axis xyz="1 0 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-0.863" upper="0.863" velocity="30.1"/> </joint> <joint name="RL_hip_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="-0.11215 0.04675 0"/> <parent link="trunk"/> <child link="RL_hip_rotor"/> </joint> <link name="RL_hip"> <visual> <origin rpy="0 3.141592653589793 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/hip.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0.08 0"/> <geometry> <cylinder length="0.04" radius="0.046"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.005657 -0.008752 -0.000102"/> <mass value="0.591"/> <inertia ixx="0.000334008405" ixy="1.0826066e-05" ixz="-1.290732e-06" iyy="0.000619101213" iyz="1.643194e-06" izz="0.00040057614"/> </inertial> </link> <link name="RL_hip_rotor"> <visual> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.089"/> <inertia ixx="0.000111842" ixy="0.0" ixz="0.0" iyy="5.9647e-05" iyz="0.0" izz="5.9647e-05"/> </inertial> </link> <joint name="RL_thigh_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0.08 0"/> <parent link="RL_hip"/> <child link="RL_thigh"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="23.7" lower="-0.686" upper="4.501" velocity="30.1"/> </joint> <joint name="RL_thigh_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 -0.00015 0"/> <parent link="RL_hip"/> <child link="RL_thigh_rotor"/> </joint> <link name="RL_thigh"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/thigh.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.0245 0.034"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="-0.003342 -0.018054 -0.033451"/> <mass value="0.92"/> <inertia ixx="0.004431760472" ixy="5.7496807e-05" ixz="-0.000218457134" iyy="0.004485671726" iyz="0.000572001265" izz="0.000740309489"/> </inertial> </link> <link name="RL_thigh_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.089"/> <inertia ixx="5.9647e-05" ixy="0.0" ixz="0.0" iyy="0.000111842" iyz="0.0" izz="5.9647e-05"/> </inertial> </link> <joint name="RL_calf_joint" type="revolute"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="RL_thigh"/> <child link="RL_calf"/> <axis xyz="0 1 0"/> <dynamics damping="0.01" friction="0.2"/> <limit effort="35.55" lower="-2.818" upper="-0.888" velocity="20.06"/> </joint> <joint name="RL_calf_rotor_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 -0.03235 0"/> <parent link="RL_thigh"/> <child link="RL_calf_rotor"/> </joint> <link name="RL_calf"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/calf.dae" scale="1 1 1"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 1.5707963267948966 0" xyz="0 0 -0.1065"/> <geometry> <box size="0.213 0.016 0.016"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.006197 0.001408 -0.116695"/> <mass value="0.135862"/> <inertia ixx="0.001088793059" ixy="-2.55679e-07" ixz="7.117814e-06" iyy="0.001100428748" iyz="2.077264e-06" izz="2.4787446e-05"/> </inertial> </link> <link name="RL_calf_rotor"> <visual> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> <material name="green"/> </visual> <collision> <origin rpy="1.5707963267948966 0 0" xyz="0 0 0"/> <geometry> <cylinder length="0.02" radius="0.035"/> </geometry> </collision> <inertial> <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/> <mass value="0.089"/> <inertia ixx="5.9647e-05" ixy="0.0" ixz="0.0" iyy="0.000111842" iyz="0.0" izz="5.9647e-05"/> </inertial> </link> <joint name="RL_foot_fixed" type="fixed"> <origin rpy="0 0 0" xyz="0 0 -0.213"/> <parent link="RL_calf"/> <child link="RL_foot"/> </joint> <link name="RL_foot"> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.01"/> </geometry> <!-- <material name="orange"/> --> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <sphere radius="0.02"/> </geometry> </collision> <inertial> <mass value="0.06"/> <inertia ixx="9.600000000000001e-06" ixy="0.0" ixz="0.0" iyy="9.600000000000001e-06" iyz="0.0" izz="9.600000000000001e-06"/> </inertial> </link> <transmission name="RL_hip_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_hip_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RL_thigh_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_thigh_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_thigh_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="RL_calf_tran"> <type>transmission_interface/SimpleTransmission</type> <joint name="RL_calf_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="RL_calf_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <joint name="camera_joint_face" type="fixed"> <origin rpy="3.141592653589793 0 0" xyz="0.2785 0.0125 0.0167"/> <parent link="trunk"/> <child link="camera_face"/> </joint> <link name="camera_face"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/depthCamera.dae" scale="1 1 1"/> </geometry> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="camera_optical_joint_face" type="fixed"> <origin rpy="-1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0"/> <parent link="camera_face"/> <child link="camera_optical_face"/> </joint> <link name="camera_optical_face"> </link> <gazebo reference="camera_face"> <!-- <material>Gazebo/Black</material> --> <sensor name="camera_face_camera" type="depth"> <update_rate>16</update_rate> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <clip> <near>0.1</near> <far>5</far> </clip> </camera> <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_face_controller"> <baseline>0.025</baseline> <alwaysOn>true</alwaysOn> <updateRate>0.0</updateRate> <cameraName>camera_face_ir</cameraName> <imageTopicName>/camera_face/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_face/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_face/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_face/depth/camera_info</depthImageInfoTopicName> <!-- <pointCloudTopicName>/camera_${name}/depth/points</pointCloudTopicName> --> <pointCloudTopicName>/cam1/point_cloud_face</pointCloudTopicName> <frameName>camera_optical_face</frameName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> <joint name="camera_joint_chin" type="fixed"> <origin rpy="3.141592653589793 1.5707963267948966 0" xyz="0.2522 0.0125 -0.0436"/> <parent link="trunk"/> <child link="camera_chin"/> </joint> <link name="camera_chin"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/depthCamera.dae" scale="1 1 1"/> </geometry> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="camera_optical_joint_chin" type="fixed"> <origin rpy="-1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0"/> <parent link="camera_chin"/> <child link="camera_optical_chin"/> </joint> <link name="camera_optical_chin"> </link> <gazebo reference="camera_chin"> <!-- <material>Gazebo/Black</material> --> <sensor name="camera_chin_camera" type="depth"> <update_rate>16</update_rate> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <clip> <near>0.1</near> <far>5</far> </clip> </camera> <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_chin_controller"> <baseline>0.025</baseline> <alwaysOn>true</alwaysOn> <updateRate>0.0</updateRate> <cameraName>camera_chin_ir</cameraName> <imageTopicName>/camera_chin/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_chin/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_chin/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_chin/depth/camera_info</depthImageInfoTopicName> <!-- <pointCloudTopicName>/camera_${name}/depth/points</pointCloudTopicName> --> <pointCloudTopicName>/cam2/point_cloud_chin</pointCloudTopicName> <frameName>camera_optical_chin</frameName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> <joint name="camera_joint_left" type="fixed"> <origin rpy="3.141592653589793 0.2618 1.5707963267948966" xyz="-0.066 0.082 -0.0176"/> <parent link="trunk"/> <child link="camera_left"/> </joint> <link name="camera_left"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/depthCamera.dae" scale="1 1 1"/> </geometry> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="camera_optical_joint_left" type="fixed"> <origin rpy="-1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0"/> <parent link="camera_left"/> <child link="camera_optical_left"/> </joint> <link name="camera_optical_left"> </link> <gazebo reference="camera_left"> <!-- <material>Gazebo/Black</material> --> <sensor name="camera_left_camera" type="depth"> <update_rate>16</update_rate> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <clip> <near>0.1</near> <far>5</far> </clip> </camera> <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_left_controller"> <baseline>0.025</baseline> <alwaysOn>true</alwaysOn> <updateRate>0.0</updateRate> <cameraName>camera_left_ir</cameraName> <imageTopicName>/camera_left/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_left/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_left/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_left/depth/camera_info</depthImageInfoTopicName> <!-- <pointCloudTopicName>/camera_${name}/depth/points</pointCloudTopicName> --> <pointCloudTopicName>/cam3/point_cloud_left</pointCloudTopicName> <frameName>camera_optical_left</frameName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> <joint name="camera_joint_right" type="fixed"> <origin rpy="3.141592653589793 0.2618 -1.5707963267948966" xyz="-0.041 -0.082 -0.0176"/> <parent link="trunk"/> <child link="camera_right"/> </joint> <link name="camera_right"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/depthCamera.dae" scale="1 1 1"/> </geometry> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="camera_optical_joint_right" type="fixed"> <origin rpy="-1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0"/> <parent link="camera_right"/> <child link="camera_optical_right"/> </joint> <link name="camera_optical_right"> </link> <gazebo reference="camera_right"> <!-- <material>Gazebo/Black</material> --> <sensor name="camera_right_camera" type="depth"> <update_rate>16</update_rate> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <clip> <near>0.1</near> <far>5</far> </clip> </camera> <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_right_controller"> <baseline>0.025</baseline> <alwaysOn>true</alwaysOn> <updateRate>0.0</updateRate> <cameraName>camera_right_ir</cameraName> <imageTopicName>/camera_right/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_right/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_right/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_right/depth/camera_info</depthImageInfoTopicName> <!-- <pointCloudTopicName>/camera_${name}/depth/points</pointCloudTopicName> --> <pointCloudTopicName>/cam4/point_cloud_right</pointCloudTopicName> <frameName>camera_optical_right</frameName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> <joint name="camera_joint_rearDown" type="fixed"> <origin rpy="3.141592653589793 1.5707963267948966 0" xyz="-0.0825 0.0125 -0.04365"/> <parent link="trunk"/> <child link="camera_rearDown"/> </joint> <link name="camera_rearDown"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/depthCamera.dae" scale="1 1 1"/> </geometry> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="camera_optical_joint_rearDown" type="fixed"> <origin rpy="-1.5707963267948966 0 -1.5707963267948966" xyz="0 0 0"/> <parent link="camera_rearDown"/> <child link="camera_optical_rearDown"/> </joint> <link name="camera_optical_rearDown"> </link> <gazebo reference="camera_rearDown"> <!-- <material>Gazebo/Black</material> --> <sensor name="camera_rearDown_camera" type="depth"> <update_rate>16</update_rate> <camera> <horizontal_fov>2.094</horizontal_fov> <image> <width>928</width> <height>800</height> <format>R8G8B8</format> </image> <clip> <near>0.1</near> <far>5</far> </clip> </camera> <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_rearDown_controller"> <baseline>0.025</baseline> <alwaysOn>true</alwaysOn> <updateRate>0.0</updateRate> <cameraName>camera_rearDown_ir</cameraName> <imageTopicName>/camera_rearDown/color/image_raw</imageTopicName> <cameraInfoTopicName>/camera_rearDown/color/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_rearDown/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_rearDown/depth/camera_info</depthImageInfoTopicName> <!-- <pointCloudTopicName>/camera_${name}/depth/points</pointCloudTopicName> --> <pointCloudTopicName>/cam5/point_cloud_rearDown</pointCloudTopicName> <frameName>camera_optical_rearDown</frameName> <pointCloudCutoff>0.1</pointCloudCutoff> <pointCloudCutoffMax>1.5</pointCloudCutoffMax> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> <CxPrime>0</CxPrime> <Cx>0.0045</Cx> <Cy>0.0039</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo> <joint name="camera_laserscan_joint_left" type="fixed"> <origin rpy="0 0.2618 0" xyz="0 0 0"/> <parent link="camera_left"/> <child link="camera_laserscan_link_left"/> </joint> <link name="camera_laserscan_link_left"> </link> <joint name="camera_laserscan_joint_right" type="fixed"> <origin rpy="0 0.2618 0" xyz="0 0 0"/> <parent link="camera_right"/> <child link="camera_laserscan_link_right"/> </joint> <link name="camera_laserscan_link_right"> </link> <joint name="ultraSound_joint_left" type="fixed"> <origin rpy="0 0.2618 1.5707963267948966" xyz="-0.0535 0.0826 0.00868"/> <parent link="trunk"/> <child link="ultraSound_left"/> </joint> <link name="ultraSound_left"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/ultraSound.dae" scale="1 1 1"/> </geometry> <material name="black"/> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="ultraSound_joint_right" type="fixed"> <origin rpy="0 0.2618 -1.5707963267948966" xyz="-0.0535 -0.0826 0.00868"/> <parent link="trunk"/> <child link="ultraSound_right"/> </joint> <link name="ultraSound_right"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/ultraSound.dae" scale="1 1 1"/> </geometry> <material name="black"/> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="ultraSound_joint_face" type="fixed"> <origin rpy="0 0 0" xyz="0.2747 0.0 -0.0088"/> <parent link="trunk"/> <child link="ultraSound_face"/> </joint> <link name="ultraSound_face"> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <box size=".001 .001 .001"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://go1_description/meshes/ultraSound.dae" scale="1 1 1"/> </geometry> <material name="black"/> </visual> <inertial> <mass value="1e-5"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/opendog_description-CHAMP/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3) project(opendog_description) find_package(catkin REQUIRED COMPONENTS) catkin_package() install(DIRECTORY meshes launch urdf DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} )
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/opendog_description-CHAMP/package.xml
<?xml version="1.0"?> <package format="2"> <name>opendog_description</name> <version>0.1.0</version> <description>Open Dog Description Package</description> <maintainer email="jimenojmm@gmail.com">Juan Miguel Jimeno</maintainer> <author>Juan Miguel Jimeno</author> <license>BSD</license> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roslaunch</exec_depend> <exec_depend>robot_state_publisher</exec_depend> <exec_depend>joint_state_publisher</exec_depend> <exec_depend>urdf</exec_depend> <exec_depend>xacro</exec_depend> <exec_depend>rviz</exec_depend> <exec_depend>gazebo_plugins</exec_depend> <exec_depend>hector_gazebo_plugins</exec_depend> <exec_depend>hector_sensors_description</exec_depend> </package>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/opendog_description-CHAMP/README.md
URDF and Gazebo model of [Jame's Bruton's](https://www.youtube.com/user/jamesbruton) [OpenDog V2](https://github.com/XRobots/openDogV2) project.
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/opendog_description-CHAMP/launch/view_urdf.launch
<launch> <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find opendog_description)/urdf/opendog.urdf.xacro' " /> <node name="opendog_robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="false" output="screen"> <param name="publish_frequency" type="double" value="30.0" /> <param name="ignore_timestamp" type="bool" value="true" /> </node> <node type="rviz" name="rviz" pkg="rviz" args="-d $(find opendog_description)/rviz/urdf_viewer.rviz" /> <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"> <param name="/use_gui" value="false"/> <rosparam param="/source_list">[joint_states]</rosparam> </node> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/opendog_description-CHAMP/launch/description.launch
<launch> <arg name="description_name" default="robot_description"/> <arg name="description_file" default="$(find opendog_description)/urdf/opendog.urdf"/> <param name="$(arg description_name)" textfile="$(arg description_file)"/> <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="false" output="screen"> <param name="use_tf_static" value="true"/> <param name="publish_frequency" value="200"/> <remap from="robot_description" to="$(arg description_name)"/> </node> </launch>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/opendog_description-CHAMP/rviz/urdf_viewer.rviz
Panels: - Class: rviz/Displays Help Height: 78 Name: Displays Property Tree Widget: Expanded: - /Global Options1 - /RobotModel1 - /RobotModel1/Links1 - /TF1/Frames1 Splitter Ratio: 0.38333332538604736 Tree Height: 845 - 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: "" 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: 1000 Reference Frame: <Fixed Frame> Value: true - Alpha: 0.8999999761581421 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_inertia: Alpha: 1 Show Axes: false Show Trail: false base_link: Alpha: 1 Show Axes: false Show Trail: false Value: true camera_depth_frame: Alpha: 1 Show Axes: false Show Trail: false camera_depth_optical_frame: Alpha: 1 Show Axes: false Show Trail: false camera_link: Alpha: 1 Show Axes: false Show Trail: false Value: true camera_rgb_frame: Alpha: 1 Show Axes: false Show Trail: false camera_rgb_optical_frame: Alpha: 1 Show Axes: false Show Trail: false hokuyo_frame: Alpha: 1 Show Axes: false Show Trail: false Value: true imu_link: Alpha: 1 Show Axes: false Show Trail: false lf_foot_link: Alpha: 1 Show Axes: false Show Trail: false lf_hip_debug_link: Alpha: 1 Show Axes: false Show Trail: false lf_hip_link: Alpha: 1 Show Axes: false Show Trail: false Value: true lf_lower_leg_link: Alpha: 1 Show Axes: false Show Trail: false Value: true lf_upper_leg_link: Alpha: 1 Show Axes: false Show Trail: false Value: true lh_foot_link: Alpha: 1 Show Axes: false Show Trail: false lh_hip_debug_link: Alpha: 1 Show Axes: false Show Trail: false lh_hip_link: Alpha: 1 Show Axes: false Show Trail: false Value: true lh_lower_leg_link: Alpha: 1 Show Axes: false Show Trail: false Value: true lh_upper_leg_link: Alpha: 1 Show Axes: false Show Trail: false Value: true rf_foot_link: Alpha: 1 Show Axes: false Show Trail: false rf_hip_debug_link: Alpha: 1 Show Axes: false Show Trail: false rf_hip_link: Alpha: 1 Show Axes: false Show Trail: false Value: true rf_lower_leg_link: Alpha: 1 Show Axes: false Show Trail: false Value: true rf_upper_leg_link: Alpha: 1 Show Axes: false Show Trail: false Value: true rh_foot_link: Alpha: 1 Show Axes: false Show Trail: false rh_hip_debug_link: Alpha: 1 Show Axes: false Show Trail: false rh_hip_link: Alpha: 1 Show Axes: false Show Trail: false Value: true rh_lower_leg_link: Alpha: 1 Show Axes: false Show Trail: false Value: true rh_upper_leg_link: 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/Axes Enabled: true Length: 1 Name: Axes Radius: 0.0010000000474974513 Reference Frame: <Fixed Frame> Value: true - Class: rviz/TF Enabled: true Frame Timeout: 15 Frames: All Enabled: true base_inertia: Value: true base_link: Value: true camera_depth_frame: Value: true camera_depth_optical_frame: Value: true camera_link: Value: true camera_rgb_frame: Value: true camera_rgb_optical_frame: Value: true hokuyo_frame: Value: true imu_link: Value: true lf_foot_link: Value: true lf_hip_debug_link: Value: true lf_hip_link: Value: true lf_lower_leg_link: Value: true lf_upper_leg_link: Value: true lh_foot_link: Value: true lh_hip_debug_link: Value: true lh_hip_link: Value: true lh_lower_leg_link: Value: true lh_upper_leg_link: Value: true rf_foot_link: Value: true rf_hip_debug_link: Value: true rf_hip_link: Value: true rf_lower_leg_link: Value: true rf_upper_leg_link: Value: true rh_foot_link: Value: true rh_hip_debug_link: Value: true rh_hip_link: Value: true rh_lower_leg_link: Value: true rh_upper_leg_link: Value: true Marker Scale: 0.25 Name: TF Show Arrows: true Show Axes: true Show Names: false Tree: base_link: base_inertia: {} camera_link: camera_depth_frame: camera_depth_optical_frame: {} camera_rgb_frame: camera_rgb_optical_frame: {} hokuyo_frame: {} imu_link: {} lf_hip_debug_link: {} lf_hip_link: lf_upper_leg_link: lf_lower_leg_link: lf_foot_link: {} lh_hip_debug_link: {} lh_hip_link: lh_upper_leg_link: lh_lower_leg_link: lh_foot_link: {} rf_hip_debug_link: {} rf_hip_link: rf_upper_leg_link: rf_lower_leg_link: rf_foot_link: {} rh_hip_debug_link: {} rh_hip_link: rh_upper_leg_link: rh_lower_leg_link: rh_foot_link: {} Update Interval: 0 Value: true - Class: rviz/MarkerArray Enabled: false Marker Topic: foot Name: MarkerArray Namespaces: {} Queue Size: 100 Value: false - Alpha: 1 Axes Length: 1 Axes Radius: 0.10000000149011612 Class: rviz/Pose Color: 255; 25; 0 Enabled: true Head Length: 0.30000001192092896 Head Radius: 0.10000000149011612 Name: Pose Shaft Length: 1 Shaft Radius: 0.05000000074505806 Shape: Arrow Topic: /pose_debug Unreliable: false Value: true Enabled: true Global Options: Background Color: 238; 238; 236 Default Light: true Fixed Frame: base_link 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: /move_base_simple/goal - Class: rviz/PublishPoint Single click: true Topic: /clicked_point Value: true Views: Current: Class: rviz/Orbit Distance: 0.9318000674247742 Enable Stereo Rendering: Stereo Eye Separation: 0.05999999865889549 Stereo Focal Distance: 1 Swap Stereo Eyes: false Value: false Focal Point: X: 0.10083316266536713 Y: -0.06101349741220474 Z: -0.2683990001678467 Focal Shape Fixed Size: false Focal Shape Size: 0.05000000074505806 Invert Z Axis: false Name: Current View Near Clip Distance: 0.009999999776482582 Pitch: 0.17520299553871155 Target Frame: base_footprint Value: Orbit (rviz) Yaw: 0.9804297685623169 Saved: ~ Window Geometry: Displays: collapsed: true Height: 1143 Hide Left Dock: true Hide Right Dock: true QMainWindow State: 000000ff00000000fd00000004000000000000021e000003d8fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073000000003d000003d8000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f000003d8fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d000003d8000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000003ab0000003ffc0100000002fb0000000800540069006d00650100000000000003ab000002eb00fffffffb0000000800540069006d00650100000000000004500000000000000000000003ab000003d800000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 Selection: collapsed: false Time: collapsed: false Tool Properties: collapsed: false Views: collapsed: true Width: 939 X: 981 Y: 27
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/opendog_description-CHAMP/urdf/leg.urdf.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://ros.org/wiki/xacro"> <xacro:macro name="opendog_leg" params="leg " > <xacro:if value="${leg == 'lf'}"> <xacro:property name="hip_trans" value="-0.165 0.054 0.001" /> <xacro:property name="hip_rotation" value="0 0 1.5708" /> <xacro:property name="upper_leg_trans" value="-0.165 -0.01 0" /> <xacro:property name="upper_leg_rotation" value="0 0 1.5708" /> <xacro:property name="lower_leg_trans" value="-0.165 0 0.201" /> <xacro:property name="lower_leg_rotation" value="0 0.02 1.5708" /> <xacro:property name="foot_y_trans" value="-0.07" /> <xacro:property name="hip_mesh" value="${hip_mesh_path}" /> <xacro:property name="base_to_hip_xyz" value="${base_to_front_hip_x} ${base_to_front_hip_y} 0" /> <xacro:property name="hip_to_upper_leg" value="${hip_to_upper_leg_distance}" /> </xacro:if> <xacro:if value="${leg == 'lh'}"> <xacro:property name="hip_trans" value="-0.165 0.054 0.001" /> <xacro:property name="hip_rotation" value="0 0 1.5708" /> <xacro:property name="upper_leg_trans" value="-0.165 -0.01 0" /> <xacro:property name="upper_leg_rotation" value="0 0 1.5708" /> <xacro:property name="lower_leg_trans" value="-0.165 0 0.201" /> <xacro:property name="lower_leg_rotation" value="0 0.02 1.5708" /> <xacro:property name="foot_y_trans" value="-0.07" /> <xacro:property name="hip_mesh" value="${hip_mesh_path}" /> <xacro:property name="base_to_hip_xyz" value="-${base_to_hind_hip_x} ${base_to_hind_hip_y} 0" /> <xacro:property name="hip_to_upper_leg" value="${hip_to_upper_leg_distance}" /> </xacro:if> <xacro:if value="${leg == 'rf'}"> <xacro:property name="hip_trans" value="-0.165 -0.054 0.001" /> <xacro:property name="hip_rotation" value="-3.1416 0 -1.5708" /> <xacro:property name="upper_leg_trans" value="0.165 0.01 0" /> <xacro:property name="upper_leg_rotation" value="0 0 -1.5708" /> <xacro:property name="lower_leg_trans" value="0.165 0 0.201" /> <xacro:property name="lower_leg_rotation" value="0 0.02 -1.5708" /> <xacro:property name="foot_y_trans" value="0.07" /> <xacro:property name="hip_mesh" value="${hip_mirror_mesh_path}" /> <xacro:property name="base_to_hip_xyz" value="${base_to_front_hip_x} -${base_to_front_hip_y} 0" /> <xacro:property name="hip_to_upper_leg" value="-${hip_to_upper_leg_distance}" /> </xacro:if> <xacro:if value="${leg == 'rh'}"> <xacro:property name="hip_trans" value="-0.165 -0.054 0.001" /> <xacro:property name="hip_rotation" value="-3.1416 0 -1.5708" /> <xacro:property name="upper_leg_trans" value="0.165 0.01 0" /> <xacro:property name="upper_leg_rotation" value="0 0 -1.5708" /> <xacro:property name="lower_leg_trans" value="0.165 0 0.201" /> <xacro:property name="lower_leg_rotation" value="0 0.02 -1.5708" /> <xacro:property name="foot_y_trans" value="0.07" /> <xacro:property name="hip_mesh" value="${hip_mirror_mesh_path}" /> <xacro:property name="base_to_hip_xyz" value="-${base_to_hind_hip_x} -${base_to_hind_hip_y} 0" /> <xacro:property name="hip_to_upper_leg" value="-${hip_to_upper_leg_distance}" /> </xacro:if> <link name="${leg}_hip_debug_link"/> <link name="${leg}_hip_link"> <inertial> <mass value="${hip_mass}" /> <inertia ixx="${(1/12) * hip_mass * (hip_y_length * hip_y_length + hip_z_length * hip_z_length)}" ixy="0.0" ixz="0.0" iyy="${(1/12) * hip_mass * (hip_x_length * hip_x_length + hip_z_length * hip_z_length)}" iyz="0.0" izz="${(1/12) * hip_mass * (hip_x_length * hip_x_length + hip_y_length * hip_y_length)}" /> </inertial> <collision> <origin xyz="${hip_trans}" rpy="${hip_rotation}" /> <geometry> <mesh filename="${hip_mesh}" scale="0.001 0.001 0.001" /> </geometry> </collision> <visual> <origin xyz="${hip_trans}" rpy="${hip_rotation}" /> <geometry> <mesh filename="${hip_mesh}" scale="0.001 0.001 0.001" /> </geometry> <material name="white" /> </visual> </link> <gazebo reference="${leg}_hip_link"> <material>Gazebo/White</material> </gazebo> <link name="${leg}_upper_leg_link"> <inertial> <origin xyz="0 0 -${(upper_leg_z_length / 2) - ((upper_leg_z_length - upper_leg_to_lower_leg_distance) / 2)}" /> <mass value="${upper_leg_mass}" /> <inertia ixx="${(1/12) * upper_leg_mass * (upper_leg_y_length * upper_leg_y_length + upper_leg_z_length * upper_leg_z_length)}" ixy="0.0" ixz="0.0" iyy="${(1/12) * upper_leg_mass * (upper_leg_x_length * upper_leg_x_length + upper_leg_z_length * upper_leg_z_length)}" iyz="0.0" izz="${(1/12) * upper_leg_mass * (upper_leg_x_length * upper_leg_x_length + upper_leg_y_length * upper_leg_y_length)}" /> </inertial> <collision> <origin xyz="${upper_leg_trans}" rpy="${upper_leg_rotation}" /> <geometry> <mesh filename="${upper_leg_mesh_path}" scale="0.001 0.001 0.001" /> </geometry> </collision> <visual> <origin xyz="${upper_leg_trans}" rpy="${upper_leg_rotation}" /> <geometry> <mesh filename="${upper_leg_mesh_path}" scale="0.001 0.001 0.001" /> </geometry> <material name="black" /> </visual> </link> <gazebo reference="${leg}_upper_leg_link"> <material>Gazebo/FlatBlack</material> </gazebo> <link name="${leg}_lower_leg_link"> <inertial> <origin xyz="0 0 -${(lower_leg_to_foot_distance - (lower_leg_z_length - lower_leg_to_foot_distance)) / 2}" /> <mass value="${lower_leg_mass}" /> <inertia ixx="${(1/12) * lower_leg_mass * (lower_leg_y_length * lower_leg_y_length + lower_leg_z_length * lower_leg_z_length)}" ixy="0.0" ixz="0.0" iyy="${(1/12) * lower_leg_mass * (lower_leg_x_length * lower_leg_x_length + lower_leg_z_length * lower_leg_z_length)}" iyz="0.0" izz="${(1/12) * lower_leg_mass * (lower_leg_x_length * lower_leg_x_length + lower_leg_y_length * lower_leg_y_length)}" /> </inertial> <collision> <origin xyz="${lower_leg_trans}" rpy="${lower_leg_rotation}" /> <geometry> <mesh filename="${lower_leg_mesh_path}" scale="0.001 0.001 0.001" /> </geometry> </collision> <visual> <origin xyz="${lower_leg_trans}" rpy="${lower_leg_rotation}" /> <geometry> <mesh filename="${lower_leg_mesh_path}" scale="0.001 0.001 0.001" /> </geometry> <material name="black" /> </visual> </link> <gazebo reference="${leg}_lower_leg_link"> <kp>1000000.0</kp> <kd>1.0</kd> <mu1>0.8</mu1> <mu2>0.8</mu2> <maxVel>0.0</maxVel> <minDepth>0.001</minDepth> <material>Gazebo/FlatBlack</material> </gazebo> <link name="${leg}_foot_link" /> <joint name="${leg}_debug_joint" type="fixed"> <parent link="base_link" /> <child link="${leg}_hip_debug_link" /> <origin xyz="${base_to_hip_xyz}" rpy="0 0 0" /> </joint> <joint name="${leg}_hip_joint" type="revolute"> <axis xyz="1 0 0" /> <limit effort="25" lower="-${pi}" upper="${pi}" velocity="3.0" /> <parent link="base_link" /> <child link="${leg}_hip_link" /> <origin xyz="${base_to_hip_xyz}" rpy="0 0 0" /> </joint> <joint name="${leg}_upper_leg_joint" type="revolute"> <axis xyz="0 1 0" /> <limit effort="25" lower="-${pi}" upper="${pi}" velocity="3.0" /> <parent link="${leg}_hip_link" /> <child link="${leg}_upper_leg_link" /> <origin xyz="0 ${hip_to_upper_leg} 0" rpy="0 0 0" /> </joint> <joint name="${leg}_lower_leg_joint" type="revolute"> <axis xyz="0 1 0" /> <limit effort="25" lower="-${pi}" upper="${pi}" velocity="3.0" /> <parent link="${leg}_upper_leg_link" /> <child link="${leg}_lower_leg_link" /> <origin xyz="0 0 -${upper_leg_to_lower_leg_distance}" rpy="0 0 0" /> </joint> <joint name="${leg}_foot_joint" type="fixed"> <parent link="${leg}_lower_leg_link" /> <child link="${leg}_foot_link" /> <!-- <origin xyz="0.00325 0 -${lower_leg_to_foot_distance}" rpy="0 0 0" /> --> <origin xyz="0 ${foot_y_trans} -${lower_leg_to_foot_distance}" rpy="0 0 0" /> </joint> <transmission name="${leg}_hip_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="${leg}_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${leg}_hip_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="${leg}_upper_leg_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="${leg}_upper_leg_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${leg}_upper_leg_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="${leg}_lower_leg_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="${leg}_lower_leg_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="${leg}_lower_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> </xacro:macro> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/opendog_description-CHAMP/urdf/opendog.urdf
<?xml version="1.0" encoding="utf-8"?> <!-- =================================================================================== --> <!-- | This document was autogenerated by xacro from opendog.urdf.xacro | --> <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | --> <!-- =================================================================================== --> <robot name="opendog"> <material name="black"> <color rgba="0.15 0.15 0.15 1.0"/> </material> <material name="white"> <color rgba="0.85 0.85 0.85 1"/> </material> <material name="yellow"> <color rgba="0.96 0.89 0.10 1"/> </material> <link name="base_link"> <collision> <origin rpy="0 0 1.5708" xyz="0.25 0.185 0.002"/> <geometry> <mesh filename="package://opendog_description/meshes/base.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> <visual> <origin rpy="0 0 1.5708" xyz="0.25 0.185 0.002"/> <geometry> <mesh filename="package://opendog_description/meshes/base.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="black"/> </visual> </link> <link name="base_inertia"> <inertial> <origin xyz="-0.1 0 0"/> <mass value="2.0"/> <inertia ixx="0.0220833333333" ixy="0.0" ixz="0.0" iyy="0.114733333333" iyz="0.0" izz="0.120683333333"/> </inertial> </link> <joint name="base_link_to_base_inertia" type="fixed"> <parent link="base_link"/> <child link="base_inertia"/> <origin rpy="0 0 0" xyz="0.05 0 0"/> </joint> <gazebo reference="base_link"> <material>Gazebo/FlatBlack</material> </gazebo> <joint name="hokuyo_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.0 0.15"/> <parent link="base_link"/> <child link="hokuyo_frame"/> </joint> <link name="hokuyo_frame"> <inertial> <mass value="0.270"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="2.632e-4" ixy="0" ixz="0" iyy="2.632e-4" iyz="0" izz="1.62e-4"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://hector_sensors_description/meshes/hokuyo_utm30lx/hokuyo_utm_30lx.dae"/> </geometry> </visual> <collision> <origin rpy="0 0 0" xyz="0 0 -0.0115"/> <geometry> <box size="0.058 0.058 0.087"/> <!--<mesh filename="package://hector_sensors_description/meshes/hokuyo_utm30lx/hokuyo_utm_30lx.stl"/>--> </geometry> </collision> </link> <gazebo reference="hokuyo_frame"> <sensor name="hokuyo" type="ray"> <always_on>true</always_on> <update_rate>30</update_rate> <pose>0 0 0 0 0 0</pose> <visualize>false</visualize> <ray> <scan> <horizontal> <samples>1040</samples> <resolution>1</resolution> <min_angle>2.26892802759</min_angle> <max_angle>-2.26892802759</max_angle> </horizontal> </scan> <range> <min>0.2</min> <max>30.0</max> <resolution>0.01</resolution> </range> <noise> <type>gaussian</type> <mean>0.0</mean> <stddev>0.004</stddev> </noise> </ray> <plugin filename="libgazebo_ros_laser.so" name="gazebo_ros_hokuyo_controller"> <topicName>scan</topicName> <frameName>hokuyo_frame</frameName> </plugin> </sensor> </gazebo> <gazebo reference="hokuyo_frame"> <material>Gazebo/FlatBlack</material> </gazebo> <joint name="camera_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.4 0.0 0.12"/> <parent link="base_link"/> <child link="camera_link"/> </joint> <link name="camera_link"> <inertial> <mass value="0.200"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="5.8083e-4" ixy="0" ixz="0" iyy="3.0833e-5" iyz="0" izz="5.9083e-4"/> </inertial> <visual> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://hector_sensors_description/meshes/asus_camera/asus_camera_simple.dae"/> </geometry> </visual> <!-- <collision> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry> <box size="0.035 0.185 0.025"/> </geometry> </collision> --> <collision> <origin rpy="0 0 0" xyz="0 0 0"/> <geometry> <mesh filename="package://hector_sensors_description/meshes/asus_camera/asus_camera_simple.dae"/> </geometry> </collision> </link> <joint name="camera_depth_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.049 0.0"/> <parent link="camera_link"/> <child link="camera_depth_frame"/> </joint> <link name="camera_depth_frame"/> <joint name="camera_depth_optical_joint" type="fixed"> <origin rpy="-1.57079632679 0.0 -1.57079632679" xyz="0 0 0"/> <parent link="camera_depth_frame"/> <child link="camera_depth_optical_frame"/> </joint> <link name="camera_depth_optical_frame"/> <joint name="camera_rgb_joint" type="fixed"> <origin rpy="0 0 0" xyz="0.0 0.022 0.0"/> <parent link="camera_link"/> <child link="camera_rgb_frame"/> </joint> <link name="camera_rgb_frame"/> <joint name="camera_rgb_optical_joint" type="fixed"> <origin rpy="-1.57079632679 0.0 -1.57079632679" xyz="0 0 0"/> <parent link="camera_rgb_frame"/> <child link="camera_rgb_optical_frame"/> </joint> <link name="camera_rgb_optical_frame"/> <!-- ASUS Xtion PRO camera for simulation --> <gazebo reference="camera_depth_frame"> <sensor name="camera" type="depth"> <update_rate>20</update_rate> <camera> <horizontal_fov>1.09606677025</horizontal_fov> <image> <format>R8G8B8</format> <width>640</width> <height>480</height> </image> <clip> <near>0.5</near> <far>9</far> </clip> </camera> <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_camera_controller"> <imageTopicName>camera/rgb/image_raw</imageTopicName> <cameraInfoTopicName>camera/rgb/camera_info</cameraInfoTopicName> <depthImageTopicName>camera/depth/image_raw</depthImageTopicName> <depthImageCameraInfoTopicName>camera/depth/camera_info</depthImageCameraInfoTopicName> <pointCloudTopicName>camera/depth/points</pointCloudTopicName> <frameName>camera_depth_optical_frame</frameName> </plugin> </sensor> </gazebo> <gazebo> <plugin filename="libhector_gazebo_ros_imu.so" name="imu_controller"> <updateRate>50.0</updateRate> <bodyName>imu_link</bodyName> <topicName>imu/data</topicName> <accelDrift>0.005 0.005 0.005</accelDrift> <accelGaussianNoise>0.005 0.005 0.005</accelGaussianNoise> <rateDrift>0.005 0.005 0.005 </rateDrift> <rateGaussianNoise>0.005 0.005 0.005 </rateGaussianNoise> <headingDrift>0.005</headingDrift> <headingGaussianNoise>0.005</headingGaussianNoise> </plugin> </gazebo> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-09" ixy="0.0" ixz="0.0" iyy="1e-09" iyz="0.0" izz="1e-09"/> </inertial> </link> <joint name="imu_joint" type="fixed"> <parent link="base_link"/> <child link="imu_link"/> </joint> <link name="lf_hip_debug_link"/> <link name="lf_hip_link"> <inertial> <mass value="0.25"/> <inertia ixx="0.000485416666667" ixy="0.0" ixz="0.0" iyy="0.000613416666667" iyz="0.0" izz="0.000394666666667"/> </inertial> <collision> <origin rpy="0 0 1.5708" xyz="-0.165 0.054 0.001"/> <geometry> <mesh filename="package://opendog_description/meshes/hip.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> <visual> <origin rpy="0 0 1.5708" xyz="-0.165 0.054 0.001"/> <geometry> <mesh filename="package://opendog_description/meshes/hip.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="white"/> </visual> </link> <gazebo reference="lf_hip_link"> <material>Gazebo/White</material> </gazebo> <link name="lf_upper_leg_link"> <inertial> <origin xyz="0 0 -0.1"/> <mass value="0.125"/> <inertia ixx="0.00100416666667" ixy="0.0" ixz="0.0" iyy="0.00100416666667" iyz="0.0" izz="0.000133333333333"/> </inertial> <collision> <origin rpy="0 0 1.5708" xyz="-0.165 -0.01 0"/> <geometry> <mesh filename="package://opendog_description/meshes/upper_leg.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> <visual> <origin rpy="0 0 1.5708" xyz="-0.165 -0.01 0"/> <geometry> <mesh filename="package://opendog_description/meshes/upper_leg.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="black"/> </visual> </link> <gazebo reference="lf_upper_leg_link"> <material>Gazebo/FlatBlack</material> </gazebo> <link name="lf_lower_leg_link"> <inertial> <origin xyz="0 0 -0.08"/> <mass value="0.125"/> <inertia ixx="0.000942541666667" ixy="0.0" ixz="0.0" iyy="0.00095334375" iyz="0.0" izz="2.08854166667e-05"/> </inertial> <collision> <origin rpy="0 0.02 1.5708" xyz="-0.165 0 0.201"/> <geometry> <mesh filename="package://opendog_description/meshes/lower_leg.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> <visual> <origin rpy="0 0.02 1.5708" xyz="-0.165 0 0.201"/> <geometry> <mesh filename="package://opendog_description/meshes/lower_leg.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="black"/> </visual> </link> <gazebo reference="lf_lower_leg_link"> <kp>1000000.0</kp> <kd>1.0</kd> <mu1>0.8</mu1> <mu2>0.8</mu2> <maxVel>0.0</maxVel> <minDepth>0.001</minDepth> <material>Gazebo/FlatBlack</material> </gazebo> <link name="lf_foot_link"/> <joint name="lf_debug_joint" type="fixed"> <parent link="base_link"/> <child link="lf_hip_debug_link"/> <origin rpy="0 0 0" xyz="0.265 0.125 0"/> </joint> <joint name="lf_hip_joint" type="revolute"> <axis xyz="1 0 0"/> <limit effort="25" lower="-3.14159265359" upper="3.14159265359" velocity="3.0"/> <parent link="base_link"/> <child link="lf_hip_link"/> <origin rpy="0 0 0" xyz="0.265 0.125 0"/> </joint> <joint name="lf_upper_leg_joint" type="revolute"> <axis xyz="0 1 0"/> <limit effort="25" lower="-3.14159265359" upper="3.14159265359" velocity="3.0"/> <parent link="lf_hip_link"/> <child link="lf_upper_leg_link"/> <origin rpy="0 0 0" xyz="0 0.07 0"/> </joint> <joint name="lf_lower_leg_joint" type="revolute"> <axis xyz="0 1 0"/> <limit effort="25" lower="-3.14159265359" upper="3.14159265359" velocity="3.0"/> <parent link="lf_upper_leg_link"/> <child link="lf_lower_leg_link"/> <origin rpy="0 0 0" xyz="0 0 -0.2"/> </joint> <joint name="lf_foot_joint" type="fixed"> <parent link="lf_lower_leg_link"/> <child link="lf_foot_link"/> <!-- <origin xyz="0.00325 0 -${lower_leg_to_foot_distance}" rpy="0 0 0" /> --> <origin rpy="0 0 0" xyz="0 -0.07 -0.23"/> </joint> <transmission name="lf_hip_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="lf_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="lf_hip_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="lf_upper_leg_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="lf_upper_leg_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="lf_upper_leg_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="lf_lower_leg_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="lf_lower_leg_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="lf_lower_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <link name="lh_hip_debug_link"/> <link name="lh_hip_link"> <inertial> <mass value="0.25"/> <inertia ixx="0.000485416666667" ixy="0.0" ixz="0.0" iyy="0.000613416666667" iyz="0.0" izz="0.000394666666667"/> </inertial> <collision> <origin rpy="0 0 1.5708" xyz="-0.165 0.054 0.001"/> <geometry> <mesh filename="package://opendog_description/meshes/hip.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> <visual> <origin rpy="0 0 1.5708" xyz="-0.165 0.054 0.001"/> <geometry> <mesh filename="package://opendog_description/meshes/hip.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="white"/> </visual> </link> <gazebo reference="lh_hip_link"> <material>Gazebo/White</material> </gazebo> <link name="lh_upper_leg_link"> <inertial> <origin xyz="0 0 -0.1"/> <mass value="0.125"/> <inertia ixx="0.00100416666667" ixy="0.0" ixz="0.0" iyy="0.00100416666667" iyz="0.0" izz="0.000133333333333"/> </inertial> <collision> <origin rpy="0 0 1.5708" xyz="-0.165 -0.01 0"/> <geometry> <mesh filename="package://opendog_description/meshes/upper_leg.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> <visual> <origin rpy="0 0 1.5708" xyz="-0.165 -0.01 0"/> <geometry> <mesh filename="package://opendog_description/meshes/upper_leg.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="black"/> </visual> </link> <gazebo reference="lh_upper_leg_link"> <material>Gazebo/FlatBlack</material> </gazebo> <link name="lh_lower_leg_link"> <inertial> <origin xyz="0 0 -0.08"/> <mass value="0.125"/> <inertia ixx="0.000942541666667" ixy="0.0" ixz="0.0" iyy="0.00095334375" iyz="0.0" izz="2.08854166667e-05"/> </inertial> <collision> <origin rpy="0 0.02 1.5708" xyz="-0.165 0 0.201"/> <geometry> <mesh filename="package://opendog_description/meshes/lower_leg.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> <visual> <origin rpy="0 0.02 1.5708" xyz="-0.165 0 0.201"/> <geometry> <mesh filename="package://opendog_description/meshes/lower_leg.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="black"/> </visual> </link> <gazebo reference="lh_lower_leg_link"> <kp>1000000.0</kp> <kd>1.0</kd> <mu1>0.8</mu1> <mu2>0.8</mu2> <maxVel>0.0</maxVel> <minDepth>0.001</minDepth> <material>Gazebo/FlatBlack</material> </gazebo> <link name="lh_foot_link"/> <joint name="lh_debug_joint" type="fixed"> <parent link="base_link"/> <child link="lh_hip_debug_link"/> <origin rpy="0 0 0" xyz="-0.16 0.125 0"/> </joint> <joint name="lh_hip_joint" type="revolute"> <axis xyz="1 0 0"/> <limit effort="25" lower="-3.14159265359" upper="3.14159265359" velocity="3.0"/> <parent link="base_link"/> <child link="lh_hip_link"/> <origin rpy="0 0 0" xyz="-0.16 0.125 0"/> </joint> <joint name="lh_upper_leg_joint" type="revolute"> <axis xyz="0 1 0"/> <limit effort="25" lower="-3.14159265359" upper="3.14159265359" velocity="3.0"/> <parent link="lh_hip_link"/> <child link="lh_upper_leg_link"/> <origin rpy="0 0 0" xyz="0 0.07 0"/> </joint> <joint name="lh_lower_leg_joint" type="revolute"> <axis xyz="0 1 0"/> <limit effort="25" lower="-3.14159265359" upper="3.14159265359" velocity="3.0"/> <parent link="lh_upper_leg_link"/> <child link="lh_lower_leg_link"/> <origin rpy="0 0 0" xyz="0 0 -0.2"/> </joint> <joint name="lh_foot_joint" type="fixed"> <parent link="lh_lower_leg_link"/> <child link="lh_foot_link"/> <!-- <origin xyz="0.00325 0 -${lower_leg_to_foot_distance}" rpy="0 0 0" /> --> <origin rpy="0 0 0" xyz="0 -0.07 -0.23"/> </joint> <transmission name="lh_hip_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="lh_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="lh_hip_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="lh_upper_leg_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="lh_upper_leg_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="lh_upper_leg_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="lh_lower_leg_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="lh_lower_leg_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="lh_lower_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <link name="rf_hip_debug_link"/> <link name="rf_hip_link"> <inertial> <mass value="0.25"/> <inertia ixx="0.000485416666667" ixy="0.0" ixz="0.0" iyy="0.000613416666667" iyz="0.0" izz="0.000394666666667"/> </inertial> <collision> <origin rpy="-3.1416 0 -1.5708" xyz="-0.165 -0.054 0.001"/> <geometry> <mesh filename="package://opendog_description/meshes/hip_mirror.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> <visual> <origin rpy="-3.1416 0 -1.5708" xyz="-0.165 -0.054 0.001"/> <geometry> <mesh filename="package://opendog_description/meshes/hip_mirror.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="white"/> </visual> </link> <gazebo reference="rf_hip_link"> <material>Gazebo/White</material> </gazebo> <link name="rf_upper_leg_link"> <inertial> <origin xyz="0 0 -0.1"/> <mass value="0.125"/> <inertia ixx="0.00100416666667" ixy="0.0" ixz="0.0" iyy="0.00100416666667" iyz="0.0" izz="0.000133333333333"/> </inertial> <collision> <origin rpy="0 0 -1.5708" xyz="0.165 0.01 0"/> <geometry> <mesh filename="package://opendog_description/meshes/upper_leg.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> <visual> <origin rpy="0 0 -1.5708" xyz="0.165 0.01 0"/> <geometry> <mesh filename="package://opendog_description/meshes/upper_leg.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="black"/> </visual> </link> <gazebo reference="rf_upper_leg_link"> <material>Gazebo/FlatBlack</material> </gazebo> <link name="rf_lower_leg_link"> <inertial> <origin xyz="0 0 -0.08"/> <mass value="0.125"/> <inertia ixx="0.000942541666667" ixy="0.0" ixz="0.0" iyy="0.00095334375" iyz="0.0" izz="2.08854166667e-05"/> </inertial> <collision> <origin rpy="0 0.02 -1.5708" xyz="0.165 0 0.201"/> <geometry> <mesh filename="package://opendog_description/meshes/lower_leg.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> <visual> <origin rpy="0 0.02 -1.5708" xyz="0.165 0 0.201"/> <geometry> <mesh filename="package://opendog_description/meshes/lower_leg.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="black"/> </visual> </link> <gazebo reference="rf_lower_leg_link"> <kp>1000000.0</kp> <kd>1.0</kd> <mu1>0.8</mu1> <mu2>0.8</mu2> <maxVel>0.0</maxVel> <minDepth>0.001</minDepth> <material>Gazebo/FlatBlack</material> </gazebo> <link name="rf_foot_link"/> <joint name="rf_debug_joint" type="fixed"> <parent link="base_link"/> <child link="rf_hip_debug_link"/> <origin rpy="0 0 0" xyz="0.265 -0.125 0"/> </joint> <joint name="rf_hip_joint" type="revolute"> <axis xyz="1 0 0"/> <limit effort="25" lower="-3.14159265359" upper="3.14159265359" velocity="3.0"/> <parent link="base_link"/> <child link="rf_hip_link"/> <origin rpy="0 0 0" xyz="0.265 -0.125 0"/> </joint> <joint name="rf_upper_leg_joint" type="revolute"> <axis xyz="0 1 0"/> <limit effort="25" lower="-3.14159265359" upper="3.14159265359" velocity="3.0"/> <parent link="rf_hip_link"/> <child link="rf_upper_leg_link"/> <origin rpy="0 0 0" xyz="0 -0.07 0"/> </joint> <joint name="rf_lower_leg_joint" type="revolute"> <axis xyz="0 1 0"/> <limit effort="25" lower="-3.14159265359" upper="3.14159265359" velocity="3.0"/> <parent link="rf_upper_leg_link"/> <child link="rf_lower_leg_link"/> <origin rpy="0 0 0" xyz="0 0 -0.2"/> </joint> <joint name="rf_foot_joint" type="fixed"> <parent link="rf_lower_leg_link"/> <child link="rf_foot_link"/> <!-- <origin xyz="0.00325 0 -${lower_leg_to_foot_distance}" rpy="0 0 0" /> --> <origin rpy="0 0 0" xyz="0 0.07 -0.23"/> </joint> <transmission name="rf_hip_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="rf_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="rf_hip_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="rf_upper_leg_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="rf_upper_leg_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="rf_upper_leg_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="rf_lower_leg_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="rf_lower_leg_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="rf_lower_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <link name="rh_hip_debug_link"/> <link name="rh_hip_link"> <inertial> <mass value="0.25"/> <inertia ixx="0.000485416666667" ixy="0.0" ixz="0.0" iyy="0.000613416666667" iyz="0.0" izz="0.000394666666667"/> </inertial> <collision> <origin rpy="-3.1416 0 -1.5708" xyz="-0.165 -0.054 0.001"/> <geometry> <mesh filename="package://opendog_description/meshes/hip_mirror.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> <visual> <origin rpy="-3.1416 0 -1.5708" xyz="-0.165 -0.054 0.001"/> <geometry> <mesh filename="package://opendog_description/meshes/hip_mirror.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="white"/> </visual> </link> <gazebo reference="rh_hip_link"> <material>Gazebo/White</material> </gazebo> <link name="rh_upper_leg_link"> <inertial> <origin xyz="0 0 -0.1"/> <mass value="0.125"/> <inertia ixx="0.00100416666667" ixy="0.0" ixz="0.0" iyy="0.00100416666667" iyz="0.0" izz="0.000133333333333"/> </inertial> <collision> <origin rpy="0 0 -1.5708" xyz="0.165 0.01 0"/> <geometry> <mesh filename="package://opendog_description/meshes/upper_leg.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> <visual> <origin rpy="0 0 -1.5708" xyz="0.165 0.01 0"/> <geometry> <mesh filename="package://opendog_description/meshes/upper_leg.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="black"/> </visual> </link> <gazebo reference="rh_upper_leg_link"> <material>Gazebo/FlatBlack</material> </gazebo> <link name="rh_lower_leg_link"> <inertial> <origin xyz="0 0 -0.08"/> <mass value="0.125"/> <inertia ixx="0.000942541666667" ixy="0.0" ixz="0.0" iyy="0.00095334375" iyz="0.0" izz="2.08854166667e-05"/> </inertial> <collision> <origin rpy="0 0.02 -1.5708" xyz="0.165 0 0.201"/> <geometry> <mesh filename="package://opendog_description/meshes/lower_leg.stl" scale="0.001 0.001 0.001"/> </geometry> </collision> <visual> <origin rpy="0 0.02 -1.5708" xyz="0.165 0 0.201"/> <geometry> <mesh filename="package://opendog_description/meshes/lower_leg.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="black"/> </visual> </link> <gazebo reference="rh_lower_leg_link"> <kp>1000000.0</kp> <kd>1.0</kd> <mu1>0.8</mu1> <mu2>0.8</mu2> <maxVel>0.0</maxVel> <minDepth>0.001</minDepth> <material>Gazebo/FlatBlack</material> </gazebo> <link name="rh_foot_link"/> <joint name="rh_debug_joint" type="fixed"> <parent link="base_link"/> <child link="rh_hip_debug_link"/> <origin rpy="0 0 0" xyz="-0.16 -0.125 0"/> </joint> <joint name="rh_hip_joint" type="revolute"> <axis xyz="1 0 0"/> <limit effort="25" lower="-3.14159265359" upper="3.14159265359" velocity="3.0"/> <parent link="base_link"/> <child link="rh_hip_link"/> <origin rpy="0 0 0" xyz="-0.16 -0.125 0"/> </joint> <joint name="rh_upper_leg_joint" type="revolute"> <axis xyz="0 1 0"/> <limit effort="25" lower="-3.14159265359" upper="3.14159265359" velocity="3.0"/> <parent link="rh_hip_link"/> <child link="rh_upper_leg_link"/> <origin rpy="0 0 0" xyz="0 -0.07 0"/> </joint> <joint name="rh_lower_leg_joint" type="revolute"> <axis xyz="0 1 0"/> <limit effort="25" lower="-3.14159265359" upper="3.14159265359" velocity="3.0"/> <parent link="rh_upper_leg_link"/> <child link="rh_lower_leg_link"/> <origin rpy="0 0 0" xyz="0 0 -0.2"/> </joint> <joint name="rh_foot_joint" type="fixed"> <parent link="rh_lower_leg_link"/> <child link="rh_foot_link"/> <!-- <origin xyz="0.00325 0 -${lower_leg_to_foot_distance}" rpy="0 0 0" /> --> <origin rpy="0 0 0" xyz="0 0.07 -0.23"/> </joint> <transmission name="rh_hip_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="rh_hip_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="rh_hip_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="rh_upper_leg_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="rh_upper_leg_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="rh_upper_leg_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="rh_lower_leg_joint_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="rh_lower_leg_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="rh_lower_joint_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <gazebo> <plugin filename="libgazebo_ros_p3d.so" name="p3d_base_controller"> <alwaysOn>true</alwaysOn> <updateRate>10.0</updateRate> <bodyName>base_link</bodyName> <topicName>odom/ground_truth</topicName> <gaussianNoise>0.01</gaussianNoise> <frameName>world</frameName> <xyzOffsets>0 0 0</xyzOffsets> <rpyOffsets>0 0 0</rpyOffsets> </plugin> </gazebo> <gazebo> <plugin filename="libgazebo_ros_control.so" name="gazebo_ros_control"> <legacyModeNS>true</legacyModeNS> </plugin> </gazebo> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/opendog_description-CHAMP/urdf/opendog.urdf.xacro
<?xml version="1.0"?> <robot name="opendog" xmlns:xacro="http://ros.org/wiki/xacro"> <xacro:include filename="$(find opendog_description)/urdf/properties.urdf.xacro" /> <material name="black"><color rgba="0.15 0.15 0.15 1.0" /></material> <material name="white"><color rgba="0.85 0.85 0.85 1" /></material> <material name="yellow"><color rgba="0.96 0.89 0.10 1" /></material> <link name="base_link"> <collision> <origin xyz="0.25 0.185 0.002" rpy="0 0 1.5708" /> <geometry> <mesh filename="${base_mesh_path}" scale="0.001 0.001 0.001" /> </geometry> </collision> <visual> <origin xyz="0.25 0.185 0.002" rpy="0 0 1.5708" /> <geometry> <mesh filename="${base_mesh_path}" scale="0.001 0.001 0.001" /> </geometry> <material name="black" /> </visual> </link> <link name="base_inertia"> <inertial> <origin xyz="-0.1 0 0" /> <mass value="${base_mass}" /> <inertia ixx="${(1/12) * base_mass * (base_y_length * base_y_length + base_z_length * base_z_length)}" ixy="0.0" ixz="0.0" iyy="${(1/12) * base_mass * (base_x_length * base_x_length + base_z_length * base_z_length)}" iyz="0.0" izz="${(1/12) * base_mass * (base_x_length * base_x_length + base_y_length * base_y_length)}" /> </inertial> </link> <joint name="base_link_to_base_inertia" type="fixed"> <parent link="base_link"/> <child link="base_inertia"/> <origin rpy="0 0 0" xyz="0.05 0 0"/> </joint> <gazebo reference="base_link"> <material>Gazebo/FlatBlack</material> </gazebo> <xacro:include filename="$(find opendog_description)/urdf/leg.urdf.xacro" /> <xacro:include filename="$(find opendog_description)/urdf/accessories.urdf.xacro" /> <xacro:opendog_leg leg="lf"/> <xacro:opendog_leg leg="lh"/> <xacro:opendog_leg leg="rf"/> <xacro:opendog_leg leg="rh"/> <gazebo> <plugin name="p3d_base_controller" filename="libgazebo_ros_p3d.so"> <alwaysOn>true</alwaysOn> <updateRate>10.0</updateRate> <bodyName>base_link</bodyName> <topicName>odom/ground_truth</topicName> <gaussianNoise>0.01</gaussianNoise> <frameName>world</frameName> <xyzOffsets>0 0 0</xyzOffsets> <rpyOffsets>0 0 0</rpyOffsets> </plugin> </gazebo> <gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <legacyModeNS>true</legacyModeNS> </plugin> </gazebo> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/opendog_description-CHAMP/urdf/accessories.urdf.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://ros.org/wiki/xacro"> <xacro:include filename="$(find hector_sensors_description)/urdf/hokuyo_utm30lx.urdf.xacro" /> <xacro:include filename="$(find hector_sensors_description)/urdf/asus_camera.urdf.xacro" /> <xacro:hokuyo_utm30lx name="hokuyo" parent="base_link" ros_topic="scan" update_rate="30" ray_count="1040" min_angle="130" max_angle="-130" > <origin xyz="0.0 0.0 ${base_z_length / 2 + 0.04}" rpy="0 0 0"/> </xacro:hokuyo_utm30lx> <gazebo reference="hokuyo_frame"> <material>Gazebo/FlatBlack</material> </gazebo> <xacro:asus_camera parent="base_link" name="camera"> <origin xyz="${base_x_length / 2} 0.0 ${base_z_length / 2 + 0.01}" rpy="0 0 0"/> </xacro:asus_camera> <gazebo> <plugin name="imu_controller" filename="libhector_gazebo_ros_imu.so"> <updateRate>50.0</updateRate> <bodyName>imu_link</bodyName> <topicName>imu/data</topicName> <accelDrift>0.005 0.005 0.005</accelDrift> <accelGaussianNoise>0.005 0.005 0.005</accelGaussianNoise> <rateDrift>0.005 0.005 0.005 </rateDrift> <rateGaussianNoise>0.005 0.005 0.005 </rateGaussianNoise> <headingDrift>0.005</headingDrift> <headingGaussianNoise>0.005</headingGaussianNoise> </plugin> </gazebo> <link name="imu_link"> <inertial> <mass value="0.001"/> <origin xyz="0 0 0" rpy="0 0 0"/> <inertia ixx="1e-09" ixy="0.0" ixz="0.0" iyy="1e-09" iyz="0.0" izz="1e-09"/> </inertial> </link> <joint name="imu_joint" type="fixed"> <parent link="base_link" /> <child link="imu_link" /> </joint> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/opendog_description-CHAMP/urdf/properties.urdf.xacro
<?xml version="1.0"?> <robot xmlns:xacro="http://ros.org/wiki/xacro"> <xacro:property name="base_to_front_hip_x" value="0.265" /> <xacro:property name="base_to_front_hip_y" value="0.125" /> <xacro:property name="base_to_hind_hip_x" value="0.160" /> <xacro:property name="base_to_hind_hip_y" value="0.125" /> <xacro:property name="hip_to_upper_leg_distance" value="0.07" /> <xacro:property name="upper_leg_to_lower_leg_distance" value="0.2" /> <xacro:property name="lower_leg_to_foot_distance" value="0.23" /> <xacro:property name="hip_mesh_path" value="package://opendog_description/meshes/hip.stl" /> <xacro:property name="hip_mirror_mesh_path" value="package://opendog_description/meshes/hip_mirror.stl" /> <xacro:property name="hip_mass" value="0.250" /> <xacro:property name="hip_x_length" value="0.112" /> <xacro:property name="hip_y_length" value="0.08" /> <xacro:property name="hip_z_length" value="0.130" /> <xacro:property name="upper_leg_mesh_path" value="package://opendog_description/meshes/upper_leg.stl" /> <xacro:property name="upper_leg_mass" value="0.125" /> <xacro:property name="upper_leg_x_length" value="0.08" /> <xacro:property name="upper_leg_y_length" value="0.08" /> <xacro:property name="upper_leg_z_length" value="0.30" /> <xacro:property name="lower_leg_mesh_path" value="package://opendog_description/meshes/lower_leg.stl" /> <xacro:property name="lower_leg_mass" value="0.125" /> <xacro:property name="lower_leg_x_length" value="0.039" /> <xacro:property name="lower_leg_y_length" value="0.022" /> <xacro:property name="lower_leg_z_length" value="0.30" /> <xacro:property name="base_mesh_path" value="package://opendog_description/meshes/base.stl" /> <xacro:property name="base_mass" value="2.0" /> <xacro:property name="base_x_length" value="0.8" /> <xacro:property name="base_y_length" value="0.29" /> <xacro:property name="base_z_length" value="0.22" /> </robot>
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/README.md
# openDogV2: CAD and Code that relates to this YouTube series: https://www.youtube.com/playlist?list=PLpwJoq86vov9CcmrLGyM2XyyYDAYG0-Iu Release 1: created at the end of part 6 of the YouTube series. Please note the issues stated at the end of this video. Release 2: created at the end of part 7 of the YouTube series. Please note the issues stated during this video. Note that the remote is unchanged since release 1. Relase 3: created for part 8 of the YouTube series. Includes the modified knee motor pulley, Python and Arduino code for the deep learning model. # Related Community Projects: OpenDog URDF/config for CHAMP: https://github.com/chvmp/opendog_description 'openDog 2.1' with higher belt reductions and cooling fans: https://github.com/J-DIndustries/openDog-V2.1
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release02/Code/openDogV2_R2/binPixel.ino
void binPixel(int dec) { // convert dec to binary and display on pixels int bit0 = bitRead(dec, 0); int bit1 = bitRead(dec, 1); int bit2 = bitRead(dec, 2); int bit3 = bitRead(dec, 3); if (bit0 == 0) { leds.setPixel(0, BLACK); } else { leds.setPixel(0, RED); } //*********** if (bit1 == 0) { leds.setPixel(1, BLACK); } else { leds.setPixel(1, RED); } //*********** if (bit2 == 0) { leds.setPixel(2, BLACK); } else { leds.setPixel(2, RED); } //*********** if (bit3 == 0) { leds.setPixel(3, BLACK); } else { leds.setPixel(3, RED); } leds.show(); } void modeSelect(int dec) { int bit0 = bitRead(dec, 0); int bit1 = bitRead(dec, 1); int bit2 = bitRead(dec, 2); int bit3 = bitRead(dec, 3); if (bit0 == 0) { leds.setPixel(7, BLACK); } else { leds.setPixel(7, BLUE); } //*********** if (bit1 == 0) { leds.setPixel(6, BLACK); } else { leds.setPixel(6, BLUE); } //*********** if (bit2 == 0) { leds.setPixel(5, BLACK); } else { leds.setPixel(5, BLUE); } //*********** if (bit3 == 0) { leds.setPixel(4, BLACK); } else { leds.setPixel(4, BLUE); } leds.show(); }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release02/Code/openDogV2_R2/ODriveInit.ino
// init hips void OdriveInit1() { Serial.println("ODrive 1 - back hips"); for (int axis = 0; axis < 2; ++axis) { Serial1 << "w axis" << axis << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial1 << "w axis" << axis << ".motor.config.current_lim " << 30.0f << '\n'; Serial1 << "w axis" << axis << ".motor.config.calibration_current " << 20.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << axis << ": Requesting state " << requested_state << '\n'; odrive1.run_state(axis, requested_state, false); // don't wait } } void OdriveInit4() { Serial.println("ODrive 4 - front hips"); for (int axis = 0; axis < 2; ++axis) { Serial4 << "w axis" << axis << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial4 << "w axis" << axis << ".motor.config.current_lim " << 30.0f << '\n'; Serial4 << "w axis" << axis << ".motor.config.calibration_current " << 20.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << axis << ": Requesting state " << requested_state << '\n'; odrive4.run_state(axis, requested_state, false); // don't wait } } void OdriveInit2() { Serial.println("init all axis 0s"); Serial2 << "w axis" << 0 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial2 << "w axis" << 0 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 0 << ": Requesting state " << requested_state << '\n'; odrive2.run_state(0, requested_state, false); // don't wait Serial3 << "w axis" << 0 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial3 << "w axis" << 0 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 0 << ": Requesting state " << requested_state << '\n'; odrive3.run_state(0, requested_state, false); // don't wait Serial5 << "w axis" << 0 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial5 << "w axis" << 0 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 0 << ": Requesting state " << requested_state << '\n'; odrive5.run_state(0, requested_state, false); // don't wait Serial6 << "w axis" << 0 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial6 << "w axis" << 0 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 0 << ": Requesting state " << requested_state << '\n'; odrive6.run_state(0, requested_state, false); // don't wait } void OdriveInit3() { Serial.println("init all axis 1s"); Serial2 << "w axis" << 1 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial2 << "w axis" << 1 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 1 << ": Requesting state " << requested_state << '\n'; odrive2.run_state(1, requested_state, false); // don't wait Serial3 << "w axis" << 1 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial3 << "w axis" << 1 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 1 << ": Requesting state " << requested_state << '\n'; odrive3.run_state(1, requested_state, false); // don't wait Serial5 << "w axis" << 1 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial5 << "w axis" << 1 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 1 << ": Requesting state " << requested_state << '\n'; odrive5.run_state(1, requested_state, false); // don't wait Serial6 << "w axis" << 1 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial6 << "w axis" << 1 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 1 << ": Requesting state " << requested_state << '\n'; odrive6.run_state(1, requested_state, false); // don't wait } void modifyGains() { Serial.println("modfy gains"); float posGain = 60.0; // 20 float velGain = 0.0008; // 0.0005 float integrator = 0.0005; // 0.0005 Serial1 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // back hip Serial1 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // back hip Serial2 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // back left shoulder Serial2 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // back left knee Serial3 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // back right shoulder Serial3 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // back right knee Serial4 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // front hip Serial4 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // front hip Serial5 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // front shoulder Serial5 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // front knee Serial6 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // front shoulder Serial6 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // front knee // ****** Serial1 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // back hip Serial1 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // back hip Serial2 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // back left shoulder Serial2 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // back left knee Serial3 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // back right shoulder Serial3 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // back right knee Serial4 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // front hip Serial4 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // front hip Serial5 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // front shoulder Serial5 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // front knee Serial6 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // front shoulder Serial6 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // front knee // ****** Serial1 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back hip Serial1 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back hip Serial2 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back left shoulder Serial2 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back left knee Serial3 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back right shoulder Serial3 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back right knee Serial4 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front hip Serial4 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front hip Serial5 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front shoulder Serial5 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front knee Serial6 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front shoulder Serial6 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front knee } void applyOffsets() { // apply initial offsets to ODrives taking into account encoder index position // hips odrive1.SetPosition(0, offSet10); // back left odrive1.SetPosition(1, offSet11); // back right odrive4.SetPosition(0, offSet40); // front left odrive4.SetPosition(1, offSet41); // front right // back right leg odrive2.SetPosition(0, offSet20); // shoulder odrive2.SetPosition(1, offSet21); // knee // back left leg odrive3.SetPosition(0, offSet30); // shoulder odrive3.SetPosition(1, offSet31); // knee // front left leg odrive5.SetPosition(0, offSet50); // shoulder odrive5.SetPosition(1, offSet51); // knee // front right leg odrive6.SetPosition(0, offSet60); // shoulder odrive6.SetPosition(1, offSet61); // knee } void driveJoints(int joint, int pos) { // takes into account the original setup offsets for motor postions, and also turns around directions so they are consistent // also constrains the motion limts for each joint if (mydata_remote.toggleTop == 1) { // only do it if the motor enable is on // hips if (joint == 10) { pos = constrain(pos, -1500,1500); odrive1.SetPosition(0, (pos*-1)+offSet10); // back left hip } else if (joint == 11) { pos = constrain(pos, -1500,1500); odrive1.SetPosition(1, pos+offSet11); // back right hip } else if (joint == 40) { pos = constrain(pos, -1500,1500); odrive4.SetPosition(0, (pos*-1)+offSet40); // front left hip } else if (joint == 41) { pos = constrain(pos, -1500,1500); odrive4.SetPosition(1, pos+offSet41); // front right hip } // shoulders else if (joint == 20) { pos = constrain(pos, -2000,4000); odrive2.SetPosition(0, pos+offSet20); // back left shoulder } else if (joint == 30) { pos = constrain(pos, -2000,4000); odrive3.SetPosition(0, (pos*-1)+offSet30); // front right shoulder } else if (joint == 50) { pos = constrain(pos, -2000,4000); odrive5.SetPosition(0, pos+offSet50); // front left shoulder } else if (joint == 60) { pos = constrain(pos, -2000,4000); odrive6.SetPosition(0, (pos*-1)+offSet60); // front right shoulder } // hips else if (joint == 21) { pos = constrain(pos, -2500,3000); odrive2.SetPosition(1, pos+offSet21); // back left knee } else if (joint == 31) { pos = constrain(pos, -2500,3000); odrive3.SetPosition(1, (pos*-1)+offSet31); // back right knee } else if (joint == 51) { pos = constrain(pos, -2500,3000); odrive5.SetPosition(1, pos+offSet51); // front left knee } else if (joint == 61) { pos = constrain(pos, -2500,3000); odrive6.SetPosition(1, (pos*-1)+offSet61); // front right knee } } }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release02/Code/openDogV2_R2/thresholdSticks.ino
int thresholdStick (int pos) { // get zero centre position pos = pos - 512; // threshold value for control sticks if (pos > 50) { pos = pos -50; } else if (pos < -50) { pos = pos +50; } else { pos = 0; } return pos; } // motion filter to filter motions and compliance float filter(float prevValue, float currentValue, int filter) { float lengthFiltered = (prevValue + (currentValue * filter)) / (filter + 1); return lengthFiltered; }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release02/Code/openDogV2_R2/kinematics.ino
void kinematics (int leg, float x, float y, float z, float roll, float pitch, float yaw, int interOn, int dur, int yawDur) { // leg 1 : front left // leg 2 : front right // leg 3 : back left // leg 4 : back right // moving the foot sideways on the end plane float lengthY; float hipAngle1a; float hipAngle1b; float hipAngle1; float hipAngle1Degrees; float hipHyp; // moving the foot forwards or backwardes in the side plane float shoulderAngle2; float shoulderAngle2Degrees; float z2; // side plane of individual leg only #define shinLength 200 #define thighLength 200 float z3; float shoulderAngle1; float shoulderAngle1Degrees; float shoulderAngle1a; float shoulderAngle1b; float shoulderAngle1c; float shoulderAngle1d; float kneeAngle; float kneeAngleDegrees; // *** ROTATION AXIS // roll axis #define bodyWidth 125 // half the distance from the middle of the body to the hip pivot float legDiffRoll; // differnece in height for each leg float bodyDiffRoll; // how much shorter the 'virtual body' gets float footDisplacementRoll; // where the foot actually is float footDisplacementAngleRoll; // smaller angle float footWholeAngleRoll; // whole leg angle float hipRollAngle; // angle for hip when roll axis is in use float rollAngle; // angle in RADIANS that the body rolls float zz1a; // hypotenuse of final triangle float zz1; // new height for leg to pass onto the next bit of code float yy1; // new position for leg to move sideways // pitch axis #define bodyLength 265 // distance from centre of body to shoulder pivot float legDiffPitch; // differnece in height for each leg float bodyDiffPitch; // how much shorter the 'virtual body' gets float footDisplacementPitch; // where the foot actually is float footDisplacementAnglePitch; // smaller angle float footWholeAnglePitch; // whole leg angle float shoulderPitchAngle; // angle for hip when roll axis is in use float pitchAngle; // angle in RADIANS that the body rolls float zz2a; // hypotenuse of final triangle float zz2; // new height for the leg to pass onto the next bit of code float xx1; // new position to move the leg fowwards/backwards // yaw axis float yawAngle; // angle in RADIANs for rotation in yaw float existingAngle; // existing angle of leg from centre float radius; // radius of leg from centre of robot based on x and y from sticks float demandYaw; // demand yaw postion - existing yaw plus the stick yaw float xx3; // new X coordinate based on demand angle float yy3; // new Y coordinate based on demand angle // ** INTERPOLATION ** if (interOn == 1) { if (leg == 1) { // front right z = interpFRZ.go(z,dur); x = interpFRX.go(x,dur); y = interpFRY.go(y,dur); yaw = interpFRT.go(yaw,yawDur); } else if (leg == 2) { // front left z = interpFLZ.go(z,dur); x = interpFLX.go(x,dur); y = interpFLY.go(y,dur); yaw = interpFLT.go(yaw,yawDur); } else if (leg == 4) { // back right z = interpBRZ.go(z,dur); x = interpBRX.go(x,dur); y = interpBRY.go(y,dur); yaw = interpBRT.go(yaw,yawDur); } else if (leg == 3) { // back left z = interpBLZ.go(z,dur); x = interpBLX.go(x,dur); y = interpBLY.go(y,dur); yaw = interpBLT.go(yaw,yawDur); } } /* if (leg == 1) { Serial.print(z); Serial.print(" , "); Serial.print(y); Serial.print(" , "); Serial.print(z); Serial.print(" , "); Serial.println(yaw); } */ // ** YAW AXIS ** // convert degrees to radians for the calcs yawAngle = (PI/180) * yaw; // put in offsets from robot's parameters so we can work out the radius of the foot from the robot's centre if (leg == 1) { // front left leg y = y - bodyWidth; x = x - bodyLength; } else if (leg == 2) { // front right leg y = y + bodyWidth; x = x - bodyLength; } else if (leg == 3) { // back left leg y = (y + bodyWidth)*-1; x = (x + bodyLength) *-1; } else if (leg == 4) { // back left leg y = (y - bodyWidth) *-1; x = (x + bodyLength) *-1; } //calc existing angle of leg from cetre existingAngle = atan(y/x); // calc radius from centre radius = y/sin(existingAngle); //calc demand yaw angle demandYaw = existingAngle + yawAngle; // calc new X and Y based on demand yaw angle xx3 = radius * cos(demandYaw); // calc new X and Y based on new yaw angle yy3 = radius * sin(demandYaw); // remove the offsets so we pivot around 0/0 x/y if (leg == 1) { // front left leg yy3 = yy3 + bodyWidth; xx3 = xx3 + bodyLength; } else if (leg == 2) { // front right leg yy3 = yy3 - bodyWidth; xx3 = xx3 + bodyLength; } else if (leg == 3) { // back left leg yy3 = (yy3 + bodyWidth) *-1; xx3 = (xx3 + bodyLength) *-1; } else if (leg == 4) { // back right leg yy3 = (yy3 - bodyWidth)*-1; xx3 = (xx3 + bodyLength)*-1; } // ** PITCH AXIS *** if (leg == 1 || leg == 2) { pitch = pitch *-1; xx3 = xx3*-1; } // convert pitch to degrees pitchAngle = (PI/180) * pitch; //calc top triangle sides legDiffPitch = sin(pitchAngle) * bodyLength; bodyDiffPitch = cos(pitchAngle) * bodyLength; // calc actual height from the ground for each side legDiffPitch = z - legDiffPitch; // calc foot displacement footDisplacementPitch = ((bodyDiffPitch - bodyLength)*-1)+xx3; //calc smaller displacement angle footDisplacementAnglePitch = atan(footDisplacementPitch/legDiffPitch); //calc distance from the ground at the displacement angle (the hypotenuse of the final triangle) zz2a = legDiffPitch/cos(footDisplacementAnglePitch); // calc the whole angle for the leg footWholeAnglePitch = footDisplacementAnglePitch + pitchAngle; //calc actual leg length - the new Z to pass on zz2 = cos(footWholeAnglePitch) * zz2a; //calc new Z to pass on xx1 = sin(footWholeAnglePitch) * zz2a; if (leg == 1 || leg == 2) { xx1 = xx1*-1; } // *** ROLL AXIS *** // convert roll angle to radians rollAngle = (PI/180) * roll; //covert degrees from the stick to radians if (leg == 2 || leg == 3) { // reverse the calcs for each side of the robot rollAngle = rollAngle *-1; yy3 = yy3*-1; } // calc the top triangle sides legDiffRoll = sin(rollAngle) * bodyWidth; bodyDiffRoll = cos(rollAngle) * bodyWidth; // calc actual height from the ground for each side legDiffRoll = zz2 - legDiffRoll; // calc foot displacement footDisplacementRoll = ((bodyDiffRoll - bodyWidth)*-1)-yy3; //calc smaller displacement angle footDisplacementAngleRoll = atan(footDisplacementRoll/legDiffRoll); //calc distance from the ground at the displacement angle (the hypotenuse of the final triangle) zz1a = legDiffRoll/cos(footDisplacementAngleRoll); // calc the whole angle for the leg footWholeAngleRoll = footDisplacementAngleRoll + rollAngle; //calc actual leg length - the new Z to pass on zz1 = cos(footWholeAngleRoll) * zz1a; //calc new Y to pass on yy1 = sin(footWholeAngleRoll) * zz1a; if (leg == 2 || leg == 3) { // reverse the calcs for each side of the robot yy1 = yy1*-1; } // *** TRANSLATION AXIS *** // calculate the hip joint and new leg length based on how far the robot moves sideways hipAngle1 = atan(yy1/zz1); hipAngle1Degrees = ((hipAngle1 * (180/PI))); // convert to degrees z2 = zz1/cos(hipAngle1); // **************** // calculate the shoulder joint offset and new leg length based on now far the foot moves forward/backwards shoulderAngle2 = atan(xx1/z2); // calc how much extra to add to the shoulder joint shoulderAngle2Degrees = shoulderAngle2 * (180/PI); z3 = z2/cos(shoulderAngle2); // calc new leg length to feed to the next bit of code below // **************** // calculate leg length based on shin/thigh length and knee and shoulder angle shoulderAngle1a = sq(thighLength) + sq(z3) - sq(shinLength); shoulderAngle1b = 2 * thighLength * z3; shoulderAngle1c = shoulderAngle1a / shoulderAngle1b; shoulderAngle1 = acos(shoulderAngle1c); // radians kneeAngle = PI - (shoulderAngle1 *2); // radians //calc degrees from angles shoulderAngle1Degrees = shoulderAngle1 * (180/PI); // degrees kneeAngleDegrees = kneeAngle * (180/PI); // degrees // write to joints if (leg == 1) { // front right int shoulderAngle1Counts = (shoulderAngle1Degrees-45) * 55.555555; // convert to encoder counts int shoulderAngle2Counts = shoulderAngle2Degrees * 55.555555; // convert to encoder counts int shoulderAngleCounts = shoulderAngle1Counts + shoulderAngle2Counts; int kneeAngleCounts = (kneeAngleDegrees-90) * 55.555555; // convert to encoder counts int hipAngleCounts = hipAngle1Degrees * 55.555555; // convert to encoder counts driveJoints (60, shoulderAngleCounts); // front right shoulder driveJoints (61, kneeAngleCounts); // front right knee driveJoints (41, hipAngleCounts); // front right hip } else if (leg == 2) { // front left int shoulderAngle1Counts = (shoulderAngle1Degrees-45) * 55.555555; // convert to encoder counts int shoulderAngle2Counts = shoulderAngle2Degrees * 55.555555; // convert to encoder counts int shoulderAngleCounts = shoulderAngle1Counts + shoulderAngle2Counts; int kneeAngleCounts = (kneeAngleDegrees-90) * 55.555555; // convert to encoder counts int hipAngleCounts = hipAngle1Degrees * 55.555555; // convert to encoder counts driveJoints (50, shoulderAngleCounts); // front left shoulder driveJoints (51, kneeAngleCounts); // front left knee driveJoints (40, hipAngleCounts); // front left hip } else if (leg == 3) { // back left int shoulderAngle1Counts = (shoulderAngle1Degrees-45) * 55.555555; // convert to encoder counts int shoulderAngle2Counts = shoulderAngle2Degrees * 55.555555; // convert to encoder counts int shoulderAngleCounts = shoulderAngle1Counts - shoulderAngle2Counts; int kneeAngleCounts = (kneeAngleDegrees-90) * 55.555555; // convert to encoder counts int hipAngleCounts = hipAngle1Degrees * 55.555555; // convert to encoder counts driveJoints (30, shoulderAngleCounts); // back left shoulder driveJoints (31, kneeAngleCounts); // back left knee driveJoints (10, hipAngleCounts); // back left hip } else if (leg == 4) { // back right int shoulderAngle1Counts = (shoulderAngle1Degrees-45) * 55.555555; // convert to encoder counts int shoulderAngle2Counts = shoulderAngle2Degrees * 55.555555; // convert to encoder counts int shoulderAngleCounts = shoulderAngle1Counts - shoulderAngle2Counts; int kneeAngleCounts = (kneeAngleDegrees-90) * 55.555555; // convert to encoder counts int hipAngleCounts = hipAngle1Degrees * 55.555555; // convert to encoder counts driveJoints (20, shoulderAngleCounts); // back right shoulder driveJoints (21, kneeAngleCounts); // back right knee driveJoints (11, hipAngleCounts); // back right hip } }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release02/Code/openDogV2_R2/readangle.ino
// IMU interrupt service routine void dmpDataReady() { IMUdataReady = 1; } // function that actually read the angle when the flag is set by the ISR void readAngles() { mpuIntStatus = mpu.getIntStatus(); fifoCount = mpu.getFIFOCount(); if ((mpuIntStatus & 0x10) || fifoCount == 1024) { // reset so we can continue cleanly mpu.resetFIFO(); Serial.println(F("FIFO overflow!")); } else if (mpuIntStatus & 0x02) { // wait for correct available data length, should be a VERY short wait while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount(); // read a packet from FIFO mpu.getFIFOBytes(fifoBuffer, packetSize); // track FIFO count here in case there is > 1 packet available // (this lets us immediately read more without waiting for an interrupt) fifoCount -= packetSize; mpu.dmpGetQuaternion(&q, fifoBuffer); mpu.dmpGetGravity(&gravity, &q); mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); IMUdataReady = 0; } }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release02/Code/openDogV2_R2/openDogV2_R2.ino
//ODrive #include <ODriveArduino.h> //IMU stuff #include "I2Cdev.h" #include "MPU6050_6Axis_MotionApps20.h" #include "Wire.h" // Radio #include <SPI.h> #include <nRF24L01.h> #include <RF24.h> // ramp lib #include <Ramp.h> // Pixel display - using Teensy 2812 lib #include <WS2812Serial.h> const int numled = 8; const int pin = 29; byte drawingMemory[numled*3]; // 3 bytes per LED DMAMEM byte displayMemory[numled*12]; // 12 bytes per LED WS2812Serial leds(numled, displayMemory, drawingMemory, pin, WS2812_GRB); #define RED 0x160000 #define GREEN 0x001600 #define BLUE 0x000016 #define YELLOW 0x101400 #define PINK 0x120009 #define ORANGE 0x100400 #define WHITE 0x101010 #define BLACK 0x000000 RF24 radio(9, 10); // CE, CSN const byte addresses[][6] = {"00001", "00002"}; // Printing with stream operator template<class T> inline Print& operator <<(Print &obj, T arg) { obj.print(arg); return obj; } template<> inline Print& operator <<(Print &obj, float arg) { obj.print(arg, 4); return obj; } // class default I2C address is 0x68 // specific I2C addresses may be passed as a parameter here // AD0 low = 0x68 (default for SparkFun breakout and InvenSense evaluation board) // AD0 high = 0x69 MPU6050 mpu; //MPU6050 mpu(0x69); // <-- use for AD0 high // MPU control/status vars bool dmpReady = false; // set true if DMP init was successful uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU uint8_t devStatus; // return status after each device operation (0 = success, !0 = error) uint16_t packetSize; // expected DMP packet size (default is 42 bytes) uint16_t fifoCount; // count of all bytes currently in FIFO uint8_t fifoBuffer[64]; // FIFO storage buffer // orientation/motion vars Quaternion q; // [w, x, y, z] quaternion container VectorInt16 aa; // [x, y, z] accel sensor measurements VectorInt16 aaReal; // [x, y, z] gravity-free accel sensor measurements VectorInt16 aaWorld; // [x, y, z] world-frame accel sensor measurements VectorFloat gravity; // [x, y, z] gravity vector float euler[3]; // [psi, theta, phi] Euler angle container float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gravity vector int IMUdataReady = 0; volatile bool mpuInterrupt = false; // indicates whether MPU interrupt pin has gone high float pitch; float roll; //ODrive Objects ODriveArduino odrive1(Serial1); ODriveArduino odrive2(Serial2); ODriveArduino odrive3(Serial3); ODriveArduino odrive4(Serial4); ODriveArduino odrive5(Serial5); ODriveArduino odrive6(Serial6); //**************remote control**************** struct RECEIVE_DATA_STRUCTURE{ //put your variable definitions here for the data you want to send //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO int16_t menuDown; int16_t Select; int16_t menuUp; int16_t toggleBottom; int16_t toggleTop; int16_t toggle1; int16_t toggle2; int16_t mode; int16_t RLR; int16_t RFB; int16_t RT; int16_t LLR; int16_t LFB; int16_t LT; }; RECEIVE_DATA_STRUCTURE mydata_remote; int RLR = 0; int RFB = 0; int RT = 0; int LLR = 0; int LFB = 0; int LT = 0; float RLRFiltered = 0; float RFBFiltered = 0; float RTFiltered = 0; float LLRFiltered = 0; float LFBFiltered = 0; float LTFiltered = 0; int filterFlag1 = 0; unsigned long currentMillis; long previousMillis = 0; // set up timers long interval = 10; // time constant for timer unsigned long count; unsigned long remoteMillis; int stepFlag = 0; long previousStepMillis = 0; int stepStartFlag = 0; int requested_state; int mode; int modeFlag; int menuFlag; int modeConfirm; int modeConfirmFlag = 0; int runMode = 0; float longLeg1; float shortLeg1; float legLength1; float longLeg2; float shortLeg2; float legLength2; int fr_RFB; int fl_RFB; int bl_RFB; int br_RFB; int fr_RLR; int fl_RLR; int bl_RLR; int br_RLR;; int fr_LT; int fl_LT; int bl_LT; int br_LT; int fr_LLR; int fl_LLR; int br_LLR; int bl_LLR; int actPos1; int actPos2; int actPos3; int actPos4; // ODrive offsets from power up once index pulse is found int offSet10 = -420; //ODrive 1, axis 0 int offSet11 = -250; //ODrive 1, axis 1 int offSet20 = -600; //ODrive 2, axis 0 - back right leg int offSet21 = -3600; //ODrive 2, axis 1 int offSet30 = -2750; //ODrive 3, axis 0 - back left leg int offSet31 = 3800; //ODrive 3, axis 1 int offSet40 = -400; //ODrive 4, axis 0 int offSet41 = -420; //ODrive 4, axis 1 int offSet50 = 1200; //ODrive 5, axis 0 - front left leg int offSet51 = -2700; //ODrive 5, axis 1 int offSet60 = -2400; //ODrive 6, axis 0 - front right leg int offSet61 = 1800; //ODrive 6, axis 1 //*********************************** //*********************************** class Interpolation { public: rampInt myRamp; int interpolationFlag = 0; int savedValue; int go(int input, int duration) { if (input != savedValue) { // check for new data interpolationFlag = 0; } savedValue = input; // bookmark the old value if (interpolationFlag == 0) { // only do it once until the flag is reset myRamp.go(input, duration, LINEAR, ONCEFORWARD); // start interpolation (value to go to, duration) interpolationFlag = 1; } int output = myRamp.update(); return output; } }; // end of class Interpolation interpFRX; // interpolation objects Interpolation interpFRY; Interpolation interpFRZ; Interpolation interpFRT; Interpolation interpFLX; // interpolation objects Interpolation interpFLY; Interpolation interpFLZ; Interpolation interpFLT; Interpolation interpBRX; // interpolation objects Interpolation interpBRY; Interpolation interpBRZ; Interpolation interpBRT; Interpolation interpBLX; // interpolation objects Interpolation interpBLY; Interpolation interpBLZ; Interpolation interpBLT; //*********************************** //*********************************** // ****************** SETUP ****************************** void setup() { // initialize serial communication Serial.begin(115200); Serial1.begin(115200); Serial2.begin(115200); Serial3.begin(115200); Serial4.begin(115200); Serial5.begin(115200); Serial6.begin(115200); radio.begin(); radio.openWritingPipe(addresses[0]); // 00002 radio.openReadingPipe(1, addresses[1]); // 00001 radio.setPALevel(RF24_PA_MIN); radio.startListening(); // IMU Setup // join I2C bus (I2Cdev library doesn't do this automatically) #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE Wire.begin(); Wire.setClock(400000); // 400kHz I2C clock. Comment this line if having compilation difficulties #elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE Fastwire::setup(400, true); #endif // initialize device mpu.initialize(); devStatus = mpu.dmpInitialize(); // supply your own gyro offsets here, scaled for min sensitivity mpu.setXGyroOffset(95); mpu.setYGyroOffset(5); mpu.setZGyroOffset(59); mpu.setXAccelOffset(-1172); mpu.setYAccelOffset(-358); mpu.setZAccelOffset(1652); // make sure it worked (returns 0 if so) if (devStatus == 0) { // turn on the DMP, now that it's ready mpu.setDMPEnabled(true); // enable Arduino interrupt detection attachInterrupt(33, dmpDataReady, RISING); mpuIntStatus = mpu.getIntStatus(); // get expected DMP packet size for later comparison packetSize = mpu.dmpGetFIFOPacketSize(); } else { // ERROR! // 1 = initial memory load failed // 2 = DMP configuration updates failed // (if it's going to break, usually the code will be 1) Serial.print(F("DMP Initialization failed (code ")); Serial.print(devStatus); Serial.println(F(")")); } leds.begin(); // init for pixels } // end of setup // ********************* MAIN LOOP ******************************* void loop() { currentMillis = millis(); if (currentMillis - previousMillis >= 10) { // start timed event previousMillis = currentMillis; // check for IMU inpterrupt, read the data if it's ready if (IMUdataReady == 1) { readAngles(); } // convert angles to degrees for pitch and roll roll = (ypr[1] * 180/M_PI); pitch = (ypr[2] * 180/M_PI); // check for radio data if (radio.available()) { radio.read(&mydata_remote, sizeof(RECEIVE_DATA_STRUCTURE)); remoteMillis = currentMillis; } // is the remote disconnected for too long ? if (currentMillis - remoteMillis > 500) { Serial.println("remote disconnected"); leds.setPixel(0, GREEN); leds.show(); } // threshold remote data // some are reversed based on stick wiring in remote RFB = (thresholdStick(mydata_remote.RFB))*-1; RLR = thresholdStick(mydata_remote.RLR); RT = thresholdStick(mydata_remote.RT); LFB = (thresholdStick(mydata_remote.LFB))*-1; LLR = thresholdStick(mydata_remote.LLR); LT = thresholdStick(mydata_remote.LT); /* // *** read encoder values ** Serial1 << "r axis" << 0 << ".encoder.pos_estimate\n"; actPos1 = odrive1.readInt(); Serial1 << "r axis" << 1 << ".encoder.pos_estimate\n"; actPos2 = odrive1.readInt(); Serial4 << "r axis" << 0 << ".encoder.pos_estimate\n"; actPos3 = odrive4.readInt(); Serial4 << "r axis" << 1 << ".encoder.pos_estimate\n"; actPos4 = odrive4.readInt(); */ /* Serial.print(pitch); Serial.print(" , "); Serial.print(roll); Serial.print(" , "); Serial.print(mode); Serial.print(" , "); Serial.print(RFB); Serial.print(" , "); Serial.print(RLR); Serial.print(" , "); Serial.print(RT); Serial.print(" , "); Serial.print(LFB); Serial.print(" , "); Serial.print(LLR); Serial.print(" , "); Serial.print(LT); Serial.println(" , "); Serial.println(mode); */ // mode select if (mydata_remote.menuUp == 1 && menuFlag == 0) { menuFlag = 1; mode = mode+1; mode = constrain(mode,0,10); } else if (mydata_remote.menuDown == 1 && menuFlag == 0) { menuFlag = 1; mode = mode-1; mode = constrain(mode,0,10); } else if (mydata_remote.menuDown == 0 && mydata_remote.menuUp == 0){ menuFlag = 0; } binPixel(mode); // use the function to display potential mode on the pixels if (mydata_remote.Select == 1){ modeConfirm = mode; // make the actual mode be the potential mode when the select button is pressed modeSelect(modeConfirm); // display actual mode on pixels. } // init ODrives (with serial) if (Serial.available()) { char c = Serial.read(); if (c == 'a') { OdriveInit1(); OdriveInit4(); } else if (c == 'b') { OdriveInit2(); } else if (c == 'c') { OdriveInit3(); } else if (c == 'd') { applyOffsets(); } else if (c == 'e') { modifyGains(); } } // remote Menu handling with debounce if (mydata_remote.Select == 0) { modeConfirmFlag = 0; } if (modeConfirm == 1 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // **init hips** OdriveInit1(); // back hips OdriveInit4(); // front hips // move to zero position away from stand odrive1.SetPosition(0, 0); // back left leg odrive1.SetPosition(1, 0); // back right leg odrive4.SetPosition(0, 0); // front left leg odrive4.SetPosition(1, 0); // front right leg modeConfirmFlag = 1; } else if (modeConfirm == 2 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** init shoulders ** OdriveInit2(); modeConfirmFlag = 1; } else if (modeConfirm == 3 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** init knees ** OdriveInit3(); modeConfirmFlag = 1; } else if (modeConfirm == 4 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** apply offsets to get joints to home position ** applyOffsets(); modeConfirmFlag = 1; } else if (modeConfirm == 5 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** apply ODrive parameters to make joints stiffer ** modifyGains(); modeConfirmFlag = 1; } else if (modeConfirm == 6 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** test mode ** runMode = 1; modeConfirmFlag = 1; } else if (modeConfirm == 7 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** kinemtaics mode ** runMode = 2; modeConfirmFlag = 1; } else if (modeConfirm == 8 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** kinemtaics mode ** runMode = 3; modeConfirmFlag = 1; } // ***** start of runModes ****** if (runMode == 1) { // ** simple joint motion test mode ** // scale sticks to drive joints directly for this test mode RT = RT * 10; RFB = RFB * 10; RLR = RLR * 10; // filter sticks a reasonable amount for this test mode RFBFiltered = filter(RFB, RFBFiltered, 20); RLRFiltered = filter(RLR, RLRFiltered, 20); RTFiltered = filter(RT, RTFiltered, 20); // drive joints all in the same direction as a test // hips driveJoints (10, RTFiltered); // back left driveJoints (11, RTFiltered); // back rght driveJoints (40, RTFiltered); // front left driveJoints (41, RTFiltered); // front right // shoulders driveJoints (20, RFBFiltered); // back right driveJoints (30, RFBFiltered); // back left driveJoints (50, RFBFiltered); // front right driveJoints (60, RFBFiltered); // front left // knees driveJoints (21, RLRFiltered); // back right driveJoints (31, RLRFiltered); // back left driveJoints (51, RLRFiltered); // front right driveJoints (61, RLRFiltered); // back left } else if (runMode == 2) { // ** inverse kinematics demo ** stepStartFlag = 0; // reset flag for stepping setup if (filterFlag1 == 0) { // make sure Z height filtered value is already set to mid position RTFiltered = 282; filterFlag1 = 1; } RFB = map(RFB,-462,462,-100,100); RFBFiltered = filter(RFB, RFBFiltered, 30); RLR = map(RLR,-462,462,-100,100); RLRFiltered = filter(RLR, RLRFiltered, 30); RT = map(RT,-462,462,182,382); RTFiltered = filter(RT, RTFiltered, 30); LFB = map(LFB,-462,462,-10,10); LFBFiltered = filter(LFB, LFBFiltered, 30); LLR = map(LLR,-462,462,-15,15); LLRFiltered = filter(LLR, LLRFiltered, 30); LT = map(LT,-462,462,-10,10); LTFiltered = filter(LT, LTFiltered, 30); kinematics (1, RFBFiltered, RLRFiltered-50, RTFiltered, LLRFiltered, LFBFiltered, LTFiltered, 0, 0, 0); // front right kinematics (2, RFBFiltered, RLRFiltered+50, RTFiltered, LLRFiltered, LFBFiltered, LTFiltered, 0, 0, 0); // front left kinematics (3, RFBFiltered, RLRFiltered+50, RTFiltered, LLRFiltered, LFBFiltered, LTFiltered, 0, 0, 0); // back left kinematics (4, RFBFiltered, RLRFiltered-50, RTFiltered, LLRFiltered, LFBFiltered, LTFiltered, 0, 0, 0); // back right } else if (runMode == 3) { // simple walking // position legs a bit straighter, only do it once if (stepStartFlag == 0) { legLength1 = longLeg1; legLength2 = longLeg2; fr_RFB = 0; fl_RFB = 0; bl_RFB = 0; br_RFB = 0; fr_RLR = -50; fl_RLR = 50; bl_RLR = 50; br_RLR = -50; fr_LT = 0; fl_LT = 0; bl_LT = 0; br_LT = 0; stepStartFlag = 1; } if (RFB != 0 || RLR !=0 || LT !=0) { RFB = map(RFB,-462,462,-50,50); RLR = map(RLR,-462,462,-25,25); LT = map(LT,-462,462,-5,5); longLeg1 = 350; shortLeg1 = 280; longLeg2 = 350; shortLeg2 = 280; int timer1 = 100; // feet ON the ground int timer2 = 100; // feet OFF the ground if (stepFlag == 0 && currentMillis - previousStepMillis > timer1) { legLength1 = shortLeg1; legLength2 = longLeg2; fr_RFB = 0-RFB; fl_RFB = RFB; bl_RFB = 0-RFB; br_RFB = RFB; fr_RLR = -50-RLR; fl_RLR = 50+RLR; bl_RLR = 50-RLR; br_RLR = -50+RLR; fr_LT = 0-LT; fl_LT = LT; bl_LT = 0-LT; br_LT = LT; stepFlag = 1; previousStepMillis = currentMillis; } else if (stepFlag == 1 && currentMillis - previousStepMillis > timer2) { legLength1 = longLeg1; legLength2 = longLeg2; fr_RFB = 0-RFB; fl_RFB = RFB; bl_RFB = 0-RFB; br_RFB = RFB; fr_RLR = -50-RLR; fl_RLR = 50+RLR; bl_RLR = 50-RLR; br_RLR = -50+RLR; fr_LT = 0-LT; fl_LT = LT; bl_LT = 0-LT; br_LT = LT; stepFlag = 2; previousStepMillis = currentMillis; } else if (stepFlag == 2 && currentMillis - previousStepMillis > timer1) { legLength1 = longLeg1; legLength2 = shortLeg2; fr_RFB = RFB; fl_RFB = 0-RFB; bl_RFB = RFB; br_RFB = 0-RFB; fr_RLR = -50+RLR; fl_RLR = 50-RLR; bl_RLR = 50+RLR; br_RLR = -50-RLR; fr_LT = LT; fl_LT = 0-LT; bl_LT = LT; br_LT = 0-LT; stepFlag = 3; previousStepMillis = currentMillis; } else if (stepFlag == 3 && currentMillis - previousStepMillis > timer2) { legLength1 = longLeg1; legLength2 = longLeg2; fr_RFB = RFB; fl_RFB = 0-RFB; bl_RFB = RFB; br_RFB = 0-RFB; fr_RLR = -50+RLR; fl_RLR = 50-RLR; bl_RLR = 50+RLR; br_RLR = -50-RLR; fr_LT = LT; fl_LT = 0-LT; bl_LT = LT; br_LT = 0-LT; stepFlag = 0; previousStepMillis = currentMillis; } } else { legLength1 = longLeg1; legLength2 = longLeg2; fr_RFB = 0; fl_RFB = 0; bl_RFB = 0; br_RFB = 0; fr_RLR = -50; fl_RLR = 50; bl_RLR = 50; br_RLR = -50; fr_LT = 0; fl_LT = 0; bl_LT = 0; br_LT = 0; } if (RFB >0) { //walking forward fl_LT = 0; fr_LT = 0; } if (RFB <0) { //walking backward bl_LT = 0; br_LT = 0; } kinematics (1, fr_RFB, fr_RLR, legLength1, 0, 0, fr_LT, 1, 100, 100); // front right kinematics (2, fl_RFB, fl_RLR, legLength2, 0, 0, fl_LT, 1, 100, 100); // front left kinematics (3, bl_RFB, bl_RLR, legLength1, 0, 0, bl_LT, 1, 100, 100); // back left kinematics (4, br_RFB, br_RLR, legLength2, 0, 0, br_LT, 1, 100, 100); // back right } } // end of timed loop } // end of main loop
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release02/Code/openDogV2_R2/MPU6050_6Axis_MotionApps20.h
// I2Cdev library collection - MPU6050 I2C device class, 6-axis MotionApps 2.0 implementation // Based on InvenSense MPU-6050 register map document rev. 2.0, 5/19/2011 (RM-MPU-6000A-00) // 5/20/2013 by Jeff Rowberg <jeff@rowberg.net> // Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib // // Changelog: // ... - ongoing debug release /* ============================================ I2Cdev device library code is placed under the MIT license Copyright (c) 2012 Jeff Rowberg Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (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. =============================================== */ #ifndef _MPU6050_6AXIS_MOTIONAPPS20_H_ #define _MPU6050_6AXIS_MOTIONAPPS20_H_ #include "I2Cdev.h" #include "helper_3dmath.h" // MotionApps 2.0 DMP implementation, built using the MPU-6050EVB evaluation board #define MPU6050_INCLUDE_DMP_MOTIONAPPS20 #include "MPU6050.h" // Tom Carpenter's conditional PROGMEM code // http://forum.arduino.cc/index.php?topic=129407.0 #ifndef __arm__ #include <avr/pgmspace.h> #else // Teensy 3.0 library conditional PROGMEM code from Paul Stoffregen #ifndef __PGMSPACE_H_ #define __PGMSPACE_H_ 1 #include <inttypes.h> #define PROGMEM #define PGM_P const char * #define PSTR(str) (str) #define F(x) x typedef void prog_void; typedef char prog_char; typedef unsigned char prog_uchar; typedef int8_t prog_int8_t; typedef uint8_t prog_uint8_t; typedef int16_t prog_int16_t; typedef uint16_t prog_uint16_t; typedef int32_t prog_int32_t; typedef uint32_t prog_uint32_t; #define strcpy_P(dest, src) strcpy((dest), (src)) #define strcat_P(dest, src) strcat((dest), (src)) #define strcmp_P(a, b) strcmp((a), (b)) #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) #define pgm_read_word(addr) (*(const unsigned short *)(addr)) #define pgm_read_dword(addr) (*(const unsigned long *)(addr)) #define pgm_read_float(addr) (*(const float *)(addr)) #define pgm_read_byte_near(addr) pgm_read_byte(addr) #define pgm_read_word_near(addr) pgm_read_word(addr) #define pgm_read_dword_near(addr) pgm_read_dword(addr) #define pgm_read_float_near(addr) pgm_read_float(addr) #define pgm_read_byte_far(addr) pgm_read_byte(addr) #define pgm_read_word_far(addr) pgm_read_word(addr) #define pgm_read_dword_far(addr) pgm_read_dword(addr) #define pgm_read_float_far(addr) pgm_read_float(addr) #endif #endif /* Source is from the InvenSense MotionApps v2 demo code. Original source is * unavailable, unless you happen to be amazing as decompiling binary by * hand (in which case, please contact me, and I'm totally serious). * * Also, I'd like to offer many, many thanks to Noah Zerkin for all of the * DMP reverse-engineering he did to help make this bit of wizardry * possible. */ // NOTE! Enabling DEBUG adds about 3.3kB to the flash program size. // Debug output is now working even on ATMega328P MCUs (e.g. Arduino Uno) // after moving string constants to flash memory storage using the F() // compiler macro (Arduino IDE 1.0+ required). //#define DEBUG #ifdef DEBUG #define DEBUG_PRINT(x) Serial.print(x) #define DEBUG_PRINTF(x, y) Serial.print(x, y) #define DEBUG_PRINTLN(x) Serial.println(x) #define DEBUG_PRINTLNF(x, y) Serial.println(x, y) #else #define DEBUG_PRINT(x) #define DEBUG_PRINTF(x, y) #define DEBUG_PRINTLN(x) #define DEBUG_PRINTLNF(x, y) #endif #define MPU6050_DMP_CODE_SIZE 1929 // dmpMemory[] #define MPU6050_DMP_CONFIG_SIZE 192 // dmpConfig[] #define MPU6050_DMP_UPDATES_SIZE 47 // dmpUpdates[] /* ================================================================================================ * | Default MotionApps v2.0 42-byte FIFO packet structure: | | | | [QUAT W][ ][QUAT X][ ][QUAT Y][ ][QUAT Z][ ][GYRO X][ ][GYRO Y][ ] | | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | | | | [GYRO Z][ ][ACC X ][ ][ACC Y ][ ][ACC Z ][ ][ ] | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | * ================================================================================================ */ // this block of memory gets written to the MPU on start-up, and it seems // to be volatile memory, so it has to be done each time (it only takes ~1 // second though) const unsigned char dmpMemory[MPU6050_DMP_CODE_SIZE] PROGMEM = { // bank 0, 256 bytes 0xFB, 0x00, 0x00, 0x3E, 0x00, 0x0B, 0x00, 0x36, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x54, 0xFF, 0xEF, 0x00, 0x00, 0xFA, 0x80, 0x00, 0x0B, 0x12, 0x82, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0xFF, 0xFF, 0x45, 0x81, 0xFF, 0xFF, 0xFA, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xE8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x7F, 0xFF, 0xFF, 0xFE, 0x80, 0x01, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x03, 0x30, 0x40, 0x00, 0x00, 0x00, 0x02, 0xCA, 0xE3, 0x09, 0x3E, 0x80, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x41, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x2A, 0x00, 0x00, 0x16, 0x55, 0x00, 0x00, 0x21, 0x82, 0xFD, 0x87, 0x26, 0x50, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x6F, 0x00, 0x02, 0x65, 0x32, 0x00, 0x00, 0x5E, 0xC0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFB, 0x8C, 0x6F, 0x5D, 0xFD, 0x5D, 0x08, 0xD9, 0x00, 0x7C, 0x73, 0x3B, 0x00, 0x6C, 0x12, 0xCC, 0x32, 0x00, 0x13, 0x9D, 0x32, 0x00, 0xD0, 0xD6, 0x32, 0x00, 0x08, 0x00, 0x40, 0x00, 0x01, 0xF4, 0xFF, 0xE6, 0x80, 0x79, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xD6, 0x00, 0x00, 0x27, 0x10, // bank 1, 256 bytes 0xFB, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFA, 0x36, 0xFF, 0xBC, 0x30, 0x8E, 0x00, 0x05, 0xFB, 0xF0, 0xFF, 0xD9, 0x5B, 0xC8, 0xFF, 0xD0, 0x9A, 0xBE, 0x00, 0x00, 0x10, 0xA9, 0xFF, 0xF4, 0x1E, 0xB2, 0x00, 0xCE, 0xBB, 0xF7, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x0C, 0xFF, 0xC2, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0xCF, 0x80, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3F, 0x68, 0xB6, 0x79, 0x35, 0x28, 0xBC, 0xC6, 0x7E, 0xD1, 0x6C, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4D, 0x00, 0x2F, 0x70, 0x6D, 0x00, 0x00, 0x05, 0xAE, 0x00, 0x0C, 0x02, 0xD0, // bank 2, 256 bytes 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x54, 0xFF, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0xFF, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // bank 3, 256 bytes 0xD8, 0xDC, 0xBA, 0xA2, 0xF1, 0xDE, 0xB2, 0xB8, 0xB4, 0xA8, 0x81, 0x91, 0xF7, 0x4A, 0x90, 0x7F, 0x91, 0x6A, 0xF3, 0xF9, 0xDB, 0xA8, 0xF9, 0xB0, 0xBA, 0xA0, 0x80, 0xF2, 0xCE, 0x81, 0xF3, 0xC2, 0xF1, 0xC1, 0xF2, 0xC3, 0xF3, 0xCC, 0xA2, 0xB2, 0x80, 0xF1, 0xC6, 0xD8, 0x80, 0xBA, 0xA7, 0xDF, 0xDF, 0xDF, 0xF2, 0xA7, 0xC3, 0xCB, 0xC5, 0xB6, 0xF0, 0x87, 0xA2, 0x94, 0x24, 0x48, 0x70, 0x3C, 0x95, 0x40, 0x68, 0x34, 0x58, 0x9B, 0x78, 0xA2, 0xF1, 0x83, 0x92, 0x2D, 0x55, 0x7D, 0xD8, 0xB1, 0xB4, 0xB8, 0xA1, 0xD0, 0x91, 0x80, 0xF2, 0x70, 0xF3, 0x70, 0xF2, 0x7C, 0x80, 0xA8, 0xF1, 0x01, 0xB0, 0x98, 0x87, 0xD9, 0x43, 0xD8, 0x86, 0xC9, 0x88, 0xBA, 0xA1, 0xF2, 0x0E, 0xB8, 0x97, 0x80, 0xF1, 0xA9, 0xDF, 0xDF, 0xDF, 0xAA, 0xDF, 0xDF, 0xDF, 0xF2, 0xAA, 0xC5, 0xCD, 0xC7, 0xA9, 0x0C, 0xC9, 0x2C, 0x97, 0x97, 0x97, 0x97, 0xF1, 0xA9, 0x89, 0x26, 0x46, 0x66, 0xB0, 0xB4, 0xBA, 0x80, 0xAC, 0xDE, 0xF2, 0xCA, 0xF1, 0xB2, 0x8C, 0x02, 0xA9, 0xB6, 0x98, 0x00, 0x89, 0x0E, 0x16, 0x1E, 0xB8, 0xA9, 0xB4, 0x99, 0x2C, 0x54, 0x7C, 0xB0, 0x8A, 0xA8, 0x96, 0x36, 0x56, 0x76, 0xF1, 0xB9, 0xAF, 0xB4, 0xB0, 0x83, 0xC0, 0xB8, 0xA8, 0x97, 0x11, 0xB1, 0x8F, 0x98, 0xB9, 0xAF, 0xF0, 0x24, 0x08, 0x44, 0x10, 0x64, 0x18, 0xF1, 0xA3, 0x29, 0x55, 0x7D, 0xAF, 0x83, 0xB5, 0x93, 0xAF, 0xF0, 0x00, 0x28, 0x50, 0xF1, 0xA3, 0x86, 0x9F, 0x61, 0xA6, 0xDA, 0xDE, 0xDF, 0xD9, 0xFA, 0xA3, 0x86, 0x96, 0xDB, 0x31, 0xA6, 0xD9, 0xF8, 0xDF, 0xBA, 0xA6, 0x8F, 0xC2, 0xC5, 0xC7, 0xB2, 0x8C, 0xC1, 0xB8, 0xA2, 0xDF, 0xDF, 0xDF, 0xA3, 0xDF, 0xDF, 0xDF, 0xD8, 0xD8, 0xF1, 0xB8, 0xA8, 0xB2, 0x86, // bank 4, 256 bytes 0xB4, 0x98, 0x0D, 0x35, 0x5D, 0xB8, 0xAA, 0x98, 0xB0, 0x87, 0x2D, 0x35, 0x3D, 0xB2, 0xB6, 0xBA, 0xAF, 0x8C, 0x96, 0x19, 0x8F, 0x9F, 0xA7, 0x0E, 0x16, 0x1E, 0xB4, 0x9A, 0xB8, 0xAA, 0x87, 0x2C, 0x54, 0x7C, 0xB9, 0xA3, 0xDE, 0xDF, 0xDF, 0xA3, 0xB1, 0x80, 0xF2, 0xC4, 0xCD, 0xC9, 0xF1, 0xB8, 0xA9, 0xB4, 0x99, 0x83, 0x0D, 0x35, 0x5D, 0x89, 0xB9, 0xA3, 0x2D, 0x55, 0x7D, 0xB5, 0x93, 0xA3, 0x0E, 0x16, 0x1E, 0xA9, 0x2C, 0x54, 0x7C, 0xB8, 0xB4, 0xB0, 0xF1, 0x97, 0x83, 0xA8, 0x11, 0x84, 0xA5, 0x09, 0x98, 0xA3, 0x83, 0xF0, 0xDA, 0x24, 0x08, 0x44, 0x10, 0x64, 0x18, 0xD8, 0xF1, 0xA5, 0x29, 0x55, 0x7D, 0xA5, 0x85, 0x95, 0x02, 0x1A, 0x2E, 0x3A, 0x56, 0x5A, 0x40, 0x48, 0xF9, 0xF3, 0xA3, 0xD9, 0xF8, 0xF0, 0x98, 0x83, 0x24, 0x08, 0x44, 0x10, 0x64, 0x18, 0x97, 0x82, 0xA8, 0xF1, 0x11, 0xF0, 0x98, 0xA2, 0x24, 0x08, 0x44, 0x10, 0x64, 0x18, 0xDA, 0xF3, 0xDE, 0xD8, 0x83, 0xA5, 0x94, 0x01, 0xD9, 0xA3, 0x02, 0xF1, 0xA2, 0xC3, 0xC5, 0xC7, 0xD8, 0xF1, 0x84, 0x92, 0xA2, 0x4D, 0xDA, 0x2A, 0xD8, 0x48, 0x69, 0xD9, 0x2A, 0xD8, 0x68, 0x55, 0xDA, 0x32, 0xD8, 0x50, 0x71, 0xD9, 0x32, 0xD8, 0x70, 0x5D, 0xDA, 0x3A, 0xD8, 0x58, 0x79, 0xD9, 0x3A, 0xD8, 0x78, 0x93, 0xA3, 0x4D, 0xDA, 0x2A, 0xD8, 0x48, 0x69, 0xD9, 0x2A, 0xD8, 0x68, 0x55, 0xDA, 0x32, 0xD8, 0x50, 0x71, 0xD9, 0x32, 0xD8, 0x70, 0x5D, 0xDA, 0x3A, 0xD8, 0x58, 0x79, 0xD9, 0x3A, 0xD8, 0x78, 0xA8, 0x8A, 0x9A, 0xF0, 0x28, 0x50, 0x78, 0x9E, 0xF3, 0x88, 0x18, 0xF1, 0x9F, 0x1D, 0x98, 0xA8, 0xD9, 0x08, 0xD8, 0xC8, 0x9F, 0x12, 0x9E, 0xF3, 0x15, 0xA8, 0xDA, 0x12, 0x10, 0xD8, 0xF1, 0xAF, 0xC8, 0x97, 0x87, // bank 5, 256 bytes 0x34, 0xB5, 0xB9, 0x94, 0xA4, 0x21, 0xF3, 0xD9, 0x22, 0xD8, 0xF2, 0x2D, 0xF3, 0xD9, 0x2A, 0xD8, 0xF2, 0x35, 0xF3, 0xD9, 0x32, 0xD8, 0x81, 0xA4, 0x60, 0x60, 0x61, 0xD9, 0x61, 0xD8, 0x6C, 0x68, 0x69, 0xD9, 0x69, 0xD8, 0x74, 0x70, 0x71, 0xD9, 0x71, 0xD8, 0xB1, 0xA3, 0x84, 0x19, 0x3D, 0x5D, 0xA3, 0x83, 0x1A, 0x3E, 0x5E, 0x93, 0x10, 0x30, 0x81, 0x10, 0x11, 0xB8, 0xB0, 0xAF, 0x8F, 0x94, 0xF2, 0xDA, 0x3E, 0xD8, 0xB4, 0x9A, 0xA8, 0x87, 0x29, 0xDA, 0xF8, 0xD8, 0x87, 0x9A, 0x35, 0xDA, 0xF8, 0xD8, 0x87, 0x9A, 0x3D, 0xDA, 0xF8, 0xD8, 0xB1, 0xB9, 0xA4, 0x98, 0x85, 0x02, 0x2E, 0x56, 0xA5, 0x81, 0x00, 0x0C, 0x14, 0xA3, 0x97, 0xB0, 0x8A, 0xF1, 0x2D, 0xD9, 0x28, 0xD8, 0x4D, 0xD9, 0x48, 0xD8, 0x6D, 0xD9, 0x68, 0xD8, 0xB1, 0x84, 0x0D, 0xDA, 0x0E, 0xD8, 0xA3, 0x29, 0x83, 0xDA, 0x2C, 0x0E, 0xD8, 0xA3, 0x84, 0x49, 0x83, 0xDA, 0x2C, 0x4C, 0x0E, 0xD8, 0xB8, 0xB0, 0xA8, 0x8A, 0x9A, 0xF5, 0x20, 0xAA, 0xDA, 0xDF, 0xD8, 0xA8, 0x40, 0xAA, 0xD0, 0xDA, 0xDE, 0xD8, 0xA8, 0x60, 0xAA, 0xDA, 0xD0, 0xDF, 0xD8, 0xF1, 0x97, 0x86, 0xA8, 0x31, 0x9B, 0x06, 0x99, 0x07, 0xAB, 0x97, 0x28, 0x88, 0x9B, 0xF0, 0x0C, 0x20, 0x14, 0x40, 0xB8, 0xB0, 0xB4, 0xA8, 0x8C, 0x9C, 0xF0, 0x04, 0x28, 0x51, 0x79, 0x1D, 0x30, 0x14, 0x38, 0xB2, 0x82, 0xAB, 0xD0, 0x98, 0x2C, 0x50, 0x50, 0x78, 0x78, 0x9B, 0xF1, 0x1A, 0xB0, 0xF0, 0x8A, 0x9C, 0xA8, 0x29, 0x51, 0x79, 0x8B, 0x29, 0x51, 0x79, 0x8A, 0x24, 0x70, 0x59, 0x8B, 0x20, 0x58, 0x71, 0x8A, 0x44, 0x69, 0x38, 0x8B, 0x39, 0x40, 0x68, 0x8A, 0x64, 0x48, 0x31, 0x8B, 0x30, 0x49, 0x60, 0xA5, 0x88, 0x20, 0x09, 0x71, 0x58, 0x44, 0x68, // bank 6, 256 bytes 0x11, 0x39, 0x64, 0x49, 0x30, 0x19, 0xF1, 0xAC, 0x00, 0x2C, 0x54, 0x7C, 0xF0, 0x8C, 0xA8, 0x04, 0x28, 0x50, 0x78, 0xF1, 0x88, 0x97, 0x26, 0xA8, 0x59, 0x98, 0xAC, 0x8C, 0x02, 0x26, 0x46, 0x66, 0xF0, 0x89, 0x9C, 0xA8, 0x29, 0x51, 0x79, 0x24, 0x70, 0x59, 0x44, 0x69, 0x38, 0x64, 0x48, 0x31, 0xA9, 0x88, 0x09, 0x20, 0x59, 0x70, 0xAB, 0x11, 0x38, 0x40, 0x69, 0xA8, 0x19, 0x31, 0x48, 0x60, 0x8C, 0xA8, 0x3C, 0x41, 0x5C, 0x20, 0x7C, 0x00, 0xF1, 0x87, 0x98, 0x19, 0x86, 0xA8, 0x6E, 0x76, 0x7E, 0xA9, 0x99, 0x88, 0x2D, 0x55, 0x7D, 0x9E, 0xB9, 0xA3, 0x8A, 0x22, 0x8A, 0x6E, 0x8A, 0x56, 0x8A, 0x5E, 0x9F, 0xB1, 0x83, 0x06, 0x26, 0x46, 0x66, 0x0E, 0x2E, 0x4E, 0x6E, 0x9D, 0xB8, 0xAD, 0x00, 0x2C, 0x54, 0x7C, 0xF2, 0xB1, 0x8C, 0xB4, 0x99, 0xB9, 0xA3, 0x2D, 0x55, 0x7D, 0x81, 0x91, 0xAC, 0x38, 0xAD, 0x3A, 0xB5, 0x83, 0x91, 0xAC, 0x2D, 0xD9, 0x28, 0xD8, 0x4D, 0xD9, 0x48, 0xD8, 0x6D, 0xD9, 0x68, 0xD8, 0x8C, 0x9D, 0xAE, 0x29, 0xD9, 0x04, 0xAE, 0xD8, 0x51, 0xD9, 0x04, 0xAE, 0xD8, 0x79, 0xD9, 0x04, 0xD8, 0x81, 0xF3, 0x9D, 0xAD, 0x00, 0x8D, 0xAE, 0x19, 0x81, 0xAD, 0xD9, 0x01, 0xD8, 0xF2, 0xAE, 0xDA, 0x26, 0xD8, 0x8E, 0x91, 0x29, 0x83, 0xA7, 0xD9, 0xAD, 0xAD, 0xAD, 0xAD, 0xF3, 0x2A, 0xD8, 0xD8, 0xF1, 0xB0, 0xAC, 0x89, 0x91, 0x3E, 0x5E, 0x76, 0xF3, 0xAC, 0x2E, 0x2E, 0xF1, 0xB1, 0x8C, 0x5A, 0x9C, 0xAC, 0x2C, 0x28, 0x28, 0x28, 0x9C, 0xAC, 0x30, 0x18, 0xA8, 0x98, 0x81, 0x28, 0x34, 0x3C, 0x97, 0x24, 0xA7, 0x28, 0x34, 0x3C, 0x9C, 0x24, 0xF2, 0xB0, 0x89, 0xAC, 0x91, 0x2C, 0x4C, 0x6C, 0x8A, 0x9B, 0x2D, 0xD9, 0xD8, 0xD8, 0x51, 0xD9, 0xD8, 0xD8, 0x79, // bank 7, 138 bytes (remainder) 0xD9, 0xD8, 0xD8, 0xF1, 0x9E, 0x88, 0xA3, 0x31, 0xDA, 0xD8, 0xD8, 0x91, 0x2D, 0xD9, 0x28, 0xD8, 0x4D, 0xD9, 0x48, 0xD8, 0x6D, 0xD9, 0x68, 0xD8, 0xB1, 0x83, 0x93, 0x35, 0x3D, 0x80, 0x25, 0xDA, 0xD8, 0xD8, 0x85, 0x69, 0xDA, 0xD8, 0xD8, 0xB4, 0x93, 0x81, 0xA3, 0x28, 0x34, 0x3C, 0xF3, 0xAB, 0x8B, 0xF8, 0xA3, 0x91, 0xB6, 0x09, 0xB4, 0xD9, 0xAB, 0xDE, 0xFA, 0xB0, 0x87, 0x9C, 0xB9, 0xA3, 0xDD, 0xF1, 0xA3, 0xA3, 0xA3, 0xA3, 0x95, 0xF1, 0xA3, 0xA3, 0xA3, 0x9D, 0xF1, 0xA3, 0xA3, 0xA3, 0xA3, 0xF2, 0xA3, 0xB4, 0x90, 0x80, 0xF2, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xB2, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xB0, 0x87, 0xB5, 0x99, 0xF1, 0xA3, 0xA3, 0xA3, 0x98, 0xF1, 0xA3, 0xA3, 0xA3, 0xA3, 0x97, 0xA3, 0xA3, 0xA3, 0xA3, 0xF3, 0x9B, 0xA3, 0xA3, 0xDC, 0xB9, 0xA7, 0xF1, 0x26, 0x26, 0x26, 0xD8, 0xD8, 0xFF }; // thanks to Noah Zerkin for piecing this stuff together! const unsigned char dmpConfig[MPU6050_DMP_CONFIG_SIZE] PROGMEM = { // BANK OFFSET LENGTH [DATA] 0x03, 0x7B, 0x03, 0x4C, 0xCD, 0x6C, // FCFG_1 inv_set_gyro_calibration 0x03, 0xAB, 0x03, 0x36, 0x56, 0x76, // FCFG_3 inv_set_gyro_calibration 0x00, 0x68, 0x04, 0x02, 0xCB, 0x47, 0xA2, // D_0_104 inv_set_gyro_calibration 0x02, 0x18, 0x04, 0x00, 0x05, 0x8B, 0xC1, // D_0_24 inv_set_gyro_calibration 0x01, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, // D_1_152 inv_set_accel_calibration 0x03, 0x7F, 0x06, 0x0C, 0xC9, 0x2C, 0x97, 0x97, 0x97, // FCFG_2 inv_set_accel_calibration 0x03, 0x89, 0x03, 0x26, 0x46, 0x66, // FCFG_7 inv_set_accel_calibration 0x00, 0x6C, 0x02, 0x20, 0x00, // D_0_108 inv_set_accel_calibration 0x02, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_00 inv_set_compass_calibration 0x02, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_01 0x02, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_02 0x02, 0x4C, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_10 0x02, 0x50, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_11 0x02, 0x54, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_12 0x02, 0x58, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_20 0x02, 0x5C, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_21 0x02, 0xBC, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_22 0x01, 0xEC, 0x04, 0x00, 0x00, 0x40, 0x00, // D_1_236 inv_apply_endian_accel 0x03, 0x7F, 0x06, 0x0C, 0xC9, 0x2C, 0x97, 0x97, 0x97, // FCFG_2 inv_set_mpu_sensors 0x04, 0x02, 0x03, 0x0D, 0x35, 0x5D, // CFG_MOTION_BIAS inv_turn_on_bias_from_no_motion 0x04, 0x09, 0x04, 0x87, 0x2D, 0x35, 0x3D, // FCFG_5 inv_set_bias_update 0x00, 0xA3, 0x01, 0x00, // D_0_163 inv_set_dead_zone // SPECIAL 0x01 = enable interrupts 0x00, 0x00, 0x00, 0x01, // SET INT_ENABLE at i=22, SPECIAL INSTRUCTION 0x07, 0x86, 0x01, 0xFE, // CFG_6 inv_set_fifo_interupt 0x07, 0x41, 0x05, 0xF1, 0x20, 0x28, 0x30, 0x38, // CFG_8 inv_send_quaternion 0x07, 0x7E, 0x01, 0x30, // CFG_16 inv_set_footer 0x07, 0x46, 0x01, 0x9A, // CFG_GYRO_SOURCE inv_send_gyro 0x07, 0x47, 0x04, 0xF1, 0x28, 0x30, 0x38, // CFG_9 inv_send_gyro -> inv_construct3_fifo 0x07, 0x6C, 0x04, 0xF1, 0x28, 0x30, 0x38, // CFG_12 inv_send_accel -> inv_construct3_fifo 0x02, 0x16, 0x02, 0x00, 0x09 // D_0_22 inv_set_fifo_rate // This very last 0x01 WAS a 0x09, which drops the FIFO rate down to 20 Hz. 0x07 is 25 Hz, // 0x01 is 100Hz. Going faster than 100Hz (0x00=200Hz) tends to result in very noisy data. // DMP output frequency is calculated easily using this equation: (200Hz / (1 + value)) // It is important to make sure the host processor can keep up with reading and processing // the FIFO output at the desired rate. Handling FIFO overflow cleanly is also a good idea. }; const unsigned char dmpUpdates[MPU6050_DMP_UPDATES_SIZE] PROGMEM = { 0x01, 0xB2, 0x02, 0xFF, 0xFF, 0x01, 0x90, 0x04, 0x09, 0x23, 0xA1, 0x35, 0x01, 0x6A, 0x02, 0x06, 0x00, 0x01, 0x60, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x40, 0x00, 0x00, 0x00, 0x01, 0x62, 0x02, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x40, 0x00, 0x00 }; uint8_t MPU6050::dmpInitialize() { // reset device DEBUG_PRINTLN(F("\n\nResetting MPU6050...")); reset(); delay(30); // wait after reset // enable sleep mode and wake cycle /*Serial.println(F("Enabling sleep mode...")); setSleepEnabled(true); Serial.println(F("Enabling wake cycle...")); setWakeCycleEnabled(true);*/ // disable sleep mode DEBUG_PRINTLN(F("Disabling sleep mode...")); setSleepEnabled(false); // get MPU hardware revision DEBUG_PRINTLN(F("Selecting user bank 16...")); setMemoryBank(0x10, true, true); DEBUG_PRINTLN(F("Selecting memory byte 6...")); setMemoryStartAddress(0x06); DEBUG_PRINTLN(F("Checking hardware revision...")); uint8_t hwRevision = readMemoryByte(); DEBUG_PRINT(F("Revision @ user[16][6] = ")); DEBUG_PRINTLNF(hwRevision, HEX); DEBUG_PRINTLN(F("Resetting memory bank selection to 0...")); setMemoryBank(0, false, false); // check OTP bank valid DEBUG_PRINTLN(F("Reading OTP bank valid flag...")); uint8_t otpValid = getOTPBankValid(); DEBUG_PRINT(F("OTP bank is ")); DEBUG_PRINTLN(otpValid ? F("valid!") : F("invalid!")); // get X/Y/Z gyro offsets DEBUG_PRINTLN(F("Reading gyro offset TC values...")); int8_t xgOffsetTC = getXGyroOffsetTC(); int8_t ygOffsetTC = getYGyroOffsetTC(); int8_t zgOffsetTC = getZGyroOffsetTC(); DEBUG_PRINT(F("X gyro offset = ")); DEBUG_PRINTLN(xgOffset); DEBUG_PRINT(F("Y gyro offset = ")); DEBUG_PRINTLN(ygOffset); DEBUG_PRINT(F("Z gyro offset = ")); DEBUG_PRINTLN(zgOffset); // setup weird slave stuff (?) DEBUG_PRINTLN(F("Setting slave 0 address to 0x7F...")); setSlaveAddress(0, 0x7F); DEBUG_PRINTLN(F("Disabling I2C Master mode...")); setI2CMasterModeEnabled(false); DEBUG_PRINTLN(F("Setting slave 0 address to 0x68 (self)...")); setSlaveAddress(0, 0x68); DEBUG_PRINTLN(F("Resetting I2C Master control...")); resetI2CMaster(); delay(20); // load DMP code into memory banks DEBUG_PRINT(F("Writing DMP code to MPU memory banks (")); DEBUG_PRINT(MPU6050_DMP_CODE_SIZE); DEBUG_PRINTLN(F(" bytes)")); if (writeProgMemoryBlock(dmpMemory, MPU6050_DMP_CODE_SIZE)) { DEBUG_PRINTLN(F("Success! DMP code written and verified.")); // write DMP configuration DEBUG_PRINT(F("Writing DMP configuration to MPU memory banks (")); DEBUG_PRINT(MPU6050_DMP_CONFIG_SIZE); DEBUG_PRINTLN(F(" bytes in config def)")); if (writeProgDMPConfigurationSet(dmpConfig, MPU6050_DMP_CONFIG_SIZE)) { DEBUG_PRINTLN(F("Success! DMP configuration written and verified.")); DEBUG_PRINTLN(F("Setting clock source to Z Gyro...")); setClockSource(MPU6050_CLOCK_PLL_ZGYRO); DEBUG_PRINTLN(F("Setting DMP and FIFO_OFLOW interrupts enabled...")); setIntEnabled(0x12); DEBUG_PRINTLN(F("Setting sample rate to 200Hz...")); setRate(4); // 1khz / (1 + 4) = 200 Hz DEBUG_PRINTLN(F("Setting external frame sync to TEMP_OUT_L[0]...")); setExternalFrameSync(MPU6050_EXT_SYNC_TEMP_OUT_L); DEBUG_PRINTLN(F("Setting DLPF bandwidth to 42Hz...")); setDLPFMode(MPU6050_DLPF_BW_42); DEBUG_PRINTLN(F("Setting gyro sensitivity to +/- 2000 deg/sec...")); setFullScaleGyroRange(MPU6050_GYRO_FS_2000); DEBUG_PRINTLN(F("Setting DMP configuration bytes (function unknown)...")); setDMPConfig1(0x03); setDMPConfig2(0x00); DEBUG_PRINTLN(F("Clearing OTP Bank flag...")); setOTPBankValid(false); DEBUG_PRINTLN(F("Setting X/Y/Z gyro offset TCs to previous values...")); setXGyroOffsetTC(xgOffsetTC); setYGyroOffsetTC(ygOffsetTC); setZGyroOffsetTC(zgOffsetTC); //DEBUG_PRINTLN(F("Setting X/Y/Z gyro user offsets to zero...")); //setXGyroOffset(0); //setYGyroOffset(0); //setZGyroOffset(0); DEBUG_PRINTLN(F("Writing final memory update 1/7 (function unknown)...")); uint8_t dmpUpdate[16], j; uint16_t pos = 0; for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]); writeMemoryBlock(dmpUpdate + 3, dmpUpdate[2], dmpUpdate[0], dmpUpdate[1]); DEBUG_PRINTLN(F("Writing final memory update 2/7 (function unknown)...")); for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]); writeMemoryBlock(dmpUpdate + 3, dmpUpdate[2], dmpUpdate[0], dmpUpdate[1]); DEBUG_PRINTLN(F("Resetting FIFO...")); resetFIFO(); DEBUG_PRINTLN(F("Reading FIFO count...")); uint16_t fifoCount = getFIFOCount(); uint8_t fifoBuffer[128]; DEBUG_PRINT(F("Current FIFO count=")); DEBUG_PRINTLN(fifoCount); getFIFOBytes(fifoBuffer, fifoCount); DEBUG_PRINTLN(F("Setting motion detection threshold to 2...")); setMotionDetectionThreshold(2); DEBUG_PRINTLN(F("Setting zero-motion detection threshold to 156...")); setZeroMotionDetectionThreshold(156); DEBUG_PRINTLN(F("Setting motion detection duration to 80...")); setMotionDetectionDuration(80); DEBUG_PRINTLN(F("Setting zero-motion detection duration to 0...")); setZeroMotionDetectionDuration(0); DEBUG_PRINTLN(F("Resetting FIFO...")); resetFIFO(); DEBUG_PRINTLN(F("Enabling FIFO...")); setFIFOEnabled(true); DEBUG_PRINTLN(F("Enabling DMP...")); setDMPEnabled(true); DEBUG_PRINTLN(F("Resetting DMP...")); resetDMP(); DEBUG_PRINTLN(F("Writing final memory update 3/7 (function unknown)...")); for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]); writeMemoryBlock(dmpUpdate + 3, dmpUpdate[2], dmpUpdate[0], dmpUpdate[1]); DEBUG_PRINTLN(F("Writing final memory update 4/7 (function unknown)...")); for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]); writeMemoryBlock(dmpUpdate + 3, dmpUpdate[2], dmpUpdate[0], dmpUpdate[1]); DEBUG_PRINTLN(F("Writing final memory update 5/7 (function unknown)...")); for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]); writeMemoryBlock(dmpUpdate + 3, dmpUpdate[2], dmpUpdate[0], dmpUpdate[1]); DEBUG_PRINTLN(F("Waiting for FIFO count > 2...")); while ((fifoCount = getFIFOCount()) < 3); DEBUG_PRINT(F("Current FIFO count=")); DEBUG_PRINTLN(fifoCount); DEBUG_PRINTLN(F("Reading FIFO data...")); getFIFOBytes(fifoBuffer, fifoCount); DEBUG_PRINTLN(F("Reading interrupt status...")); uint8_t mpuIntStatus = getIntStatus(); DEBUG_PRINT(F("Current interrupt status=")); DEBUG_PRINTLNF(mpuIntStatus, HEX); DEBUG_PRINTLN(F("Reading final memory update 6/7 (function unknown)...")); for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]); readMemoryBlock(dmpUpdate + 3, dmpUpdate[2], dmpUpdate[0], dmpUpdate[1]); DEBUG_PRINTLN(F("Waiting for FIFO count > 2...")); while ((fifoCount = getFIFOCount()) < 3); DEBUG_PRINT(F("Current FIFO count=")); DEBUG_PRINTLN(fifoCount); DEBUG_PRINTLN(F("Reading FIFO data...")); getFIFOBytes(fifoBuffer, fifoCount); DEBUG_PRINTLN(F("Reading interrupt status...")); mpuIntStatus = getIntStatus(); DEBUG_PRINT(F("Current interrupt status=")); DEBUG_PRINTLNF(mpuIntStatus, HEX); DEBUG_PRINTLN(F("Writing final memory update 7/7 (function unknown)...")); for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]); writeMemoryBlock(dmpUpdate + 3, dmpUpdate[2], dmpUpdate[0], dmpUpdate[1]); DEBUG_PRINTLN(F("DMP is good to go! Finally.")); DEBUG_PRINTLN(F("Disabling DMP (you turn it on later)...")); setDMPEnabled(false); DEBUG_PRINTLN(F("Setting up internal 42-byte (default) DMP packet buffer...")); dmpPacketSize = 42; /*if ((dmpPacketBuffer = (uint8_t *)malloc(42)) == 0) { return 3; // TODO: proper error code for no memory }*/ DEBUG_PRINTLN(F("Resetting FIFO and clearing INT status one last time...")); resetFIFO(); getIntStatus(); } else { DEBUG_PRINTLN(F("ERROR! DMP configuration verification failed.")); return 2; // configuration block loading failed } } else { DEBUG_PRINTLN(F("ERROR! DMP code verification failed.")); return 1; // main binary block loading failed } return 0; // success } bool MPU6050::dmpPacketAvailable() { return getFIFOCount() >= dmpGetFIFOPacketSize(); } // uint8_t MPU6050::dmpSetFIFORate(uint8_t fifoRate); // uint8_t MPU6050::dmpGetFIFORate(); // uint8_t MPU6050::dmpGetSampleStepSizeMS(); // uint8_t MPU6050::dmpGetSampleFrequency(); // int32_t MPU6050::dmpDecodeTemperature(int8_t tempReg); //uint8_t MPU6050::dmpRegisterFIFORateProcess(inv_obj_func func, int16_t priority); //uint8_t MPU6050::dmpUnregisterFIFORateProcess(inv_obj_func func); //uint8_t MPU6050::dmpRunFIFORateProcesses(); // uint8_t MPU6050::dmpSendQuaternion(uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendGyro(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendAccel(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendLinearAccel(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendLinearAccelInWorld(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendControlData(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendSensorData(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendExternalSensorData(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendGravity(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendPacketNumber(uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendQuantizedAccel(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendEIS(uint_fast16_t elements, uint_fast16_t accuracy); uint8_t MPU6050::dmpGetAccel(int32_t *data, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; data[0] = ((packet[28] << 24) + (packet[29] << 16) + (packet[30] << 8) + packet[31]); data[1] = ((packet[32] << 24) + (packet[33] << 16) + (packet[34] << 8) + packet[35]); data[2] = ((packet[36] << 24) + (packet[37] << 16) + (packet[38] << 8) + packet[39]); return 0; } uint8_t MPU6050::dmpGetAccel(int16_t *data, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; data[0] = (packet[28] << 8) + packet[29]; data[1] = (packet[32] << 8) + packet[33]; data[2] = (packet[36] << 8) + packet[37]; return 0; } uint8_t MPU6050::dmpGetAccel(VectorInt16 *v, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; v -> x = (packet[28] << 8) + packet[29]; v -> y = (packet[32] << 8) + packet[33]; v -> z = (packet[36] << 8) + packet[37]; return 0; } uint8_t MPU6050::dmpGetQuaternion(int32_t *data, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; data[0] = ((packet[0] << 24) + (packet[1] << 16) + (packet[2] << 8) + packet[3]); data[1] = ((packet[4] << 24) + (packet[5] << 16) + (packet[6] << 8) + packet[7]); data[2] = ((packet[8] << 24) + (packet[9] << 16) + (packet[10] << 8) + packet[11]); data[3] = ((packet[12] << 24) + (packet[13] << 16) + (packet[14] << 8) + packet[15]); return 0; } uint8_t MPU6050::dmpGetQuaternion(int16_t *data, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; data[0] = ((packet[0] << 8) + packet[1]); data[1] = ((packet[4] << 8) + packet[5]); data[2] = ((packet[8] << 8) + packet[9]); data[3] = ((packet[12] << 8) + packet[13]); return 0; } uint8_t MPU6050::dmpGetQuaternion(Quaternion *q, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) int16_t qI[4]; uint8_t status = dmpGetQuaternion(qI, packet); if (status == 0) { q -> w = (float)qI[0] / 16384.0f; q -> x = (float)qI[1] / 16384.0f; q -> y = (float)qI[2] / 16384.0f; q -> z = (float)qI[3] / 16384.0f; return 0; } return status; // int16 return value, indicates error if this line is reached } // uint8_t MPU6050::dmpGet6AxisQuaternion(long *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetRelativeQuaternion(long *data, const uint8_t* packet); uint8_t MPU6050::dmpGetGyro(int32_t *data, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; data[0] = ((packet[16] << 24) + (packet[17] << 16) + (packet[18] << 8) + packet[19]); data[1] = ((packet[20] << 24) + (packet[21] << 16) + (packet[22] << 8) + packet[23]); data[2] = ((packet[24] << 24) + (packet[25] << 16) + (packet[26] << 8) + packet[27]); return 0; } uint8_t MPU6050::dmpGetGyro(int16_t *data, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; data[0] = (packet[16] << 8) + packet[17]; data[1] = (packet[20] << 8) + packet[21]; data[2] = (packet[24] << 8) + packet[25]; return 0; } uint8_t MPU6050::dmpGetGyro(VectorInt16 *v, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; v -> x = (packet[16] << 8) + packet[17]; v -> y = (packet[20] << 8) + packet[21]; v -> z = (packet[24] << 8) + packet[25]; return 0; } // uint8_t MPU6050::dmpSetLinearAccelFilterCoefficient(float coef); // uint8_t MPU6050::dmpGetLinearAccel(long *data, const uint8_t* packet); uint8_t MPU6050::dmpGetLinearAccel(VectorInt16 *v, VectorInt16 *vRaw, VectorFloat *gravity) { // get rid of the gravity component (+1g = +8192 in standard DMP FIFO packet, sensitivity is 2g) v -> x = vRaw -> x - gravity -> x*8192; v -> y = vRaw -> y - gravity -> y*8192; v -> z = vRaw -> z - gravity -> z*8192; return 0; } // uint8_t MPU6050::dmpGetLinearAccelInWorld(long *data, const uint8_t* packet); uint8_t MPU6050::dmpGetLinearAccelInWorld(VectorInt16 *v, VectorInt16 *vReal, Quaternion *q) { // rotate measured 3D acceleration vector into original state // frame of reference based on orientation quaternion memcpy(v, vReal, sizeof(VectorInt16)); v -> rotate(q); return 0; } // uint8_t MPU6050::dmpGetGyroAndAccelSensor(long *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetGyroSensor(long *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetControlData(long *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetTemperature(long *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetGravity(long *data, const uint8_t* packet); uint8_t MPU6050::dmpGetGravity(VectorFloat *v, Quaternion *q) { v -> x = 2 * (q -> x*q -> z - q -> w*q -> y); v -> y = 2 * (q -> w*q -> x + q -> y*q -> z); v -> z = q -> w*q -> w - q -> x*q -> x - q -> y*q -> y + q -> z*q -> z; return 0; } // uint8_t MPU6050::dmpGetUnquantizedAccel(long *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetQuantizedAccel(long *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetExternalSensorData(long *data, int size, const uint8_t* packet); // uint8_t MPU6050::dmpGetEIS(long *data, const uint8_t* packet); uint8_t MPU6050::dmpGetEuler(float *data, Quaternion *q) { data[0] = atan2(2*q -> x*q -> y - 2*q -> w*q -> z, 2*q -> w*q -> w + 2*q -> x*q -> x - 1); // psi data[1] = -asin(2*q -> x*q -> z + 2*q -> w*q -> y); // theta data[2] = atan2(2*q -> y*q -> z - 2*q -> w*q -> x, 2*q -> w*q -> w + 2*q -> z*q -> z - 1); // phi return 0; } uint8_t MPU6050::dmpGetYawPitchRoll(float *data, Quaternion *q, VectorFloat *gravity) { // yaw: (about Z axis) data[0] = atan2(2*q -> x*q -> y - 2*q -> w*q -> z, 2*q -> w*q -> w + 2*q -> x*q -> x - 1); // pitch: (nose up/down, about Y axis) data[1] = atan(gravity -> x / sqrt(gravity -> y*gravity -> y + gravity -> z*gravity -> z)); // roll: (tilt left/right, about X axis) data[2] = atan(gravity -> y / sqrt(gravity -> x*gravity -> x + gravity -> z*gravity -> z)); return 0; } // uint8_t MPU6050::dmpGetAccelFloat(float *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetQuaternionFloat(float *data, const uint8_t* packet); uint8_t MPU6050::dmpProcessFIFOPacket(const unsigned char *dmpData) { /*for (uint8_t k = 0; k < dmpPacketSize; k++) { if (dmpData[k] < 0x10) Serial.print("0"); Serial.print(dmpData[k], HEX); Serial.print(" "); } Serial.print("\n");*/ //Serial.println((uint16_t)dmpPacketBuffer); return 0; } uint8_t MPU6050::dmpReadAndProcessFIFOPacket(uint8_t numPackets, uint8_t *processed) { uint8_t status; uint8_t buf[dmpPacketSize]; for (uint8_t i = 0; i < numPackets; i++) { // read packet from FIFO getFIFOBytes(buf, dmpPacketSize); // process packet if ((status = dmpProcessFIFOPacket(buf)) > 0) return status; // increment external process count variable, if supplied if (processed != 0) *processed++; } return 0; } // uint8_t MPU6050::dmpSetFIFOProcessedCallback(void (*func) (void)); // uint8_t MPU6050::dmpInitFIFOParam(); // uint8_t MPU6050::dmpCloseFIFO(); // uint8_t MPU6050::dmpSetGyroDataSource(uint_fast8_t source); // uint8_t MPU6050::dmpDecodeQuantizedAccel(); // uint32_t MPU6050::dmpGetGyroSumOfSquare(); // uint32_t MPU6050::dmpGetAccelSumOfSquare(); // void MPU6050::dmpOverrideQuaternion(long *q); uint16_t MPU6050::dmpGetFIFOPacketSize() { return dmpPacketSize; } #endif /* _MPU6050_6AXIS_MOTIONAPPS20_H_ */
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release03/code/Python/camera100.py
import RPi.GPIO as GPIO import jetson.inference import jetson.utils import time import argparse import sys # parse the command line parser = argparse.ArgumentParser(description="Locate objects in a live camera stream using an object detection DNN.", formatter_class=argparse.RawTextHelpFormatter, epilog=jetson.inference.detectNet.Usage() + jetson.utils.videoSource.Usage() + jetson.utils.videoOutput.Usage() + jetson.utils.logUsage()) parser.add_argument("input_URI", type=str, default="", nargs='?', help="URI of the input stream") parser.add_argument("output_URI", type=str, default="", nargs='?', help="URI of the output stream") parser.add_argument("--network", type=str, default="ssd-mobilenet-v2", help="pre-trained model to load (see below for options)") parser.add_argument("--overlay", type=str, default="box,labels,conf", help="detection overlay flags (e.g. --overlay=box,labels,conf)\nvalid combinations are: 'box', 'labels', 'conf', 'none'") parser.add_argument("--threshold", type=float, default=0.5, help="minimum detection threshold to use") is_headless = ["--headless"] if sys.argv[0].find('console.py') != -1 else [""] try: opt = parser.parse_known_args()[0] except: print("") parser.print_help() sys.exit(0) # load the object detection network net = jetson.inference.detectNet(opt.network, sys.argv, opt.threshold) # create video sources & outputs input = jetson.utils.videoSource(opt.input_URI, argv=sys.argv) output = jetson.utils.videoOutput(opt.output_URI, argv=sys.argv+is_headless) #setup GPIO pins GPIO.setmode(GPIO.BCM) #RaspPi pin numbering GPIO.setup(18, GPIO.OUT, initial=GPIO.HIGH) GPIO.output(18, GPIO.HIGH) GPIO.setup(17, GPIO.OUT, initial=GPIO.HIGH) GPIO.output(17, GPIO.HIGH) GPIO.setup(16, GPIO.OUT, initial=GPIO.HIGH) GPIO.output(16, GPIO.HIGH) GPIO.setup(20, GPIO.OUT, initial=GPIO.HIGH) GPIO.output(20, GPIO.HIGH) GPIO.setup(21, GPIO.OUT, initial=GPIO.HIGH) GPIO.output(21, GPIO.HIGH) def back(): GPIO.output(18, GPIO.LOW) GPIO.output(17, GPIO.HIGH) GPIO.output(16, GPIO.HIGH) GPIO.output(20, GPIO.HIGH) GPIO.output(21, GPIO.HIGH) print("back") def forward(): GPIO.output(18, GPIO.HIGH) GPIO.output(17, GPIO.LOW) GPIO.output(16, GPIO.HIGH) GPIO.output(20, GPIO.HIGH) GPIO.output(21, GPIO.HIGH) print("forward") def left(): GPIO.output(18, GPIO.HIGH) GPIO.output(17, GPIO.HIGH) GPIO.output(16, GPIO.LOW) GPIO.output(20, GPIO.HIGH) GPIO.output(21, GPIO.HIGH) print("left") def right(): GPIO.output(18, GPIO.HIGH) GPIO.output(17, GPIO.HIGH) GPIO.output(16, GPIO.HIGH) GPIO.output(20, GPIO.LOW) GPIO.output(21, GPIO.HIGH) print("right") def up(): GPIO.output(18, GPIO.HIGH) GPIO.output(17, GPIO.HIGH) GPIO.output(16, GPIO.HIGH) GPIO.output(20, GPIO.HIGH) GPIO.output(21, GPIO.LOW) print("up") def nothing(): GPIO.output(18, GPIO.HIGH) GPIO.output(17, GPIO.HIGH) GPIO.output(16, GPIO.HIGH) GPIO.output(20, GPIO.HIGH) GPIO.output(21, GPIO.HIGH) print("nothing") # declare variables as global and that global index global width global location global confidence index = 0 width = 0 location = 0 condifence = 0; # process frames until the user exits while True: # capture the next image img = input.Capture() # detect objects in the image (with overlay) detections = net.Detect(img, overlay=opt.overlay) # print the detections #print("detected {:d} objects in image".format(len(detections))) # check for detections, otherwise nothing if(len(detections) > 0): print("object detected") for detection in detections: index = detections[0].ClassID confidence = (detections[0].Confidence) width = (detections[0].Width) location = (detections[0].Center[0]) # print index of item, width and horizonal location print(index) print(width) print(location) print(confidence) # look for detections if (index == 1 and confidence > 0.9): back() elif (index == 2 and confidence > 0.7): forward() elif (index == 3 and confidence > 0.7): left() elif (index == 4 and confidence > 0.7): right() elif (index == 5 and confidence > 0.7): up() else: nothing() # nothing is detected # render the image output.Render(img) # update the title bar output.SetStatus("{:s} | Network {:.0f} FPS".format(opt.network, net.GetNetworkFPS())) # print out performance info #net.PrintProfilerTimes() # exit on input/output EOS if not input.IsStreaming() or not output.IsStreaming(): break
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release03/code/openDogV2_R3/binPixel.ino
void binPixel(int dec) { // convert dec to binary and display on pixels int bit0 = bitRead(dec, 0); int bit1 = bitRead(dec, 1); int bit2 = bitRead(dec, 2); int bit3 = bitRead(dec, 3); if (bit0 == 0) { leds.setPixel(0, BLACK); } else { leds.setPixel(0, RED); } //*********** if (bit1 == 0) { leds.setPixel(1, BLACK); } else { leds.setPixel(1, RED); } //*********** if (bit2 == 0) { leds.setPixel(2, BLACK); } else { leds.setPixel(2, RED); } //*********** if (bit3 == 0) { leds.setPixel(3, BLACK); } else { leds.setPixel(3, RED); } leds.show(); } void modeSelect(int dec) { int bit0 = bitRead(dec, 0); int bit1 = bitRead(dec, 1); int bit2 = bitRead(dec, 2); int bit3 = bitRead(dec, 3); if (bit0 == 0) { leds.setPixel(7, BLACK); } else { leds.setPixel(7, BLUE); } //*********** if (bit1 == 0) { leds.setPixel(6, BLACK); } else { leds.setPixel(6, BLUE); } //*********** if (bit2 == 0) { leds.setPixel(5, BLACK); } else { leds.setPixel(5, BLUE); } //*********** if (bit3 == 0) { leds.setPixel(4, BLACK); } else { leds.setPixel(4, BLUE); } leds.show(); }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release03/code/openDogV2_R3/openDogV2_R3.ino
//ODrive #include <ODriveArduino.h> //IMU stuff #include "I2Cdev.h" #include "MPU6050_6Axis_MotionApps20.h" #include "Wire.h" // Radio #include <SPI.h> #include <nRF24L01.h> #include <RF24.h> // ramp lib #include <Ramp.h> // Pixel display - using Teensy 2812 lib #include <WS2812Serial.h> const int numled = 8; const int pin = 29; byte drawingMemory[numled*3]; // 3 bytes per LED DMAMEM byte displayMemory[numled*12]; // 12 bytes per LED WS2812Serial leds(numled, displayMemory, drawingMemory, pin, WS2812_GRB); #define RED 0x160000 #define GREEN 0x001600 #define BLUE 0x000016 #define YELLOW 0x101400 #define PINK 0x120009 #define ORANGE 0x100400 #define WHITE 0x101010 #define BLACK 0x000000 RF24 radio(9, 10); // CE, CSN const byte addresses[][6] = {"00001", "00002"}; // Printing with stream operator template<class T> inline Print& operator <<(Print &obj, T arg) { obj.print(arg); return obj; } template<> inline Print& operator <<(Print &obj, float arg) { obj.print(arg, 4); return obj; } // class default I2C address is 0x68 // specific I2C addresses may be passed as a parameter here // AD0 low = 0x68 (default for SparkFun breakout and InvenSense evaluation board) // AD0 high = 0x69 MPU6050 mpu; //MPU6050 mpu(0x69); // <-- use for AD0 high // MPU control/status vars bool dmpReady = false; // set true if DMP init was successful uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU uint8_t devStatus; // return status after each device operation (0 = success, !0 = error) uint16_t packetSize; // expected DMP packet size (default is 42 bytes) uint16_t fifoCount; // count of all bytes currently in FIFO uint8_t fifoBuffer[64]; // FIFO storage buffer // orientation/motion vars Quaternion q; // [w, x, y, z] quaternion container VectorInt16 aa; // [x, y, z] accel sensor measurements VectorInt16 aaReal; // [x, y, z] gravity-free accel sensor measurements VectorInt16 aaWorld; // [x, y, z] world-frame accel sensor measurements VectorFloat gravity; // [x, y, z] gravity vector float euler[3]; // [psi, theta, phi] Euler angle container float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gravity vector int IMUdataReady = 0; volatile bool mpuInterrupt = false; // indicates whether MPU interrupt pin has gone high float pitch; float roll; //ODrive Objects ODriveArduino odrive1(Serial1); ODriveArduino odrive2(Serial2); ODriveArduino odrive3(Serial3); ODriveArduino odrive4(Serial4); ODriveArduino odrive5(Serial5); ODriveArduino odrive6(Serial6); //**************remote control**************** struct RECEIVE_DATA_STRUCTURE{ //put your variable definitions here for the data you want to send //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO int16_t menuDown; int16_t Select; int16_t menuUp; int16_t toggleBottom; int16_t toggleTop; int16_t toggle1; int16_t toggle2; int16_t mode; int16_t RLR; int16_t RFB; int16_t RT; int16_t LLR; int16_t LFB; int16_t LT; }; RECEIVE_DATA_STRUCTURE mydata_remote; int RLR = 0; int RFB = 0; int RT = 0; int LLR = 0; int LFB = 0; int LT = 0; float RLRFiltered = 0; float RFBFiltered = 0; float RTFiltered = 0; float LLRFiltered = 0; float LFBFiltered = 0; float LTFiltered = 0; int filterFlag1 = 0; unsigned long currentMillis; long previousMillis = 0; // set up timers long interval = 10; // time constant for timer unsigned long count; unsigned long remoteMillis; int stepFlag = 0; long previousStepMillis = 0; int stepStartFlag = 0; int requested_state; int mode; int modeFlag; int menuFlag; int modeConfirm; int modeConfirmFlag = 0; int runMode = 0; float longLeg1; float shortLeg1; float legLength1; float longLeg2; float shortLeg2; float legLength2; int fr_RFB; int fl_RFB; int bl_RFB; int br_RFB; int fr_RLR; int fl_RLR; int bl_RLR; int br_RLR;; int fr_LT; int fl_LT; int bl_LT; int br_LT; int fr_LLR; int fl_LLR; int br_LLR; int bl_LLR; int actPos1; int actPos2; int actPos3; int actPos4; // Jetson Nano test inputs int jetson1; int jetson2; int jetson3; int jetson4; int jetson5; int jetson1Trigger; int jetson2Trigger; int jetson3Trigger; int jetson4Trigger; int jetson5Trigger; int jetson1Time; int jetson2Time; int jetson3Time; int jetson4Time; int jetson5Time; int jetson1Flag = 0; int jetson2Flag = 0; int jetson3Flag = 0; int jetson4Flag = 0; int jetson5Flag = 0; int jetsonFB = 0; int jetsonLR = 0; int jetsonUP = 0; float jetsonFBfiltered = 0; float jetsonLRfiltered = 0; int jetsonUPfiltered = 0; int jetsonFBflag = 0; int jetsonLRflag = 0; int jetsonUPflag = 0; int jetsonFBtime = 0; int jetsonLRtime = 0; int jetsonUPtime = 0; // ODrive offsets from power up once index pulse is found int offSet10 = -420; //ODrive 1, axis 0 int offSet11 = -250; //ODrive 1, axis 1 int offSet20 = -600; //ODrive 2, axis 0 - back right leg int offSet21 = -3600; //ODrive 2, axis 1 int offSet30 = -2750; //ODrive 3, axis 0 - back left leg int offSet31 = 4100; //ODrive 3, axis 1 int offSet40 = -400; //ODrive 4, axis 0 int offSet41 = -420; //ODrive 4, axis 1 int offSet50 = 1200; //ODrive 5, axis 0 - front left leg int offSet51 = -1400; //ODrive 5, axis 1 int offSet60 = -2400; //ODrive 6, axis 0 - front right leg int offSet61 = 1700; //ODrive 6, axis 1 //*********************************** //*********************************** class Interpolation { public: rampInt myRamp; int interpolationFlag = 0; int savedValue; int go(int input, int duration) { if (input != savedValue) { // check for new data interpolationFlag = 0; } savedValue = input; // bookmark the old value if (interpolationFlag == 0) { // only do it once until the flag is reset myRamp.go(input, duration, LINEAR, ONCEFORWARD); // start interpolation (value to go to, duration) interpolationFlag = 1; } int output = myRamp.update(); return output; } }; // end of class Interpolation interpFRX; // interpolation objects Interpolation interpFRY; Interpolation interpFRZ; Interpolation interpFRT; Interpolation interpFLX; // interpolation objects Interpolation interpFLY; Interpolation interpFLZ; Interpolation interpFLT; Interpolation interpBRX; // interpolation objects Interpolation interpBRY; Interpolation interpBRZ; Interpolation interpBRT; Interpolation interpBLX; // interpolation objects Interpolation interpBLY; Interpolation interpBLZ; Interpolation interpBLT; //*********************************** //*********************************** // ****************** SETUP ****************************** void setup() { // initialize serial communication Serial.begin(115200); Serial1.begin(115200); Serial2.begin(115200); Serial3.begin(115200); Serial4.begin(115200); Serial5.begin(115200); Serial6.begin(115200); pinMode(2, INPUT_PULLUP); // test inputs from Jetson Nano pinMode(3, INPUT_PULLUP); pinMode(4, INPUT_PULLUP); pinMode(5, INPUT_PULLUP); pinMode(6, INPUT_PULLUP); radio.begin(); radio.openWritingPipe(addresses[0]); // 00002 radio.openReadingPipe(1, addresses[1]); // 00001 radio.setPALevel(RF24_PA_MIN); radio.startListening(); // IMU Setup // join I2C bus (I2Cdev library doesn't do this automatically) #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE Wire.begin(); Wire.setClock(400000); // 400kHz I2C clock. Comment this line if having compilation difficulties #elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE Fastwire::setup(400, true); #endif // initialize device mpu.initialize(); devStatus = mpu.dmpInitialize(); // supply your own gyro offsets here, scaled for min sensitivity mpu.setXGyroOffset(95); mpu.setYGyroOffset(5); mpu.setZGyroOffset(59); mpu.setXAccelOffset(-1172); mpu.setYAccelOffset(-358); mpu.setZAccelOffset(1652); // make sure it worked (returns 0 if so) if (devStatus == 0) { // turn on the DMP, now that it's ready mpu.setDMPEnabled(true); // enable Arduino interrupt detection attachInterrupt(33, dmpDataReady, RISING); mpuIntStatus = mpu.getIntStatus(); // get expected DMP packet size for later comparison packetSize = mpu.dmpGetFIFOPacketSize(); } else { // ERROR! // 1 = initial memory load failed // 2 = DMP configuration updates failed // (if it's going to break, usually the code will be 1) Serial.print(F("DMP Initialization failed (code ")); Serial.print(devStatus); Serial.println(F(")")); } leds.begin(); // init for pixels } // end of setup // ********************* MAIN LOOP ******************************* void loop() { currentMillis = millis(); if (currentMillis - previousMillis >= 10) { // start timed event previousMillis = currentMillis; // check for IMU inpterrupt, read the data if it's ready if (IMUdataReady == 1) { readAngles(); } // convert angles to degrees for pitch and roll roll = (ypr[1] * 180/M_PI); pitch = (ypr[2] * 180/M_PI); // check for radio data if (radio.available()) { radio.read(&mydata_remote, sizeof(RECEIVE_DATA_STRUCTURE)); remoteMillis = currentMillis; } // is the remote disconnected for too long ? if (currentMillis - remoteMillis > 500) { Serial.println("remote disconnected"); leds.setPixel(0, GREEN); leds.show(); } // threshold remote data // some are reversed based on stick wiring in remote RFB = (thresholdStick(mydata_remote.RFB))*-1; RLR = thresholdStick(mydata_remote.RLR); RT = thresholdStick(mydata_remote.RT); LFB = (thresholdStick(mydata_remote.LFB))*-1; LLR = thresholdStick(mydata_remote.LLR); LT = thresholdStick(mydata_remote.LT); // read data from Jetson jetson1 = digitalRead(2); jetson2 = digitalRead(3); jetson3 = digitalRead(4); jetson4 = digitalRead(5); jetson5 = digitalRead(6); // 'debounce' input - make sure pin is triggered for more than 300ms to get rid of spurious results. if (jetson1 == 0 && jetson1Flag == 0) { jetson1Flag = 1; jetson1Time = currentMillis; } else if (jetson1 == 0 && jetson1Flag == 1 && currentMillis - jetson1Time >= 300) { jetson1Trigger = 0; } else if (jetson1 == 1) { jetson1Trigger = 1; jetson1Flag = 0; jetson1Time = currentMillis; } if (jetson2 == 0 && jetson2Flag == 0) { jetson2Flag = 1; jetson2Time = currentMillis; } else if (jetson2 == 0 && jetson2Flag == 1 && currentMillis - jetson2Time >= 300) { jetson2Trigger = 0; } else if (jetson2 == 1) { jetson2Trigger = 1; jetson2Flag = 0; jetson2Time = currentMillis; } if (jetson3 == 0 && jetson3Flag == 0) { jetson3Flag = 1; jetson3Time = currentMillis; } else if (jetson3 == 0 && jetson3Flag == 1 && currentMillis - jetson3Time >= 300) { jetson3Trigger = 0; } else if (jetson3 == 1) { jetson3Trigger = 1; jetson3Flag = 0; jetson3Time = currentMillis; } if (jetson4 == 0 && jetson4Flag == 0) { jetson4Flag = 1; jetson4Time = currentMillis; } else if (jetson4 == 0 && jetson4Flag == 1 && currentMillis - jetson4Time >= 300) { jetson4Trigger = 0; } else if (jetson4 == 1) { jetson4Trigger = 1; jetson4Flag = 0; jetson4Time = currentMillis; } if (jetson5 == 0 && jetson5Flag == 0) { jetson5Flag = 1; jetson5Time = currentMillis; } else if (jetson5 == 0 && jetson5Flag == 1 && currentMillis - jetson5Time >= 300) { jetson5Trigger = 0; } else if (jetson5 == 1) { jetson5Trigger = 1; jetson5Flag = 0; jetson5Time = currentMillis; } // *** make value be held for a minimum amount of time *** // *** front / back *** if (jetson1Trigger == 0 && jetsonFBflag == 0) { // forward jetsonFB = -462; jetsonFBflag = 1; jetsonFBtime = currentMillis; } else if (jetson2Trigger == 0 && jetsonFBflag == 0) { // backwards jetsonFB = 462; jetsonFBflag = 1; jetsonFBtime = currentMillis; } else if (jetsonFBflag == 1 && currentMillis - jetsonFBtime > 1000) { jetsonFB = 0; jetsonFBflag = 0; } // filter value so it rises and falls slowly jetsonFBfiltered = filter(jetsonFB, jetsonFBfiltered, 30); // *** left / right *** if (jetson3Trigger == 0 && jetsonLRflag == 0) { // left jetsonLR = -462; jetsonLRflag = 1; jetsonLRtime = currentMillis; } else if (jetson4Trigger == 0 && jetsonLRflag == 0) { // right jetsonLR = 462; jetsonLRflag = 1; jetsonLRtime = currentMillis; } else if (jetsonLRflag == 1 && currentMillis - jetsonLRtime > 1000) { jetsonLR = 0; jetsonLRflag = 0; } // filter value so it rises and falls slowly jetsonLRfiltered = filter(jetsonLR, jetsonLRfiltered, 30); // *** UP *** if (jetson5Trigger == 0 && jetsonUPflag == 0) { // UP jetsonUP = 500; jetsonUPflag = 1; jetsonUPtime = currentMillis; } else if (jetsonUPflag == 1 && currentMillis - jetsonUPtime > 200) { jetsonUP = 0; jetsonUPflag = 2; } else if (jetsonUPflag == 2 && currentMillis - jetsonUPtime > 1000) { jetsonUP = 0; jetsonUPflag = 0; } /* Serial.print(jetsonFB); Serial.print(" , "); Serial.print(jetsonFBfiltered); Serial.print(" , "); Serial.print(jetsonLR); Serial.print(" , "); Serial.print(jetsonLRfiltered); Serial.print(" , "); Serial.print(jetsonUP); Serial.print(" , "); Serial.print(mydata_remote.toggle1); Serial.println(); // *** read encoder values ** Serial1 << "r axis" << 0 << ".encoder.pos_estimate\n"; actPos1 = odrive1.readInt(); Serial1 << "r axis" << 1 << ".encoder.pos_estimate\n"; actPos2 = odrive1.readInt(); Serial4 << "r axis" << 0 << ".encoder.pos_estimate\n"; actPos3 = odrive4.readInt(); Serial4 << "r axis" << 1 << ".encoder.pos_estimate\n"; actPos4 = odrive4.readInt(); */ /* Serial.print(pitch); Serial.print(" , "); Serial.print(roll); Serial.print(" , "); Serial.print(mode); Serial.print(" , "); Serial.print(RFB); Serial.print(" , "); Serial.print(RLR); Serial.print(" , "); Serial.print(RT); Serial.print(" , "); Serial.print(LFB); Serial.print(" , "); Serial.print(LLR); Serial.print(" , "); Serial.print(LT); Serial.println(" , "); Serial.println(mode); */ // mode select if (mydata_remote.menuUp == 1 && menuFlag == 0) { menuFlag = 1; mode = mode+1; mode = constrain(mode,0,10); } else if (mydata_remote.menuDown == 1 && menuFlag == 0) { menuFlag = 1; mode = mode-1; mode = constrain(mode,0,10); } else if (mydata_remote.menuDown == 0 && mydata_remote.menuUp == 0){ menuFlag = 0; } binPixel(mode); // use the function to display potential mode on the pixels if (mydata_remote.Select == 1){ modeConfirm = mode; // make the actual mode be the potential mode when the select button is pressed modeSelect(modeConfirm); // display actual mode on pixels. } // init ODrives (with serial) if (Serial.available()) { char c = Serial.read(); if (c == 'a') { OdriveInit1(); OdriveInit4(); } else if (c == 'b') { OdriveInit2(); } else if (c == 'c') { OdriveInit3(); } else if (c == 'd') { applyOffsets(); } else if (c == 'e') { modifyGains(); } } // remote Menu handling with debounce if (mydata_remote.Select == 0) { modeConfirmFlag = 0; } if (modeConfirm == 1 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // **init hips** OdriveInit1(); // back hips OdriveInit4(); // front hips // move to zero position away from stand odrive1.SetPosition(0, 0); // back left leg odrive1.SetPosition(1, 0); // back right leg odrive4.SetPosition(0, 0); // front left leg odrive4.SetPosition(1, 0); // front right leg modeConfirmFlag = 1; } else if (modeConfirm == 2 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** init shoulders ** OdriveInit2(); modeConfirmFlag = 1; } else if (modeConfirm == 3 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** init knees ** OdriveInit3(); modeConfirmFlag = 1; } else if (modeConfirm == 4 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** apply offsets to get joints to home position ** applyOffsets(); modeConfirmFlag = 1; } else if (modeConfirm == 5 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** apply ODrive parameters to make joints stiffer ** modifyGains(); modeConfirmFlag = 1; } else if (modeConfirm == 6 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** test mode ** runMode = 1; modeConfirmFlag = 1; } else if (modeConfirm == 7 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** kinemtaics mode ** runMode = 2; modeConfirmFlag = 1; } else if (modeConfirm == 8 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** kinemtaics mode ** runMode = 3; modeConfirmFlag = 1; } // ***** start of runModes ****** if (runMode == 1) { // ** simple joint motion test mode ** // scale sticks to drive joints directly for this test mode RT = RT * 10; RFB = RFB * 10; RLR = RLR * 10; // filter sticks a reasonable amount for this test mode RFBFiltered = filter(RFB, RFBFiltered, 20); RLRFiltered = filter(RLR, RLRFiltered, 20); RTFiltered = filter(RT, RTFiltered, 20); // drive joints all in the same direction as a test // hips driveJoints (10, RTFiltered); // back left driveJoints (11, RTFiltered); // back rght driveJoints (40, RTFiltered); // front left driveJoints (41, RTFiltered); // front right // shoulders driveJoints (20, RFBFiltered); // back right driveJoints (30, RFBFiltered); // back left driveJoints (50, RFBFiltered); // front right driveJoints (60, RFBFiltered); // front left // knees driveJoints (21, RLRFiltered); // back right driveJoints (31, RLRFiltered); // back left driveJoints (51, RLRFiltered); // front right driveJoints (61, RLRFiltered); // back left } else if (runMode == 2) { // ** inverse kinematics demo ** stepStartFlag = 0; // reset flag for stepping setup if (filterFlag1 == 0) { // make sure Z height filtered value is already set to mid position RTFiltered = 282; filterFlag1 = 1; } RFB = map(RFB,-462,462,-100,100); RFBFiltered = filter(RFB, RFBFiltered, 30); RLR = map(RLR,-462,462,-100,100); RLRFiltered = filter(RLR, RLRFiltered, 30); RT = map(RT,-462,462,182,382); RTFiltered = filter(RT, RTFiltered, 30); LFB = map(LFB,-462,462,-10,10); LFBFiltered = filter(LFB, LFBFiltered, 30); LLR = map(LLR,-462,462,-15,15); LLRFiltered = filter(LLR, LLRFiltered, 30); LT = map(LT,-462,462,-10,10); LTFiltered = filter(LT, LTFiltered, 30); kinematics (1, RFBFiltered, RLRFiltered-50, RTFiltered, LLRFiltered, LFBFiltered, LTFiltered, 0, 0, 0); // front right kinematics (2, RFBFiltered, RLRFiltered+50, RTFiltered, LLRFiltered, LFBFiltered, LTFiltered, 0, 0, 0); // front left kinematics (3, RFBFiltered, RLRFiltered+50, RTFiltered, LLRFiltered, LFBFiltered, LTFiltered, 0, 0, 0); // back left kinematics (4, RFBFiltered, RLRFiltered-50, RTFiltered, LLRFiltered, LFBFiltered, LTFiltered, 0, 0, 0); // back right } else if (runMode == 3) { // simple walking // position legs a bit straighter, only do it once if (stepStartFlag == 0) { longLeg1 = 330; shortLeg1 = 260; longLeg2 = 330; shortLeg2 = 260; legLength1 = longLeg1; legLength2 = longLeg2; fr_RFB = 0; fl_RFB = 0; bl_RFB = 0; br_RFB = 0; fr_RLR = -50; fl_RLR = 50; bl_RLR = 50; br_RLR = -50; fr_LT = 0; fl_LT = 0; bl_LT = 0; br_LT = 0; stepStartFlag = 1; } if (mydata_remote.toggle1 == 1) { // use Jetson data instead of remote RFB = jetsonFBfiltered; RLR = jetsonLRfiltered; } if (RFB != 0 || RLR !=0 || LT !=0) { RFB = map(RFB,-462,462,-50,50); RLR = map(RLR,-462,462,-25,25); LT = map(LT,-462,462,-5,5); int timer1 = 100; // feet ON the ground int timer2 = 100; // feet OFF the ground if (stepFlag == 0 && currentMillis - previousStepMillis > timer1) { legLength1 = shortLeg1; legLength2 = longLeg2; fr_RFB = 0-RFB; fl_RFB = RFB; bl_RFB = 0-RFB; br_RFB = RFB; fr_RLR = -50-RLR; fl_RLR = 50+RLR; bl_RLR = 50-RLR; br_RLR = -50+RLR; fr_LT = 0-LT; fl_LT = LT; bl_LT = 0-LT; br_LT = LT; stepFlag = 1; previousStepMillis = currentMillis; } else if (stepFlag == 1 && currentMillis - previousStepMillis > timer2) { legLength1 = longLeg1; legLength2 = longLeg2; fr_RFB = 0-RFB; fl_RFB = RFB; bl_RFB = 0-RFB; br_RFB = RFB; fr_RLR = -50-RLR; fl_RLR = 50+RLR; bl_RLR = 50-RLR; br_RLR = -50+RLR; fr_LT = 0-LT; fl_LT = LT; bl_LT = 0-LT; br_LT = LT; stepFlag = 2; previousStepMillis = currentMillis; } else if (stepFlag == 2 && currentMillis - previousStepMillis > timer1) { legLength1 = longLeg1; legLength2 = shortLeg2; fr_RFB = RFB; fl_RFB = 0-RFB; bl_RFB = RFB; br_RFB = 0-RFB; fr_RLR = -50+RLR; fl_RLR = 50-RLR; bl_RLR = 50+RLR; br_RLR = -50-RLR; fr_LT = LT; fl_LT = 0-LT; bl_LT = LT; br_LT = 0-LT; stepFlag = 3; previousStepMillis = currentMillis; } else if (stepFlag == 3 && currentMillis - previousStepMillis > timer2) { legLength1 = longLeg1; legLength2 = longLeg2; fr_RFB = RFB; fl_RFB = 0-RFB; bl_RFB = RFB; br_RFB = 0-RFB; fr_RLR = -50+RLR; fl_RLR = 50-RLR; bl_RLR = 50+RLR; br_RLR = -50-RLR; fr_LT = LT; fl_LT = 0-LT; bl_LT = LT; br_LT = 0-LT; stepFlag = 0; previousStepMillis = currentMillis; } } else { if (jetsonUP == 500 && mydata_remote.toggle1 == 1) { // jump!! legLength1 = 400; legLength2 = 400; } else{ legLength1 = longLeg1; legLength2 = longLeg2; } fr_RFB = 0; fl_RFB = 0; bl_RFB = 0; br_RFB = 0; fr_RLR = -50; fl_RLR = 50; bl_RLR = 50; br_RLR = -50; fr_LT = 0; fl_LT = 0; bl_LT = 0; br_LT = 0; } // only yaw one half of the robot when walking forward or backwards if (RFB >0) { //walking forward fl_LT = 0; fr_LT = 0; } if (RFB <0) { //walking backward bl_LT = 0; br_LT = 0; } kinematics (1, fr_RFB, fr_RLR, legLength1, 0, 0, fr_LT, 1, 100, 100); // front right kinematics (2, fl_RFB, fl_RLR, legLength2, 0, 0, fl_LT, 1, 100, 100); // front left kinematics (3, bl_RFB, bl_RLR, legLength1, 0, 0, bl_LT, 1, 100, 100); // back left kinematics (4, br_RFB, br_RLR, legLength2, 0, 0, br_LT, 1, 100, 100); // back right Serial.println(legLength1); } } // end of timed loop } // end of main loop
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release03/code/openDogV2_R3/ODriveInit.ino
// init hips void OdriveInit1() { Serial.println("ODrive 1 - back hips"); for (int axis = 0; axis < 2; ++axis) { Serial1 << "w axis" << axis << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial1 << "w axis" << axis << ".motor.config.current_lim " << 30.0f << '\n'; Serial1 << "w axis" << axis << ".motor.config.calibration_current " << 20.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << axis << ": Requesting state " << requested_state << '\n'; odrive1.run_state(axis, requested_state, false); // don't wait } } void OdriveInit4() { Serial.println("ODrive 4 - front hips"); for (int axis = 0; axis < 2; ++axis) { Serial4 << "w axis" << axis << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial4 << "w axis" << axis << ".motor.config.current_lim " << 30.0f << '\n'; Serial4 << "w axis" << axis << ".motor.config.calibration_current " << 20.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << axis << ": Requesting state " << requested_state << '\n'; odrive4.run_state(axis, requested_state, false); // don't wait } } void OdriveInit2() { Serial.println("init all axis 0s"); Serial2 << "w axis" << 0 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial2 << "w axis" << 0 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 0 << ": Requesting state " << requested_state << '\n'; odrive2.run_state(0, requested_state, false); // don't wait Serial3 << "w axis" << 0 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial3 << "w axis" << 0 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 0 << ": Requesting state " << requested_state << '\n'; odrive3.run_state(0, requested_state, false); // don't wait Serial5 << "w axis" << 0 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial5 << "w axis" << 0 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 0 << ": Requesting state " << requested_state << '\n'; odrive5.run_state(0, requested_state, false); // don't wait Serial6 << "w axis" << 0 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial6 << "w axis" << 0 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 0 << ": Requesting state " << requested_state << '\n'; odrive6.run_state(0, requested_state, false); // don't wait } void OdriveInit3() { Serial.println("init all axis 1s"); Serial2 << "w axis" << 1 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial2 << "w axis" << 1 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 1 << ": Requesting state " << requested_state << '\n'; odrive2.run_state(1, requested_state, false); // don't wait Serial3 << "w axis" << 1 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial3 << "w axis" << 1 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 1 << ": Requesting state " << requested_state << '\n'; odrive3.run_state(1, requested_state, false); // don't wait Serial5 << "w axis" << 1 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial5 << "w axis" << 1 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 1 << ": Requesting state " << requested_state << '\n'; odrive5.run_state(1, requested_state, false); // don't wait Serial6 << "w axis" << 1 << ".controller.config.vel_limit " << 60000.0f << '\n'; Serial6 << "w axis" << 1 << ".motor.config.current_lim " << 30.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 1 << ": Requesting state " << requested_state << '\n'; odrive6.run_state(1, requested_state, false); // don't wait } void modifyGains() { Serial.println("modfy gains"); float posGain = 60.0; // 20 float velGain = 0.0008; // 0.0005 float integrator = 0.0005; // 0.0005 Serial1 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // back hip Serial1 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // back hip Serial2 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // back left shoulder Serial2 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // back left knee Serial3 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // back right shoulder Serial3 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // back right knee Serial4 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // front hip Serial4 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // front hip Serial5 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // front shoulder Serial5 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // front knee Serial6 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // front shoulder Serial6 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // front knee // ****** Serial1 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // back hip Serial1 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // back hip Serial2 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // back left shoulder Serial2 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // back left knee Serial3 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // back right shoulder Serial3 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // back right knee Serial4 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // front hip Serial4 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // front hip Serial5 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // front shoulder Serial5 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // front knee Serial6 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // front shoulder Serial6 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // front knee // ****** Serial1 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back hip Serial1 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back hip Serial2 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back left shoulder Serial2 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back left knee Serial3 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back right shoulder Serial3 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back right knee Serial4 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front hip Serial4 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front hip Serial5 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front shoulder Serial5 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front knee Serial6 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front shoulder Serial6 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front knee } void applyOffsets() { // apply initial offsets to ODrives taking into account encoder index position // hips odrive1.SetPosition(0, offSet10); // back left odrive1.SetPosition(1, offSet11); // back right odrive4.SetPosition(0, offSet40); // front left odrive4.SetPosition(1, offSet41); // front right // back right leg odrive2.SetPosition(0, offSet20); // shoulder odrive2.SetPosition(1, offSet21); // knee // back left leg odrive3.SetPosition(0, offSet30); // shoulder odrive3.SetPosition(1, offSet31); // knee // front left leg odrive5.SetPosition(0, offSet50); // shoulder odrive5.SetPosition(1, offSet51); // knee // front right leg odrive6.SetPosition(0, offSet60); // shoulder odrive6.SetPosition(1, offSet61); // knee } void driveJoints(int joint, int pos) { // takes into account the original setup offsets for motor postions, and also turns around directions so they are consistent // also constrains the motion limts for each joint if (mydata_remote.toggleTop == 1) { // only do it if the motor enable is on // hips if (joint == 10) { pos = constrain(pos, -1500,1500); odrive1.SetPosition(0, (pos*-1)+offSet10); // back left hip } else if (joint == 11) { pos = constrain(pos, -1500,1500); odrive1.SetPosition(1, pos+offSet11); // back right hip } else if (joint == 40) { pos = constrain(pos, -1500,1500); odrive4.SetPosition(0, (pos*-1)+offSet40); // front left hip } else if (joint == 41) { pos = constrain(pos, -1500,1500); odrive4.SetPosition(1, pos+offSet41); // front right hip } // shoulders else if (joint == 20) { pos = constrain(pos, -2000,4000); odrive2.SetPosition(0, pos+offSet20); // back left shoulder } else if (joint == 30) { pos = constrain(pos, -2000,4000); odrive3.SetPosition(0, (pos*-1)+offSet30); // front right shoulder } else if (joint == 50) { pos = constrain(pos, -2000,4000); odrive5.SetPosition(0, pos+offSet50); // front left shoulder } else if (joint == 60) { pos = constrain(pos, -2000,4000); odrive6.SetPosition(0, (pos*-1)+offSet60); // front right shoulder } // hips else if (joint == 21) { pos = constrain(pos, -2500,3000); odrive2.SetPosition(1, pos+offSet21); // back left knee } else if (joint == 31) { pos = constrain(pos, -2500,3000); odrive3.SetPosition(1, (pos*-1)+offSet31); // back right knee } else if (joint == 51) { pos = constrain(pos, -2500,3000); odrive5.SetPosition(1, pos+offSet51); // front left knee } else if (joint == 61) { pos = constrain(pos, -2500,3000); odrive6.SetPosition(1, (pos*-1)+offSet61); // front right knee } } }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release03/code/openDogV2_R3/thresholdSticks.ino
int thresholdStick (int pos) { // get zero centre position pos = pos - 512; // threshold value for control sticks if (pos > 50) { pos = pos -50; } else if (pos < -50) { pos = pos +50; } else { pos = 0; } return pos; } // motion filter to filter motions and compliance float filter(float prevValue, float currentValue, int filter) { float lengthFiltered = (prevValue + (currentValue * filter)) / (filter + 1); return lengthFiltered; }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release03/code/openDogV2_R3/kinematics.ino
void kinematics (int leg, float x, float y, float z, float roll, float pitch, float yaw, int interOn, int dur, int yawDur) { // leg 1 : front left // leg 2 : front right // leg 3 : back left // leg 4 : back right // moving the foot sideways on the end plane float lengthY; float hipAngle1a; float hipAngle1b; float hipAngle1; float hipAngle1Degrees; float hipHyp; // moving the foot forwards or backwardes in the side plane float shoulderAngle2; float shoulderAngle2Degrees; float z2; // side plane of individual leg only #define shinLength 200 #define thighLength 200 float z3; float shoulderAngle1; float shoulderAngle1Degrees; float shoulderAngle1a; float shoulderAngle1b; float shoulderAngle1c; float shoulderAngle1d; float kneeAngle; float kneeAngleDegrees; // *** ROTATION AXIS // roll axis #define bodyWidth 125 // half the distance from the middle of the body to the hip pivot float legDiffRoll; // differnece in height for each leg float bodyDiffRoll; // how much shorter the 'virtual body' gets float footDisplacementRoll; // where the foot actually is float footDisplacementAngleRoll; // smaller angle float footWholeAngleRoll; // whole leg angle float hipRollAngle; // angle for hip when roll axis is in use float rollAngle; // angle in RADIANS that the body rolls float zz1a; // hypotenuse of final triangle float zz1; // new height for leg to pass onto the next bit of code float yy1; // new position for leg to move sideways // pitch axis #define bodyLength 265 // distance from centre of body to shoulder pivot float legDiffPitch; // differnece in height for each leg float bodyDiffPitch; // how much shorter the 'virtual body' gets float footDisplacementPitch; // where the foot actually is float footDisplacementAnglePitch; // smaller angle float footWholeAnglePitch; // whole leg angle float shoulderPitchAngle; // angle for hip when roll axis is in use float pitchAngle; // angle in RADIANS that the body rolls float zz2a; // hypotenuse of final triangle float zz2; // new height for the leg to pass onto the next bit of code float xx1; // new position to move the leg fowwards/backwards // yaw axis float yawAngle; // angle in RADIANs for rotation in yaw float existingAngle; // existing angle of leg from centre float radius; // radius of leg from centre of robot based on x and y from sticks float demandYaw; // demand yaw postion - existing yaw plus the stick yaw float xx3; // new X coordinate based on demand angle float yy3; // new Y coordinate based on demand angle // ** INTERPOLATION ** if (interOn == 1) { if (leg == 1) { // front right z = interpFRZ.go(z,dur); x = interpFRX.go(x,dur); y = interpFRY.go(y,dur); yaw = interpFRT.go(yaw,yawDur); } else if (leg == 2) { // front left z = interpFLZ.go(z,dur); x = interpFLX.go(x,dur); y = interpFLY.go(y,dur); yaw = interpFLT.go(yaw,yawDur); } else if (leg == 4) { // back right z = interpBRZ.go(z,dur); x = interpBRX.go(x,dur); y = interpBRY.go(y,dur); yaw = interpBRT.go(yaw,yawDur); } else if (leg == 3) { // back left z = interpBLZ.go(z,dur); x = interpBLX.go(x,dur); y = interpBLY.go(y,dur); yaw = interpBLT.go(yaw,yawDur); } } /* if (leg == 1) { Serial.print(z); Serial.print(" , "); Serial.print(y); Serial.print(" , "); Serial.print(z); Serial.print(" , "); Serial.println(yaw); } */ // ** YAW AXIS ** // convert degrees to radians for the calcs yawAngle = (PI/180) * yaw; // put in offsets from robot's parameters so we can work out the radius of the foot from the robot's centre if (leg == 1) { // front left leg y = y - bodyWidth; x = x - bodyLength; } else if (leg == 2) { // front right leg y = y + bodyWidth; x = x - bodyLength; } else if (leg == 3) { // back left leg y = (y + bodyWidth)*-1; x = (x + bodyLength) *-1; } else if (leg == 4) { // back left leg y = (y - bodyWidth) *-1; x = (x + bodyLength) *-1; } //calc existing angle of leg from cetre existingAngle = atan(y/x); // calc radius from centre radius = y/sin(existingAngle); //calc demand yaw angle demandYaw = existingAngle + yawAngle; // calc new X and Y based on demand yaw angle xx3 = radius * cos(demandYaw); // calc new X and Y based on new yaw angle yy3 = radius * sin(demandYaw); // remove the offsets so we pivot around 0/0 x/y if (leg == 1) { // front left leg yy3 = yy3 + bodyWidth; xx3 = xx3 + bodyLength; } else if (leg == 2) { // front right leg yy3 = yy3 - bodyWidth; xx3 = xx3 + bodyLength; } else if (leg == 3) { // back left leg yy3 = (yy3 + bodyWidth) *-1; xx3 = (xx3 + bodyLength) *-1; } else if (leg == 4) { // back right leg yy3 = (yy3 - bodyWidth)*-1; xx3 = (xx3 + bodyLength)*-1; } // ** PITCH AXIS *** if (leg == 1 || leg == 2) { pitch = pitch *-1; xx3 = xx3*-1; } // convert pitch to degrees pitchAngle = (PI/180) * pitch; //calc top triangle sides legDiffPitch = sin(pitchAngle) * bodyLength; bodyDiffPitch = cos(pitchAngle) * bodyLength; // calc actual height from the ground for each side legDiffPitch = z - legDiffPitch; // calc foot displacement footDisplacementPitch = ((bodyDiffPitch - bodyLength)*-1)+xx3; //calc smaller displacement angle footDisplacementAnglePitch = atan(footDisplacementPitch/legDiffPitch); //calc distance from the ground at the displacement angle (the hypotenuse of the final triangle) zz2a = legDiffPitch/cos(footDisplacementAnglePitch); // calc the whole angle for the leg footWholeAnglePitch = footDisplacementAnglePitch + pitchAngle; //calc actual leg length - the new Z to pass on zz2 = cos(footWholeAnglePitch) * zz2a; //calc new Z to pass on xx1 = sin(footWholeAnglePitch) * zz2a; if (leg == 1 || leg == 2) { xx1 = xx1*-1; } // *** ROLL AXIS *** // convert roll angle to radians rollAngle = (PI/180) * roll; //covert degrees from the stick to radians if (leg == 2 || leg == 3) { // reverse the calcs for each side of the robot rollAngle = rollAngle *-1; yy3 = yy3*-1; } // calc the top triangle sides legDiffRoll = sin(rollAngle) * bodyWidth; bodyDiffRoll = cos(rollAngle) * bodyWidth; // calc actual height from the ground for each side legDiffRoll = zz2 - legDiffRoll; // calc foot displacement footDisplacementRoll = ((bodyDiffRoll - bodyWidth)*-1)-yy3; //calc smaller displacement angle footDisplacementAngleRoll = atan(footDisplacementRoll/legDiffRoll); //calc distance from the ground at the displacement angle (the hypotenuse of the final triangle) zz1a = legDiffRoll/cos(footDisplacementAngleRoll); // calc the whole angle for the leg footWholeAngleRoll = footDisplacementAngleRoll + rollAngle; //calc actual leg length - the new Z to pass on zz1 = cos(footWholeAngleRoll) * zz1a; //calc new Y to pass on yy1 = sin(footWholeAngleRoll) * zz1a; if (leg == 2 || leg == 3) { // reverse the calcs for each side of the robot yy1 = yy1*-1; } // *** TRANSLATION AXIS *** // calculate the hip joint and new leg length based on how far the robot moves sideways hipAngle1 = atan(yy1/zz1); hipAngle1Degrees = ((hipAngle1 * (180/PI))); // convert to degrees z2 = zz1/cos(hipAngle1); // **************** // calculate the shoulder joint offset and new leg length based on now far the foot moves forward/backwards shoulderAngle2 = atan(xx1/z2); // calc how much extra to add to the shoulder joint shoulderAngle2Degrees = shoulderAngle2 * (180/PI); z3 = z2/cos(shoulderAngle2); // calc new leg length to feed to the next bit of code below // **************** // calculate leg length based on shin/thigh length and knee and shoulder angle shoulderAngle1a = sq(thighLength) + sq(z3) - sq(shinLength); shoulderAngle1b = 2 * thighLength * z3; shoulderAngle1c = shoulderAngle1a / shoulderAngle1b; shoulderAngle1 = acos(shoulderAngle1c); // radians kneeAngle = PI - (shoulderAngle1 *2); // radians //calc degrees from angles shoulderAngle1Degrees = shoulderAngle1 * (180/PI); // degrees kneeAngleDegrees = kneeAngle * (180/PI); // degrees // write to joints if (leg == 1) { // front right int shoulderAngle1Counts = (shoulderAngle1Degrees-45) * 55.555555; // convert to encoder counts int shoulderAngle2Counts = shoulderAngle2Degrees * 55.555555; // convert to encoder counts int shoulderAngleCounts = shoulderAngle1Counts + shoulderAngle2Counts; int kneeAngleCounts = (kneeAngleDegrees-90) * 55.555555; // convert to encoder counts int hipAngleCounts = hipAngle1Degrees * 55.555555; // convert to encoder counts driveJoints (60, shoulderAngleCounts); // front right shoulder driveJoints (61, kneeAngleCounts); // front right knee driveJoints (41, hipAngleCounts); // front right hip } else if (leg == 2) { // front left int shoulderAngle1Counts = (shoulderAngle1Degrees-45) * 55.555555; // convert to encoder counts int shoulderAngle2Counts = shoulderAngle2Degrees * 55.555555; // convert to encoder counts int shoulderAngleCounts = shoulderAngle1Counts + shoulderAngle2Counts; int kneeAngleCounts = (kneeAngleDegrees-90) * 55.555555; // convert to encoder counts int hipAngleCounts = hipAngle1Degrees * 55.555555; // convert to encoder counts driveJoints (50, shoulderAngleCounts); // front left shoulder driveJoints (51, kneeAngleCounts); // front left knee driveJoints (40, hipAngleCounts); // front left hip } else if (leg == 3) { // back left int shoulderAngle1Counts = (shoulderAngle1Degrees-45) * 55.555555; // convert to encoder counts int shoulderAngle2Counts = shoulderAngle2Degrees * 55.555555; // convert to encoder counts int shoulderAngleCounts = shoulderAngle1Counts - shoulderAngle2Counts; int kneeAngleCounts = (kneeAngleDegrees-90) * 55.555555; // convert to encoder counts int hipAngleCounts = hipAngle1Degrees * 55.555555; // convert to encoder counts driveJoints (30, shoulderAngleCounts); // back left shoulder driveJoints (31, kneeAngleCounts); // back left knee driveJoints (10, hipAngleCounts); // back left hip } else if (leg == 4) { // back right int shoulderAngle1Counts = (shoulderAngle1Degrees-45) * 55.555555; // convert to encoder counts int shoulderAngle2Counts = shoulderAngle2Degrees * 55.555555; // convert to encoder counts int shoulderAngleCounts = shoulderAngle1Counts - shoulderAngle2Counts; int kneeAngleCounts = (kneeAngleDegrees-90) * 55.555555; // convert to encoder counts int hipAngleCounts = hipAngle1Degrees * 55.555555; // convert to encoder counts driveJoints (20, shoulderAngleCounts); // back right shoulder driveJoints (21, kneeAngleCounts); // back right knee driveJoints (11, hipAngleCounts); // back right hip } }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release03/code/openDogV2_R3/readangle.ino
// IMU interrupt service routine void dmpDataReady() { IMUdataReady = 1; } // function that actually read the angle when the flag is set by the ISR void readAngles() { mpuIntStatus = mpu.getIntStatus(); fifoCount = mpu.getFIFOCount(); if ((mpuIntStatus & 0x10) || fifoCount == 1024) { // reset so we can continue cleanly mpu.resetFIFO(); Serial.println(F("FIFO overflow!")); } else if (mpuIntStatus & 0x02) { // wait for correct available data length, should be a VERY short wait while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount(); // read a packet from FIFO mpu.getFIFOBytes(fifoBuffer, packetSize); // track FIFO count here in case there is > 1 packet available // (this lets us immediately read more without waiting for an interrupt) fifoCount -= packetSize; mpu.dmpGetQuaternion(&q, fifoBuffer); mpu.dmpGetGravity(&gravity, &q); mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); IMUdataReady = 0; } }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release03/code/openDogV2_R3/MPU6050_6Axis_MotionApps20.h
// I2Cdev library collection - MPU6050 I2C device class, 6-axis MotionApps 2.0 implementation // Based on InvenSense MPU-6050 register map document rev. 2.0, 5/19/2011 (RM-MPU-6000A-00) // 5/20/2013 by Jeff Rowberg <jeff@rowberg.net> // Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib // // Changelog: // ... - ongoing debug release /* ============================================ I2Cdev device library code is placed under the MIT license Copyright (c) 2012 Jeff Rowberg Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (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. =============================================== */ #ifndef _MPU6050_6AXIS_MOTIONAPPS20_H_ #define _MPU6050_6AXIS_MOTIONAPPS20_H_ #include "I2Cdev.h" #include "helper_3dmath.h" // MotionApps 2.0 DMP implementation, built using the MPU-6050EVB evaluation board #define MPU6050_INCLUDE_DMP_MOTIONAPPS20 #include "MPU6050.h" // Tom Carpenter's conditional PROGMEM code // http://forum.arduino.cc/index.php?topic=129407.0 #ifndef __arm__ #include <avr/pgmspace.h> #else // Teensy 3.0 library conditional PROGMEM code from Paul Stoffregen #ifndef __PGMSPACE_H_ #define __PGMSPACE_H_ 1 #include <inttypes.h> #define PROGMEM #define PGM_P const char * #define PSTR(str) (str) #define F(x) x typedef void prog_void; typedef char prog_char; typedef unsigned char prog_uchar; typedef int8_t prog_int8_t; typedef uint8_t prog_uint8_t; typedef int16_t prog_int16_t; typedef uint16_t prog_uint16_t; typedef int32_t prog_int32_t; typedef uint32_t prog_uint32_t; #define strcpy_P(dest, src) strcpy((dest), (src)) #define strcat_P(dest, src) strcat((dest), (src)) #define strcmp_P(a, b) strcmp((a), (b)) #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) #define pgm_read_word(addr) (*(const unsigned short *)(addr)) #define pgm_read_dword(addr) (*(const unsigned long *)(addr)) #define pgm_read_float(addr) (*(const float *)(addr)) #define pgm_read_byte_near(addr) pgm_read_byte(addr) #define pgm_read_word_near(addr) pgm_read_word(addr) #define pgm_read_dword_near(addr) pgm_read_dword(addr) #define pgm_read_float_near(addr) pgm_read_float(addr) #define pgm_read_byte_far(addr) pgm_read_byte(addr) #define pgm_read_word_far(addr) pgm_read_word(addr) #define pgm_read_dword_far(addr) pgm_read_dword(addr) #define pgm_read_float_far(addr) pgm_read_float(addr) #endif #endif /* Source is from the InvenSense MotionApps v2 demo code. Original source is * unavailable, unless you happen to be amazing as decompiling binary by * hand (in which case, please contact me, and I'm totally serious). * * Also, I'd like to offer many, many thanks to Noah Zerkin for all of the * DMP reverse-engineering he did to help make this bit of wizardry * possible. */ // NOTE! Enabling DEBUG adds about 3.3kB to the flash program size. // Debug output is now working even on ATMega328P MCUs (e.g. Arduino Uno) // after moving string constants to flash memory storage using the F() // compiler macro (Arduino IDE 1.0+ required). //#define DEBUG #ifdef DEBUG #define DEBUG_PRINT(x) Serial.print(x) #define DEBUG_PRINTF(x, y) Serial.print(x, y) #define DEBUG_PRINTLN(x) Serial.println(x) #define DEBUG_PRINTLNF(x, y) Serial.println(x, y) #else #define DEBUG_PRINT(x) #define DEBUG_PRINTF(x, y) #define DEBUG_PRINTLN(x) #define DEBUG_PRINTLNF(x, y) #endif #define MPU6050_DMP_CODE_SIZE 1929 // dmpMemory[] #define MPU6050_DMP_CONFIG_SIZE 192 // dmpConfig[] #define MPU6050_DMP_UPDATES_SIZE 47 // dmpUpdates[] /* ================================================================================================ * | Default MotionApps v2.0 42-byte FIFO packet structure: | | | | [QUAT W][ ][QUAT X][ ][QUAT Y][ ][QUAT Z][ ][GYRO X][ ][GYRO Y][ ] | | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | | | | [GYRO Z][ ][ACC X ][ ][ACC Y ][ ][ACC Z ][ ][ ] | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | * ================================================================================================ */ // this block of memory gets written to the MPU on start-up, and it seems // to be volatile memory, so it has to be done each time (it only takes ~1 // second though) const unsigned char dmpMemory[MPU6050_DMP_CODE_SIZE] PROGMEM = { // bank 0, 256 bytes 0xFB, 0x00, 0x00, 0x3E, 0x00, 0x0B, 0x00, 0x36, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x54, 0xFF, 0xEF, 0x00, 0x00, 0xFA, 0x80, 0x00, 0x0B, 0x12, 0x82, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0xFF, 0xFF, 0x45, 0x81, 0xFF, 0xFF, 0xFA, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xE8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x7F, 0xFF, 0xFF, 0xFE, 0x80, 0x01, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x03, 0x30, 0x40, 0x00, 0x00, 0x00, 0x02, 0xCA, 0xE3, 0x09, 0x3E, 0x80, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x41, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x2A, 0x00, 0x00, 0x16, 0x55, 0x00, 0x00, 0x21, 0x82, 0xFD, 0x87, 0x26, 0x50, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x6F, 0x00, 0x02, 0x65, 0x32, 0x00, 0x00, 0x5E, 0xC0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFB, 0x8C, 0x6F, 0x5D, 0xFD, 0x5D, 0x08, 0xD9, 0x00, 0x7C, 0x73, 0x3B, 0x00, 0x6C, 0x12, 0xCC, 0x32, 0x00, 0x13, 0x9D, 0x32, 0x00, 0xD0, 0xD6, 0x32, 0x00, 0x08, 0x00, 0x40, 0x00, 0x01, 0xF4, 0xFF, 0xE6, 0x80, 0x79, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xD6, 0x00, 0x00, 0x27, 0x10, // bank 1, 256 bytes 0xFB, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFA, 0x36, 0xFF, 0xBC, 0x30, 0x8E, 0x00, 0x05, 0xFB, 0xF0, 0xFF, 0xD9, 0x5B, 0xC8, 0xFF, 0xD0, 0x9A, 0xBE, 0x00, 0x00, 0x10, 0xA9, 0xFF, 0xF4, 0x1E, 0xB2, 0x00, 0xCE, 0xBB, 0xF7, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x0C, 0xFF, 0xC2, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0xCF, 0x80, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3F, 0x68, 0xB6, 0x79, 0x35, 0x28, 0xBC, 0xC6, 0x7E, 0xD1, 0x6C, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4D, 0x00, 0x2F, 0x70, 0x6D, 0x00, 0x00, 0x05, 0xAE, 0x00, 0x0C, 0x02, 0xD0, // bank 2, 256 bytes 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x54, 0xFF, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0xFF, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // bank 3, 256 bytes 0xD8, 0xDC, 0xBA, 0xA2, 0xF1, 0xDE, 0xB2, 0xB8, 0xB4, 0xA8, 0x81, 0x91, 0xF7, 0x4A, 0x90, 0x7F, 0x91, 0x6A, 0xF3, 0xF9, 0xDB, 0xA8, 0xF9, 0xB0, 0xBA, 0xA0, 0x80, 0xF2, 0xCE, 0x81, 0xF3, 0xC2, 0xF1, 0xC1, 0xF2, 0xC3, 0xF3, 0xCC, 0xA2, 0xB2, 0x80, 0xF1, 0xC6, 0xD8, 0x80, 0xBA, 0xA7, 0xDF, 0xDF, 0xDF, 0xF2, 0xA7, 0xC3, 0xCB, 0xC5, 0xB6, 0xF0, 0x87, 0xA2, 0x94, 0x24, 0x48, 0x70, 0x3C, 0x95, 0x40, 0x68, 0x34, 0x58, 0x9B, 0x78, 0xA2, 0xF1, 0x83, 0x92, 0x2D, 0x55, 0x7D, 0xD8, 0xB1, 0xB4, 0xB8, 0xA1, 0xD0, 0x91, 0x80, 0xF2, 0x70, 0xF3, 0x70, 0xF2, 0x7C, 0x80, 0xA8, 0xF1, 0x01, 0xB0, 0x98, 0x87, 0xD9, 0x43, 0xD8, 0x86, 0xC9, 0x88, 0xBA, 0xA1, 0xF2, 0x0E, 0xB8, 0x97, 0x80, 0xF1, 0xA9, 0xDF, 0xDF, 0xDF, 0xAA, 0xDF, 0xDF, 0xDF, 0xF2, 0xAA, 0xC5, 0xCD, 0xC7, 0xA9, 0x0C, 0xC9, 0x2C, 0x97, 0x97, 0x97, 0x97, 0xF1, 0xA9, 0x89, 0x26, 0x46, 0x66, 0xB0, 0xB4, 0xBA, 0x80, 0xAC, 0xDE, 0xF2, 0xCA, 0xF1, 0xB2, 0x8C, 0x02, 0xA9, 0xB6, 0x98, 0x00, 0x89, 0x0E, 0x16, 0x1E, 0xB8, 0xA9, 0xB4, 0x99, 0x2C, 0x54, 0x7C, 0xB0, 0x8A, 0xA8, 0x96, 0x36, 0x56, 0x76, 0xF1, 0xB9, 0xAF, 0xB4, 0xB0, 0x83, 0xC0, 0xB8, 0xA8, 0x97, 0x11, 0xB1, 0x8F, 0x98, 0xB9, 0xAF, 0xF0, 0x24, 0x08, 0x44, 0x10, 0x64, 0x18, 0xF1, 0xA3, 0x29, 0x55, 0x7D, 0xAF, 0x83, 0xB5, 0x93, 0xAF, 0xF0, 0x00, 0x28, 0x50, 0xF1, 0xA3, 0x86, 0x9F, 0x61, 0xA6, 0xDA, 0xDE, 0xDF, 0xD9, 0xFA, 0xA3, 0x86, 0x96, 0xDB, 0x31, 0xA6, 0xD9, 0xF8, 0xDF, 0xBA, 0xA6, 0x8F, 0xC2, 0xC5, 0xC7, 0xB2, 0x8C, 0xC1, 0xB8, 0xA2, 0xDF, 0xDF, 0xDF, 0xA3, 0xDF, 0xDF, 0xDF, 0xD8, 0xD8, 0xF1, 0xB8, 0xA8, 0xB2, 0x86, // bank 4, 256 bytes 0xB4, 0x98, 0x0D, 0x35, 0x5D, 0xB8, 0xAA, 0x98, 0xB0, 0x87, 0x2D, 0x35, 0x3D, 0xB2, 0xB6, 0xBA, 0xAF, 0x8C, 0x96, 0x19, 0x8F, 0x9F, 0xA7, 0x0E, 0x16, 0x1E, 0xB4, 0x9A, 0xB8, 0xAA, 0x87, 0x2C, 0x54, 0x7C, 0xB9, 0xA3, 0xDE, 0xDF, 0xDF, 0xA3, 0xB1, 0x80, 0xF2, 0xC4, 0xCD, 0xC9, 0xF1, 0xB8, 0xA9, 0xB4, 0x99, 0x83, 0x0D, 0x35, 0x5D, 0x89, 0xB9, 0xA3, 0x2D, 0x55, 0x7D, 0xB5, 0x93, 0xA3, 0x0E, 0x16, 0x1E, 0xA9, 0x2C, 0x54, 0x7C, 0xB8, 0xB4, 0xB0, 0xF1, 0x97, 0x83, 0xA8, 0x11, 0x84, 0xA5, 0x09, 0x98, 0xA3, 0x83, 0xF0, 0xDA, 0x24, 0x08, 0x44, 0x10, 0x64, 0x18, 0xD8, 0xF1, 0xA5, 0x29, 0x55, 0x7D, 0xA5, 0x85, 0x95, 0x02, 0x1A, 0x2E, 0x3A, 0x56, 0x5A, 0x40, 0x48, 0xF9, 0xF3, 0xA3, 0xD9, 0xF8, 0xF0, 0x98, 0x83, 0x24, 0x08, 0x44, 0x10, 0x64, 0x18, 0x97, 0x82, 0xA8, 0xF1, 0x11, 0xF0, 0x98, 0xA2, 0x24, 0x08, 0x44, 0x10, 0x64, 0x18, 0xDA, 0xF3, 0xDE, 0xD8, 0x83, 0xA5, 0x94, 0x01, 0xD9, 0xA3, 0x02, 0xF1, 0xA2, 0xC3, 0xC5, 0xC7, 0xD8, 0xF1, 0x84, 0x92, 0xA2, 0x4D, 0xDA, 0x2A, 0xD8, 0x48, 0x69, 0xD9, 0x2A, 0xD8, 0x68, 0x55, 0xDA, 0x32, 0xD8, 0x50, 0x71, 0xD9, 0x32, 0xD8, 0x70, 0x5D, 0xDA, 0x3A, 0xD8, 0x58, 0x79, 0xD9, 0x3A, 0xD8, 0x78, 0x93, 0xA3, 0x4D, 0xDA, 0x2A, 0xD8, 0x48, 0x69, 0xD9, 0x2A, 0xD8, 0x68, 0x55, 0xDA, 0x32, 0xD8, 0x50, 0x71, 0xD9, 0x32, 0xD8, 0x70, 0x5D, 0xDA, 0x3A, 0xD8, 0x58, 0x79, 0xD9, 0x3A, 0xD8, 0x78, 0xA8, 0x8A, 0x9A, 0xF0, 0x28, 0x50, 0x78, 0x9E, 0xF3, 0x88, 0x18, 0xF1, 0x9F, 0x1D, 0x98, 0xA8, 0xD9, 0x08, 0xD8, 0xC8, 0x9F, 0x12, 0x9E, 0xF3, 0x15, 0xA8, 0xDA, 0x12, 0x10, 0xD8, 0xF1, 0xAF, 0xC8, 0x97, 0x87, // bank 5, 256 bytes 0x34, 0xB5, 0xB9, 0x94, 0xA4, 0x21, 0xF3, 0xD9, 0x22, 0xD8, 0xF2, 0x2D, 0xF3, 0xD9, 0x2A, 0xD8, 0xF2, 0x35, 0xF3, 0xD9, 0x32, 0xD8, 0x81, 0xA4, 0x60, 0x60, 0x61, 0xD9, 0x61, 0xD8, 0x6C, 0x68, 0x69, 0xD9, 0x69, 0xD8, 0x74, 0x70, 0x71, 0xD9, 0x71, 0xD8, 0xB1, 0xA3, 0x84, 0x19, 0x3D, 0x5D, 0xA3, 0x83, 0x1A, 0x3E, 0x5E, 0x93, 0x10, 0x30, 0x81, 0x10, 0x11, 0xB8, 0xB0, 0xAF, 0x8F, 0x94, 0xF2, 0xDA, 0x3E, 0xD8, 0xB4, 0x9A, 0xA8, 0x87, 0x29, 0xDA, 0xF8, 0xD8, 0x87, 0x9A, 0x35, 0xDA, 0xF8, 0xD8, 0x87, 0x9A, 0x3D, 0xDA, 0xF8, 0xD8, 0xB1, 0xB9, 0xA4, 0x98, 0x85, 0x02, 0x2E, 0x56, 0xA5, 0x81, 0x00, 0x0C, 0x14, 0xA3, 0x97, 0xB0, 0x8A, 0xF1, 0x2D, 0xD9, 0x28, 0xD8, 0x4D, 0xD9, 0x48, 0xD8, 0x6D, 0xD9, 0x68, 0xD8, 0xB1, 0x84, 0x0D, 0xDA, 0x0E, 0xD8, 0xA3, 0x29, 0x83, 0xDA, 0x2C, 0x0E, 0xD8, 0xA3, 0x84, 0x49, 0x83, 0xDA, 0x2C, 0x4C, 0x0E, 0xD8, 0xB8, 0xB0, 0xA8, 0x8A, 0x9A, 0xF5, 0x20, 0xAA, 0xDA, 0xDF, 0xD8, 0xA8, 0x40, 0xAA, 0xD0, 0xDA, 0xDE, 0xD8, 0xA8, 0x60, 0xAA, 0xDA, 0xD0, 0xDF, 0xD8, 0xF1, 0x97, 0x86, 0xA8, 0x31, 0x9B, 0x06, 0x99, 0x07, 0xAB, 0x97, 0x28, 0x88, 0x9B, 0xF0, 0x0C, 0x20, 0x14, 0x40, 0xB8, 0xB0, 0xB4, 0xA8, 0x8C, 0x9C, 0xF0, 0x04, 0x28, 0x51, 0x79, 0x1D, 0x30, 0x14, 0x38, 0xB2, 0x82, 0xAB, 0xD0, 0x98, 0x2C, 0x50, 0x50, 0x78, 0x78, 0x9B, 0xF1, 0x1A, 0xB0, 0xF0, 0x8A, 0x9C, 0xA8, 0x29, 0x51, 0x79, 0x8B, 0x29, 0x51, 0x79, 0x8A, 0x24, 0x70, 0x59, 0x8B, 0x20, 0x58, 0x71, 0x8A, 0x44, 0x69, 0x38, 0x8B, 0x39, 0x40, 0x68, 0x8A, 0x64, 0x48, 0x31, 0x8B, 0x30, 0x49, 0x60, 0xA5, 0x88, 0x20, 0x09, 0x71, 0x58, 0x44, 0x68, // bank 6, 256 bytes 0x11, 0x39, 0x64, 0x49, 0x30, 0x19, 0xF1, 0xAC, 0x00, 0x2C, 0x54, 0x7C, 0xF0, 0x8C, 0xA8, 0x04, 0x28, 0x50, 0x78, 0xF1, 0x88, 0x97, 0x26, 0xA8, 0x59, 0x98, 0xAC, 0x8C, 0x02, 0x26, 0x46, 0x66, 0xF0, 0x89, 0x9C, 0xA8, 0x29, 0x51, 0x79, 0x24, 0x70, 0x59, 0x44, 0x69, 0x38, 0x64, 0x48, 0x31, 0xA9, 0x88, 0x09, 0x20, 0x59, 0x70, 0xAB, 0x11, 0x38, 0x40, 0x69, 0xA8, 0x19, 0x31, 0x48, 0x60, 0x8C, 0xA8, 0x3C, 0x41, 0x5C, 0x20, 0x7C, 0x00, 0xF1, 0x87, 0x98, 0x19, 0x86, 0xA8, 0x6E, 0x76, 0x7E, 0xA9, 0x99, 0x88, 0x2D, 0x55, 0x7D, 0x9E, 0xB9, 0xA3, 0x8A, 0x22, 0x8A, 0x6E, 0x8A, 0x56, 0x8A, 0x5E, 0x9F, 0xB1, 0x83, 0x06, 0x26, 0x46, 0x66, 0x0E, 0x2E, 0x4E, 0x6E, 0x9D, 0xB8, 0xAD, 0x00, 0x2C, 0x54, 0x7C, 0xF2, 0xB1, 0x8C, 0xB4, 0x99, 0xB9, 0xA3, 0x2D, 0x55, 0x7D, 0x81, 0x91, 0xAC, 0x38, 0xAD, 0x3A, 0xB5, 0x83, 0x91, 0xAC, 0x2D, 0xD9, 0x28, 0xD8, 0x4D, 0xD9, 0x48, 0xD8, 0x6D, 0xD9, 0x68, 0xD8, 0x8C, 0x9D, 0xAE, 0x29, 0xD9, 0x04, 0xAE, 0xD8, 0x51, 0xD9, 0x04, 0xAE, 0xD8, 0x79, 0xD9, 0x04, 0xD8, 0x81, 0xF3, 0x9D, 0xAD, 0x00, 0x8D, 0xAE, 0x19, 0x81, 0xAD, 0xD9, 0x01, 0xD8, 0xF2, 0xAE, 0xDA, 0x26, 0xD8, 0x8E, 0x91, 0x29, 0x83, 0xA7, 0xD9, 0xAD, 0xAD, 0xAD, 0xAD, 0xF3, 0x2A, 0xD8, 0xD8, 0xF1, 0xB0, 0xAC, 0x89, 0x91, 0x3E, 0x5E, 0x76, 0xF3, 0xAC, 0x2E, 0x2E, 0xF1, 0xB1, 0x8C, 0x5A, 0x9C, 0xAC, 0x2C, 0x28, 0x28, 0x28, 0x9C, 0xAC, 0x30, 0x18, 0xA8, 0x98, 0x81, 0x28, 0x34, 0x3C, 0x97, 0x24, 0xA7, 0x28, 0x34, 0x3C, 0x9C, 0x24, 0xF2, 0xB0, 0x89, 0xAC, 0x91, 0x2C, 0x4C, 0x6C, 0x8A, 0x9B, 0x2D, 0xD9, 0xD8, 0xD8, 0x51, 0xD9, 0xD8, 0xD8, 0x79, // bank 7, 138 bytes (remainder) 0xD9, 0xD8, 0xD8, 0xF1, 0x9E, 0x88, 0xA3, 0x31, 0xDA, 0xD8, 0xD8, 0x91, 0x2D, 0xD9, 0x28, 0xD8, 0x4D, 0xD9, 0x48, 0xD8, 0x6D, 0xD9, 0x68, 0xD8, 0xB1, 0x83, 0x93, 0x35, 0x3D, 0x80, 0x25, 0xDA, 0xD8, 0xD8, 0x85, 0x69, 0xDA, 0xD8, 0xD8, 0xB4, 0x93, 0x81, 0xA3, 0x28, 0x34, 0x3C, 0xF3, 0xAB, 0x8B, 0xF8, 0xA3, 0x91, 0xB6, 0x09, 0xB4, 0xD9, 0xAB, 0xDE, 0xFA, 0xB0, 0x87, 0x9C, 0xB9, 0xA3, 0xDD, 0xF1, 0xA3, 0xA3, 0xA3, 0xA3, 0x95, 0xF1, 0xA3, 0xA3, 0xA3, 0x9D, 0xF1, 0xA3, 0xA3, 0xA3, 0xA3, 0xF2, 0xA3, 0xB4, 0x90, 0x80, 0xF2, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xB2, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xB0, 0x87, 0xB5, 0x99, 0xF1, 0xA3, 0xA3, 0xA3, 0x98, 0xF1, 0xA3, 0xA3, 0xA3, 0xA3, 0x97, 0xA3, 0xA3, 0xA3, 0xA3, 0xF3, 0x9B, 0xA3, 0xA3, 0xDC, 0xB9, 0xA7, 0xF1, 0x26, 0x26, 0x26, 0xD8, 0xD8, 0xFF }; // thanks to Noah Zerkin for piecing this stuff together! const unsigned char dmpConfig[MPU6050_DMP_CONFIG_SIZE] PROGMEM = { // BANK OFFSET LENGTH [DATA] 0x03, 0x7B, 0x03, 0x4C, 0xCD, 0x6C, // FCFG_1 inv_set_gyro_calibration 0x03, 0xAB, 0x03, 0x36, 0x56, 0x76, // FCFG_3 inv_set_gyro_calibration 0x00, 0x68, 0x04, 0x02, 0xCB, 0x47, 0xA2, // D_0_104 inv_set_gyro_calibration 0x02, 0x18, 0x04, 0x00, 0x05, 0x8B, 0xC1, // D_0_24 inv_set_gyro_calibration 0x01, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, // D_1_152 inv_set_accel_calibration 0x03, 0x7F, 0x06, 0x0C, 0xC9, 0x2C, 0x97, 0x97, 0x97, // FCFG_2 inv_set_accel_calibration 0x03, 0x89, 0x03, 0x26, 0x46, 0x66, // FCFG_7 inv_set_accel_calibration 0x00, 0x6C, 0x02, 0x20, 0x00, // D_0_108 inv_set_accel_calibration 0x02, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_00 inv_set_compass_calibration 0x02, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_01 0x02, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_02 0x02, 0x4C, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_10 0x02, 0x50, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_11 0x02, 0x54, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_12 0x02, 0x58, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_20 0x02, 0x5C, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_21 0x02, 0xBC, 0x04, 0x00, 0x00, 0x00, 0x00, // CPASS_MTX_22 0x01, 0xEC, 0x04, 0x00, 0x00, 0x40, 0x00, // D_1_236 inv_apply_endian_accel 0x03, 0x7F, 0x06, 0x0C, 0xC9, 0x2C, 0x97, 0x97, 0x97, // FCFG_2 inv_set_mpu_sensors 0x04, 0x02, 0x03, 0x0D, 0x35, 0x5D, // CFG_MOTION_BIAS inv_turn_on_bias_from_no_motion 0x04, 0x09, 0x04, 0x87, 0x2D, 0x35, 0x3D, // FCFG_5 inv_set_bias_update 0x00, 0xA3, 0x01, 0x00, // D_0_163 inv_set_dead_zone // SPECIAL 0x01 = enable interrupts 0x00, 0x00, 0x00, 0x01, // SET INT_ENABLE at i=22, SPECIAL INSTRUCTION 0x07, 0x86, 0x01, 0xFE, // CFG_6 inv_set_fifo_interupt 0x07, 0x41, 0x05, 0xF1, 0x20, 0x28, 0x30, 0x38, // CFG_8 inv_send_quaternion 0x07, 0x7E, 0x01, 0x30, // CFG_16 inv_set_footer 0x07, 0x46, 0x01, 0x9A, // CFG_GYRO_SOURCE inv_send_gyro 0x07, 0x47, 0x04, 0xF1, 0x28, 0x30, 0x38, // CFG_9 inv_send_gyro -> inv_construct3_fifo 0x07, 0x6C, 0x04, 0xF1, 0x28, 0x30, 0x38, // CFG_12 inv_send_accel -> inv_construct3_fifo 0x02, 0x16, 0x02, 0x00, 0x09 // D_0_22 inv_set_fifo_rate // This very last 0x01 WAS a 0x09, which drops the FIFO rate down to 20 Hz. 0x07 is 25 Hz, // 0x01 is 100Hz. Going faster than 100Hz (0x00=200Hz) tends to result in very noisy data. // DMP output frequency is calculated easily using this equation: (200Hz / (1 + value)) // It is important to make sure the host processor can keep up with reading and processing // the FIFO output at the desired rate. Handling FIFO overflow cleanly is also a good idea. }; const unsigned char dmpUpdates[MPU6050_DMP_UPDATES_SIZE] PROGMEM = { 0x01, 0xB2, 0x02, 0xFF, 0xFF, 0x01, 0x90, 0x04, 0x09, 0x23, 0xA1, 0x35, 0x01, 0x6A, 0x02, 0x06, 0x00, 0x01, 0x60, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x40, 0x00, 0x00, 0x00, 0x01, 0x62, 0x02, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x40, 0x00, 0x00 }; uint8_t MPU6050::dmpInitialize() { // reset device DEBUG_PRINTLN(F("\n\nResetting MPU6050...")); reset(); delay(30); // wait after reset // enable sleep mode and wake cycle /*Serial.println(F("Enabling sleep mode...")); setSleepEnabled(true); Serial.println(F("Enabling wake cycle...")); setWakeCycleEnabled(true);*/ // disable sleep mode DEBUG_PRINTLN(F("Disabling sleep mode...")); setSleepEnabled(false); // get MPU hardware revision DEBUG_PRINTLN(F("Selecting user bank 16...")); setMemoryBank(0x10, true, true); DEBUG_PRINTLN(F("Selecting memory byte 6...")); setMemoryStartAddress(0x06); DEBUG_PRINTLN(F("Checking hardware revision...")); uint8_t hwRevision = readMemoryByte(); DEBUG_PRINT(F("Revision @ user[16][6] = ")); DEBUG_PRINTLNF(hwRevision, HEX); DEBUG_PRINTLN(F("Resetting memory bank selection to 0...")); setMemoryBank(0, false, false); // check OTP bank valid DEBUG_PRINTLN(F("Reading OTP bank valid flag...")); uint8_t otpValid = getOTPBankValid(); DEBUG_PRINT(F("OTP bank is ")); DEBUG_PRINTLN(otpValid ? F("valid!") : F("invalid!")); // get X/Y/Z gyro offsets DEBUG_PRINTLN(F("Reading gyro offset TC values...")); int8_t xgOffsetTC = getXGyroOffsetTC(); int8_t ygOffsetTC = getYGyroOffsetTC(); int8_t zgOffsetTC = getZGyroOffsetTC(); DEBUG_PRINT(F("X gyro offset = ")); DEBUG_PRINTLN(xgOffset); DEBUG_PRINT(F("Y gyro offset = ")); DEBUG_PRINTLN(ygOffset); DEBUG_PRINT(F("Z gyro offset = ")); DEBUG_PRINTLN(zgOffset); // setup weird slave stuff (?) DEBUG_PRINTLN(F("Setting slave 0 address to 0x7F...")); setSlaveAddress(0, 0x7F); DEBUG_PRINTLN(F("Disabling I2C Master mode...")); setI2CMasterModeEnabled(false); DEBUG_PRINTLN(F("Setting slave 0 address to 0x68 (self)...")); setSlaveAddress(0, 0x68); DEBUG_PRINTLN(F("Resetting I2C Master control...")); resetI2CMaster(); delay(20); // load DMP code into memory banks DEBUG_PRINT(F("Writing DMP code to MPU memory banks (")); DEBUG_PRINT(MPU6050_DMP_CODE_SIZE); DEBUG_PRINTLN(F(" bytes)")); if (writeProgMemoryBlock(dmpMemory, MPU6050_DMP_CODE_SIZE)) { DEBUG_PRINTLN(F("Success! DMP code written and verified.")); // write DMP configuration DEBUG_PRINT(F("Writing DMP configuration to MPU memory banks (")); DEBUG_PRINT(MPU6050_DMP_CONFIG_SIZE); DEBUG_PRINTLN(F(" bytes in config def)")); if (writeProgDMPConfigurationSet(dmpConfig, MPU6050_DMP_CONFIG_SIZE)) { DEBUG_PRINTLN(F("Success! DMP configuration written and verified.")); DEBUG_PRINTLN(F("Setting clock source to Z Gyro...")); setClockSource(MPU6050_CLOCK_PLL_ZGYRO); DEBUG_PRINTLN(F("Setting DMP and FIFO_OFLOW interrupts enabled...")); setIntEnabled(0x12); DEBUG_PRINTLN(F("Setting sample rate to 200Hz...")); setRate(4); // 1khz / (1 + 4) = 200 Hz DEBUG_PRINTLN(F("Setting external frame sync to TEMP_OUT_L[0]...")); setExternalFrameSync(MPU6050_EXT_SYNC_TEMP_OUT_L); DEBUG_PRINTLN(F("Setting DLPF bandwidth to 42Hz...")); setDLPFMode(MPU6050_DLPF_BW_42); DEBUG_PRINTLN(F("Setting gyro sensitivity to +/- 2000 deg/sec...")); setFullScaleGyroRange(MPU6050_GYRO_FS_2000); DEBUG_PRINTLN(F("Setting DMP configuration bytes (function unknown)...")); setDMPConfig1(0x03); setDMPConfig2(0x00); DEBUG_PRINTLN(F("Clearing OTP Bank flag...")); setOTPBankValid(false); DEBUG_PRINTLN(F("Setting X/Y/Z gyro offset TCs to previous values...")); setXGyroOffsetTC(xgOffsetTC); setYGyroOffsetTC(ygOffsetTC); setZGyroOffsetTC(zgOffsetTC); //DEBUG_PRINTLN(F("Setting X/Y/Z gyro user offsets to zero...")); //setXGyroOffset(0); //setYGyroOffset(0); //setZGyroOffset(0); DEBUG_PRINTLN(F("Writing final memory update 1/7 (function unknown)...")); uint8_t dmpUpdate[16], j; uint16_t pos = 0; for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]); writeMemoryBlock(dmpUpdate + 3, dmpUpdate[2], dmpUpdate[0], dmpUpdate[1]); DEBUG_PRINTLN(F("Writing final memory update 2/7 (function unknown)...")); for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]); writeMemoryBlock(dmpUpdate + 3, dmpUpdate[2], dmpUpdate[0], dmpUpdate[1]); DEBUG_PRINTLN(F("Resetting FIFO...")); resetFIFO(); DEBUG_PRINTLN(F("Reading FIFO count...")); uint16_t fifoCount = getFIFOCount(); uint8_t fifoBuffer[128]; DEBUG_PRINT(F("Current FIFO count=")); DEBUG_PRINTLN(fifoCount); getFIFOBytes(fifoBuffer, fifoCount); DEBUG_PRINTLN(F("Setting motion detection threshold to 2...")); setMotionDetectionThreshold(2); DEBUG_PRINTLN(F("Setting zero-motion detection threshold to 156...")); setZeroMotionDetectionThreshold(156); DEBUG_PRINTLN(F("Setting motion detection duration to 80...")); setMotionDetectionDuration(80); DEBUG_PRINTLN(F("Setting zero-motion detection duration to 0...")); setZeroMotionDetectionDuration(0); DEBUG_PRINTLN(F("Resetting FIFO...")); resetFIFO(); DEBUG_PRINTLN(F("Enabling FIFO...")); setFIFOEnabled(true); DEBUG_PRINTLN(F("Enabling DMP...")); setDMPEnabled(true); DEBUG_PRINTLN(F("Resetting DMP...")); resetDMP(); DEBUG_PRINTLN(F("Writing final memory update 3/7 (function unknown)...")); for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]); writeMemoryBlock(dmpUpdate + 3, dmpUpdate[2], dmpUpdate[0], dmpUpdate[1]); DEBUG_PRINTLN(F("Writing final memory update 4/7 (function unknown)...")); for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]); writeMemoryBlock(dmpUpdate + 3, dmpUpdate[2], dmpUpdate[0], dmpUpdate[1]); DEBUG_PRINTLN(F("Writing final memory update 5/7 (function unknown)...")); for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]); writeMemoryBlock(dmpUpdate + 3, dmpUpdate[2], dmpUpdate[0], dmpUpdate[1]); DEBUG_PRINTLN(F("Waiting for FIFO count > 2...")); while ((fifoCount = getFIFOCount()) < 3); DEBUG_PRINT(F("Current FIFO count=")); DEBUG_PRINTLN(fifoCount); DEBUG_PRINTLN(F("Reading FIFO data...")); getFIFOBytes(fifoBuffer, fifoCount); DEBUG_PRINTLN(F("Reading interrupt status...")); uint8_t mpuIntStatus = getIntStatus(); DEBUG_PRINT(F("Current interrupt status=")); DEBUG_PRINTLNF(mpuIntStatus, HEX); DEBUG_PRINTLN(F("Reading final memory update 6/7 (function unknown)...")); for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]); readMemoryBlock(dmpUpdate + 3, dmpUpdate[2], dmpUpdate[0], dmpUpdate[1]); DEBUG_PRINTLN(F("Waiting for FIFO count > 2...")); while ((fifoCount = getFIFOCount()) < 3); DEBUG_PRINT(F("Current FIFO count=")); DEBUG_PRINTLN(fifoCount); DEBUG_PRINTLN(F("Reading FIFO data...")); getFIFOBytes(fifoBuffer, fifoCount); DEBUG_PRINTLN(F("Reading interrupt status...")); mpuIntStatus = getIntStatus(); DEBUG_PRINT(F("Current interrupt status=")); DEBUG_PRINTLNF(mpuIntStatus, HEX); DEBUG_PRINTLN(F("Writing final memory update 7/7 (function unknown)...")); for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]); writeMemoryBlock(dmpUpdate + 3, dmpUpdate[2], dmpUpdate[0], dmpUpdate[1]); DEBUG_PRINTLN(F("DMP is good to go! Finally.")); DEBUG_PRINTLN(F("Disabling DMP (you turn it on later)...")); setDMPEnabled(false); DEBUG_PRINTLN(F("Setting up internal 42-byte (default) DMP packet buffer...")); dmpPacketSize = 42; /*if ((dmpPacketBuffer = (uint8_t *)malloc(42)) == 0) { return 3; // TODO: proper error code for no memory }*/ DEBUG_PRINTLN(F("Resetting FIFO and clearing INT status one last time...")); resetFIFO(); getIntStatus(); } else { DEBUG_PRINTLN(F("ERROR! DMP configuration verification failed.")); return 2; // configuration block loading failed } } else { DEBUG_PRINTLN(F("ERROR! DMP code verification failed.")); return 1; // main binary block loading failed } return 0; // success } bool MPU6050::dmpPacketAvailable() { return getFIFOCount() >= dmpGetFIFOPacketSize(); } // uint8_t MPU6050::dmpSetFIFORate(uint8_t fifoRate); // uint8_t MPU6050::dmpGetFIFORate(); // uint8_t MPU6050::dmpGetSampleStepSizeMS(); // uint8_t MPU6050::dmpGetSampleFrequency(); // int32_t MPU6050::dmpDecodeTemperature(int8_t tempReg); //uint8_t MPU6050::dmpRegisterFIFORateProcess(inv_obj_func func, int16_t priority); //uint8_t MPU6050::dmpUnregisterFIFORateProcess(inv_obj_func func); //uint8_t MPU6050::dmpRunFIFORateProcesses(); // uint8_t MPU6050::dmpSendQuaternion(uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendGyro(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendAccel(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendLinearAccel(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendLinearAccelInWorld(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendControlData(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendSensorData(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendExternalSensorData(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendGravity(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendPacketNumber(uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendQuantizedAccel(uint_fast16_t elements, uint_fast16_t accuracy); // uint8_t MPU6050::dmpSendEIS(uint_fast16_t elements, uint_fast16_t accuracy); uint8_t MPU6050::dmpGetAccel(int32_t *data, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; data[0] = ((packet[28] << 24) + (packet[29] << 16) + (packet[30] << 8) + packet[31]); data[1] = ((packet[32] << 24) + (packet[33] << 16) + (packet[34] << 8) + packet[35]); data[2] = ((packet[36] << 24) + (packet[37] << 16) + (packet[38] << 8) + packet[39]); return 0; } uint8_t MPU6050::dmpGetAccel(int16_t *data, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; data[0] = (packet[28] << 8) + packet[29]; data[1] = (packet[32] << 8) + packet[33]; data[2] = (packet[36] << 8) + packet[37]; return 0; } uint8_t MPU6050::dmpGetAccel(VectorInt16 *v, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; v -> x = (packet[28] << 8) + packet[29]; v -> y = (packet[32] << 8) + packet[33]; v -> z = (packet[36] << 8) + packet[37]; return 0; } uint8_t MPU6050::dmpGetQuaternion(int32_t *data, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; data[0] = ((packet[0] << 24) + (packet[1] << 16) + (packet[2] << 8) + packet[3]); data[1] = ((packet[4] << 24) + (packet[5] << 16) + (packet[6] << 8) + packet[7]); data[2] = ((packet[8] << 24) + (packet[9] << 16) + (packet[10] << 8) + packet[11]); data[3] = ((packet[12] << 24) + (packet[13] << 16) + (packet[14] << 8) + packet[15]); return 0; } uint8_t MPU6050::dmpGetQuaternion(int16_t *data, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; data[0] = ((packet[0] << 8) + packet[1]); data[1] = ((packet[4] << 8) + packet[5]); data[2] = ((packet[8] << 8) + packet[9]); data[3] = ((packet[12] << 8) + packet[13]); return 0; } uint8_t MPU6050::dmpGetQuaternion(Quaternion *q, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) int16_t qI[4]; uint8_t status = dmpGetQuaternion(qI, packet); if (status == 0) { q -> w = (float)qI[0] / 16384.0f; q -> x = (float)qI[1] / 16384.0f; q -> y = (float)qI[2] / 16384.0f; q -> z = (float)qI[3] / 16384.0f; return 0; } return status; // int16 return value, indicates error if this line is reached } // uint8_t MPU6050::dmpGet6AxisQuaternion(long *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetRelativeQuaternion(long *data, const uint8_t* packet); uint8_t MPU6050::dmpGetGyro(int32_t *data, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; data[0] = ((packet[16] << 24) + (packet[17] << 16) + (packet[18] << 8) + packet[19]); data[1] = ((packet[20] << 24) + (packet[21] << 16) + (packet[22] << 8) + packet[23]); data[2] = ((packet[24] << 24) + (packet[25] << 16) + (packet[26] << 8) + packet[27]); return 0; } uint8_t MPU6050::dmpGetGyro(int16_t *data, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; data[0] = (packet[16] << 8) + packet[17]; data[1] = (packet[20] << 8) + packet[21]; data[2] = (packet[24] << 8) + packet[25]; return 0; } uint8_t MPU6050::dmpGetGyro(VectorInt16 *v, const uint8_t* packet) { // TODO: accommodate different arrangements of sent data (ONLY default supported now) if (packet == 0) packet = dmpPacketBuffer; v -> x = (packet[16] << 8) + packet[17]; v -> y = (packet[20] << 8) + packet[21]; v -> z = (packet[24] << 8) + packet[25]; return 0; } // uint8_t MPU6050::dmpSetLinearAccelFilterCoefficient(float coef); // uint8_t MPU6050::dmpGetLinearAccel(long *data, const uint8_t* packet); uint8_t MPU6050::dmpGetLinearAccel(VectorInt16 *v, VectorInt16 *vRaw, VectorFloat *gravity) { // get rid of the gravity component (+1g = +8192 in standard DMP FIFO packet, sensitivity is 2g) v -> x = vRaw -> x - gravity -> x*8192; v -> y = vRaw -> y - gravity -> y*8192; v -> z = vRaw -> z - gravity -> z*8192; return 0; } // uint8_t MPU6050::dmpGetLinearAccelInWorld(long *data, const uint8_t* packet); uint8_t MPU6050::dmpGetLinearAccelInWorld(VectorInt16 *v, VectorInt16 *vReal, Quaternion *q) { // rotate measured 3D acceleration vector into original state // frame of reference based on orientation quaternion memcpy(v, vReal, sizeof(VectorInt16)); v -> rotate(q); return 0; } // uint8_t MPU6050::dmpGetGyroAndAccelSensor(long *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetGyroSensor(long *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetControlData(long *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetTemperature(long *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetGravity(long *data, const uint8_t* packet); uint8_t MPU6050::dmpGetGravity(VectorFloat *v, Quaternion *q) { v -> x = 2 * (q -> x*q -> z - q -> w*q -> y); v -> y = 2 * (q -> w*q -> x + q -> y*q -> z); v -> z = q -> w*q -> w - q -> x*q -> x - q -> y*q -> y + q -> z*q -> z; return 0; } // uint8_t MPU6050::dmpGetUnquantizedAccel(long *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetQuantizedAccel(long *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetExternalSensorData(long *data, int size, const uint8_t* packet); // uint8_t MPU6050::dmpGetEIS(long *data, const uint8_t* packet); uint8_t MPU6050::dmpGetEuler(float *data, Quaternion *q) { data[0] = atan2(2*q -> x*q -> y - 2*q -> w*q -> z, 2*q -> w*q -> w + 2*q -> x*q -> x - 1); // psi data[1] = -asin(2*q -> x*q -> z + 2*q -> w*q -> y); // theta data[2] = atan2(2*q -> y*q -> z - 2*q -> w*q -> x, 2*q -> w*q -> w + 2*q -> z*q -> z - 1); // phi return 0; } uint8_t MPU6050::dmpGetYawPitchRoll(float *data, Quaternion *q, VectorFloat *gravity) { // yaw: (about Z axis) data[0] = atan2(2*q -> x*q -> y - 2*q -> w*q -> z, 2*q -> w*q -> w + 2*q -> x*q -> x - 1); // pitch: (nose up/down, about Y axis) data[1] = atan(gravity -> x / sqrt(gravity -> y*gravity -> y + gravity -> z*gravity -> z)); // roll: (tilt left/right, about X axis) data[2] = atan(gravity -> y / sqrt(gravity -> x*gravity -> x + gravity -> z*gravity -> z)); return 0; } // uint8_t MPU6050::dmpGetAccelFloat(float *data, const uint8_t* packet); // uint8_t MPU6050::dmpGetQuaternionFloat(float *data, const uint8_t* packet); uint8_t MPU6050::dmpProcessFIFOPacket(const unsigned char *dmpData) { /*for (uint8_t k = 0; k < dmpPacketSize; k++) { if (dmpData[k] < 0x10) Serial.print("0"); Serial.print(dmpData[k], HEX); Serial.print(" "); } Serial.print("\n");*/ //Serial.println((uint16_t)dmpPacketBuffer); return 0; } uint8_t MPU6050::dmpReadAndProcessFIFOPacket(uint8_t numPackets, uint8_t *processed) { uint8_t status; uint8_t buf[dmpPacketSize]; for (uint8_t i = 0; i < numPackets; i++) { // read packet from FIFO getFIFOBytes(buf, dmpPacketSize); // process packet if ((status = dmpProcessFIFOPacket(buf)) > 0) return status; // increment external process count variable, if supplied if (processed != 0) *processed++; } return 0; } // uint8_t MPU6050::dmpSetFIFOProcessedCallback(void (*func) (void)); // uint8_t MPU6050::dmpInitFIFOParam(); // uint8_t MPU6050::dmpCloseFIFO(); // uint8_t MPU6050::dmpSetGyroDataSource(uint_fast8_t source); // uint8_t MPU6050::dmpDecodeQuantizedAccel(); // uint32_t MPU6050::dmpGetGyroSumOfSquare(); // uint32_t MPU6050::dmpGetAccelSumOfSquare(); // void MPU6050::dmpOverrideQuaternion(long *q); uint16_t MPU6050::dmpGetFIFOPacketSize() { return dmpPacketSize; } #endif /* _MPU6050_6AXIS_MOTIONAPPS20_H_ */
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release01/Code/openDogV2_R1/binPixel.ino
void binPixel(int dec) { // convert dec to binary and display on pixels int bit0 = bitRead(dec, 0); int bit1 = bitRead(dec, 1); int bit2 = bitRead(dec, 2); int bit3 = bitRead(dec, 3); if (bit0 == 0) { leds.setPixel(0, BLACK); } else { leds.setPixel(0, RED); } //*********** if (bit1 == 0) { leds.setPixel(1, BLACK); } else { leds.setPixel(1, RED); } //*********** if (bit2 == 0) { leds.setPixel(2, BLACK); } else { leds.setPixel(2, RED); } //*********** if (bit3 == 0) { leds.setPixel(3, BLACK); } else { leds.setPixel(3, RED); } leds.show(); } void modeSelect(int dec) { int bit0 = bitRead(dec, 0); int bit1 = bitRead(dec, 1); int bit2 = bitRead(dec, 2); int bit3 = bitRead(dec, 3); if (bit0 == 0) { leds.setPixel(7, BLACK); } else { leds.setPixel(7, BLUE); } //*********** if (bit1 == 0) { leds.setPixel(6, BLACK); } else { leds.setPixel(6, BLUE); } //*********** if (bit2 == 0) { leds.setPixel(5, BLACK); } else { leds.setPixel(5, BLUE); } //*********** if (bit3 == 0) { leds.setPixel(4, BLACK); } else { leds.setPixel(4, BLUE); } leds.show(); }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release01/Code/openDogV2_R1/ODriveInit.ino
// init hips void OdriveInit1() { Serial.println("ODrive 1 - back hips"); for (int axis = 0; axis < 2; ++axis) { Serial1 << "w axis" << axis << ".controller.config.vel_limit " << 50000.0f << '\n'; Serial1 << "w axis" << axis << ".motor.config.current_lim " << 20.0f << '\n'; Serial1 << "w axis" << axis << ".motor.config.calibration_current " << 20.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << axis << ": Requesting state " << requested_state << '\n'; odrive1.run_state(axis, requested_state, false); // don't wait } } void OdriveInit4() { Serial.println("ODrive 4 - front hips"); for (int axis = 0; axis < 2; ++axis) { Serial4 << "w axis" << axis << ".controller.config.vel_limit " << 50000.0f << '\n'; Serial4 << "w axis" << axis << ".motor.config.current_lim " << 20.0f << '\n'; Serial4 << "w axis" << axis << ".motor.config.calibration_current " << 20.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << axis << ": Requesting state " << requested_state << '\n'; odrive4.run_state(axis, requested_state, false); // don't wait } } void OdriveInit2() { Serial.println("init all axis 0s"); Serial2 << "w axis" << 0 << ".controller.config.vel_limit " << 50000.0f << '\n'; Serial2 << "w axis" << 0 << ".motor.config.current_lim " << 20.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 0 << ": Requesting state " << requested_state << '\n'; odrive2.run_state(0, requested_state, false); // don't wait Serial3 << "w axis" << 0 << ".controller.config.vel_limit " << 50000.0f << '\n'; Serial3 << "w axis" << 0 << ".motor.config.current_lim " << 20.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 0 << ": Requesting state " << requested_state << '\n'; odrive3.run_state(0, requested_state, false); // don't wait Serial5 << "w axis" << 0 << ".controller.config.vel_limit " << 50000.0f << '\n'; Serial5 << "w axis" << 0 << ".motor.config.current_lim " << 20.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 0 << ": Requesting state " << requested_state << '\n'; odrive5.run_state(0, requested_state, false); // don't wait Serial6 << "w axis" << 0 << ".controller.config.vel_limit " << 50000.0f << '\n'; Serial6 << "w axis" << 0 << ".motor.config.current_lim " << 20.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 0 << ": Requesting state " << requested_state << '\n'; odrive6.run_state(0, requested_state, false); // don't wait } void OdriveInit3() { Serial.println("init all axis 1s"); Serial2 << "w axis" << 1 << ".controller.config.vel_limit " << 50000.0f << '\n'; Serial2 << "w axis" << 1 << ".motor.config.current_lim " << 20.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 1 << ": Requesting state " << requested_state << '\n'; odrive2.run_state(1, requested_state, false); // don't wait Serial3 << "w axis" << 1 << ".controller.config.vel_limit " << 50000.0f << '\n'; Serial3 << "w axis" << 1 << ".motor.config.current_lim " << 20.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 1 << ": Requesting state " << requested_state << '\n'; odrive3.run_state(1, requested_state, false); // don't wait Serial5 << "w axis" << 1 << ".controller.config.vel_limit " << 50000.0f << '\n'; Serial5 << "w axis" << 1 << ".motor.config.current_lim " << 20.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 1 << ": Requesting state " << requested_state << '\n'; odrive5.run_state(1, requested_state, false); // don't wait Serial6 << "w axis" << 1 << ".controller.config.vel_limit " << 50000.0f << '\n'; Serial6 << "w axis" << 1 << ".motor.config.current_lim " << 20.0f << '\n'; requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL; Serial << "Axis" << 1 << ": Requesting state " << requested_state << '\n'; odrive6.run_state(1, requested_state, false); // don't wait } void modifyGains() { Serial.println("modfy gains"); float posGain = 60.0; // 20 float velGain = 0.0008; // 0.0005 float integrator = 0.0005; // 0.0005 Serial1 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // back hip Serial1 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // back hip Serial2 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // back left shoulder Serial2 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // back left knee Serial3 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // back right shoulder Serial3 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // back right knee Serial4 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // front hip Serial4 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // front hip Serial5 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // front shoulder Serial5 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // front knee Serial6 << "w axis" << 0 << ".controller.config.pos_gain " << posGain << '\n'; // front shoulder Serial6 << "w axis" << 1 << ".controller.config.pos_gain " << posGain << '\n'; // front knee // ****** Serial1 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // back hip Serial1 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // back hip Serial2 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // back left shoulder Serial2 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // back left knee Serial3 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // back right shoulder Serial3 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // back right knee Serial4 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // front hip Serial4 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // front hip Serial5 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // front shoulder Serial5 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // front knee Serial6 << "w axis" << 0 << ".controller.config.vel_gain " << velGain << '\n'; // front shoulder Serial6 << "w axis" << 1 << ".controller.config.vel_gain " << velGain << '\n'; // front knee // ****** Serial1 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back hip Serial1 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back hip Serial2 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back left shoulder Serial2 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back left knee Serial3 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back right shoulder Serial3 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // back right knee Serial4 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front hip Serial4 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front hip Serial5 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front shoulder Serial5 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front knee Serial6 << "w axis" << 0 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front shoulder Serial6 << "w axis" << 1 << ".controller.config.vel_integrator_gain " << integrator << '\n'; // front knee } void applyOffsets() { // apply initial offsets to ODrives taking into account encoder index position // hips odrive1.SetPosition(0, offSet10); // back left odrive1.SetPosition(1, offSet11); // back right odrive4.SetPosition(0, offSet40); // front left odrive4.SetPosition(1, offSet41); // front right // back right leg odrive2.SetPosition(0, offSet20); // shoulder odrive2.SetPosition(1, offSet21); // knee // back left leg odrive3.SetPosition(0, offSet30); // shoulder odrive3.SetPosition(1, offSet31); // knee // front left leg odrive5.SetPosition(0, offSet50); // shoulder odrive5.SetPosition(1, offSet51); // knee // front right leg odrive6.SetPosition(0, offSet60); // shoulder odrive6.SetPosition(1, offSet61); // knee } void driveJoints(int joint, int pos) { // takes into account the original setup offsets for motor postions, and also turns around directions so they are consistent // also constrains the motion limts for each joint // hips if (joint == 10) { pos = constrain(pos, -1500,1500); odrive1.SetPosition(0, (pos*-1)+offSet10); // back left hip } else if (joint == 11) { pos = constrain(pos, -1500,1500); odrive1.SetPosition(1, pos+offSet11); // back right hip } else if (joint == 40) { pos = constrain(pos, -1500,1500); odrive4.SetPosition(0, (pos*-1)+offSet40); // front left hip } else if (joint == 41) { pos = constrain(pos, -1500,1500); odrive4.SetPosition(1, pos+offSet41); // front right hip } // shoulders else if (joint == 20) { pos = constrain(pos, -2000,4000); odrive2.SetPosition(0, pos+offSet20); // back left shoulder } else if (joint == 30) { pos = constrain(pos, -2000,4000); odrive3.SetPosition(0, (pos*-1)+offSet30); // front right shoulder } else if (joint == 50) { pos = constrain(pos, -2000,4000); odrive5.SetPosition(0, pos+offSet50); // front left shoulder } else if (joint == 60) { pos = constrain(pos, -2000,4000); odrive6.SetPosition(0, (pos*-1)+offSet60); // front right shoulder } // hips else if (joint == 21) { pos = constrain(pos, -2500,3000); odrive2.SetPosition(1, pos+offSet21); // back left knee } else if (joint == 31) { pos = constrain(pos, -2500,3000); odrive3.SetPosition(1, (pos*-1)+offSet31); // back right knee } else if (joint == 51) { pos = constrain(pos, -2500,3000); odrive5.SetPosition(1, pos+offSet51); // front left knee } else if (joint == 61) { pos = constrain(pos, -2500,3000); odrive6.SetPosition(1, (pos*-1)+offSet61); // front right knee } }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release01/Code/openDogV2_R1/thresholdSticks.ino
int thresholdStick (int pos) { // get zero centre position pos = pos - 512; // threshold value for control sticks if (pos > 50) { pos = pos -50; } else if (pos < -50) { pos = pos +50; } else { pos = 0; } return pos; } // motion filter to filter motions and compliance float filter(float prevValue, float currentValue, int filter) { float lengthFiltered = (prevValue + (currentValue * filter)) / (filter + 1); return lengthFiltered; }
renanmb/Omniverse_legged_robotics/URDF-Descriptions/openDogV2/openDogV2-original/Release01/Code/openDogV2_R1/openDogV2_R1.ino
//ODrive #include <ODriveArduino.h> //IMU stuff #include "I2Cdev.h" #include "MPU6050_6Axis_MotionApps20.h" #include "Wire.h" // Radio #include <SPI.h> #include <nRF24L01.h> #include <RF24.h> // Pixel display - using Teensy 2812 lib #include <WS2812Serial.h> const int numled = 8; const int pin = 29; byte drawingMemory[numled*3]; // 3 bytes per LED DMAMEM byte displayMemory[numled*12]; // 12 bytes per LED WS2812Serial leds(numled, displayMemory, drawingMemory, pin, WS2812_GRB); #define RED 0x160000 #define GREEN 0x001600 #define BLUE 0x000016 #define YELLOW 0x101400 #define PINK 0x120009 #define ORANGE 0x100400 #define WHITE 0x101010 #define BLACK 0x000000 RF24 radio(9, 10); // CE, CSN const byte addresses[][6] = {"00001", "00002"}; // Printing with stream operator template<class T> inline Print& operator <<(Print &obj, T arg) { obj.print(arg); return obj; } template<> inline Print& operator <<(Print &obj, float arg) { obj.print(arg, 4); return obj; } // class default I2C address is 0x68 // specific I2C addresses may be passed as a parameter here // AD0 low = 0x68 (default for SparkFun breakout and InvenSense evaluation board) // AD0 high = 0x69 MPU6050 mpu; //MPU6050 mpu(0x69); // <-- use for AD0 high // MPU control/status vars bool dmpReady = false; // set true if DMP init was successful uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU uint8_t devStatus; // return status after each device operation (0 = success, !0 = error) uint16_t packetSize; // expected DMP packet size (default is 42 bytes) uint16_t fifoCount; // count of all bytes currently in FIFO uint8_t fifoBuffer[64]; // FIFO storage buffer // orientation/motion vars Quaternion q; // [w, x, y, z] quaternion container VectorInt16 aa; // [x, y, z] accel sensor measurements VectorInt16 aaReal; // [x, y, z] gravity-free accel sensor measurements VectorInt16 aaWorld; // [x, y, z] world-frame accel sensor measurements VectorFloat gravity; // [x, y, z] gravity vector float euler[3]; // [psi, theta, phi] Euler angle container float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gravity vector int IMUdataReady = 0; volatile bool mpuInterrupt = false; // indicates whether MPU interrupt pin has gone high float pitch; float roll; //ODrive Objects ODriveArduino odrive1(Serial1); ODriveArduino odrive2(Serial2); ODriveArduino odrive3(Serial3); ODriveArduino odrive4(Serial4); ODriveArduino odrive5(Serial5); ODriveArduino odrive6(Serial6); //**************remote control**************** struct RECEIVE_DATA_STRUCTURE{ //put your variable definitions here for the data you want to send //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO int16_t menuDown; int16_t Select; int16_t menuUp; int16_t toggleBottom; int16_t toggleTop; int16_t toggle1; int16_t toggle2; int16_t mode; int16_t RLR; int16_t RFB; int16_t RT; int16_t LLR; int16_t LFB; int16_t LT; }; RECEIVE_DATA_STRUCTURE mydata_remote; int RLR = 0; int RFB = 0; int RT = 0; int LLR = 0; int LFB = 0; int LT = 0; float RLRFiltered = 0; float RFBFiltered = 0; float RTFiltered = 0; float LLRFiltered = 0; float LFBFiltered = 0; float LTFiltered = 0; int filterFlag1 = 0; unsigned long currentMillis; long previousMillis = 0; // set up timers long interval = 10; // time constant for timer unsigned long count; unsigned long remoteMillis; int stepFlag = 0; long previousStepMillis = 0; int stepStartFlag = 0; int requested_state; int mode; int modeFlag; int menuFlag; int modeConfirm; int modeConfirmFlag = 0; int runMode = 0; int longLeg; int shortLeg; int actPos1; int actPos2; int actPos3; int actPos4; // ODrive offsets from power up once index pulse is found int offSet10 = -420; //ODrive 1, axis 0 int offSet11 = -280; //ODrive 1, axis 1 int offSet20 = -600; //ODrive 2, axis 0 int offSet21 = -36s00; //ODrive 2, axis 1 int offSet30 = -2700; //ODrive 3, axis 0 int offSet31 = 1500; //ODrive 3, axis 1 int offSet40 = -450; //ODrive 4, axis 0 int offSet41 = -420; //ODrive 4, axis 1 int offSet50 = 1200; //ODrive 5, axis 0 int offSet51 = -2300; //ODrive 5, axis 1 int offSet60 = -2350; //ODrive 6, axis 0 int offSet61 = 3300; //ODrive 6, axis 1 // ****************** SETUP ****************************** void setup() { // initialize serial communication Serial.begin(115200); Serial1.begin(115200); Serial2.begin(115200); Serial3.begin(115200); Serial4.begin(115200); Serial5.begin(115200); Serial6.begin(115200); radio.begin(); radio.openWritingPipe(addresses[0]); // 00002 radio.openReadingPipe(1, addresses[1]); // 00001 radio.setPALevel(RF24_PA_MIN); radio.startListening(); // IMU Setup // join I2C bus (I2Cdev library doesn't do this automatically) #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE Wire.begin(); Wire.setClock(400000); // 400kHz I2C clock. Comment this line if having compilation difficulties #elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE Fastwire::setup(400, true); #endif // initialize device mpu.initialize(); devStatus = mpu.dmpInitialize(); // supply your own gyro offsets here, scaled for min sensitivity mpu.setXGyroOffset(95); mpu.setYGyroOffset(5); mpu.setZGyroOffset(59); mpu.setXAccelOffset(-1172); mpu.setYAccelOffset(-358); mpu.setZAccelOffset(1652); // make sure it worked (returns 0 if so) if (devStatus == 0) { // turn on the DMP, now that it's ready mpu.setDMPEnabled(true); // enable Arduino interrupt detection attachInterrupt(33, dmpDataReady, RISING); mpuIntStatus = mpu.getIntStatus(); // get expected DMP packet size for later comparison packetSize = mpu.dmpGetFIFOPacketSize(); } else { // ERROR! // 1 = initial memory load failed // 2 = DMP configuration updates failed // (if it's going to break, usually the code will be 1) Serial.print(F("DMP Initialization failed (code ")); Serial.print(devStatus); Serial.println(F(")")); } leds.begin(); // init for pixels } // end of setup // ********************* MAIN LOOP ******************************* void loop() { currentMillis = millis(); if (currentMillis - previousMillis >= 10) { // start timed event previousMillis = currentMillis; // check for IMU inpterrupt, read the data if it's ready if (IMUdataReady == 1) { readAngles(); } // convert angles to degrees for pitch and roll roll = (ypr[1] * 180/M_PI); pitch = (ypr[2] * 180/M_PI); // check for radio data if (radio.available()) { radio.read(&mydata_remote, sizeof(RECEIVE_DATA_STRUCTURE)); remoteMillis = currentMillis; } // is the remote disconnected for too long ? if (currentMillis - remoteMillis > 500) { Serial.println("remote disconnected"); leds.setPixel(0, GREEN); leds.show(); } // threshold remote data // some are reversed based on stick wiring in remote RFB = (thresholdStick(mydata_remote.RFB))*-1; RLR = thresholdStick(mydata_remote.RLR); RT = thresholdStick(mydata_remote.RT); LFB = (thresholdStick(mydata_remote.LFB))*-1; LLR = thresholdStick(mydata_remote.LLR); LT = thresholdStick(mydata_remote.LT); /* // *** read encoder values ** Serial1 << "r axis" << 0 << ".encoder.pos_estimate\n"; actPos1 = odrive1.readInt(); Serial1 << "r axis" << 1 << ".encoder.pos_estimate\n"; actPos2 = odrive1.readInt(); Serial4 << "r axis" << 0 << ".encoder.pos_estimate\n"; actPos3 = odrive4.readInt(); Serial4 << "r axis" << 1 << ".encoder.pos_estimate\n"; actPos4 = odrive4.readInt(); */ /* Serial.print(pitch); Serial.print(" , "); Serial.print(roll); Serial.print(" , "); Serial.print(mode); Serial.print(" , "); Serial.print(RFB); Serial.print(" , "); Serial.print(RLR); Serial.print(" , "); Serial.print(RT); Serial.print(" , "); Serial.print(LFB); Serial.print(" , "); Serial.print(LLR); Serial.print(" , "); Serial.print(LT); Serial.println(" , "); Serial.println(mode); */ // mode select if (mydata_remote.menuUp == 1 && menuFlag == 0) { menuFlag = 1; mode = mode+1; mode = constrain(mode,0,10); } else if (mydata_remote.menuDown == 1 && menuFlag == 0) { menuFlag = 1; mode = mode-1; mode = constrain(mode,0,10); } else if (mydata_remote.menuDown == 0 && mydata_remote.menuUp == 0){ menuFlag = 0; } binPixel(mode); // use the function to display potential mode on the pixels if (mydata_remote.Select == 1){ modeConfirm = mode; // make the actual mode be the potential mode when the select button is pressed modeSelect(modeConfirm); // display actual mode on pixels. } // init ODrives (with serial) if (Serial.available()) { char c = Serial.read(); if (c == 'a') { OdriveInit1(); OdriveInit4(); } else if (c == 'b') { OdriveInit2(); } else if (c == 'c') { OdriveInit3(); } else if (c == 'd') { applyOffsets(); } else if (c == 'e') { modifyGains(); } } // remote Menu handling with debounce if (mydata_remote.Select == 0) { modeConfirmFlag = 0; } if (modeConfirm == 1 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // **init hips** OdriveInit1(); // back hips OdriveInit4(); // front hips // move to zero position away from stand odrive1.SetPosition(0, 0); // back left leg odrive1.SetPosition(1, 0); // back right leg odrive4.SetPosition(0, 0); // front left leg odrive4.SetPosition(1, 0); // front right leg modeConfirmFlag = 1; } else if (modeConfirm == 2 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** init shoulders ** OdriveInit2(); modeConfirmFlag = 1; } else if (modeConfirm == 3 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** init knees ** OdriveInit3(); modeConfirmFlag = 1; } else if (modeConfirm == 4 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** apply offsets to get joints to home position ** applyOffsets(); modeConfirmFlag = 1; } else if (modeConfirm == 5 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** apply ODrive parameters to make joints stiffer ** modifyGains(); modeConfirmFlag = 1; } else if (modeConfirm == 6 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** test mode ** runMode = 1; modeConfirmFlag = 1; } else if (modeConfirm == 7 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** kinemtaics mode ** runMode = 2; modeConfirmFlag = 1; } else if (modeConfirm == 8 && modeConfirmFlag == 0 && mydata_remote.Select == 1) { // ** kinemtaics mode ** runMode = 3; modeConfirmFlag = 1; } // ***** start of runModes ****** if (runMode == 1) { // ** simple joint motion test mode ** // scale sticks to drive joints directly for this test mode RT = RT * 10; RFB = RFB * 10; RLR = RLR * 10; // filter sticks a reasonable amount for this test mode RFBFiltered = filter(RFB, RFBFiltered, 20); RLRFiltered = filter(RLR, RLRFiltered, 20); RTFiltered = filter(RT, RTFiltered, 20); // drive joints all in the same direction as a test // hips driveJoints (10, RTFiltered); // back left driveJoints (11, RTFiltered); // back rght driveJoints (40, RTFiltered); // front left driveJoints (41, RTFiltered); // front right // shoulders driveJoints (20, RFBFiltered); // back right driveJoints (30, RFBFiltered); // back left driveJoints (50, RFBFiltered); // front right driveJoints (60, RFBFiltered); // front left // knees driveJoints (21, RLRFiltered); // back right driveJoints (31, RLRFiltered); // back left driveJoints (51, RLRFiltered); // front right driveJoints (61, RLRFiltered); // back left } else if (runMode == 2) { // ** inverse kinematics demo ** stepStartFlag = 0; // reset flag for stepping setup if (filterFlag1 == 0) { // make sure Z height filtered value is already set to mid position RTFiltered = 282; filterFlag1 = 1; } RFB = map(RFB,-462,462,-100,100); RFBFiltered = filter(RFB, RFBFiltered, 30); RLR = map(RLR,-462,462,-100,100); RLRFiltered = filter(RLR, RLRFiltered, 30); RT = map(RT,-462,462,182,382); RTFiltered = filter(RT, RTFiltered, 30); LFB = map(LFB,-462,462,-10,10); LFBFiltered = filter(LFB, LFBFiltered, 30); LLR = map(LLR,-462,462,-15,15); LLRFiltered = filter(LLR, LLRFiltered, 30); LT = map(LT,-462,462,-10,10); LTFiltered = filter(LT, LTFiltered, 30); kinematics (1, RFBFiltered, RLRFiltered-50, RTFiltered, LLRFiltered, LFBFiltered, LTFiltered); // front right kinematics (2, RFBFiltered, RLRFiltered+50, RTFiltered, LLRFiltered, LFBFiltered, LTFiltered); // front left kinematics (3, RFBFiltered, RLRFiltered+50, RTFiltered, LLRFiltered, LFBFiltered, LTFiltered); // back left kinematics (4, RFBFiltered, RLRFiltered-50, RTFiltered, LLRFiltered, LFBFiltered, LTFiltered); // back right } else if (runMode == 3) { // simple walking // position legs a bit straighter, only do it once if (stepStartFlag == 0) { modifyPos2(); stepStartFlag = 1; } Serial.println(RFB); if (mydata_remote.toggle1 == 1) { RFB = map(RFB,-462,462,-50,50); RLR = map(RLR,-462,462,-25,25); LT = map(LT,-462,462,-5,5); longLeg = 350; shortLeg = 280; int timer1 = 100; // feet ON the ground int timer2 = 100; // feet OFF the ground if (stepFlag == 0 && currentMillis - previousStepMillis > timer1) { modifyPos1(); stepFlag = 1; previousStepMillis = currentMillis; } else if (stepFlag == 1 && currentMillis - previousStepMillis > timer2) { modifyPos2(); stepFlag = 2; previousStepMillis = currentMillis; } else if (stepFlag == 2 && currentMillis - previousStepMillis > timer1) { modifyPos3(); stepFlag = 3; previousStepMillis = currentMillis; } else if (stepFlag == 3 && currentMillis - previousStepMillis > timer2) { modifyPos4(); stepFlag = 0; previousStepMillis = currentMillis; } } else { modifyPos2(); } } } // end of timed loop } // end of main loop void modifyPos1() { // the other diag legs bent kinematics (1, 0-RFB, -50-RLR, shortLeg, 0, 0, 0-LT); // front right kinematics (2, RFB, 50+RLR, longLeg, 0, 0, LT); // front left kinematics (3, 0-RFB, 50-RLR, shortLeg, 0, 0, 0-LT); // back left kinematics (4, RFB, -50+RLR, longLeg, 0, 0, LT); // back right } void modifyPos2() { // all legs long kinematics (1, 0-RFB, -50-RLR, longLeg, 0, 0, 0-LT); // front right kinematics (2, RFB, 50+RFB, longLeg, 0, 0, LT); // front left kinematics (3, 0-RFB, 50-RLR, longLeg, 0, 0, 0-LT); // back left kinematics (4, RFB, -50+RFB, longLeg, 0, 0, LT); // back right } void modifyPos3() { // diag legs bent kinematics (1, RFB, -50+RLR, longLeg, 0, 0, LT); // front right kinematics (2, 0-RFB, 50-RLR, shortLeg, 0, 0, 0-LT); // front left kinematics (3, RFB, 50+RLR, longLeg, 0, 0, LT); // back left kinematics (4, 0-RFB, -50-RLR, shortLeg, 0, 0, -LT); // back right } void modifyPos4() { // all legs long kinematics (1, RFB, -50+RLR, longLeg, 0, 0, LT); // front right kinematics (2, 0-RFB, 50-RLR, longLeg, 0, 0, 0-LT); // front left kinematics (3, RFB, 50+RLR, longLeg, 0, 0, LT); // back left kinematics (4, 0-RFB, -50-RLR, longLeg, 0, 0, 0-LT); // back right }