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

Updates for Magni robot simulation in Gazebo. #70

Merged
merged 5 commits into from
Feb 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions magni_description/meshes/caster_wheel.dae
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,10 @@
<profile_COMMON>
<technique sid="standard">
<phong>
<emission><color>0 0 0 1</color></emission>
<ambient><color>0 0 0 1</color></ambient>
<diffuse>
<color>0 0 0.376471 1</color>
</diffuse>
<specular><color>0 0 0.376471 1</color></specular>
<transparent opaque="A_ONE"><color>1.0 1.0 1.0 1.0</color></transparent>
<transparency><float>1</float></transparency>
</phong>
</technique>
</profile_COMMON>
Expand All @@ -338,14 +334,10 @@
<profile_COMMON>
<technique sid="standard">
<phong>
<emission><color>0 0 0 1</color></emission>
<ambient><color>0 0 0 1</color></ambient>
<diffuse>
<color>0.792157 0.819608 0.933333 1</color>
</diffuse>
<specular><color>0.396078 0.409804 0.466667 1</color></specular>
<transparent opaque="A_ONE"><color>1.0 1.0 1.0 1.0</color></transparent>
<transparency><float>1</float></transparency>
</phong>
</technique>
</profile_COMMON>
Expand Down
12 changes: 0 additions & 12 deletions magni_description/meshes/front_wheel.dae
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,10 @@
<profile_COMMON>
<technique sid="standard">
<phong>
<emission><color>0 0 0 1</color></emission>
<ambient><color>0 0 0 1</color></ambient>
<diffuse>
<color>0.137255 0.137255 0.137255 1</color>
</diffuse>
<specular><color>0.0686275 0.0686275 0.0686275 1</color></specular>
<transparent opaque="A_ONE"><color>1.0 1.0 1.0 1.0</color></transparent>
<transparency><float>1</float></transparency>
</phong>
</technique>
</profile_COMMON>
Expand All @@ -209,14 +205,10 @@
<profile_COMMON>
<technique sid="standard">
<phong>
<emission><color>0 0 0 1</color></emission>
<ambient><color>0 0 0 1</color></ambient>
<diffuse>
<color>0.501961 0.501961 0.501961 1</color>
</diffuse>
<specular><color>0.25098 0.25098 0.25098 1</color></specular>
<transparent opaque="A_ONE"><color>1.0 1.0 1.0 1.0</color></transparent>
<transparency><float>1</float></transparency>
</phong>
</technique>
</profile_COMMON>
Expand All @@ -225,14 +217,10 @@
<profile_COMMON>
<technique sid="standard">
<phong>
<emission><color>0 0 0 1</color></emission>
<ambient><color>0 0 0 1</color></ambient>
<diffuse>
<color>0.792157 0.819608 0.933333 1</color>
</diffuse>
<specular><color>0.396078 0.409804 0.466667 1</color></specular>
<transparent opaque="A_ONE"><color>1.0 1.0 1.0 1.0</color></transparent>
<transparency><float>1</float></transparency>
</phong>
</technique>
</profile_COMMON>
Expand Down
16 changes: 1 addition & 15 deletions magni_description/meshes/magni_body.dae
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,9 @@
<profile_COMMON>
<technique sid="standard">
<phong>
<emission><color>0 0 0 1</color></emission>
<ambient><color>0 0 0 1</color></ambient>
<diffuse>
<color>0.00392157 0.129412 0.227451 1</color>
</diffuse>
<specular><color>0.00196078 0.0647059 0.113725 1</color></specular>
<transparent opaque="A_ONE"><color>1.0 1.0 1.0 1.0</color></transparent>
<transparency><float>1</float></transparency>
</diffuse>Z
</phong>
</technique>
</profile_COMMON>
Expand All @@ -297,14 +292,9 @@
<profile_COMMON>
<technique sid="standard">
<phong>
<emission><color>0 0 0 1</color></emission>
<ambient><color>0 0 0 1</color></ambient>
<diffuse>
<color>0.00392157 0.121569 0.419608 1</color>
</diffuse>
<specular><color>0.00196078 0.0607843 0.209804 1</color></specular>
<transparent opaque="A_ONE"><color>1.0 1.0 1.0 1.0</color></transparent>
<transparency><float>1</float></transparency>
</phong>
</technique>
</profile_COMMON>
Expand All @@ -313,14 +303,10 @@
<profile_COMMON>
<technique sid="standard">
<phong>
<emission><color>0 0 0 1</color></emission>
<ambient><color>0 0 0 1</color></ambient>
<diffuse>
<color>0.0588235 0.0588235 0.0862745 1</color>
</diffuse>
<specular><color>0.0294118 0.0294118 0.0431373 1</color></specular>
<transparent opaque="A_ONE"><color>1.0 1.0 1.0 1.0</color></transparent>
<transparency><float>1</float></transparency>
</phong>
</technique>
</profile_COMMON>
Expand Down
99 changes: 99 additions & 0 deletions magni_description/urdf/inertial.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version="1.0"?>
<!--
Copyright 2019 Osnabrück University, Knowledge Based Systems Group
https://github.com/uos/uos_tools/tree/kinetic/uos_common_urdf

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
-->

