I encountered a very troublesome problem when developing URCap X in Ploy Scope X. Whenever I add multiple nodes, Ploy Scope X always prompts me with an error. I would be extremely grateful if I could get some help.
Hi Joe
My best guess is that you are not calling the registerProgramBehavior function in you behavior worker. A minimal ProgramBehavior should look like this:
/// <reference lib="webworker" />
import {
ProgramBehaviors,
ProgramNode, registerProgramBehavior
} from '@universal-robots/contribution-api';
const behaviors: ProgramBehaviors<ProgramNode> = {
factory: (): ProgramNode => {
return {
type: 'my-node',
version: '0.0.1',
parameters: {
},
};
},
programNodeLabel(node: ProgramNode) {
return 'my-node-label'
},
};
registerProgramBehavior(behaviors);
It is the last line, that you most likely have forgotten.
Thank you very much for your reply, which helped me solve the problem very well. In addition, I want to know if it is possible to display the Angle of RPY in PloyScope X, so far I only found the rotation.