Tools with multiple inputs

I know it is possible to have multiple inputs for a Logic Node but is it also possible to have multiple inputs of information for a Tool? For example, if I have two nodes (one for the Gyro Sensor and another for the Ultrasonic sensor for my robot) and I want to send an array of values to just one tool, how can I make it so that my tool is able to take in both of these inputs at once? Or, is there a way to create a visualization on the Spatial Toolbox, like a graph from a directly from the robotic addon folder?

Hi @Emun13. I’d say there are at least two possibilities. The simplest one would probably be to create a new version of the tool with two (or more) nodes. For example you could make a “Comparison Graph” tool that has two nodes names “value1” and “value2”. The nodes might not necessarily receive data at the exact same timestamp, but you could plot one line based on the most-recently-received value1 and plot another line based on the most-recently-received value2.

Another option could be to build a new type of node that can receive two values. The Logic Node is just a special node type that was programmed to have some additional capabilities, and you can build new nodes like it. This does require a bit more knowledge of how the edge server works and processes data, but this post could be a starting point: Building new Node types

I’m not sure exactly what you mean by this:

Can you elaborate?

@ben Thank you for the advice and tips, I’ll give those a try! For the visualization within the robotic addon folder what I was thinking of is that currently, we can create nodes for our robot. For the SPIKE Prime, using the index.js file in the robotic addon folder, we can create different nodes (Ex. a node for motor A, a node for motor B, etc.) and these nodes appear as some sort of visualization on the Spatial Toolbox. So we wanted to know if there was a way we can make a graph within this index.js file in the robotic addon to visualize in the Spatial Toolbox, or if this type of visualization has to be done within a tool.

I believe @valentin added an API for hardware interfaces that allow them to add tools in addition to adding nodes, but I’m not sure if it supports this use case yet.

Valentin, would the setTool API allow an interface to add some graph tools to the object by default, so that a user would immediately be able to visualize the node values?