Skip to content

Commit 90f353e

Browse files
authored
Release 0.5.2
AIRO-1696
2 parents e9859c4 + 58791f8 commit 90f353e

File tree

23 files changed

+484
-114
lines changed

23 files changed

+484
-114
lines changed

.github/workflows/jira-link.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: jira-link
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened, synchronize]
6+
7+
jobs:
8+
jira-link:
9+
runs-on: ubuntu-20.04
10+
steps:
11+
- name: check pull request title and source branch name
12+
run: |
13+
echo "Checking pull request with title ${{ github.event.pull_request.title }} from source branch ${{ github.event.pull_request.head.ref }}"
14+
if ! [[ "${{ github.event.pull_request.title }}" =~ ^AIRO-[0-9]+[[:space:]].*$ ]] && ! [[ "${{ github.event.pull_request.head.ref }}" =~ ^AIRO-[0-9]+.*$ ]]
15+
then
16+
echo -e "Please make sure one of the following is true:\n \
17+
1. the pull request title starts with 'AIRO-xxxx ', e.g. 'AIRO-1024 My Pull Request'\n \
18+
2. the source branch starts with 'AIRO-xxx', e.g. 'AIRO-1024-my-branch'"
19+
exit 1
20+
else
21+
echo "Completed checking"
22+
fi

.github/workflows/stale.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 'Stale issue handler'
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 17 * * *' # 17:00 UTC; 10:00 PDT
6+
7+
permissions:
8+
issues: write
9+
10+
jobs:
11+
stale:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/[email protected]
15+
id: stale
16+
with:
17+
stale-issue-label: 'stale'
18+
stale-issue-message: 'This issue has been marked stale because it has been open for 14 days with no activity. Please remove the stale label or comment on this issue, or the issue will be automatically closed in the next 14 days.'
19+
days-before-stale: 14
20+
days-before-pr-stale: -1
21+
days-before-close: 14
22+
days-before-pr-close: -1
23+
exempt-issue-labels: 'blocked,must,should,keep,pinned,work-in-progress,request,announcement'
24+
close-issue-message: 'This issue has been marked stale for 14 days and will now be closed. If this issue is still valid, please ping a maintainer.'
25+
- name: Print outputs
26+
run: echo ${{ join(steps.stale.outputs.*, ',') }}
27+

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
# Autogenerated Jetbrains Rider plugin
2525
/[Aa]ssets/Plugins/Editor/JetBrains*
2626

27+
# Rider cache directory
28+
.idea
29+
2730
# Visual Studio cache directory
2831
.vs/
2932

@@ -73,3 +76,7 @@ crashlytics-build.properties
7376

