Hi,
I am investigating fusion for use of real-time robotics control. An example appilcaition would go something like this:
The biggest unknowns are live animation using the API and accessing/exporting actuator positions live using the API.
Could someone provide insight into the capabilities of the API and/or API calls that fit this description.
Thanks,
Daniel
Hello,
I am not clear how you create "animation" by Fusion 360. A potential solution for you could be "parameter" driven.
1. Convert the input of your controller into model parameter.
2. Drive your robotic arm by the parameter.
3. Calculate the position of robotic arm according to current parameter.
4. Pass it to real robotic arm over TCP/IP.
The following codes demo how to drive model by model parameter. Please download attached design, upload it to your project, open the design and run the codes.
import adsk.core, adsk.fusion, traceback import time def run(context): ui = None try: app = adsk.core.Application.get() ui = app.userInterface design = adsk.fusion.Design.cast(app.activeProduct) param = design.rootComponent.modelParameters.itemByName('d6') angle = 0.0 oldexp = param.expression while angle <= 90: param.expression = '{} deg'.format(angle) angle += 1.0 time.sleep(0.1) adsk.doEvents() param.expression = oldexp except: if ui: ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
Hi,
As Marshal said, it is basically to drive the parameters, assuming you could pass the data from he hardware to Fusion 360.
I am not familiar with XBox. What I have practiced with is Socket.IO. This is a blog. probably it might help a bit.
In addition to parameters, it is possible to do the equivalent of the "Drive Joints" command where you're changing the value of the joint so it's not required to have a parameter.
It's not currently possible to get the joint information as the user is dragging the components in the assembly. This would require an event to be fired as the user is manipulating the assembly and this does not currently exist.