-
Notifications
You must be signed in to change notification settings - Fork 451
[AIRO-420] Adding Pick and Place Integration Test #228
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
Conversation
63217a6
to
54406ce
Compare
|
||
#if INTEGRATION_TEST | ||
int ReturnFive() | ||
{ | ||
return 5; | ||
} | ||
#endif |
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.
Experimental code - will remove.
Tests "passed," but on reviewing the output in the Yamato log it looks like the integration test was skipped. My guess is that the |
https://unity-ci.cds.internal.unity3d.com/job/7007522 Line 4991 -- Test successfully executes! |
tutorials/pick_and_place/PickAndPlaceProject/Assets/Scripts/TargetPlacement.cs
Show resolved
Hide resolved
tutorials/pick_and_place/PickAndPlaceProject/Assets/Tests/EditMode/IntegrationTest.cs
Show resolved
Hide resolved
e0bceb5
to
77bd9bb
Compare
77bd9bb
to
d573f7f
Compare
- mkdir -p ./tutorials/pick_and_place/PickAndPlaceProject/Assets/Scripts && cp ./tutorials/pick_and_place/Scripts/*.cs ./tutorials/pick_and_place/PickAndPlaceProject/Assets | ||
- utr/utr --testproject=./tutorials/pick_and_place/PickAndPlaceProject --editor-location=.Editor --reruncount=0 --artifacts_path=test-results --suite=playmode --suite=editor --platform=Editor --editorTestsCategories BuildTests | ||
- git submodule update --init --recursive | ||
# We must remove the Demo.cs script because the System.CodeDom assembly is not in the bokken .NET sdk |
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.
wow. i would not know this. Do you think we should ask bokken team to add System.CodeDom assembly ?
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.
I have brought it up with them before and was basically told to figure it out myself. I think the issue is that utr
automatically includes the -api-profile NET_Standard_2_0
argument in every test invocation, meaning that the API we're developing against is not the same as the API that test runner runs our tests against. I've raised this with the test framework team and hopefully we can figure out why that is.
d1323fd
to
aba5df9
Compare
02bd9ac
to
44743e1
Compare
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.
Looks good to me. Just have some questions to clarify.
|
||
[RequireComponent(typeof(MeshRenderer))] | ||
[RequireComponent(typeof(BoxCollider))] | ||
public class TargetPlacement : MonoBehaviour |
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.
Will this class be used in the demo process or is it only for the integration test?
{ | ||
#if INTEGRATION_TEST | ||
SetUpScene(); | ||
// TODO: This test could be made a PlayMode test once ImportRobot can use the PlayMode URDF import |
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.
nit: I think the URDF-Importer 0.4.0 is ready to import the robot in the playmode?
//m_RosConnection.overrideUnityIP = k_IpAddressLoopback; | ||
//m_RosConnection.unityPort = k_UnityPort; | ||
//m_RosConnection.awaitDataMaxRetries = k_NumAwaitDataRetries; | ||
//m_RosConnection.awaitDataSleepSeconds = k_NumAwaitDataSleepSeconds; |
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.
do we need to remove these lines?
* AIRO-420 Adding integration tests to PickAndPlaceProject * Updating version in tutorial and fixing TargetPlacement bug.
Proposed change(s)
This PR includes two major additions:
First, a new MonoBehaviour called
TargetPlacement
was added and attached to the TargetPlacement prefab. The purpose of this script is to track the state of TargetPlacement with respect to the expected Target to be placed within its bounds. This state tracking allows for automated and visual confirmation that the Pick and Place task completed successfully (the Target has been placed at rest in the TargetPlacement zone). Unit tests are also added for this class.I've added scripts to the
.yamato
directory that modify the state of the PickAndPlaceProject to reproduce the configuration reached after finishing Part 3 of the tutorial and add theINTEGRATION_TEST
scripting define to the ProjectSettings.asset file (this is the only difference between IntegrationTestSettings.asset and the original in the ProjectSettings directory).Tested locally and on Yamato until same result was achieved.
Useful links (GitHub issues, JIRA tickets, forum threads, etc.)
Provide any relevant links here.
Types of change(s)
Testing and Verification
It is a test, and it passes.
Test Configuration:
Unity 2020.2.0b9
Unity machine OS:

ROS machine OS: Ubuntu 18.04 in Docker container from Pick and Place
ROS–Unity communication: loopback through Docker
Checklist
dev
branchdev
branch