Skip to content

Commit

Permalink
Add lynx mesh and use base_footprint
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Dec 5, 2024
1 parent 2513a07 commit c86139e
Show file tree
Hide file tree
Showing 15 changed files with 496 additions and 122 deletions.
59 changes: 59 additions & 0 deletions husarion_ugv_description/meshes/WH05/fl_wheel.dae

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions husarion_ugv_description/meshes/WH05/fr_wheel.dae

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions husarion_ugv_description/meshes/WH05/rl_wheel.dae

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions husarion_ugv_description/meshes/WH05/rr_wheel.dae

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions husarion_ugv_description/meshes/lynx/base.dae

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions husarion_ugv_description/meshes/lynx/battery.dae

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions husarion_ugv_description/meshes/lynx/user_compartment.dae

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<joint name="${prefix}_wheel_joint" type="continuous">
<origin xyz="${x} ${y} 0.0" rpy="0.0 0.0 0.0" />
<parent link="body_link" />
<parent link="base_link" />
<child link="${prefix}_wheel_link" />
<axis xyz="0.0 1.0 0.0" />

Expand All @@ -43,8 +43,7 @@
<visual>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
<geometry>
<mesh
filename="package://${wheel_config['mesh_package']}/${wheel_config['folder_path']}/${prefix}_wheel.dae" />
<mesh filename="package://${wheel_config['mesh_package']}/${wheel_config['folder_path']}/${prefix}_wheel.dae" />
</geometry>
</visual>

Expand Down
81 changes: 68 additions & 13 deletions husarion_ugv_description/urdf/lynx/body.urdf.xacro
Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<robot xmlns:xacro="http://wiki.ros.org/xacro">

<!-- body defining macro -->
<xacro:macro
name="body"
params="wheel_radius imu_xyz imu_rpy">

<link name="base_link" />
<link name="base_footprint" />

<joint name="base_to_body_joint" type="fixed">
<origin xyz="0.0 0.0 ${wheel_radius}" rpy="0.0 0.0 0.0" />
<parent link="base_link" />
<child link="body_link" />
<parent link="base_footprint" />
<child link="base_link" />
</joint>

<link name="body_link">
<link name="base_link">
<visual>
<origin xyz="0.0 0.0 0.0745" rpy="0.0 0.0 0.0" />
<geometry>
<!-- TODO cheange when models ready -->
<!-- <mesh filename="package://husarion_ugv_description/meshes/panther/body.dae" /> -->
<box size="0.646 0.34 0.268" />
<mesh filename="package://husarion_ugv_description/meshes/lynx/base.dae" />
</geometry>
</visual>

<collision>
<origin xyz="0.0 0.0 0.0745" rpy="0.0 0.0 0.0" />
<geometry>
<!-- TODO cheange when models ready -->
<!-- TODO change when models ready -->
<!-- <mesh filename="package://husarion_ugv_description/meshes/panther/body_collision.stl" /> -->
<box size="0.646 0.34 0.268" />
</geometry>
Expand All @@ -43,18 +39,77 @@
</inertial>
</link>

<joint name="base_to_user_compartment_joint" type="fixed">
<origin xyz="0.0 0.0 0.00535" rpy="0.0 0.0 0.0" />
<parent link="base_link" />
<child link="user_compartment_link" />
</joint>

<link name="user_compartment_link">
<visual>
<geometry>
<mesh filename="package://husarion_ugv_description/meshes/lynx/user_compartment.dae" />
</geometry>
</visual>

<!-- TODO change when models ready -->
<!-- <collision>
<geometry>
<mesh filename="package://husarion_ugv_description/meshes/panther/user_compartment_collision.stl" />
</geometry>
</collision> -->

<inertial>
<!-- TODO calculate real interia -->
<mass value="30.0" />
<inertia ixx="0.46856" ixy="0.0" ixz="0.0"
iyy="1.22285" iyz="0.0"
izz="1.51185" />
</inertial>
</link>

<joint name="base_to_battery_joint" type="fixed">
<origin xyz="-0.2628 -0.07945 0.07265" rpy="0.0 0.0 0.0" />
<parent link="base_link" />
<child link="battery_link" />
</joint>

<link name="battery_link">
<visual>
<geometry>
<mesh filename="package://husarion_ugv_description/meshes/lynx/battery.dae" />
</geometry>
</visual>

<!-- TODO change when models ready -->
<!-- <collision>
<geometry>
<mesh filename="package://husarion_ugv_description/meshes/panther/battery_collision.stl" />
</geometry>
</collision> -->


<inertial>
<mass value="30.0" />
<!-- TODO calculate real interia -->
<inertia ixx="0.46856" ixy="0.0" ixz="0.0"
iyy="1.22285" iyz="0.0"
izz="1.51185" />
</inertial>
</link>

