-
Notifications
You must be signed in to change notification settings - Fork 9
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
base: master
Are you sure you want to change the base?
Fix/models #10
Changes from all commits
75a32f4
945804f
5423f62
dc09f33
14ef102
f4c2468
571fc6f
3b8aae4
6c2635f
5fadf0d
6955356
b9d3179
1a49447
e3009fa
2d83df6
7443d8a
0a0e7e6
fb831ed
27d4e46
d7440e3
4543848
3916751
694d602
799980d
7a98ae8
31ec331
de9b712
adfaadc
b74df41
009e711
30a6b1b
78ad0b3
385eeed
b221457
c746c8c
b9d3ab9
63283e1
a7b0760
b5b03c2
8cef306
b2a724d
fe8ac56
1f4a78d
12f5cec
29215ce
a96b188
e2f2834
b5a9aab
9e2c012
bbe893e
38b4424
73c1efa
baa9db5
73e3095
594e3ee
e1c9d17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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' |
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 |
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" ?> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
<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> |
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> |
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} |
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> |
There was a problem hiding this comment.
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