Skip to content

Fix/models #10

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

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
75a32f4
Add script to set model paths
MatthijsBurgh Dec 18, 2022
945804f
Add SDF model files
MatthijsBurgh Dec 18, 2022
5423f62
(README) Update how to set env vars
MatthijsBurgh Dec 19, 2022
dc09f33
Add hero plugings
GustavoDCC Dec 20, 2022
14ef102
(tutorial06) Convert robot-lab to world
GustavoDCC Dec 20, 2022
f4c2468
Fix uri of nested models
MatthijsBurgh Dec 21, 2022
571fc6f
Add missing floors to sdf models
MatthijsBurgh Dec 21, 2022
3b8aae4
(tutorial07) Convert robot-lab to world
MatthijsBurgh Dec 21, 2022
6c2635f
(tutorial08) Convert robot-lab to world
MatthijsBurgh Dec 21, 2022
5fadf0d
Revert "Add hero plugings"
GustavoDCC Jan 10, 2023
6955356
Update plugins for an open source robot model
GustavoDCC Jan 10, 2023
b9d3179
Delete a forward slash and comment robot_footprint
GustavoDCC Jan 10, 2023
1a49447
Add a xml tag and find the package
GustavoDCC Jan 10, 2023
e3009fa
Fix indent
MatthijsBurgh Feb 11, 2023
2d83df6
Revert indent changes
MatthijsBurgh Feb 11, 2023
7443d8a
yaml 2 space indent
MatthijsBurgh Feb 11, 2023
0a0e7e6
Create .yamllint
MatthijsBurgh Feb 11, 2023
fb831ed
(actions) add YAML Linting
MatthijsBurgh Feb 11, 2023
27d4e46
(tutorial03) fix yamllint
MatthijsBurgh Feb 11, 2023
d7440e3
(tutorial03) fix yamllint
MatthijsBurgh Feb 11, 2023
4543848
(tutorial11) fix yamllint
MatthijsBurgh Feb 11, 2023
3916751
(tutorial11) fix yamllint
MatthijsBurgh Feb 11, 2023
694d602
(tutorial11) fix yamllint
MatthijsBurgh Feb 11, 2023
799980d
(tutorial11) fix yamllint
MatthijsBurgh Feb 11, 2023
7a98ae8
(tutorial11) fix yamllint
MatthijsBurgh Feb 11, 2023
31ec331
(tutorial11) fix yamllint
MatthijsBurgh Feb 11, 2023
de9b712
(tutorial09) fix yamllint
MatthijsBurgh Feb 11, 2023
adfaadc
(tutorial09) fix yamllint
MatthijsBurgh Feb 11, 2023
b74df41
(tutorial09) fix yamllint
MatthijsBurgh Feb 11, 2023
009e711
(tutorial09) fix yamllint
MatthijsBurgh Feb 11, 2023
30a6b1b
(tutorial07) fix yamllint
MatthijsBurgh Feb 11, 2023
78ad0b3
(tutorial07) fix yamllint
MatthijsBurgh Feb 11, 2023
385eeed
(tutorial07) fix yamllint
MatthijsBurgh Feb 11, 2023
b221457
(tutorial07) fix yamllint
MatthijsBurgh Feb 11, 2023
c746c8c
(tutorial07) fix yamllint
MatthijsBurgh Feb 11, 2023
b9d3ab9
(tutorial04) fix yamllint
MatthijsBurgh Feb 11, 2023
63283e1
(tutorial04) fix yamllint
MatthijsBurgh Feb 11, 2023
a7b0760
(tutorial04) fix yamllint
MatthijsBurgh Feb 11, 2023
b5b03c2
(tutorial12) fix yamllint
MatthijsBurgh Feb 11, 2023
8cef306
(tutorial12) fix yamllint
MatthijsBurgh Feb 11, 2023
b2a724d
(tutorial12) fix yamllint
MatthijsBurgh Feb 11, 2023
fe8ac56
(tutorial05) fix yamllint
MatthijsBurgh Feb 11, 2023
1f4a78d
(tutorial05) fix yamllint
MatthijsBurgh Feb 11, 2023
12f5cec
(tutorial08) fix yamllint
MatthijsBurgh Feb 11, 2023
29215ce
(tutorial08) fix yamllint
MatthijsBurgh Feb 11, 2023
a96b188
(tutorial06) fix yamllint
MatthijsBurgh Feb 11, 2023
e2f2834
(tutorial06) fix yamllint
MatthijsBurgh Feb 11, 2023
b5a9aab
(tutorial02) fix yamllint
MatthijsBurgh Feb 11, 2023
9e2c012
(tutorial01) fix yamllint
MatthijsBurgh Feb 11, 2023
bbe893e
(tutorial06) restore init_pose
MatthijsBurgh Feb 11, 2023
38b4424
(tutorial08) revert init_pose
MatthijsBurgh Feb 11, 2023
73c1efa
(tutorial09) revert init_pose
MatthijsBurgh Feb 11, 2023
baa9db5
(tutorial11) revert init_pose
MatthijsBurgh Feb 11, 2023
73e3095
(tutorial07) revert frequency changes
MatthijsBurgh Feb 14, 2023
594e3ee
(tutorial07) revert removal of default offset
MatthijsBurgh Feb 14, 2023
e1c9d17
should -> needs
MatthijsBurgh Feb 15, 2023
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
18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint

