Commit c4760e69 authored by Paul Rouanet's avatar Paul Rouanet
Browse files

URDF doc for tests on rviz2

parent cdb05ba7
<?xml version="1.0"?>
<!--
Copied from ROS1 example -
https://github.com/ros-simulation/gazebo_ros_demos/blob/kinetic-devel/rrbot_description/urdf/materials.xacro
-->
<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="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="yellow">
<color rgba="1.0 1.0 0.0 1.0"/>
</material>
<material name="white">
<color rgba="1.0 1.0 1.0 1.0"/>
</material>
</robot>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!-- Adapted from bolt.urdf.xacro of ODRI (robot_properties_bolt) https://github.com/open-dynamic-robot-initiative/robot_properties_bolt/blob/master/src/robot_properties_bolt/resources/xacro/bolt.urdf.xacro -->
<?xml version="1.0"?>
<!-- Revolute-Revolute Manipulator -->
<!--
Copied and modified from ROS2 example -
https://github.com/ros-controls/ros2_control_demos/blob/master/ros2_control_demo_description/rrbot_description/urdf/rrbot.urdf.xacro
-->
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="bolt">
<xacro:arg name="prefix" default="" />
<?xml version="1.0" ?>
<robot name="bolt"
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
xmlns:xacro="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface">
<!-- Import RRBot macro -->
<xacro:include filename="$(find ros2_description_bolt)/urdf/system_bolt_description.urdf.xacro" />
<xacro:property name="mesh_ext" value="stl" />
<xacro:property name="color_name" value="grey" />
<xacro:property name="color" value="0.8 0.8 0.8" />
<xacro:property name="opacity" value="1.0" />
<xacro:property name="new_leg" value="true" />
<xacro:property name="has_passive_ankle" value="false" />
<!-- Import Rviz colors -->
<xacro:include filename="$(find ros2_description_bolt)/gazebo/system_bolt.materials.xacro" />
<!-- Include the legs -->
<xacro:include filename="bolt.xacro"/>
<!-- Import RRBot ros2_control description -->
<xacro:include filename="$(find ros2_description_bolt)/ros2_control/system_bolt.ros2_control.xacro" />
<!-- Include the fully parametrized bolt -->
<xacro:bolt_full
mesh_ext="${mesh_ext}"
color_name="${color_name}"
color="${color}"
opacity="${opacity}"
new_leg="${new_leg}"
has_passive_ankle="${has_passive_ankle}"/>
<!-- Used for fixing robot -->
<link name="world"/>
<gazebo reference="world">
<static>true</static>
</gazebo>
<xacro:system_bolt parent="world" prefix="$(arg prefix)">
<origin xyz="0 0 0" rpy="0 0 0" />
</xacro:system_bolt>
<xacro:system_bolt_ros2_control
name="Bolt" prefix="$(arg prefix)" />
</robot>
<!--
Copied from ODRI -
https://github.com/open-dynamic-robot-initiative/robot_properties_bolt/blob/master/src/robot_properties_bolt/resources/xacro/bolt.xacro
-->
<?xml version="1.0" ?>
<robot name="bolt"
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
xmlns:xacro="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface">
<xacro:macro name="bolt_full" params="mesh_ext color_name color opacity new_leg has_passive_ankle">
<!-- This file is based on: https://atlas.is.localnet/confluence/display/AMDW/Quadruped+URDF+Files -->
<link name="base_link">
<!-- BASE LINK INERTIAL -->
<inertial>
<origin xyz="0 0 0" rpy="0 0 0" />
<mass value="0.61436936"/>
<!-- The base is extremely symmetrical. -->
<inertia ixx="0.00578574" ixy="0.0" ixz="0.0"
iyy="0.01938108" iyz="0.0"
izz="0.02476124"
/>
</inertial>
<!-- BASE LINK VISUAL -->
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh filename="package://robot_properties_bolt/resources/meshes/${mesh_ext}/bolt_body.${mesh_ext}"/>
</geometry>
<material name="${color_name}">
<color rgba="${color} ${opacity}"/>
</material>
</visual>
<!-- BASE LINK COLLISION -->
<collision>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh filename="package://robot_properties_bolt/resources/meshes/${mesh_ext}/bolt_body.${mesh_ext}"/>
</geometry>
<material name="${color_name}">
<color rgba="${color} ${opacity}"/>
</material>
</collision>
<!-- Bullet specific paramters -->
<contact>
<lateral_friction value="1.0"/>
<restitution value="0.5"/>
</contact>
</link> <!-- END BASE LINK -->
<!-- Include the legs -->
<xacro:include filename="leg.xacro"/>
<!-- Include the front left leg -->
<xacro:leg
prefix="FL"
is_front="true"
is_right="false"
has_side_motion="true"
mesh_ext="${mesh_ext}"
color_name="${color_name}"
color="${color}"
opacity="${opacity}"
new_leg="${new_leg}"
has_passive_ankle="${has_passive_ankle}"/>
<!-- Include the front right leg -->
<xacro:leg
prefix="FR"
is_front="true"
is_right="true"
has_side_motion="true"
mesh_ext="${mesh_ext}"
color_name="${color_name}"
color="${color}"
opacity="${opacity}"
new_leg="${new_leg}"
has_passive_ankle="${has_passive_ankle}"/>
</xacro:macro>
</robot>
<!--
Copied from ODRI -
https://github.com/open-dynamic-robot-initiative/robot_properties_bolt/blob/master/src/robot_properties_bolt/resources/xacro/bolt.urdf.xacro
-->
<?xml version="1.0" ?>
<robot name="bolt"
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
xmlns:xacro="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface">
<xacro:property name="mesh_ext" value="stl" />
<xacro:property name="color_name" value="grey" />
<xacro:property name="color" value="0.8 0.8 0.8" />
<xacro:property name="opacity" value="1.0" />
<xacro:property name="new_leg" value="true" />
<xacro:property name="has_passive_ankle" value="false" />
<!-- Include the legs -->
<xacro:include filename="system_bolt.xacro"/>
<!-- Include the fully parametrized bolt -->
<xacro:bolt_full
mesh_ext="${mesh_ext}"
color_name="${color_name}"
color="${color}"
opacity="${opacity}"
new_leg="${new_leg}"
has_passive_ankle="${has_passive_ankle}"/>
</robot>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment