Locomotion Issue

Ooo, so close! I just need to see what was printed ahead of the assertion error:

print("\n".join(str(l) for l in out + err))

It uses the same RAGDOLL_FLOATING to find the licence server, and since it’s already leased on the machine for Ragdoll it would reuse that one.

haha, got it now! Blank lines, sadly

Successfully installed Ragdoll menu from plug-in load.
Successfully installed Locomotion from plug-in load.
# Locomotion is loaded #
import os
import subprocess

loco3d = os.environ["LOCOMOTION_EXECUTABLE"]

popen = subprocess.Popen(
    loco3d,
    stdin=subprocess.PIPE,
    stdout=subprocess.PIPE,
    stderr=subprocess.PIPE
)
text = b"locomotion data\n"
size = b"%08x" % len(text)
t = popen.stdin.write(size)
t = popen.stdin.write(text)
popen.stdin.flush()

out = popen.stdout.readlines()
err = popen.stderr.readlines()

print("\n".join(str(l) for l in out + err))

assert out == []

expected_output = [b'!Reading !16! bytes from parent process..\r\n', b'Sanity checking..\r\n', b'Converting JSON -> Plan\r\n', b'Convert Plan -> Animation\r\n']
assert err == expected_output


# Error: 
# Traceback (most recent call last):
#   File "<maya console>", line 26, in <module>
# AssertionError #

Blank lines is fine, that still tells us something. And from what I can tell, one circumstance where Locomotion will not print any lines is when a licence has failed to be leased.

You mentioned you can confirm that a licence has been leased already, here’s a way to confirm.

import os
import subprocess
from ragdoll import licence

assert "RAGDOLL_FLOATING" in os.environ, "Missing floating licence"
assert licence.has_lease(), "Missing lease of licence"

# Manually lease, typically happens on first simulation or when
# clicking the bottom menu item in the Ragdoll menu
licence.request_lease()

loco3d = os.environ["LOCOMOTION_EXECUTABLE"]

popen = subprocess.Popen(
    loco3d,
    stdin=subprocess.PIPE,
    stdout=subprocess.PIPE,
    stderr=subprocess.PIPE
)
text = b"locomotion data\n"
size = b"%08x" % len(text)
t = popen.stdin.write(size)
t = popen.stdin.write(text)
popen.stdin.flush()

out = popen.stdout.readlines()
err = popen.stderr.readlines()

string = "\n".join(str(l) for l in out + err)

assert out == [], string

expected_output = [b'!Reading !16! bytes from parent process..\n', b'Sanity checking..\n', b'Converting JSON -> Plan\n', b'Convert Plan -> Animation\n']
assert err == expected_output, string

from maya import cmds
cmds.unloadPlugin("ragdoll")

Let me know what you see.

Ran this one without loading any of the plugins

import os
import subprocess
from ragdoll import licence

assert "RAGDOLL_FLOATING" in os.environ, "Missing floating licence"
assert licence.has_lease(), "Missing lease of licence"

# Manually lease, typically happens on first simulation or when
# clicking the bottom menu item in the Ragdoll menu
licence.request_lease()

loco3d = os.environ["LOCOMOTION_EXECUTABLE"]

popen = subprocess.Popen(
    loco3d,
    stdin=subprocess.PIPE,
    stdout=subprocess.PIPE,
    stderr=subprocess.PIPE
)
text = b"locomotion data\n"
size = b"%08x" % len(text)
t = popen.stdin.write(size)
t = popen.stdin.write(text)
popen.stdin.flush()

out = popen.stdout.readlines()
err = popen.stderr.readlines()

string = "\n".join(str(l) for l in out + err)

assert out == [], string

expected_output = [b'!Reading !16! bytes from parent process..\n', b'Sanity checking..\n', b'Converting JSON -> Plan\n', b'Convert Plan -> Animation\n']
assert err == expected_output, string

from maya import cmds
cmds.unloadPlugin("ragdoll")

# Error: module 'maya.cmds' has no attribute 'ragdollLicence'
# Traceback (most recent call last):
#   File "<maya console>", line 6, in <module>
#   File "/asset/common/software/thirdparty/Ragdoll/2024.07.01-build1/arch/linux-any/x86_64/Ragdoll-2024_07_01/scripts/ragdoll/licence.py", line 329, in has_lease
#     return cmds.ragdollLicence(hasLease=True, query=True)
# AttributeError: module 'maya.cmds' has no attribute 'ragdollLicence' #

This one with the plugin loaded and clicking the bottom ragdoll menu
Looks like that last line crashes maya? This is from the terminal

pymel.internal.factories : WARNING : trying to remove PyNode for maya type 'rdPlanManip', but could not find an associated PyNode registered
pymel.internal.factories : WARNING : trying to remove PyNode for maya type 'rdFootManip', but could not find an associated PyNode registered
Ragdoll: I'm being destroyed.. good bye then 

This is with the last commented out

from ragdoll import interactive as ri
ri.welcome_user()
# ragdoll.status_callback() - Successfully acquired a lease #
import os
import subprocess
from ragdoll import licence

assert "RAGDOLL_FLOATING" in os.environ, "Missing floating licence"
assert licence.has_lease(), "Missing lease of licence"

# Manually lease, typically happens on first simulation or when
# clicking the bottom menu item in the Ragdoll menu
licence.request_lease()

loco3d = os.environ["LOCOMOTION_EXECUTABLE"]

