{"action":"created","issue":{"url":"https://api.github.com/repos/siemens/ros-sharp/issues/129","repository_url":"https://api.github.com/repos/siemens/ros-sharp","labels_url":"https://api.github.com/repos/siemens/ros-sharp/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/siemens/ros-sharp/issues/129/comments","events_url":"https://api.github.com/repos/siemens/ros-sharp/issues/129/events","html_url":"https://github.com/siemens/ros-sharp/issues/129","id":365464058,"node_id":"MDU6SXNzdWUzNjU0NjQwNTg=","number":129,"title":"Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported in Unity 5","user":{"login":"shoeffner","id":1836815,"node_id":"MDQ6VXNlcjE4MzY4MTU=","avatar_url":"https://avatars3.githubusercontent.com/u/1836815?v=4","gravatar_id":"","url":"https://api.github.com/users/shoeffner","html_url":"https://github.com/shoeffner","followers_url":"https://api.github.com/users/shoeffner/followers","following_url":"https://api.github.com/users/shoeffner/following{/other_user}","gists_url":"https://api.github.com/users/shoeffner/gists{/gist_id}","starred_url":"https://api.github.com/users/shoeffner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoeffner/subscriptions","organizations_url":"https://api.github.com/users/shoeffner/orgs","repos_url":"https://api.github.com/users/shoeffner/repos","events_url":"https://api.github.com/users/shoeffner/events{/privacy}","received_events_url":"https://api.github.com/users/shoeffner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-01T13:34:09Z","updated_at":"2018-10-01T14:33:54Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nInstructions:\r\n* Please confirm the two statements below.\r\n* Please fill out one of the three sections below.\r\n* Please delete the other two sections and these instructions.\r\n\r\nIssue Template © Siemens AG, 2017-2018\r\nAuthor: Dr. Martin Bischoff (martin.bischoff@siemens.com)\r\n-->\r\n\r\n* [x] I am at the right place and my issue is directly related to ROS#. General technical questions I would post e.g. at [ROS Answers](https://answers.ros.org/) or [Stack Overflow](https://stackoverflow.com). For library-specific questions I would look for help in the corresponding library forums.\r\n* [x] I have thoroughly read [the Contributing Guideline](Contributing.md) and writing this issue is the right thing to do in my case.\r\n\r\n## I have a problem! ##\r\n* [x] I am using the latest ROS# version available here on the master branch.\r\n* [x] I am adding all required information, code and data files, screenshots and log files so that you can reproduce the problem.\r\n\r\n* My OS is: Mac OS 10.13.6\r\n* My Unity Version is: 2018.2.6f1\r\n* My ROS Distribution is: kinetic (via docker container, see [here for dockerfile and entrypoints](https://gitlab.informatik.uni-bremen.de/hoeffner/semantic-simulation/blob/master/ros))\r\n* My Build Target Platform is: mac/linux, but this issue is inside the editor on Mac\r\n\r\n**Here is my bug description:**\r\nAfter importing the PR2 robot when running the scene from the editor, I get the following error:\r\n```\r\nNon-convex MeshCollider with non-kinematic Rigidbody is no longer supported in Unity 5.\r\nIf you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path \"pr2/base_footprint/base_link/torso_lift_link/l_shoulder_pan_link/l_shoulder_lift_link/l_upper_arm_roll_link/l_upper_arm_link/l_elbow_flex_link/l_forearm_roll_link/l_forearm_link/l_wrist_flex_link/l_wrist_roll_link/l_gripper_palm_link/l_gripper_r_finger_link/l_gripper_r_finger_tip_link/Collisions/unnamed/l_finger_tip/l_finger_tip_0\", Mesh asset path \"Assets/Urdf/PR2/pr2_description/meshes/gripper_v0/l_finger_tip_0.asset\" Mesh name \"l_finger_tip_0\"\r\n```\r\nThis does not only happen for the finger tip, but for multiple different links.\r\n\r\n\r\nPerform the following steps reproduce the bug:\r\n\r\n1. Clone the repository and run the docker containers to have a working ros instance which publishes the PR2 on the param server. Alternatively, use whatever ROS you have available and publish a PR2 description from [pr2_common](https://github.com/PR2/pr2_common/tree/kinetic-devel/pr2_description) via rosbridge.\r\n```\r\ngit clone git@gitlab.informatik.uni-bremen.de:hoeffner/semantic-simulation\r\ncd semantic-simulation\r\ndocker-compose up\r\n```\r\n2. Build the master version of the RosSharp.unitypackage using this Makefile (adjust the Unity path on top according to your setup):\r\n```Makefile\r\nUNITY=/Applications/Unity/Unity.app/Contents/MacOS/Unity\r\n\r\nUNITY_BATCH=${UNITY} -batchmode -quit -projectPath\r\nBUILD=$(shell pwd)/build\r\nROS_SHARP_DIR=${BUILD}/ros-sharp\r\n\r\n${BUILD}/RosSharp.unitypackage: ${ROS_SHARP_DIR}\r\n\tfor LIB in RosBridgeClient Urdf; do \\\r\n\t\tcd ${ROS_SHARP_DIR}/Libraries && msbuild ${ROS_SHARP_DIR}/Libraries/$${LIB}/$${LIB}.csproj /property:Configuration=Release; \\\r\n\t\tcp ${ROS_SHARP_DIR}/Libraries/$${LIB}/bin/Release/* ${ROS_SHARP_DIR}/Unity3D/Assets/RosSharp/Plugins; \\\r\n\tdone\r\n\tfor EXTERNAL in $(shell ls ${ROS_SHARP_DIR}/Libraries/packages); do \\\r\n\t\tcp ${ROS_SHARP_DIR}/Libraries/packages/$${EXTERNAL}/lib/* ${ROS_SHARP_DIR}/Unity3D/Assets/RosSharp/Plugins; \\\r\n\tdone\r\n\t# Run Unity once to create project settings -- this tries to compile the\r\n\t# scripts which might fail due to the scripting version, which will then be\r\n\t# changed.\r\n\t-${UNITY_BATCH} ${ROS_SHARP_DIR}/Unity3D\r\n\tsed -i '' 's/  scriptingRuntimeVersion: 0/  scriptingRuntimeVersion: 1/g' ${ROS_SHARP_DIR}/Unity3D/ProjectSettings/ProjectSettings.asset\r\n\t# Export package\r\n\t${UNITY_BATCH} ${ROS_SHARP_DIR}/Unity3D -exportPackage Assets/RosSharp $@ -logFile\r\n\r\n${ROS_SHARP_DIR}: | ${BUILD}\r\n\tcd ${BUILD} && git clone https://github.com/siemens/ros-sharp.git\r\n\tnuget restore -PackagesDirectory ${ROS_SHARP_DIR}/Libraries/packages ${ROS_SHARP_DIR}/Libraries/RosBridgeClient/RosBridgeClient.csproj\r\n\tnuget restore -PackagesDirectory ${ROS_SHARP_DIR}/Libraries/packages ${ROS_SHARP_DIR}/Libraries/Urdf/Urdf.csproj\r\n\r\n${BUILD}:\r\n\tmkdir -p $@\r\n```\r\n3. Create a Unity project, import the RosSharp.unitypackage, set the Player ScriptingRuntimeVersion, restart unity.\r\n4. Use RosBridgeClient to import the PR2. I also added a plane so it doesn't fall down directly (thanks to gravity it wills till fall through though, but slower).\r\n5. Click the run button.\r\n\r\nObserved results:\r\nThe error messages as depicted above.\r\n\r\nWhen setting all colliders to convex, and all upper RigitBodies to Kinematic, the issue seems to be resolved.\r\n\r\nExpected results:\r\nNo error messages.\r\n\r\nAdditional Information:\r\nI also tried to fix it by adding Twist Subscribers for the link transforms. Currently, what is the recommended way to add multiple subscribers and \"fix\" the components at once? The manager component used in older versions seems no longer to exist, and I didn't find a proper alternative yet."},"comment":{"url":"https://api.github.com/repos/siemens/ros-sharp/issues/comments/425930367","html_url":"https://github.com/siemens/ros-sharp/issues/129#issuecomment-425930367","issue_url":"https://api.github.com/repos/siemens/ros-sharp/issues/129","id":425930367,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTkzMDM2Nw==","user":{"login":"MartinBischoff","id":30176214,"node_id":"MDQ6VXNlcjMwMTc2MjE0","avatar_url":"https://avatars0.githubusercontent.com/u/30176214?v=4","gravatar_id":"","url":"https://api.github.com/users/MartinBischoff","html_url":"https://github.com/MartinBischoff","followers_url":"https://api.github.com/users/MartinBischoff/followers","following_url":"https://api.github.com/users/MartinBischoff/following{/other_user}","gists_url":"https://api.github.com/users/MartinBischoff/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinBischoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinBischoff/subscriptions","organizations_url":"https://api.github.com/users/MartinBischoff/orgs","repos_url":"https://api.github.com/users/MartinBischoff/repos","events_url":"https://api.github.com/users/MartinBischoff/events{/privacy}","received_events_url":"https://api.github.com/users/MartinBischoff/received_events","type":"User","site_admin":false},"created_at":"2018-10-01T14:33:54Z","updated_at":"2018-10-01T14:33:54Z","author_association":"CONTRIBUTOR","body":"Hi @shoeffner , \r\n\r\nas the error message said: Unity / PhysX can not work with non-convex mesh colliders. Further info [here](https://docs.unity3d.com/Manual/class-MeshCollider.html).\r\n\r\nAs you found out by yourself:\r\n(1) setting the mesh colliders convex (and thus using the convex hull of the mesh) works for some meshes.\r\n(2) setting the corresponding rigidbody kinematic (and thus deactivating physics) will make sure you get rid of any further errors in this direction.\r\n(3) another alternative would be to change the URDF in ROS and/or Unity and use a proper simpler collider instead.\r\n\r\nIn case you want to run a physical simulation of your robot model in Unity, (2) will obviously be no option for you. In case you want to run just an animation of your robot and e.g. subscribe to the corresponding ROS joint_states, (2) should be your preferred option.\r\nAdding Subscribers will not help to get rid of this error.\r\n\r\nIn case you are asking for the Urdf Patchers in the question you asked in additional information: We moved all those functions to the UrdfRobot script. You find it in the URDFroot GameObject after importing your robot in Unity. Screenshot:\r\n![urdf root](https://user-images.githubusercontent.com/30176214/46294825-f5899180-c596-11e8-8235-337dcf33c3b3.png)\r\n\r\nIf this answers your question, please close this issue.\r\n\r\nBest,\r\nMartin\r\n\r\n\r\n"}}
{"actor":{"display_login":"MartinBischoff"}}