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.