Skip to content

Instantly share code, notes, and snippets.

@gwbischof
Last active January 17, 2023 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwbischof/2aeb5fe7d9e9e70a4bf603a8590263d2 to your computer and use it in GitHub Desktop.
Save gwbischof/2aeb5fe7d9e9e70a4bf603a8590263d2 to your computer and use it in GitHub Desktop.

This requires the Unreal Robot Arm Simulation. And the code here: https://gist.github.com/gwbischof/32c2de9e8e5521752d442cef3365d9b4

List all of the exposed Unreal properties.

from unreal_remote_control import UnrealClient, UnrealSignal
client = UnrealClient()
client.get_all_properties()

Create Ophyd signals for the properties that we want to access.

motor1 = UnrealSignal(preset_name="NewRemoteControlPreset", name='motor1')
motor2 = UnrealSignal(preset_name="NewRemoteControlPreset", name='motor2')
motor3 = UnrealSignal(preset_name="NewRemoteControlPreset", name='motor3')
motor4 = UnrealSignal(preset_name="NewRemoteControlPreset", name='motor4')

Run a grid scan with the Robot Arm.

from bluesky import RunEngine
from bluesky.plans import grid_scan
RE = RunEngine({})
RE(grid_scan([], motor1, 0, 50, 10, motor2, 0, 50, 10, motor3, -20, 20, 10, snake_axes=True))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment