Add minimal pick-and-place case with world embedded

This commit is contained in:
Igor Brylyov 2023-03-31 20:24:56 +00:00
parent 209e99a4b3
commit a87fb8a7ec
64 changed files with 2419 additions and 275 deletions

View file

@ -0,0 +1,21 @@
macro(list_subdirectories retval curdir return_relative)
file(GLOB sub-dir RELATIVE ${curdir} *)
set(list_of_dirs "")
foreach(dir ${sub-dir})
if(IS_DIRECTORY ${curdir}/${dir})
if (${return_relative})
set(list_of_dirs ${list_of_dirs} ${dir})
else()
set(list_of_dirs ${list_of_dirs} ${curdir}/${dir})
endif()
endif()
endforeach()
set(${retval} ${list_of_dirs})
endmacro()
list_subdirectories(SUBDIR ${CMAKE_CURRENT_LIST_DIR} TRUE)
install(
DIRECTORY ${SUBDIR}
DESTINATION share/${PROJECT_NAME}
)

View file

@ -0,0 +1,40 @@
{
"label": "box1",
"type": "component",
"include": [],
"features": {
"grasp-poses": {
"Gripper_for_Part__Feature057": {
"placement": {
"position": {
"x": 0.0,
"y": 0.0,
"z": 0.149
},
"orientation": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"w": 0.0
}
},
"distance": 0.015
}
},
"placements": {
"placement": {
"position": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"orientation": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
}
}
}

View file

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<model>
<name>box1</name>
<sdf version="1.0">model.sdf</sdf>
<author>
<name>Splinter1984</name>
<email>rom.andrianov1984@gmail.com</email>
</author>
<description>
A box1.
</description>
</model>

View file

@ -0,0 +1,58 @@
<?xml version="1.0" ?>
<sdf version="1.4">
<model name="box1">
<pose>0 0 0.015 0 0 0</pose>
<link name="link">
<inertial>
<inertia>
<ixx>0.00004167</ixx>
<ixy>0.0</ixy>
<ixz>0.0</ixz>
<iyy>0.00004167</iyy>
<iyz>0.0</iyz>
<izz>0.00004167</izz>
</inertia>
<mass>0.1</mass>
</inertial>
<!-- <gravity>0</gravity> -->
<collision name="collision">
<geometry>
<box>
<size>0.05 0.05 0.05</size>
</box>
</geometry>
<surface>
<contact>
<ode/>
</contact>
<bounce/>
<friction>
<torsional>
<ode>
<slip>
0.3
</slip>
</ode>
</torsional>
<ode>
<mu>0.2</mu>
<mu2>0.2</mu2>
</ode>
</friction>
</surface>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.05 0.05 0.05</size>
</box>
</geometry>
<!-- <material>
<ambient>0.8 0.8 0.8 1</ambient>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.8 0.8 0.8 1</specular>
</material> -->
</visual>
</link>
</model>
</sdf>

View file

@ -0,0 +1,40 @@
{
"label": "box12",
"type": "assembly",
"include": ["box1", "box2"],
"features": {
"grasp-poses": {
"Gripper_for_Part__Feature059": {
"placement": {
"position": {
"x": 0.0,
"y": 0.0,
"z": 0.129
},
"orientation": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"w": 0.0
}
},
"distance": 0.015
}
},
"placements": {
"placement": {
"position": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"orientation": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
}
}
}

View file

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<model>
<name>box12</name>
<sdf version="1.0">model.sdf</sdf>
<author>
<name>Splinter1984</name>
<email>rom.andrianov1984@gmail.com</email>
</author>
<description>
A box12.
</description>
</model>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" ?>
<sdf version="1.4">
<model name="box12">
<pose>0 0 0.015 0 0 0</pose>
<link name="box1">
<pose>0 0 0 0 0 0</pose>
<gravity>0</gravity>
</link>
<link name="box2">
<pose>0 0 0.03 0 0 0</pose>
<gravity>0</gravity>
</link>
<joint name="joint" type="fixed">
<parent>box1</parent>
<child>box2</child>
<pose>0.0 0.0 0.06 0.0 0.0 0.0</pose>
</joint>
</model>
</sdf>

View file

@ -0,0 +1,40 @@
{
"label": "box2",
"type": "component",
"include": [],
"features": {
"grasp-poses": {
"Gripper_for_Part__Feature058": {
"placement": {
"position": {
"x": 0.0,
"y": 0.0,
"z": 0.129
},
"orientation": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"w": 0.0
}
},
"distance": 0.015
}
},
"placements": {
"placement": {
"position": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"orientation": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
}
}
}

