


“Name” is the name given to the component in RobotBuilder, such as “Arm Motor”), and turns it into the name of a variable defined in the generated code. #variable takes a string, usually the a variable defined somewhere (i.e. The only macro you’ll probably need to use is #variable( component_name ) They always start with the “#” symbol, and have a syntax similar to functions: ( arg0, arg1, arg2. Macros are simple functions that RobotBuilder uses to turn variables into text that will be inserted into generated code. limit switch)Ĭontroller (robot drive, PID controller, etc.)Īctuator (an output that is not a motor, e.g. Sensor (sensor that does not implement PIDSource e.g. PIDSource (sensor that implements PIDSource e.g. The types of component RobotBuilder supports (these are case-sensitive): a motor controller - that has been added to the kiwi drive) A ChildSelectionProperty allows the user to choose a component of the given type from the subcomponents of the one being edited (so here, they would show a dropdown asking for a PIDOutput - i.e. In this kiwi drive example, there are three very similar properties, one for each motor. Properties: a list of the properties of this component. Help: a short string that gives a helpful message when one of these components is hovered over If a component doesn’t support anything (such as sensors or motor controllers), just leave this line out

Motor controllers in RobotBuilder are all PIDOutputs, so a kiwi drive can support three PIDOutputs. Supports: a map of the amount of each type of component this can support. Type: the type of the component (these will be explained in depth later on) This is what will show up in the palette/tree – this should also be the same as the name of the containing folder !Component: Declares the beginning of a new component Using PIDSubsystem to Control Actuators.