on: [push, pull_request]

jobs:
yaml_lint:
name: YAML Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install YamlLint
run: pip install --upgrade yamllint
- name: YamlLint
run: bash -c 'find ./ -iname '*.yaml' -or -iname '*.yml' | xargs yamllint'
54 changes: 54 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
rules:
braces:
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: 0
max-spaces-inside-empty: 0
brackets:
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: 0
max-spaces-inside-empty: 0
colons:
max-spaces-before: 0
max-spaces-after: 1
commas:
max-spaces-before: 0
min-spaces-after: 1
max-spaces-after: 1
comments:
require-starting-space: false
min-spaces-from-content: 1
level: warning
comments-indentation:
level: warning
document-end: disable
document-start:
present: false
empty-lines:
max: 2
max-start: 0
max-end: 1
# empty-values:
# forbid-in-block-mappings: true
# forbid-in-flow-mappings: true
hyphens:
max-spaces-after: 1
indentation:
check-multi-line-strings: true
indent-sequences: consistent
spaces: 2
key-duplicates: enable
# key-ordering: disable
line-length:
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
max: 120
new-line-at-end-of-file: enable
new-lines:
type: unix
# octal-values: disable
# quoted-strings: disable
trailing-spaces: enable
# truthy:
# level: warning
27 changes: 27 additions & 0 deletions setup_env.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#! /usr/bin/env bash

function ed_tutorial_setup {
local model_path=${PWD}/my-model-dir

local model_paths=($(find $model_path -type f -name '*model*.sdf' | xargs dirname 2>/dev/null | xargs dirname 2>/dev/null))
local unique_model_paths=$(printf "%s\n" "${model_paths[@]}" | sort -ru | tr '\n' ' ')
local model_paths_string=""
for dir in $unique_model_paths
do
if [[ "$dir" == "$model_path" ]]
then
# You want to have the main model path at the beginning
continue
fi
model_paths_string="$dir${model_paths_string:+:${model_paths_string}}"
done

model_paths_string="$model_path${model_paths_string:+:${model_paths_string}}"

export ED_MODEL_PATH=$model_path${ED_MODEL_PATH:+:${ED_MODEL_PATH}}

export GAZEBO_MODEL_PATH=$model_paths_string${GAZEBO_MODEL_PATH:+:${GAZEBO_MODEL_PATH}}
export GAZEBO_RESOURCE_PATH=$model_paths_string${GAZEBO_RESOURCE_PATH:+:${GAZEBO_RESOURCE_PATH}}
}

ed_tutorial_setup
20 changes: 10 additions & 10 deletions tutorial01/my-ed-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
world:
- id: block1
pose: { x: 2, y: 0, z: 0.5 }
shape:
box:
size: { x: 0.5, y: 0.5, z: 1 }
- id: block2
pose: { x: 3, y: 2, z: 0.75 }
shape:
box:
size: { x: 0.5, y: 0.5, z: 1.5 }
- id: block1
pose: {x: 2, y: 0, z: 0.5}
shape:
box:
size: {x: 0.5, y: 0.5, z: 1}
- id: block2
pose: {x: 3, y: 2, z: 0.75}
shape:
box:
size: {x: 0.5, y: 0.5, z: 1.5}

plugins:
- name: gui_server
Expand Down
2 changes: 1 addition & 1 deletion tutorial02/my-ed-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ world:
image: $(file my-walls.pgm)
height: 2
resolution: 0.025
pose: { x: -10.0, y: -10.0, z: 0 }
pose: {x: -10.0, y: -10.0, z: 0}

plugins:
- name: gui_server
Expand Down
2 changes: 1 addition & 1 deletion tutorial03/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ mkdir my-model-dir
You have to let ED know where it will be able to find the models. You can do this by setting the ED_MODEL_PATH variable.

```bash
export ED_MODEL_PATH=`pwd`/my-model-dir
source ../setup_env.bash # This needs to be done from the tutorial specific folder

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part still does not fully explain what needs to happen to set the model paths. It instead gives the user a magic bash script that does everything for them.
Write down in the tutorial what paths need to be set. With the sdf models this also includes Gazebo_model_path and gazebo_resource_path

```

You can specify multiple paths by separating them with colons (':').
Expand Down
12 changes: 6 additions & 6 deletions tutorial03/my-ed-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
world:
- id: table1
type: table
pose: { x: 2, y: 0, z: 0 }
- id: table2
type: table
pose: { x: 3, y: 2, z: 0, Z: 1.54 }
- id: table1
type: table
pose: {x: 2, y: 0, z: 0}
- id: table2
type: table
pose: {x: 3, y: 2, z: 0, Z: 1.54}