View file

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<model>
<name>box2</name>
<sdf version="1.0">model.sdf</sdf>
<author>
<name>Splinter1984</name>
<email>rom.andrianov1984@gmail.com</email>
</author>
<description>
A box2.
</description>
</model>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" ?>
<sdf version="1.4">
<model name="box2">
<pose>0 0 0.015 0 0 0</pose>
<link name="link">
<gravity>0</gravity>
<collision name="collision">
<geometry>
<box>
<size>0.03 0.03 0.03</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.03 0.03 0.03</size>
</box>
</geometry>
<material>
<ambient>0.1 0.75 0 5</ambient>
<diffuse>0.9 0.7 0 1</diffuse>
<specular>0.4 0.4 0.4 64</specular>
<emissive>0.2 0 0.2 2</emissive>
</material>
</visual>
</link>
</model>
</sdf>

View file

@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>rack</name>
<version>1.0</version>
<sdf version="1.6">model.sdf</sdf>
<author>
<name>brothermechanic</name>
<email>brothermechanic@gmail.com</email>
</author>
<description>
rack
</description>
</model>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name="rack">
<pose>0 0 0 0 0 0</pose>
<static>true</static>
<link name="body">
<visual name="visual">
<geometry>
<mesh>
<scale>1.0 1.0 1.0</scale>
<uri>model://rack/model/rack.dae</uri>
</mesh>
</geometry>
</visual>
<collision name="collision">
<geometry>
<mesh>
<scale>1.0 1.0 1.0</scale>
<uri>model://rack/model/rack.stl</uri>
</mesh>
</geometry>
</collision>
</link>
</model>
</sdf>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -0,0 +1,35 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="rack">
<xacro:macro name="rack" params="*origin parent">
<link name="rack_body">
<static>true</static>
<inertial>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<mass value="0.0"/>
<inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
</inertial>
<visual>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<geometry>
<mesh filename="package://rbs_simulation/rack/model/rack.dae" scale="0.35 0.35 0.35"/>
</geometry>
<material name="asd">
<color rgba="1.0 0.0 0.0 1.0"/>
<texture filename="package://rbs_simulation/rack/model/Metal.jpg"/>
</material>
</visual>
<collision>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<geometry>
<mesh filename="package://rbs_simulation/rack/model/rack.stl" scale="0.35 0.35 0.35"/>
</geometry>
</collision>
</link>
<joint name="rack_base_joint" type="fixed">
<parent link="${parent}" />
<child link="rack_body" />
<xacro:insert_block name="origin" />
</joint>
</xacro:macro>
</robot>

View file

@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>table</name>
<version>1.0</version>
<sdf version="1.6">table.sdf</sdf>
<author>
<name>brothermechanic</name>
<email>brothermechanic@gmail.com</email>
</author>
<description>
table
</description>
</model>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name="table">
<pose>0 0 0 0 0 0</pose>
<static>true</static>
<link name="body">
<visual name="visual">
<geometry>
<mesh>
<scale>1.0 1.0 1.0</scale>
<uri>model://table/model/table.dae</uri>
</mesh>
</geometry>
</visual>
<collision name="collision">
<geometry>
<mesh>
<scale>1.0 1.0 1.0</scale>
<uri>model://table/model/table.stl</uri>
</mesh>
</geometry>
</collision>
</link>
</model>
</sdf>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 KiB

View file

@ -0,0 +1,37 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="table">
<xacro:macro name="table" params="*origin parent">
<link name="table_body">
<static>true</static>
<inertial>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<mass value="0.0"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
<visual>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<geometry>
<!-- <mesh filename="package://rbs_simulation/table/model/table.dae" scale="1 1 1"/> -->
<box size="0.8 0.8 0.4"/>
</geometry>
<material name="asd">
<color rgba="1.0 1.0 0.0 1.0"/>
<!-- <texture filename="package://rbs_simulation/table/model/Metal.jpg"/> -->
</material>
</visual>
<collision>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<geometry>
<!-- <mesh filename="package://rbs_simulation/table/model/table.stl" scale="1 1 1"/> -->
<box size="0.8 0.8 0.4"/>
</geometry>
</collision>
</link>
<joint name="table_base_joint" type="fixed">
<parent link="${parent}" />
<child link="table_body" />
<xacro:insert_block name="origin" />
</joint>
</xacro:macro>
</robot>