-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
RayPerceptionSensor related errors #5958
Comments
This error could be related to the most recent commit on the main branch - "Update to 2022.3 LTS and batched raycasts" |
The package was updated to use Unity 2022.3. The API for batched ray casts has changed a bit in 2022.3. Upgrading Unity to 2022.3 should fix the issue. |
Does that mean I cannot run ML-agents in a lower version of Unity? |
You can use any version that you want, if you install the last registry release from the package manager, which was 2.0.1. Keep in mind, that you'll have to also install the correct python versions as well. You can find this info on the releases page. https://github.com/Unity-Technologies/ml-agents/releases For installing older versions from GitHub, you'll have to switch to the correct release branch, e.g. release 20, which was released for 2021.3. https://github.com/Unity-Technologies/ml-agents/releases/tag/release_20 If you want to use the bleeding edge available on the develop branch, then you'll have to upgrade to the editor version listed in package.json https://github.com/Unity-Technologies/ml-agents/blob/develop/com.unity.ml-agents/package.json. |
Thank you so much for the clarification. It is now clear what I should do :) |
Closing. |
May I ask what is the science behind forcing upgrade to 2022 to use the latest package version, despite sentis already working on 2021 as far as I'm concern Our project heavly rely on webgl support, and upgrading to 2022 effect our performance a lot due to having to upgrade URP to newer version and many render features we have no longer working . |
There are some new features in the latest release of MLA the depend on 2022, unrelated to Sentis. As Unity evolves, so does MLA. |
Thanks for explanation, would be possible for those features to be optional? In my imagination, ML agents hasnt updated for very long time, and most of the users who use it are mostly using old version of unity which difficult for sudden update... so we may expect at least we can still use the package without those exclusive feature for 2022 and up. However, its just suggestion hopefully put in to account Thank you:) |
What version of 2021 are you using? I can patch ML-Agents to exclude features related to 2022.3 and have it available on the develop branch. I also replied to your thread on the Sentis discussion board. https://discussions.unity.com/t/ml-agent-and-sentis-pipeline/282043/15 Reopenning. |
We are using 2021.3.8f1 Really appreciated, lets continue the discussion here for easier collaboration :)) |
@OmarVector So, I've made the changes to support running MLA with Sentis on 2021.3. It's on this branch: https://github.com/Unity-Technologies/ml-agents/tree/fix-remove-batched-raycasts-2021 Unfortunately, I will not be able to merge this into develop, as we do not want to explicitly add support for Unity versions older than 2022.3. Plus, these changes remove any errors with the ML-Agents package, but some of the example scenes do not work on 2021.3 since they've been updated to 2022.3. However, we'll keep this branch around for those that want to use MLA + Sentis in 2021.3. You can always install ML-Agents from the github repo directly by using the following git url:
and installing the package through the package manager git URL installation process. Give it a shot and let me know how it goes. Thanks again for supporting ML-Agents! I'm closing this issue. |
It went well, the performance is much higher than the version of 2022 but I believe its due to URP version as well for the performance compared to our 2021 version, is almost the same, I may consider slightly improvement ... its difficult to observe the difference compared to 2022 due to frame spikes on webgl due to GC... its always in range 30-50 FPS Thank you for providing this custom version of sentis: )) |
Describe the bug
The RayPerceptionSensor.cs file has errors associated with variable names not existing, error in float to int conversions, some methods don't exist as supposed.
To Reproduce
Steps to reproduce the behavior:
Unity will show the error right away, after starting the 3DBall example tutorial.
Console logs / stack traces
...\ml-agents-develop\com.unity.ml-agents\Runtime\Sensors\RayPerceptionSensor.cs(459,39): error CS0103: The name 'QueryParameters' does not exist in the current context
com.unity.ml-agents\Runtime\Sensors\RayPerceptionSensor.cs(466,146): error CS1503: Argument 5: cannot convert from 'float' to 'int'
ml-agents-develop\com.unity.ml-agents\Runtime\Sensors\RayPerceptionSensor.cs(470,122): error CS1503: Argument 4: cannot convert from 'float' to 'int'
ml-agents-develop\com.unity.ml-agents\Runtime\Sensors\RayPerceptionSensor.cs(486,54): error CS1501: No overload for method 'ScheduleBatch' takes 5 arguments
ml-agents-develop\com.unity.ml-agents\Runtime\Sensors\RayPerceptionSensor.cs(491,51): error CS1501: No overload for method 'ScheduleBatch' takes 5 arguments
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: