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

Improve SVS documentation #496

Open
garfieldnate opened this issue Sep 1, 2024 · 1 comment
Open

Improve SVS documentation #496

garfieldnate opened this issue Sep 1, 2024 · 1 comment

Comments

@garfieldnate
Copy link
Collaborator

Thought I had written this up already but I can't find it now, so this might be a duplicate 🤷

  • Is there any wildcard syntax? SVS communicates with the SVS viewer using wildcards, so I thought they might be usable in commands. svs S1.scene.clear clears S1; how do I run the command for all scenes? Or a command on all objects?
  • Manual chapter needs some examples of using the CLI.

See also #490, #488.

@garfieldnate
Copy link
Collaborator Author

Just for later documentation: here's an example script showing loading an agent and some basic SVS commands. You always have to step 1 before you can see any of the updates in SVS!

import Python_sml_ClientInterface as sml

kernel = sml.Kernel.CreateKernelInNewThread()
agent = kernel.CreateAgent("soar")
print(agent.ExecuteCommandLine("svs --on"))
svs_commands = """
add Apple1 world v 0.5 0.5 0.5 0.5 0.5 -0.5 0.5 -0.5 0.5 0.5 -0.5 -0.5 -0.5 0.5 0.5 -0.5 0.5 -0.5 -0.5 -0.5 0.5 -0.5 -0.5 -0.5 p -0.465155 0.475745 1.156725 r 0.000000 0.000000 0.000000 s 0.106014 0.106025 0.113450
tag add Apple1 object-source perception
add Book2 world v 0.5 0.5 0.5 0.5 0.5 -0.5 0.5 -0.5 0.5 0.5 -0.5 -0.5 -0.5 0.5 0.5 -0.5 0.5 -0.5 -0.5 -0.5 0.5 -0.5 -0.5 -0.5 p 0.153736 0.615839 1.130338 r 0.000000 0.000000 0.000000 s 0.534262 0.532402 0.061983
tag add Book2 object-source perception
"""
print(agent.SendSVSInput(svs_commands))
print(agent.RunSelf(1))

print("\n---------------------\nSVS Contents\n---------------------")
print(agent.ExecuteCommandLine("svs S1.scene.world dir"))

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

No branches or pull requests

1 participant