Daemon and program nodes in the same URCap? How?

I have a fully working URCap consisting only of an installationNode delivering a daemon. It is the intention to add several programNodes to this URCap. So I created a very simple programNode and testet it in the URSim (where URCaps WITHOUT daemon may be simulated). When I incoorporate this fully working and very simple programNode in the existing fully working URCap, it suddenly cannot find resource folder and therfore the installationNode do not work anymore. However the programNode actually work on the physical robot.

Is anyone able to tell me if it is completely impossible to have a daemon and programNodes in the same URCap running on a physical robot? If it acturally IS possible please tell me what measures I need to make to have it work?

It is possible. As for what you specifically need to do, I can’t really say with the amount of information I have. My advice would be to backup and re-evaluate the error, knowing that it is completely possible to run both a Daemon and program nodes. They should be completely unrelated. Perhaps you have a constructor wrong, or a path to the resources folder is wrong.

It is very uplifting to hear that it is actually possible. Thanks for that. However I don’t believe there is anything wrong with paths or anything, as the InstallationNode worked very well and could find the resource folder before the introduction of the Program node. UR must be changing something when a ProgramNode is added. But what?

Can you post your activator class?

package SetupRobotics.UR;

import com.ur.urcap.api.contribution.DaemonService;
import com.ur.urcap.api.contribution.installation.swing.SwingInstallationNodeService;
import com.ur.urcap.api.contribution.program.swing.SwingProgramNodeService;

import SetupRobotics.ProgramNodes.PickPlace.SetupRobotics_PickPlace_ProgramNodeService;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

public class Activator implements BundleActivator {
private static SetupRoboticsDaemonService daemonService;
private static FindLogDaemonService findLogDaemonService;

@Override
public void start(final BundleContext context) throws Exception {
	this.daemonService = new SetupRoboticsDaemonService();
	this.findLogDaemonService = new FindLogDaemonService();

	// -------------------------------------------------------------------------------------------
	// Register installation node
	context.registerService(SwingInstallationNodeService.class, new SetupRoboticsInstallationNodeService(daemonService), null);

	// -------------------------------------------------------------------------------------------
	// Register daemon
	context.registerService(DaemonService.class, daemonService, null);
	context.registerService(DaemonService.class, findLogDaemonService, null);

	// -------------------------------------------------------------------------------------------
	// Register program nodes
	context.registerService(SwingProgramNodeService.class, new SetupRobotics_PickPlace_ProgramNodeService(), null);
}

@Override
public void stop(BundleContext context) throws Exception {
}

}

Sorry, but for some reason it could’t paste everything. Her is the file attached. I had to zip it.

Activator.zip (611 Bytes)

I can’t see why it would matter, but one difference between yours and mine is that I register the daemon service last. Can you try moving your program node registration above your daemons?

I have moved registration of the program node up above registration of the daemonservice and the result was the exact same.

Hmm. Haven’t seen that before. Can’t say I’ve even seen the error screen popup looking like that before. It almost seems more like a compilation/packaging problem. I had a customer once who kept getting an “Invalid Manifest” error every time they loaded the CAP, which happens when the manifest file couldn’t be found. It was clearly there, and it worked fine on my robot, but their’s just wouldn’t. I think they ended up factory resetting their robot, and I’m not sure if that solved the problem or not.

SOLVED! OpenAI’s Codex made a few minutes of magic and then it suddenly worked,