<robot xmlns:xacro="http://wiki.ros.org/xacro">
<property name="M_PI" value="3.1415926535897931" />

<!-- see https://secure.wikimedia.org/wikipedia/en/wiki/List_of_moment_of_inertia_tensors -->

<!-- #################### versions without origin #################### -->
<xacro:macro name="sphere_inertial" params="radius mass">
<inertial>
<mass value="${mass}" />
<origin xyz="0 0 0" />
<inertia ixx="${0.4 * mass * radius * radius}" ixy="0.0" ixz="0.0"
iyy="${0.4 * mass * radius * radius}" iyz="0.0"
izz="${0.4 * mass * radius * radius}" />
</inertial>
</xacro:macro>

<xacro:macro name="cylinder_inertial" params="radius length mass">
<inertial>
<mass value="${mass}" />
<origin xyz="0 0 0" />
<inertia ixx="${0.0833333 * mass * (3 * radius * radius + length * length)}" ixy="0.0" ixz="0.0"
iyy="${0.0833333 * mass * (3 * radius * radius + length * length)}" iyz="0.0"
izz="${0.5 * mass * radius * radius}" />
</inertial>
</xacro:macro>

<xacro:macro name="box_inertial" params="x y z mass">
<inertial>
<mass value="${mass}" />
<origin xyz="0 0 0" />
<inertia ixx="${0.0833333 * mass * (y*y + z*z)}" ixy="0.0" ixz="0.0"
iyy="${0.0833333 * mass * (x*x + z*z)}" iyz="0.0"
izz="${0.0833333 * mass * (x*x + y*y)}" />
</inertial>
</xacro:macro>

<!-- #################### versions with origin #################### -->
<xacro:macro name="sphere_inertial_with_origin" params="radius mass *origin">
<inertial>
<mass value="${mass}" />
<insert_block name="origin" />
<inertia ixx="${0.4 * mass * radius * radius}" ixy="0.0" ixz="0.0"
iyy="${0.4 * mass * radius * radius}" iyz="0.0"
izz="${0.4 * mass * radius * radius}" />
</inertial>
</xacro:macro>

<xacro:macro name="cylinder_inertial_with_origin" params="radius length mass *origin">
<inertial>
<mass value="${mass}" />
<insert_block name="origin" />
<inertia ixx="${0.0833333 * mass * (3 * radius * radius + length * length)}" ixy="0.0" ixz="0.0"
iyy="${0.0833333 * mass * (3 * radius * radius + length * length)}" iyz="0.0"
izz="${0.5 * mass * radius * radius}" />
</inertial>
</xacro:macro>

<xacro:macro name="box_inertial_with_origin" params="x y z mass *origin">
<inertial>
<mass value="${mass}" />
<insert_block name="origin" />
<inertia ixx="${0.0833333 * mass * (y*y + z*z)}" ixy="0.0" ixz="0.0"
iyy="${0.0833333 * mass * (x*x + z*z)}" iyz="0.0"
izz="${0.0833333 * mass * (x*x + y*y)}" />
</inertial>
</xacro:macro>

</robot>
38 changes: 38 additions & 0 deletions magni_description/urdf/magni.gazebo.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://wiki.ros.org/xacro">

<gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
<legacyModeNS>true</legacyModeNS>
</plugin>
</gazebo>

<gazebo reference="left_wheel">
<mu1>1.0</mu1>
<mu2>1.0</mu2>
<fdir1>0 0 1</fdir1>
<minDepth>0.005</minDepth>
<kp>1e8</kp>
</gazebo>
<gazebo reference="right_wheel">
<mu1>1.0</mu1>
<mu2>1.0</mu2>
<fdir1>0 0 1</fdir1>
<minDepth>0.005</minDepth>
<kp>1e8</kp>
</gazebo>

<gazebo reference="left_caster_wheel">
<mu1>0.0</mu1>
<mu2>0.0</mu2>
<minDepth>0.005</minDepth>
<kp>1e8</kp>
</gazebo>
<gazebo reference="right_caster_wheel">
<mu1>0.0</mu1>
<mu2>0.0</mu2>
<minDepth>0.005</minDepth>
<kp>1e8</kp>
</gazebo>

</robot>
26 changes: 26 additions & 0 deletions magni_description/urdf/magni.transmission.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://wiki.ros.org/xacro">

<transmission name="left_wheel_transmission">
<type>transmission_interface/SimpleTransmission</type>
<joint name="left_wheel_joint">
<hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
</joint>
<actuator name="left_wheel_actuator">
<mechanicalReduction>1</mechanicalReduction>
<hardwareInterface>VelocityJointInterface</hardwareInterface>
</actuator>
</transmission>

<transmission name="right_wheel_transmission">
<type>transmission_interface/SimpleTransmission</type>
<joint name="right_wheel_joint">
<hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
</joint>
<actuator name="right_wheel_actuator">
<mechanicalReduction>1</mechanicalReduction>
<hardwareInterface>VelocityJointInterface</hardwareInterface>
</actuator>
</transmission>

</robot>
Loading