popen = subprocess.Popen(
    loco3d,
    stdin=subprocess.PIPE,
    stdout=subprocess.PIPE,
    stderr=subprocess.PIPE
)
text = b"locomotion data\n"
size = b"%08x" % len(text)
t = popen.stdin.write(size)
t = popen.stdin.write(text)
popen.stdin.flush()

out = popen.stdout.readlines()
err = popen.stderr.readlines()

string = "\n".join(str(l) for l in out + err)

assert out == [], string

expected_output = [b'!Reading !16! bytes from parent process..\n', b'Sanity checking..\n', b'Converting JSON -> Plan\n', b'Convert Plan -> Animation\n']
assert err == expected_output, string

from maya import cmds
# cmds.unloadPlugin("ragdoll")

I have to head for the day. I hope that is helps(?).

If nothing was printed, and there were no assertion errors, then all is well. You should be able to use Locomotion! :partying_face:

Smells like the problem was the lack of a leased licence; that request_lease() call up there would force it. Have a play, let me know. Locomotion should be able to lease on its own, but it doesn’t look like it manages without Ragdoll having done so first.

I the request_lease() and still nothing. I even went down a long list of attributes on the plan node, toggling and arbitrarily setting things and still it would not solve.

I am going to do a sanity check and re download from the website and try locally in my home directory. I have tried that previously without the fresh download.

Wait wait, this is important. Do you mean that the above snippet, with the asserts around what gets output, still fails? They would fail if there was no output, and succeed if the output was correct.

Ok, I’ll ping you via email with a node-based serial as well. Just in case it struggles to understand the floating licence.

Sorry for the confusion. I loaded the plugin and then ran the portion
licence.request_lease() to ensure a lease was had. But the issue of

Persisted.

OKAY WOW!
So I removed the RAGDOLL_FLOATING from the environment and then loaded the plugin. It immediately asked for an activation.
When I applied the key I received a timeout error that made it seem as if it had not worked. But when I assigned a plan to a cube and four spheres, it processed for a moment and created a plan!
For the first time I saw the lines, that have only been straight, indicating a walk cycle. And I was able to transfer animation.

I learned something while removing the environment variable before launching. On our network it is being set twice. As in there are two references to RAGDOLL_FLOATING and setting the network address. (This is an accident on our part)
They both point to the same address, and ragdoll continues to have success in obtaining a license for its portion. Locomotion did not work when I removed the duplicate setting. It only worked when I removed the env variable entry all together and used the key you provided.

So it does seem there is an issue with how (our?) Locomotion is trying to obtain the same license.

It feels like we are getting close! Thoughts on what it could mean?

Great news.

It’s unclear why it won’t work with your floating licence, someone on the team will need to take a closer look - ideally via screenshare. It may however be at least a week until we can manage as we are all knee deep in development, are you able to manage with your node-locked licence for now? I can increase the count to supply the rest of your team with this temporary workaround if needed.

No worries, I understand you guys are busy.

Well we have 3 seats in total. I consumed the one you provided in the debugging. But I wouldnt normally be using a seat, unless something needed debugging. So would 2 seats be okay? And the animators who actually use it, can continue their rnd and shot work.

And whenever we can set up a screen share, Ill be there.

I’ve increased the count to 3 now, let’s continue via email.

We are having the same problem right now. We have a floating license server with two licenses and ragdoll is able to check out the license.

When trying to run “Assign Plan” on a very simple test scene, it does not work and gives us the same warning message

“Locomotion failed with Solved to Acceptable Level”

If I then remove the RAGDOLL_FLOATING from my environment in Maya, it works again, but with a trial license. I made sure that loco3d has the proper permissions.
With env var


Without env var:

Thanks for reporting this, we are investigating as we speak and will return to you (both) in this thread.

(I also spotted that you email just now, will reply there as well)

Hi @micdin , sorry for the trouble and thanks for reaching out!

Now we have got a new quick release, this might not resolve the issue but should give us more clue.

Please download one of them, and give it a try. Please let us know if any error message shows up.

Thank you.

No I don’t see any additional error messages. Do I need to set a log level somewhere? The result is exactly the same as before

Hey @micdin,

That’s strange :thinking:

Can you share your Script Editor screenshot?

From the screenshot you have posted above, there was this warning/error message:

Locomotion failed with 'Solved To Acceptable Level'

Which was actually a bad message and did not tell us the true cause. And the new version should show us more on that.

Can you have a look? Also, just to make sure, can you also share the screenshot of your plug-in manager window so that we know it was the latest version of locomotion?

In the mean time, I will also double check on my Linux box.

Thank you. :slight_smile:

@micdin If you have installed correctly, this is what you should see in your Maya Plug-in Manager window.

Then with licence applied, instead of getting that “Locomotion failed with…” warning, it should raise error instead.

For example, this is what I got from a fresh install.

Thanks!

yes the plugin is loaded.

You are correct, the error message did change after all. It not says
Locomotion failed with unknown status


I also can not see anything in the terminal

I’m sorry, the last post was a mishap by me. We have two licenses available. One is being used by me for testing and one by an artist.

I now made sure that we have two licenses for me available. After that, I do get a different error message

image

I hope that helps

1 Like

I also noticed that after running locomotion and getting this error message, maya does not shut down even though the window has been closed and the license does not get released on the server. Perhaps that is also a clue