Starting Nodes (Command Line)

This article demonstrates how to interact with the Core manager to start and stop runtime nodes using the command line, rather than using Studio.

Nodes can be spawned individually, or with all enabled nodes on a given host in the SDF.

1. Spawn all enabled nodes

1.1 Hardware state

To spawn all enabled nodes in the system SDF in the hardware state, start the Core manager as a process and provide the -n flag.

$ polysync-core-manager -n 

1.2 Replay state

To spawn all enabled nodes in the system SDF in the replay state, start the Core manager as a process and provide the -n and -w flags.

$ polysync-core-manager -n -w 

To command nodes to replay data follow one of these articles:

1.3 Standby state

To stop all nodes and the Core manager, pass the -q flag.

$ polysync-core-manager -q

2. Spawning individual nodes

2.1 Get the node ID

Start the SDF Configurator.

$ polysync-core-sdf-configurator

Each node─located in the list on the left─has a box indicating a unique Node ID used by the Core manager to start the node. Save this ID for the next step.

Configurator node ID

2.2 Start the manager as a process

Before any other node is started, start the PolySync Core manager.

$ polysync-core-manager

If the manager is already running as a service, be sure to stop it before restarting the manager as a process.

$ sudo service polysync-core-manager stop
$ polysync-core-manager 

2.3 Start the node

Now that the unique node ID is known, start the node using the provided Core dynamic driver node.

$ polysync-core-dynamic-driver -n 11

This will start up the node in the terminal, and then block, as long it is in normal operation.

2.3.1 Node help output

Pass the -h flag to the dynamic driver─along with the node ID─to see a list of all options the sensor interface supports.

$ polysync-core-dynamic-driver -n 11 -h 

2.3.2 Additional debug information

All PolySync provided sensor nodes support the -t flag which performs a test-operation on the hardware configuration.

Most nodes support the -d debug flag to print debug information to stdout while parsing, processing and publishing data to the bus.

$ polysync-core-dynamic-driver -n 11 -d

2.4 Starting multiple nodes

It is possible to start multiple nodes. Open a new terminal and run the dynamic driver with the unique node ID.

2.5 Monitor debug and error output

Additional information is written to the PolySync log file. This info can help to figure out why a node may not be working, or to check on normal operation. The log file can be “tailed” to capture the output of the dynamic-driver in real time:

$ tail -f ~/.local/share/polysync/polysync.log 

3. Validating the node data

Once the node has started it will begin publishing data to the global PolySync bus. This allows other applications to access the data by subscribing to the message types output by the node.

Start Studio to check the runtime status of the node using the System State module, and use the provided Studio plugins to visualize and validate the data.