Skip to content

Commit

Permalink
Added/edited comments
Browse files Browse the repository at this point in the history
  • Loading branch information
BartlomiejK2 committed Sep 17, 2024
1 parent 7a62db4 commit 165e349
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name = "joint_macros">

<!-- Joint macro for limits and dynamics -->
<xacro:macro name ="joint_macro" params="lower upper">
<limit lower="${lower}" upper="${upper}" effort="${joint_max_torque}" velocity="${joint_max_velocity}"/>
<dynamics damping="${joint_damping}" friction="${joint_friction}"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name = "joint_properties">

<!-- Limits for joints (lower and upper position): -->
<!-- Limits for joints (lower and upper position) -->
<xacro:property name="H_lower_limit" value="-${PI/2}"/>
<xacro:property name="H_upper_limit" value="${PI/2}"/>
<xacro:property name="T_lower_limit" value="-${PI}"/>
Expand All @@ -13,7 +13,7 @@
<xacro:property name="joint_max_velocity" value="20.2"/>
<xacro:property name="joint_max_torque" value="30"/>

<!-- Joint properties -->
<!-- Joint dynamic properties -->
<xacro:property name="joint_damping" value="0.0"/>
<xacro:property name="joint_friction" value="0.0"/>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name ="meldog_feet">

<xacro:property name="feet_radius" value="0.06"/>
<xacro:property name="feet_mass" value="0.1"/>

<!-- Meldog feet (simple spheres) -->
<xacro:property name="feet_radius" value="0.06"/>
<xacro:property name="feet_mass" value="0.1"/>

<xacro:macro name="feet_link" params="position">
<link name="feet_${position}_link">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name = "meldog_hip">



<!-- Meldog hips (simple boxes)-->
<xacro:property name="hip_length" value="0.2"/>
<xacro:property name="hip_width" value="0.15"/>
<xacro:property name="hip_height" value="0.075"/>

<xacro:property name="hip_mass" value="3.0"/>

<xacro:macro name="hip_link" params="position">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name = "meldog_shank">

<!-- Meldog shank (simple cylinders) -->
<xacro:property name="shank_length" value="0.5"/>
<xacro:property name="shank_radius" value="0.05"/>

<xacro:property name="shank_mass" value = "1.0"/>

<xacro:macro name="shank_link" params="position">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name = "meldog_thigh">

<!-- Meldog thigh (simple cylinders) -->
<xacro:property name="thigh_length" value="0.5"/>
<xacro:property name="thigh_radius" value="0.05"/>

<xacro:property name="thigh_mass" value="1.0"/>

<xacro:macro name="thigh_link" params="position">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name = "meldog_trunk">

<!-- Meldog trunk (3 simple boxes) -->
<xacro:property name="trunk_base_length" value="0.8" />
<xacro:property name="trunk_base_width" value="0.2" />
<xacro:property name="trunk_base_height" value="0.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<!-- PI -->
<xacro:property name="PI" value="3.1415926535897"/>

<!-- Joint properties and macros: -->
<!-- Joint properties and macros -->
<xacro:include filename="joints/joint_properties.urdf.xacro"/>
<xacro:include filename="joints/joint_macros.urdf.xacro"/>

<!-- LINKS: -->
<!-- LINKS -->
<!-- Base link spawns in x= 0.0 y = 0.0 z = 0.0 -->
<link name="base_link"></link>

Expand Down Expand Up @@ -45,7 +45,7 @@
<xacro:feet_link position="back_left"/>
<xacro:feet_link position="back_right"/>

<!-- JOINTS: -->
<!-- JOINTS -->

<!-- Base to Trunk joint -->
<joint name="BT_joint" type="fixed">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- Gazebo macros -->
<xacro:include filename="gazebo/gazebo_macros.urdf.xacro"/>

<!-- LINKS: -->
<!-- LINKS -->
<!-- Trunk link -->
<xacro:gazebo_link link_name="trunk" color="Blue" selfCollide_value ="true"/>

Expand Down Expand Up @@ -36,7 +36,7 @@
<xacro:gazebo_link link_name="feet_back_right" color="Pink" selfCollide_value ="true"/>


<!-- JOINTS (only revolute): -->
<!-- JOINTS (only revolute) -->
<!-- Trunk to Hips joints-->
<xacro:gazebo_joint joint_name="FLH"/>
<xacro:gazebo_joint joint_name="FRH"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name ="joint_hardware_macros">

<!-- JMotor and actuator macro for ros2_control hardware interface -->
<xacro:macro name="joint_hardware_macro" params="joint_name upper lower">
<joint name="${joint_name}_joint">
<command_interface name="position">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name ="joint_hardware_properties">

<!-- Actuator and motor parameters: -->
<!-- Actuator and motor parameters -->
<xacro:property name="actuator_gear_ratio" value="9.97"/>
<xacro:property name="motor_max_velocity" value="${actuator_gear_ratio*20.2}"/>
<xacro:property name="motor_max_torque" value="${30.0/actuator_gear_ratio}"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name = "meldog_ros2_control_core">

<!-- Joint hardware properties and macros: -->
<!-- Joint hardware properties and macros -->
<xacro:include filename="joints_hardware/joint_hardware_properties.urdf.xacro"/>
<xacro:include filename="joints_hardware/joint_hardware_macros.urdf.xacro"/>

<!-- Transmissions: -->
<!-- Transmissions -->
<xacro:include filename="transmission/transmission_macros.urdf.xacro"/>

<!-- Hardware interface for Gazebo: -->
<!-- Hardware interface for Gazebo -->

<!-- Trunk to Hips joints-->
<xacro:joint_hardware_macro joint_name="FLH" lower="${motor_lower_limit}" upper="${motor_upper_limit}"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name = "meldog_ros2_control_gazebo">

<!-- ROS2 Control for Gazebo: -->
<!-- ROS2 Control for Gazebo -->
<ros2_control name="meldog_gazebo" type="system">
<hardware>
<plugin>ign_ros2_control/IgnitionSystem</plugin>
</hardware>

<!-- ROS2 Control core xacro file: -->
<!-- ROS2 Control core xacro file -->
<xacro:include filename="ros2_control_core.urdf.xacro"/>

</ros2_control>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
</transmission>
</xacro:macro>

<!-- Meldog Transmissions: -->
<!-- Meldog Transmissions -->

<!-- Trunk to Hips transmissions: -->
<!-- Trunk to Hips transmissions -->
<xacro:SimpleTransmission joint_name="FLH" reduction="${actuator_gear_ratio}" offset="0.0"/>
<xacro:SimpleTransmission joint_name="FRH" reduction="${actuator_gear_ratio}" offset="0.0"/>
<xacro:SimpleTransmission joint_name="BLH" reduction="${actuator_gear_ratio}" offset="0.0"/>
<xacro:SimpleTransmission joint_name="BRH" reduction="${actuator_gear_ratio}" offset="0.0"/>

<!-- Thighs to Shanks transmissions: -->
<!-- Thighs to Shanks transmissions -->
<xacro:FourBarLinkageTransmission first_joint_name="FLT" second_joint_name="FLS" reduction="${actuator_gear_ratio}" first_offset="0.0" second_offset="0.0"/>
<xacro:FourBarLinkageTransmission first_joint_name="FRT" second_joint_name="FRS" reduction="${actuator_gear_ratio}" first_offset="0.0" second_offset="0.0"/>
<xacro:FourBarLinkageTransmission first_joint_name="BLT" second_joint_name="BLS" reduction="${actuator_gear_ratio}" first_offset="0.0" second_offset="0.0"/>
Expand Down

0 comments on commit 165e349

Please sign in to comment.