Bug in omni.anim.people-0.1.9

Hello, I think I found a bug in the omni.anim.people extension v.0.1.9.

The extension stopped working for me after updating.

The issue seems to come from the following file:
omni.anim.people-0.1.9\omni\anim\people\scripts\commands\idle.py

After changing line 22 from
self.set_variable("Action", "None")
to
self.character.set_variable("Action", "None")
the issue was fixed.

Please fix this in the upcoming version.

Hi @jominga - Someone from our team will review and respond to your question.

Thats the correct fix. Idle is the default state regardless, so that character will go to Idle after finishing a command.

We’ll add the fix in the next release.

Hello,

I got some early access to Isaac Sim 2022.2.1 and noticed this bug is not yet fixed.

Also I found another bug:

In the function get_avoid_angle in /omni.anim.people-0.1.9/omni/anim/people/scripts/navigation_manager.py the variable movement_vector is sometimes 0, which results in a division by 0. I noticed this when increasing the number of agents in the scene to more than 100. This results in a lot of agents staying put when they should move somewhere.

I created a simple test scene where you can reproduce the second error. Here you have the usd file and cmd.txt file:

cmd.txt (3.7 KB)
Example_omni.anim.people_error.usd (8.9 KB)

The error log when you click on play:

2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils] Python Scripting Error:
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils] Traceback (most recent call last):
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils]   File "/opt/nvidia-omniverse/library/isaac-sim-2022.2.1-dbs/extscache/omni.anim.people-0.1.9/omni/anim/people/scripts/character_behavior.py", line 240, in on_update
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils]     self.execute_command(self.commands, delta_time)
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils]   File "/opt/nvidia-omniverse/library/isaac-sim-2022.2.1-dbs/extscache/omni.anim.people-0.1.9/omni/anim/people/scripts/character_behavior.py", line 221, in execute_command
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils]     if self.current_command.execute(delta_time):
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils]   File "/opt/nvidia-omniverse/library/isaac-sim-2022.2.1-dbs/extscache/omni.anim.people-0.1.9/omni/anim/people/scripts/commands/goto.py", line 26, in execute
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils]     return self.update(dt)
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils]   File "/opt/nvidia-omniverse/library/isaac-sim-2022.2.1-dbs/extscache/omni.anim.people-0.1.9/omni/anim/people/scripts/commands/goto.py", line 30, in update
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils]     if self.walk(dt):
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils]   File "/opt/nvidia-omniverse/library/isaac-sim-2022.2.1-dbs/extscache/omni.anim.people-0.1.9/omni/anim/people/scripts/commands/base_command.py", line 108, in walk
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils]     self.navigation_manager.update_path()
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils]   File "/opt/nvidia-omniverse/library/isaac-sim-2022.2.1-dbs/extscache/omni.anim.people-0.1.9/omni/anim/people/scripts/navigation_manager.py", line 231, in update_path
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils]     angle = Gf.Clamp((radius_b/radius_a) * self.get_avoid_angle(radius_a, radius_b, predicted_pos_difference, self_movement_vector),0, 60)
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils]   File "/opt/nvidia-omniverse/library/isaac-sim-2022.2.1-dbs/extscache/omni.anim.people-0.1.9/omni/anim/people/scripts/navigation_manager.py", line 83, in get_avoid_angle
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils]     return math.degrees(math.atan(dist_to_avoid/Utils.length3(movement_vector)))
2023-07-14 07:57:34  [Error] [omni.kit.scripting.scripts.utils] ZeroDivisionError: float division by zero
2023-07-14 07:57:37  [Error] [omni.anim.graph.core.plugin] Character APIs are only valid when animating in play mode.
2023-07-14 07:57:45  [Error] [omni.anim.graph.core.plugin] Character APIs are only valid when animating in play mode.
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils] Python Scripting Error:
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils] Traceback (most recent call last):
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils]   File "/opt/nvidia-omniverse/library/isaac-sim-2022.2.1-dbs/extscache/omni.anim.people-0.1.9/omni/anim/people/scripts/character_behavior.py", line 240, in on_update
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils]     self.execute_command(self.commands, delta_time)
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils]   File "/opt/nvidia-omniverse/library/isaac-sim-2022.2.1-dbs/extscache/omni.anim.people-0.1.9/omni/anim/people/scripts/character_behavior.py", line 221, in execute_command
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils]     if self.current_command.execute(delta_time):
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils]   File "/opt/nvidia-omniverse/library/isaac-sim-2022.2.1-dbs/extscache/omni.anim.people-0.1.9/omni/anim/people/scripts/commands/goto.py", line 26, in execute
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils]     return self.update(dt)
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils]   File "/opt/nvidia-omniverse/library/isaac-sim-2022.2.1-dbs/extscache/omni.anim.people-0.1.9/omni/anim/people/scripts/commands/goto.py", line 30, in update
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils]     if self.walk(dt):
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils]   File "/opt/nvidia-omniverse/library/isaac-sim-2022.2.1-dbs/extscache/omni.anim.people-0.1.9/omni/anim/people/scripts/commands/base_command.py", line 108, in walk
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils]     self.navigation_manager.update_path()
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils]   File "/opt/nvidia-omniverse/library/isaac-sim-2022.2.1-dbs/extscache/omni.anim.people-0.1.9/omni/anim/people/scripts/navigation_manager.py", line 231, in update_path
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils]     angle = Gf.Clamp((radius_b/radius_a) * self.get_avoid_angle(radius_a, radius_b, predicted_pos_difference, self_movement_vector),0, 60)
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils]   File "/opt/nvidia-omniverse/library/isaac-sim-2022.2.1-dbs/extscache/omni.anim.people-0.1.9/omni/anim/people/scripts/navigation_manager.py", line 83, in get_avoid_angle
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils]     return math.degrees(math.atan(dist_to_avoid/Utils.length3(movement_vector)))
2023-07-14 08:03:24  [Error] [omni.kit.scripting.scripts.utils] ZeroDivisionError: float division by zero
2023-07-14 08:03:28  [Error] [omni.anim.graph.core.plugin] Character APIs are only valid when animating in play mode.

This issue should be fixed with the latest release of Isaac Sim.