7477
# .DS_Store
7578
**/.DS_Store
79+
80+
# Sonarqube
81+
.scannerwork/**
82+
.sonarqube/**

.yamato/sonar.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Sonarqube Scan
2+
agent:
3+
type: Unity::metal::macmini
4+
image: package-ci/mac
5+
flavor: m1.mac
6+
variables:
7+
PROJECT_PATH: TestUrdfImporter
8+
SONARQUBE_PROJECT_KEY: ai-robotics-urdf-importer
9+
SONARQUBE_PROJECT_BASE_DIR: /Users/bokken/build/output/Unity-Technologies/URDF-Importer/com.unity.robotics.urdf-importer
10+
MSBUILD_SLN_PATH: ./TestUrdfImporter/TestUrdfImporter.sln
11+
UNITY_VERSION: 2020.3.11f1
12+
commands:
13+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.it.unity3d.com/artifactory/api/npm/upm-npm
14+
- unity-downloader-cli -u $UNITY_VERSION -c Editor
15+
- brew install mono corretto
16+
- curl https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.2.1.31210/sonar-scanner-msbuild-5.2.1.31210-net46.zip -o sonar-scanner-msbuild-net46.zip -L
17+
- unzip sonar-scanner-msbuild-net46.zip -d ~
18+
- chmod a+x ~/sonar-scanner-4.6.1.2450/bin/sonar-scanner
19+
- .Editor/Unity.app/Contents/MacOS/Unity -projectPath $PROJECT_PATH -batchmode -quit -nographics -logFile - -executeMethod "UnityEditor.SyncVS.SyncSolution"
20+
- command: |
21+
cd $PROJECT_PATH
22+
for file in *.csproj; do sed -i.backup "s/^[[:blank:]]*<ReferenceOutputAssembly>false<\/ReferenceOutputAssembly>/<ReferenceOutputAssembly>true<\/ReferenceOutputAssembly>/g" $file; rm $file.backup; done
23+
cd ../
24+
- mono ~/SonarScanner.MSBuild.exe begin /k:$SONARQUBE_PROJECT_KEY /d:sonar.host.url=$SONARQUBE_ENDPOINT_URL_PRD /d:sonar.login=$SONARQUBE_TOKEN_PRD /d:sonar.projectBaseDir=$SONARQUBE_PROJECT_BASE_DIR
25+
- msbuild $MSBUILD_SLN_PATH
26+
- mono ~/SonarScanner.MSBuild.exe end /d:sonar.login=$SONARQUBE_TOKEN_PRD
27+
triggers:
28+
cancel_old_ci: true
29+
expression: |
30+
((pull_request.target eq "main" OR pull_request.target eq "dev")
31+
AND NOT pull_request.push.changes.all match "**/*.md") OR
32+
(push.branch eq "main" OR push.branch eq "dev")
33+

.yamato/yamato-config.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: URDF Importer Unit Tests
22
agent:
33
type: Unity::VM
4-
image: robotics/ci-ubuntu20:latest
4+
image: robotics/ci-ubuntu20:v0.1.0-795910
55
flavor: i1.large
66
variables:
7+
COVERAGE_EXPECTED: 35
78
PATH: /root/.local/bin:/home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin
89
commands:
910
- git submodule update --init --recursive
@@ -15,14 +16,15 @@ commands:
1516
- command: |
1617
linecoverage=$(cat test-results/Report/Summary.xml | grep Linecoverage | grep -Eo '[+-]?[0-9]+([.][0-9]+)?')
1718
echo "Line coverage: $linecoverage%"
18-
if (( $(echo "$linecoverage < 20" | bc -l) )); then exit 1; fi
19+
if (( $(echo "$linecoverage < $COVERAGE_EXPECTED" | bc -l) ))
20+
then echo "ERROR: Code coverage is under threshold of $COVERAGE_EXPECTED%" && exit 1
21+
fi
1922
triggers:
2023
cancel_old_ci: true
2124
expression: |
22-
(pull_request.target eq "main" AND
23-
NOT pull_request.push.changes.all match "**/*.md") OR
24-
(pull_request.target eq "dev" AND
25-
NOT pull_request.push.changes.all match "**/*.md")
25+
((pull_request.target eq "main" OR pull_request.target eq "dev")
26+
AND NOT pull_request.push.changes.all match "**/*.md") OR
27+
(push.branch eq "main" OR push.branch eq "dev")
2628
artifacts:
2729
logs:
2830
paths:

CONTRIBUTING.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,30 @@ does the following:
3030
- Has corresponding changes to documentation, unit tests and sample environments (if
3131
applicable)
3232
- Contains a summary of the tests performed to validate your changes
33+
- Updates the [Changelog](com.unity.robotics.urdf-importer/CHANGELOG.md) and describes changes in the Unreleased section
3334
- Links to issue numbers that the PR resolves (if any)
3435