plugins:
- name: gui_server
Expand Down
11 changes: 11 additions & 0 deletions tutorial03/my-model-dir/table/model.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" ?>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tutorial instructs the user to make a yaml file. Now there is both a yaml file for a table and an sdf file. I dont know which one ED will take here but this is definitly bad practice.
The tutorial also does not mention how to create an sdf file. If you want to update the models you should also update the tutorial itself.

<model>
<name>table</name>
<version>1.0</version>
<sdf version="1.6">model.sdf</sdf>
<author>
<name>AMIGO</name>
<email>todo@todo.nl</email>
</author>
<description>table</description>
</model>
91 changes: 91 additions & 0 deletions tutorial03/my-model-dir/table/model.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name="table">
<static>true</static>
<link name="1_link">
<collision name="1_col">
<geometry>
<box>
<size>1.2 0.8 0.02</size>
</box>
</geometry>
</collision>
<visual name="1_vis">
<geometry>
<box>
<size>1.2 0.8 0.02</size>
</box>
</geometry>
</visual>
<pose>0 0 0.75 0 0 0</pose>
</link>
<link name="2_link">
<collision name="2_col">
<geometry>
<box>
<size>0.05 0.05 0.74</size>
</box>
</geometry>
</collision>
<visual name="2_vis">
<geometry>
<box>
<size>0.05 0.05 0.74</size>
</box>
</geometry>
</visual>
<pose>-0.55 -0.35 0.37 0 0 0</pose>
</link>
<link name="3_link">
<collision name="3_col">
<geometry>
<box>
<size>0.05 0.05 0.74</size>
</box>
</geometry>
</collision>
<visual name="3_vis">
<geometry>
<box>
<size>0.05 0.05 0.74</size>
</box>
</geometry>
</visual>
<pose>0.55 -0.35 0.37 0 0 0</pose>
</link>
<link name="4_link">
<collision name="4_col">
<geometry>
<box>
<size>0.05 0.05 0.74</size>
</box>
</geometry>
</collision>
<visual name="4_vis">
<geometry>
<box>
<size>0.05 0.05 0.74</size>
</box>
</geometry>
</visual>
<pose>-0.55 0.35 0.37 0 0 0</pose>
</link>
<link name="5_link">
<collision name="5_col">
<geometry>
<box>
<size>0.05 0.05 0.74</size>
</box>
</geometry>
</collision>
<visual name="5_vis">
<geometry>
<box>
<size>0.05 0.05 0.74</size>
</box>
</geometry>
</visual>
<pose>0.55 0.35 0.37 0 0 0</pose>
</link>
</model>
</sdf>
30 changes: 15 additions & 15 deletions tutorial03/my-model-dir/table/model.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
shape:
group:
- box:
pose: {x: 0, y: 0, z: 0.75}
size: {x: 1.20, y: 0.80, z: 0.02}
- box:
pose: {x: -0.55, y: -0.35, z: 0.37}
size: {x: 0.05, y: 0.05, z: 0.74}
- box:
pose: {x: 0.55, y: -0.35, z: 0.37}
size: {x: 0.05, y: 0.05, z: 0.74}
- box:
pose: {x: -0.55, y: 0.35, z: 0.37}
size: {x: 0.05, y: 0.05, z: 0.74}
- box:
pose: {x: 0.55, y: 0.35, z: 0.37}
size: {x: 0.05, y: 0.05, z: 0.74}
- box:
pose: {x: 0, y: 0, z: 0.75}
size: {x: 1.20, y: 0.80, z: 0.02}
- box:
pose: {x: -0.55, y: -0.35, z: 0.37}
size: {x: 0.05, y: 0.05, z: 0.74}
- box:
pose: {x: 0.55, y: -0.35, z: 0.37}
size: {x: 0.05, y: 0.05, z: 0.74}
- box:
pose: {x: -0.55, y: 0.35, z: 0.37}
size: {x: 0.05, y: 0.05, z: 0.74}
- box:
pose: {x: 0.55, y: 0.35, z: 0.37}
size: {x: 0.05, y: 0.05, z: 0.74}
4 changes: 2 additions & 2 deletions tutorial04/my-ed-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
world:
- type: robot-lab
pose: { x: 0, y: 0, z: 0 }
- type: robot-lab
pose: {x: 0, y: 0, z: 0}

plugins:
- name: gui_server
Expand Down
11 changes: 11 additions & 0 deletions tutorial04/my-model-dir/robot-lab/model.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" ?>
<model>
<name>robot-lab</name>
<version>1.0</version>
<sdf version="1.6">model.sdf</sdf>
<author>
<name>AMIGO</name>
<email>todo@todo.nl</email>
</author>
<description>robot-lab</description>
</model>
Loading