Skip to content
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

NavAgent doesn't seem to be working #422

Open
sethmnielsen opened this issue May 23, 2020 · 3 comments
Open

NavAgent doesn't seem to be working #422

sethmnielsen opened this issue May 23, 2020 · 3 comments
Assignees
Labels
Milestone

Comments

@sethmnielsen
Copy link

Describe the bug
I can get the NavAgent to spawn in the world, but it doesn't seem to respond to any commands given to it. I tried both the CyberPunkCity and UrbanCity worlds.

To Reproduce
I first used the default CyberPunkCity-Follow scenario, then I used the same scenario with two changes:

  • for uav0: changed control_scheme to 1
  • for nav0: changed rotation to [0.0, 0.0, 0.0]

and copied the code from the Multi Agent Example in the documentation:

import holodeck
import numpy as np

env = holodeck.make('CyberPunkCity-Follow')
env.reset()

env.act('uav0', np.array([0, 0, 0, 100]))
env.act('nav0', np.array([0, 0, 0]))
for i in range(300):
   states = env.tick()

   # states is a dictionary
   task = states["uav0"]["FollowTask"]

   reward = task[0]
   terminal = task[1]
   location = states["uav0"]["LocationSensor"]

I then pressed tab to go to the NavAgent's location and then v to look around.

Expected behavior
I would expect the NavAgent to try to move to the location [0, 0, 0], but it doesn't do anything. The default config has it spawn rotated where it is mostly stuck below the ground, so I changed its initial rotation to all zeros in the json file. Still, the NavAgent just stood there without doing anything. Also, it seems like gravity doesn't affect the NavAgent either, because it will float in the air wherever it spawns without ever falling.

Any ideas on how to fix this?

Logs
HolodeckLog.txt

Version Information:

  • Ubuntu 18.04.4
  • Holodeck Version: 0.3.1
@MaxRobinsonTheGreat
Copy link
Contributor

Thanks for documenting this. The navagent has received very little support recently and is in need of some upkeep. We will add this to our todo! (Also, the nav agent is not meant to be affected by gravity, it is constricted to its xy plane)

Screenshot of nav agent in CyberPunkCity-Follow:
navbug

@sethmnielsen
Copy link
Author

Cool, glad to see that get added to the 0.3.2 milestone. Do you know if there is any quick-ish fix that I can do on my end in the meantime? Dr. Beard and I were hoping to use the NavAgent in a target-following assignment next week for his class. It isn't the end of the world if we can't - we could probably do something with a second UAV as the target instead. That being said, following a person-like target would be ideal!

@sethmnielsen
Copy link
Author

Any update on this issue? Man, that NavAgent would be super useful...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants