- 22/07/2019 at 08:43 #15762
is there a possibility to attach a component (e.g. a gripper) to another component (e.g. a robot) by the plug ans play mechanism?
Simon022/07/2019 at 09:39 #15767
Jes with “OneToOne” – or “OneToMany-Interface”001/08/2019 at 10:35 #15971
thanks for your answer. Do you have an example for the plag and play function by the IOneToOneInterface and OneToManyInterface?
I try it wit the AutoConnect function with theAutoConnect method like this:C#1234567var simComponent1 = this.GetSimComponent("MyRobot");var simComponent2 = this.GetSimComponent("MyGripper");this.AutoPlugPlayService.ResolveParentToChildHierarchyConflicts = true;this.AutoPlugPlayService.UpdatePosition = true;this.AutoPlugPlayService.AutoConnect(simComponent1, simComponent2));
But it does not work.
Simon020/08/2019 at 08:38 #16401
Remember you are using the interface in the component to make connection. I would first of all get the interfaces in both components and then connect them. For exampleC#1234var robot = App.World.Components.First().Behaviors.First(i=>i.Name == "Tool") as IOneToOneInterface;var gripper = App.World.Components.Last().Behaviors.First(i=>i.Name == "EOAT_MountInterface") as IOneToOneInterface;robot.Connect(gripper, true);IoC.Get<IRenderService>().RequestRender();0
You must be logged in to reply to this topic.