36+
## Workflow
37+
38+
This project is provided as a package to be imported into a Unity project. In order to avoid common issues regarding version control and unmanaged files, the suggested workflow for contributing to the package is as follows:
39+
40+
1. Clone this repository to a known location on your local machine (e.g. Documents).
41+
2. Git checkout the `dev` branch to ensure you have the latest staged changes.
42+
3. In a development Unity project (e.g. a new project created from the Unity Hub of the minimum Unity [version](README.md) or above), open the `Window > Package Manager`.
43+
4. Click the `+` in the top-left of the Package Manager window and select `Add package from disk...`.
44+
5. Navigate to the cloned repository, and select the `com.unity.<package>/package.json` file. Click `Open`.
45+
6. The local version of the package is now added to your Unity project! Changes made to your cloned directory will update in your Unity project.
46+
3547
<!-- ## Continuous Integration (CI)
3648
3749
We run continuous integration on all PRs; all tests must be passing before the PR is merged. -->
3850

3951
## Code style
4052

41-
All Python code should follow the [PEP 8 style guidelines](https://pep8.org/).
42-
43-
All C# code should follow the [Microsoft C# Coding Conventions](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions).
44-
Additionally, the [Unity Coding package](https://docs.unity3d.com/Packages/[email protected]/manual/index.html)
45-
can be used to format, encode, and lint your code according to the standard Unity
46-
development conventions. Be aware that these Unity conventions will supersede the
47-
Microsoft C# Coding Conventions where applicable.
53+
All C# code should follow the [Microsoft C# Coding Conventions](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions). (Code may be reformatted to Unity coding standards where applicable.)
4854

49-
Please note that even if the code you are changing does not adhere to these guidelines,
50-
we expect your submissions to follow these conventions.
55+
Please note that even if the code you are changing does not follow these conventions,
56+
we expect your submissions to do so.
5157

5258
## Contributor License Agreements
5359

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,31 @@
44
[![License](https://img.shields.io/badge/license-Apache--2.0-green.svg)](LICENSE.md)
55
![Unity](https://img.shields.io/badge/unity-2020.2+-brightgreen)
66

7+
---
8+
9+
We're currently working on lots of things! Please take a short moment fill out our [survey](https://unitysoftware.co1.qualtrics.com/jfe/form/SV_0ojVkDVW0nNrHkW) to help us identify what products and packages to build next.
10+
11+
---
12+
13+
## Introduction
14+
715
URDF Importer allows you to import a robot defined in [URDF](http://wiki.ros.org/urdf/XML) format in a Unity scene. URDF defines the geometry, visual meshes, kinematic and dynamic attributes of a Robot. Importer parses a URDF file and imports it into Unity using PhyX 4.0 articulation bodies.
816

9-
# Using the Package
17+
## Using the Package
1018

11-
## Adding the URDF package
19+
### Adding the URDF package
1220

1321
1. Open the Package Manager from Unity Menu. Click `Window -> Package Manager`. A new package manager window will appear.
1422

1523
2. Click on the `+` sign on the top left corner of the package manager window and click on `Add Package from Git URL`.
1624

1725
<img src = "images~/Package_manager_add.png">
1826

19-
3. Enter the git URL for the URDF Importer with the latest version tag (currently v0.5.0) `https://github.com/Unity-Technologies/URDF-Importer.git?path=/com.unity.robotics.urdf-importer#v0.5.0` in the text box and press `Enter`.
27+
3. Enter the git URL for the URDF Importer with the latest version tag (currently v0.5.2) `https://github.com/Unity-Technologies/URDF-Importer.git?path=/com.unity.robotics.urdf-importer#v0.5.2` in the text box and press `Enter`.
2028

2129
4. Click `Import URDF`.
2230

23-
## Importing the robot using URDF file
31+
### Importing the robot using URDF file
2432

2533
1. Copy the URDF and the associated files in the assets folder in the Project window. Make sure the [location](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/urdf_importer/urdf_appendix.md#file-hierarchy) of the mesh files is correct.
2634

@@ -35,7 +43,7 @@ URDF Importer allows you to import a robot defined in [URDF](http://wiki.ros.org
3543
4. Click `Import URDF`
3644

3745

38-
# Tutorials
46+
## Tutorials
3947

4048
Instructions for using URDF importer can be found [here](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/urdf_importer/urdf_tutorial.md).
4149

com.unity.robotics.urdf-importer/CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,38 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
2020

2121
### Fixed
2222

23+
24+
## [0.5.2-preview] - 2022-02-01
25+
26+
Added Sonarqube scanner
27+
28+
### Fixed
29+
Fixed inability to read relative file paths
30+
31+
Correct Axis change issues in URDF Importer
32+
33+
34+
## [0.5.1-preview] - 2021-10-04
35+
Fixed bug with multiple references to the same mesh during import
36+
37+
Add the [Close Stale Issues](https://github.com/marketplace/actions/close-stale-issues) action
38+
39+
### Upgrade Notes
40+
41+
### Known Issues
42+
43+
### Added
44+
45+
Start supporting file:// type URI.
46+
47+
### Changed
48+
49+
### Deprecated
50+
51+
### Removed
52+
53+
### Fixed
54+
2355
## [0.5.0-preview] - 2021-07-15
2456

2557
### Upgrade Notes

com.unity.robotics.urdf-importer/Editor/CustomEditors/UrdfRobotEditor.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ You may obtain a copy of the License at
1010
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1111
See the License for the specific language governing permissions and
1212
limitations under the License.
13-
*/
13+
*/
1414

1515
using System.IO;
1616
using UnityEditor;
@@ -28,7 +28,7 @@ public class UrdfRobotEditor : UnityEditor.Editor
2828

2929
public void OnEnable()
3030
{
31-
axisType = serializedObject.FindProperty("choosenAxis");
31+
axisType = serializedObject.FindProperty("chosenAxis");
3232
}
3333
public override void OnInspectorGUI()
3434
{
@@ -37,10 +37,6 @@ public override void OnInspectorGUI()
3737

3838
urdfRobot = (UrdfRobot) target;
3939

40-
EditorGUILayout.PropertyField(axisType, new GUIContent("Axis Type"));
41-
serializedObject.ApplyModifiedProperties();
42-
UrdfRobotExtensions.CorrectAxis(urdfRobot.gameObject);
43-
4440
GUILayout.Space(5);
4541
GUILayout.Label("All Rigidbodies", EditorStyles.boldLabel);
4642
DisplaySettingsToggle(new GUIContent("Use Gravity", "If disabled, robot is not affected by gravity."), urdfRobot.SetRigidbodiesUseGravity, UrdfRobot.useGravity);
@@ -61,9 +57,12 @@ public override void OnInspectorGUI()
6157
EditorGUILayout.EndHorizontal();
6258

6359
GUILayout.Space(5);
60+
EditorGUI.BeginDisabledGroup(true);
6461
EditorGUILayout.PropertyField(axisType, new GUIContent("Axis Type", "Adjust this if the models that make up your robot are facing the wrong direction."));
65-
serializedObject.ApplyModifiedProperties();
66-
UrdfRobotExtensions.CorrectAxis(urdfRobot.gameObject);
62+
EditorGUI.EndDisabledGroup();
63+
// Legacy code for correcting axis in the inspector
64+
// serializedObject.ApplyModifiedProperties();
65+
// UrdfRobotExtensions.CorrectAxis(urdfRobot.gameObject);
6766

6867
if (urdfRobot.GetComponent<Unity.Robotics.UrdfImporter.Control.Controller>() == null || urdfRobot.GetComponent<Unity.Robotics.UrdfImporter.Control.FKRobot>() == null)
6968
{

com.unity.robotics.urdf-importer/Editor/MenuItems/FileImportMenu.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ private void OnGUI()
3838
//Select the original up axis of the imported mesh
3939
GUILayout.Space(5);
4040
EditorGUILayout.BeginHorizontal();
41-
settings.choosenAxis = (ImportSettings.axisType)EditorGUILayout.EnumPopup(
42-
"Select Axis Type" , settings.choosenAxis);
41+
settings.chosenAxis = (ImportSettings.axisType)EditorGUILayout.EnumPopup(
42+
"Select Axis Type" , settings.chosenAxis);
4343
EditorGUILayout.EndHorizontal();
4444

4545
//Window title

0 commit comments

Comments
 (0)