Unity-Technologies / ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
https://unity.com/products/machine-learning-agents
Other
17.19k stars 4.16k forks source link

NavMeshAgent does not work #526

Closed r-lipton closed 6 years ago

r-lipton commented 6 years ago

Hello

I am using a NavMeshAgent component in my environment, making a character to move to a target destination. Using the player brain, it works in Unity and it works also when I export it to Windows and Linux. However, when I run the environment using python (in an Ubuntu instance), the character does not move. There is no error in the log file. The training can run, but the character does not move.

Any idea? Thanks

r-lipton commented 6 years ago

Just tested in Windows using python, same results :(

r-lipton commented 6 years ago

I was using CharacterController.Move to move the character. A workaround is to modify directly the transform.position

r-lipton commented 6 years ago

It looks like the NavMeshAgent is updating periodically only every ~100 steps.

RossMelbourne commented 6 years ago

I am using NavMeshAgent but moving my character manually. I call SetDestination and then using nextPosition and steeringTarget to navigate.

shihzy commented 6 years ago

thanks for filing. we've logged this bug and will report back once we have a resolution.

xiaomaogy commented 6 years ago

@r-lipton Do you see any error message when you tested it in the Windows platform? More information would be helpful here.

r-lipton commented 6 years ago

No, there is not error when tested on Windows neither on Linux

xiaomaogy commented 6 years ago

@r-lipton I'm not really familiar with NavMeshAgent, and so not able to reproduce what bug you have here. Maybe it would be helpful if you can share the steps and the source code you have, so that we can reproduce the bug you have.

xiaomaogy commented 6 years ago

@r-lipton I am closing this thread due to inactivity, but feel free to re-open it if you desire.

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.