<joint name="body_to_imu_joint" type="fixed">
<origin xyz="${imu_xyz}" rpy="${imu_rpy}" />
<parent link="body_link" />
<parent link="base_link" />
<child link="imu_link" />
</joint>

<link name="imu_link" />

<joint name="body_to_cover_joint" type="fixed">
<!-- TODO cheange to real value -->
<!-- TODO change to real value -->
<origin xyz="0.0 0.0 0.2085" rpy="0.0 0.0 0.0" />
<parent link="body_link" />
<parent link="base_link" />
<child link="cover_link" />
</joint>

Expand Down
2 changes: 1 addition & 1 deletion husarion_ugv_description/urdf/lynx/lynx_macro.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<!-- INCLUDE ROBOT PARTS DEFINITIONS -->
<xacro:include filename="$(find husarion_ugv_description)/urdf/lynx/body.urdf.xacro" ns="body" />
<xacro:include filename="$(find husarion_ugv_description)/urdf/common/gazebo.urdf.xacro" ns="gazebo" />
<xacro:include filename="$(find husarion_ugv_description)/urdf/lynx/wheel.urdf.xacro" ns="wheel" />
<xacro:include filename="$(find husarion_ugv_description)/urdf/common/wheel.urdf.xacro" ns="wheel" />

<!-- BODY DECLARATION -->
<xacro:body.body
Expand Down
94 changes: 0 additions & 94 deletions husarion_ugv_description/urdf/lynx/wheel.urdf.xacro

This file was deleted.

21 changes: 11 additions & 10 deletions husarion_ugv_description/urdf/panther/body.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,31 @@
name="body"
params="wheel_radius imu_xyz imu_rpy">

<link name="base_link" />
<link name="base_footprint" />

<joint name="base_to_body_joint" type="fixed">
<origin xyz="0.0 0.0 ${wheel_radius}" rpy="0.0 0.0 0.0" />
<parent link="base_link" />
<child link="body_link" />
<parent link="base_footprint" />
<child link="base_link" />
</joint>

<link name="body_link">
<link name="base_link">
<visual>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
<geometry>
<mesh filename="package://husarion_ugv_description/meshes/panther/body.dae" />
<mesh filename="package://husarion_ugv_description/meshes/panther/base.dae" />
</geometry>
</visual>

<collision>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
<geometry>
<mesh filename="package://husarion_ugv_description/meshes/panther/body_collision.stl" />
<mesh filename="package://husarion_ugv_description/meshes/panther/base_collision.stl" />
</geometry>
</collision>

<inertial>
<!-- TODO: Fix oringin -->
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
<mass value="43.0" />
<inertia ixx="2.630036" ixy="-0.023480" ixz="0.052320"
Expand All @@ -40,15 +41,15 @@

<joint name="body_to_imu_joint" type="fixed">
<origin xyz="${imu_xyz}" rpy="${imu_rpy}" />
<parent link="body_link" />
<parent link="base_link" />
<child link="imu_link" />
</joint>

<link name="imu_link" />

<joint name="body_to_front_bumper_joint" type="fixed">
<origin xyz="0.362 0.0 0.0" rpy="0.0 0.0 0.0" />
<parent link="body_link" />
<parent link="base_link" />
<child link="front_bumper_link" />
</joint>

Expand All @@ -64,7 +65,7 @@

<joint name="body_to_rear_bumper_joint" type="fixed">
<origin xyz="-0.362 0.0 0.0" rpy="0.0 0.0 ${pi}" />
<parent link="body_link" />
<parent link="base_link" />
<child link="rear_bumper_link" />
</joint>

Expand All @@ -80,7 +81,7 @@

<joint name="body_to_cover_joint" type="fixed">
<origin xyz="0.0 0.0 0.1715" rpy="0.0 0.0 0.0" />
<parent link="body_link" />
<parent link="base_link" />
<child link="cover_link" />
</joint>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<!-- INCLUDE ROBOT PARTS DEFINITIONS -->
<xacro:include filename="$(find husarion_ugv_description)/urdf/panther/body.urdf.xacro" ns="body" />
<xacro:include filename="$(find husarion_ugv_description)/urdf/common/gazebo.urdf.xacro" ns="gazebo" />
<xacro:include filename="$(find husarion_ugv_description)/urdf/panther/wheel.urdf.xacro" ns="wheel" />
<xacro:include filename="$(find husarion_ugv_description)/urdf/common/wheel.urdf.xacro" ns="wheel" />

<!-- BODY DECLARATION -->
<xacro:body.body
Expand Down

0 comments on commit c86139e

Please sign in to comment.