Skip to content
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
3 changes: 1 addition & 2 deletions examples/dave_demo_launch/launch/dave_demo.launch
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<arg name="timeout" default="0.0"/>
<arg name="velocity_control" default="true"/>
<arg name="joy_id" default="0"/>

<!-- use Gazebo's empty_world.launch with dave_ocean_waves.world -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(arg world_name)"/>
Expand Down Expand Up @@ -85,7 +85,6 @@
<arg name="model_name" value="rexrov"/>
<arg name="joy_id" value="$(arg joy_id)"/>
</include>


<!-- joint control for oberon7 -->
<include file="$(find oberon7_control)/launch/joint_control.launch">
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>

<model>
<name>SunkenShip</name>
<version>1.0</version>
<sdf version="1.6">model.sdf</sdf>

<author>
<name>Cole Biesemeyer</name>
<email>cole@openrobotics.org</email>
</author>

<description>
</description>
</model>
48 changes: 48 additions & 0 deletions models/dave_object_models/models/sunken_ship_distorted/model.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0"?>
<sdf version="1.6">
<model name="sunkenship_distorted">
<static>true</static>
<link name="base_link">
<collision name="collision">
<pose>0 0 0 0 0 0</pose>
<geometry>
<mesh>
<!--uri>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken ship/2/files/meshes/sunkenship.dae</uri-->
<uri>model://sunken_ship_distorted/meshes/sunkenship_distort.dae</uri>
<scale>1.0 1.0 1.0</scale>
</mesh>
</geometry>
</collision>
<visual name="SunkenShip_distorted_visual">
<geometry>
<mesh>
<!--uri>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken ship/2/files/meshes/sunkenship.dae</uri-->
<uri>model://sunken_ship_distorted/meshes/sunkenship_distort.dae</uri>
<submesh>
<name>SunkenShip</name>
<center>false</center>
</submesh>
</mesh>
</geometry>
<material>
<diffuse>1.0 1.0 1.0</diffuse>
<specular>1.0 1.0 1.0</specular>
<pbr>
<metal>
<albedo_map>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken ship/2/files/materials/textures/SunkenShip_Albedo.png</albedo_map>
<normal_map>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken ship/2/files/materials/textures/SunkenShip_Normal.png</normal_map>
<metalness_map>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken ship/2/files/materials/textures/SunkenShip_Metalness.png</metalness_map>
<roughness_map>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken ship/2/files/materials/textures/SunkenShip_Roughness.png</roughness_map>
</metal>
</pbr>
<!-- fallback to script if no PBR support-->
<script>
<uri>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken ship/2/files/materials/scripts/</uri>
<uri>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken ship/2/files/materials/textures/</uri>
<name>UrbanTile/SunkenShip</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>

<model>
<name>Vase</name>
<version>1.0</version>
<sdf version="1.6">model.sdf</sdf>

<author>
<name>Cole Biesemeyer</name>
<email>cole@openrobotics.org</email>
</author>

<description>
</description>
</model>
56 changes: 56 additions & 0 deletions models/dave_object_models/models/sunken_vase_distorted/model.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0"?>
<sdf version="1.6">
<model name="Pot01_distorted">
<static>false</static>
<link name="base_link">
<inertial>
<pose>0.000000 0.00014473 0.28908009</pose>
<mass>0.047262</mass>
<inertia>
<ixx>0.002228</ixx>
<iyy>0.002315</iyy>
<izz>0.002557</izz>
</inertia>
</inertial>
<collision name="collision">
<pose>0 0 0 0 0 0</pose>
<geometry>
<mesh>
<!--uri>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken vase/3/files/meshes/Pot01.dae</uri-->
<uri>model://sunken_vase_distorted/meshes/Pot01_distort.dae</uri>
<scale>1.0 1.0 1.0</scale>
</mesh>
</geometry>
</collision>
<visual name="Pot01_distorted_visual">
<geometry>
<mesh>
<!--uri>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken vase/3/files/meshes/Pot01.dae</uri-->
<uri>model://sunken_vase_distorted/meshes/Pot01_distort.dae</uri>
<submesh>
<name>Pot01</name>
<center>false</center>
</submesh>
</mesh>
</geometry>
<material>
<diffuse>1.0 1.0 1.0</diffuse>
<specular>1.0 1.0 1.0</specular>
<pbr>
<metal>
<albedo_map>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken vase/3/files/materials/textures/Pot01_Albedo.png</albedo_map>
<normal_map>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken vase/3/files/materials/textures/Pot01_Normal.png</normal_map>
<roughness_map>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken vase/3/files/materials/textures/Pot01_Roughness.png</roughness_map>
</metal>
</pbr>
<!-- fallback to script if no PBR support-->
<script>
<uri>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken vase/3/files/materials/scripts/</uri>
<uri>https://fuel.ignitionrobotics.org/1.0/cole/models/sunken vase/3/files/materials/textures/</uri>
<name>UrbanTile/Pot01_Diffuse</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
10 changes: 8 additions & 2 deletions urdf/scripts/mesh_distortion/distort.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# In Blender, perform mesh modifications.
#
# Usage:
# This script is to be run from within the Blender GUI. Tested in Blender 2.9.2.
# This script is to be run from within the Blender GUI. Tested in Blender
# 2.92.
# distort.py <file_path> <object_prefix> [distort_extent] [method]
#
# Example:
Expand All @@ -21,6 +22,8 @@
import os
import sys

import numpy as np


def find_target_object(object_prefix):

Expand Down Expand Up @@ -179,6 +182,7 @@ def distort(file_path, object_prefix, distort_extent, method):
if step == 'subdiv_mod':
# Figure out levels magnitude
SUBDIV_LVL_MIN = 0
# This might need tuning
SUBDIV_LVL_MAX = 4
# Must be integer
subdiv_lvl = round(SUBDIV_LVL_MIN + (
Expand All @@ -189,7 +193,9 @@ def distort(file_path, object_prefix, distort_extent, method):
elif step == 'vert_rand':
# Meters
VERT_RAND_MIN = 0
VERT_RAND_MAX = 0.02
# Set max in terms of object dimensions. This might need tuning.
VERT_RAND_MAX = 10 * np.max(target_obj.dimensions)

# Figure out offset magnitude
vert_rand_amt = VERT_RAND_MIN + (
(VERT_RAND_MAX - VERT_RAND_MIN) * distort_extent)
Expand Down