Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #690 #706

Merged
merged 11 commits into from
Jul 27, 2023
15 changes: 15 additions & 0 deletions vrx_gz/models/articulated_platform/model.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<model>
<name>platform</name>
<version>1.0</version>
<sdf version="1.6">model.sdf</sdf>

<author>
<name>Carlos Agüero</name>
<email>caguero@openrobotics.org</email>
</author>

<description>
A platform to lock/release vehicles.
</description>
</model>
31 changes: 31 additions & 0 deletions vrx_gz/models/articulated_platform/model.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0"?>
<sdf version="1.6">
<model name="articulated_platform">
<static>false</static>
<link name="dummy_upper"/>
<link name="dummy_lower"/>

<joint name="platform_pivot_joint" type="universal">
<parent>dummy_lower</parent>
<child>dummy_upper</child>
<axis>
<xyz>1 0 0</xyz>
</axis>
<axis2>
<xyz>0 1 0</xyz>
</axis2>
</joint>

<joint name="world_joint" type="prismatic">
<parent>world</parent>
<child>dummy_lower</child>
<axis>
<limit>
<lower>-3</lower>
<upper>3</upper>
</limit>
<xyz>0 0 1</xyz>
</axis>
</joint>
</model>
</sdf>
16 changes: 8 additions & 8 deletions vrx_gz/models/platform/model.sdf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0"?>
<sdf version="1.6">
<model name="platform">
<static>false</static>
<link name="dummy_base"/>
<model name="platform">
<static>false</static>
<link name="dummy_upper"/>

<joint name="world_joint" type="fixed">
<parent>world</parent>
<child>dummy_base</child>
</joint>
</model>
<joint name="world_joint" type="fixed">
<parent>world</parent>
<child>dummy_upper</child>
</joint>
</model>
</sdf>
3 changes: 0 additions & 3 deletions vrx_gz/src/Surface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,6 @@ void Surface::PreUpdate(const sim::UpdateInfo &_info,

// Debug output:
// gzdbg << bpnt.X() << "," << bpnt.Y() << "," << bpnt.Z() << std::endl;
// gzdbg << "-" << std::endl;
// gzdbg << bpntW.X() << "," << bpntW.Y() << "," << bpntW.Z() << std::endl;
// gzdbg << "X: " << X << std::endl;
// gzdbg << "depth: " << depth << std::endl;
// gzdbg << "dz: " << dz << std::endl;
// gzdbg << "kDdz: " << kDdz << std::endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,9 @@
</include>

<include>
<pose>-532 162 -1 0 0 0</pose>
<name>platform</name>
<uri>platform</uri>
<uri>articulated_platform</uri>
</include>

<!-- The posts for securing the WAM-V -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,9 @@
</include>

<include>
<pose>-532 162 -1 0 0 0</pose>
<name>platform</name>
<uri>platform</uri>
<uri>articulated_platform</uri>
</include>

<!-- The posts for securing the WAM-V -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,9 @@
</include>

<include>
<pose>-532 162 -1 0 0 0</pose>
<name>platform</name>
<uri>platform</uri>
<uri>articulated_platform</uri>
</include>

<!-- The posts for securing the WAM-V -->
Expand Down
3 changes: 2 additions & 1 deletion vrx_gz/worlds/perception_task.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,9 @@
</include>

<include>
<pose>-532 162 -1 0 0 0</pose>
<name>platform</name>
<uri>platform</uri>
<uri>articulated_platform</uri>
</include>

<!-- The posts for securing the WAM-V -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,17 @@
<yDotV>0.0</yDotV>
<nDotR>0.0</nDotR>
<!-- Linear and quadratic drag -->
<xU>51.3</xU>
<xUU>72.4</xUU>
<yV>40.0</yV>
<yVV>0.0</yVV>
<xU>100.0</xU>
<xUU>150.0</xUU>
<yV>100.0</yV>
<yVV>100.0</yVV>
<zW>500.0</zW>
<kP>100.0</kP>
<mQ>100.0</mQ>
<nR>400.0</nR>
<nRR>0.0</nRR>
<kP>300.0</kP>
<kPP>600.0</kPP>
<mQ>900.0</mQ>
<mQQ>900.0</mQQ>
<nR>800.0</nR>
<nRR>800.0</nRR>
</plugin>

</gazebo>
Expand Down
69 changes: 10 additions & 59 deletions vrx_urdf/wamv_gazebo/urdf/wamv_gazebo.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -69,65 +69,16 @@
</xacro:if>
</xacro:unless>

<!-- === Decide if we lock the robot to the world === -->
<xacro:if value="$(arg locked)">
<gazebo>
<link name="wamv_external_link">
<inertial>
<mass>0.001</mass>
<inertia>
<ixx>0.00000004</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.00000004</iyy>
<iyz>0</iyz>
<izz>0.00000004</izz>
</inertia>
</inertial>
</link>
<link name="wamv_external_link_base">
<inertial>
<mass>0.001</mass>
<inertia>
<ixx>0.00000004</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.00000004</iyy>
<iyz>0</iyz>
<izz>0.00000004</izz>
</inertia>
</inertial>
</link>
<joint name="wamv_external_pivot_joint" type="universal">
<parent>wamv_external_link</parent>
<child>$(arg namespace)/base_link</child>
<axis>
<xyz>1 0 0</xyz>
</axis>
<axis2>
<xyz>0 1 0</xyz>
</axis2>
</joint>
<joint name="wamv_external_riser" type="prismatic">
<parent>wamv_external_link_base</parent>
<child>wamv_external_link</child>
<axis>
<limit>
<lower>-3</lower>
<upper>3</upper>
</limit>
<xyz>0 0 1</xyz>
</axis>
</joint>
<plugin filename="gz-sim-detachable-joint-system" name="gz::sim::systems::DetachableJoint">
<parent_link>wamv_external_link_base</parent_link>
<child_model>platform</child_model>
<child_link>dummy_base</child_link>
<topic>/vrx/release</topic>
<suppress_child_warning>true</suppress_child_warning>
</plugin>
</gazebo>
</xacro:if>
<!-- === [Un]lock the robot to the world === -->
<gazebo>
<plugin filename="gz-sim-detachable-joint-system" name="gz::sim::systems::DetachableJoint">
<parent_link>$(arg namespace)/base_link</parent_link>
<child_model>platform</child_model>
<child_link>dummy_upper</child_link>
<topic>/vrx/release</topic>
<suppress_child_warning>true</suppress_child_warning>
</plugin>
</gazebo>

<!-- === TF === -->
<!-- Publish robot state information -->
Expand Down