Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
TRIK help — a guide for working with the free robot programming environment TRIK Studio. You can find the open-source TRIK Studio code in our repository at GitHub.
The help also describes how TRIK Studio interacts with supported platforms:
Create a new project and launch an existing one
After starting TRIK Studio, you will see the start page that displays the version of TRIK Studio, quick access to recent projects, and buttons for opening an existing project and creating a new one.
To create a new project, click the "New project" button on the TRIK Studio home page.
Or select File → New project
from the main menu.
A window opens with a new program in the visual programming language:
Read about programming in a visual language in the article:
Read about creating a new text program in the article:
To start an existing project, click the "Open project" button on the TRIK Studio start page.
Or in the main menu, select File → Open...
.
By default, TRIK Studio searches for files in the *.qrs
format or the last open format (for example, *.js
). If you need an existing project in a different format, select the desired format (for example, *.py
) or All files (*.*)
.
TRIK Studio — free robot programming environment.
It allows you to solve problems using both visual and textual programming languages.
A distinctive feature of TRIK Studio is an interactive simulation mode. You don't need to have a constructor to learn how to program.
TRIK Studio — universal software for teaching programming basics. It provides a smooth transition from diagrams to text languages.
TRIK Studio supports 4 platforms:
You can download the latest version of TRIK Studio on the website trikset.com.
RAM: 4 GB or more.
Operating system:
64-bit Microsoft Ⓡ Windows 10.
Ubuntu 16.04 and later.
macOS 10.12 Sierra and later.
TRIK Studio can be run on computers with different versions of operating systems and with less memory. For example, TRIK Studio 3.2.0 works with legacy versions of Microsoft Ⓡ Windows, on macOS 10.9 Mavericks, and on many versions of GNU/Linux. However, for later versions, compatibility with legacy operating systems is not guaranteed, so check compatibility before installing if your system does not meet the recommended requirements.
The TRIK Studio version is displayed in the window title.
And also on the start page.
The main menu of TRIK Studio contains a set of basic operations and environment settings:
New project — create a new project.
Recent projects — open one of the recently used projects.
New diagram — create a new chart in the current project.
Open… — open a saved project. Projects are stored on disk in files with the .qrs
extension.
Save — save the current project.
Save as… — save the current project to the selected location. Subsequent saves will be made to the selected file.
Save diagram as a picture… — save the current image on the scene to disk.
Print — print a chart or text using the standard print dialog.
Quit — exit the program.
Restore default settings and Quit — restore the default settings and exit the program.
Undo — cancel a completed action.
Redo — make a canceled action again.
Copy — copy the selected item.
Paste — insert the selected item.
Cut — cut the selected item.
Find... — open the search dialog for the project.
Find and replace — open the project search dialog and replace.
Zoom in — zoom in on the scene.
Zoom out — to reduce the scale of the scene.
Panels — enable/disable the display of various windows.
To main page — go back to the main page.
Attention! Items in this menu may appear and disappear depending on the program configuration.
Mouse gestures — open a tab with a list of available mouse gestures (see the "Adding blocks with mouse gestures" section).
Run — start execution of the diagram currently displayed in interpretation mode (the item is available only in interpretation mode).
2D model — switch the interpretation mode to a two-dimensional model.
Real robot — switch the interpretation mode to control the real robot via Wi-Fi, Bluetooth, or USB, depending on the platform used and the settings for connecting to the robot.
Robot settings — open the settings window of the robot model with which you work in TRIK Studio (for more details see the "Robots" section in the article "TRIK Studio settings").
Save as task… — save the current diagram and two-dimensional model as an exercise for students. In an exercise, you cannot modify some parts of a solution. For example, the location of objects in a two-dimensional model or the configuration of sensors. Selecting this menu item opens a dialog in which you can select the parts to be frozen (for more information about exercises, see the article "Exercises").
Subprograms — subprograms management (for more details see the article "Subprograms").
Generate code — open a tab with the generated code corresponding to the current diagram and the selected text language (this item may look like "Generate JavaScript code", "Generate Python code", "Generate C code", etc.). The code is not downloaded to the robot and is not executed, but can be edited and downloaded later.
Upload program — only generate code and upload to the robot without executing.
Upload and execute program — generate the code corresponding to the current diagram, load it and execute on the robot.
Stop robot — interrupt the execution of the program and send the robot commands to turn off the motors.
Connect — establish a connection with the robot. The robot must be turned on. The item is available only if the selected mode of working with the robot requires a constant connection (for example, interpretation of the program via Bluetooth or Wi-Fi).
Preferences… — open the TRIK Studio environment settings window (see the article "TRIK Studio settings").
Show grid — enable/disable grid on the scene.
Show alignment — enable/disable the display mode for vertical and horizontal guidelines for positioning objects relative to each other.
Switch on grid — enable/disable automatic grid alignment.
Switch on alignment — enable/disable vertical and horizontal guidelines for positioning blocks relative to each other.
Show all text — enable/disable displaying all block properties directly on the diagram. If the text below the blocks is disabled, properties can be viewed and edited in the property editor at the top left.
Small help — open help.
About TRIK Studio — view brief information about TRIK Studio.
Open logs — open a folder with log files.
Check for updates — get information from the Internet about the availability of a new version of the environment or any of the plug-ins, and run auto-updates if necessary.
The graph is scaled automatically so that the readings curve fits entirely in height.
From the drop-down list below you can select a sensor, the values from which will be displayed on the graph.
When you hover over a point on the graph, the value at that point will be displayed.
To the right of the graph there are four buttons for working with it:
Interface language can be changed in the TRIK Studio settings.
2. Choose the "Behaviour" tab in the opened window.
3. Select necessary language. Now TRIK Studio supports English, Russian and French.
“<System language>” means that the TRIK Studio interface language will be determined by the language of the operating system.
4. Press "OK".
5. Restart TRIK Studio to apply the changes.
If the program is launched in the interpretation mode on the robot or in the two-dimensional model, you can see the readings of the robot sensors on the graph in the .
1. Choose Settings → Preferences ...
in the
1. Choose in the Settings → Preferences → Robots
.
Button
Description
Change the scale of the graph.
Clear the graph.
Export graph readings in .csv (comma-separated value) format. All readings of the selected sensor from the beginning of their recording are exported.
The TRIK Studio interface depends on the selected mode. TRIK Studio has two modes:
Editing mode It is intended for creating a robot control diagram and executing it in the generation mode.
Debug mode It is intended for executing and debugging a program on a 2D model or in interpretation mode on a real robot.
There are three ways to switch modes:
Keyboard shortcuts Ctrl+1
/ Ctrl+2
.
TRIK Studio in edit mode has the following interface elements:
The scene displays the diagram and allows you to edit it.
Read about creating a new project and working with the diagrams in the articles:
Editor mode also displays the current executable block when interpreting diagrams.
The main menu of TRIK Studio contains a set of basic operations and environment settings:
For more information, see the article:
The "File" panel repeats the main operations available from the "File" menu.
The View panel contains buttons that allow you to scale diagrams.
You can also zoom the scene using:
Hold down the Ctrl
key and roll the mouse wheel.
Keyboard shortcut Ctrl+=
и Ctrl+-
.
The Interpreter panel contains the commands for starting and stopping the execution of a program, buttons for switching interpretation modes between a two-dimensional model and a real robot, as well as a button for opening robot settings available from the Tools menu.
When working with a real robot in interpretation mode, this panel also contains a "Connect" button.
The commands in this panel change depending on the program configuration.
The Generators panel contains commands for generating code and loading the program to the robot.
"Other" panel may contain various information depending on the chosen platform.
For example, for the TRIK kit this panel displays the IP address of the controller to which you are connecting.
The panel for mode switching displays the current TRIK Studio mode and allows you to switch between editing and debugging modes.
The property editor is used to display and edit the property values of selected objects (blocks, links).
About working with the property editor see article:
Sensor settings allow you to specify which sensors are used on which port. The same can be done from the robot settings dialog.
Available set of sensors depends on the selected platform in the settings on the Robots tab.
The Palette panel contains a set of available blocks and the relationships between them, which can be added to the diagram.
The composition of the palette may vary depending on the platform selected in the settings.
Blocks that are not available in the selected execution model (2D model or on a real robot) are highlighted in gray.
How to add and remove blocks to the scene in TRIK Studio read in the article:
Displays the list of variables used when executing the diagram with their current values, including sensor variables. When executed in the interpretation mode on a two-dimensional model or a real robot, they are taken from the robot in real-time. Not used in the generation mode.
The status bar displays the current TRIK Studio mode (editing or debugging) and allows you to switch between modes. To switch between them, just click on the status bar.
The elements of the TRIK Studio interface in debug mode repeat the elements in edit mode, except for the editor window, property editor panels and palette. Instead of these elements, the next elements are displayed:
The 2D model window opens if a 2D model is selected as the program execution mode.
The window allows you to set the environment in which the robot will be executed, set the robot sensors and observe how the program written in edit mode will work.
Read more about the 2D model in the article:
In the Interpretation and Generation modes for the real robot, this window is not displayed, an executable diagram is displayed instead.
The robot settings panel displays the type of controller and robot parameters that depend on the selected platform.
In the case of syntactic and semantic errors in the TRIK Studio, a window with the corresponding messages appears.
To view the block where the error occurred, click on the message.
The Plots window displays the values sent by the sensors in real-time.
Read more in the article:
You can add blocks to the scene in TRIK Studio in three ways:
Drag and drop the corresponding icons from the palette of elements onto the diagram.
When creating a new connection between blocks using a linker.
Left-click on the necessary block located in the Palette panel. Without releasing the mouse button, move the block onto the scene.
Draw on the scene a special image of the block with the Right mouse button. The block appears in the center of the drawn image.
Gestures can be drawn with a few strokes. The gesture input ends if the strokes have not been drawn for some time (you can set the time in the settings window on the Behavior tab).
Available conditional images can be found in two ways:
1. In the "Mouse Gestures" window, which opens through the main menuTools → Mouse gestures
.
2. In the tooltip that appears when you hover over a block in the Palette panel.
Start creating a connection using the linker (a colored circle to the right of the block that appears after the block is selected) and release the left mouse button when the cursor is on an empty section of the diagram.
In the menu that appears, select "Create new element". A new menu with blocks will appear.
Select the block you need.
Deleting a block from the scene is possible in two ways:
Select the block with the left mouse button and then click the "Delete" button on the keyboard.
Right-click on the block and select "Delete" in the menu that appears.
1. Select the necessary blocks in one of the following ways.
1.1. Hold down the "Ctrl" button and right-click the necessary blocks.
1.2. Right-click on an area in the scene with the necessary blocks.
2. Delete the selected blocks in one of the following ways.
2.1. Press the “Delete” button on the keyboard.
2.2. Right-click on any selected block and select "Delete" from the menu that appears.
To replace the block on the scene:
1. Right-click on the block and select "Replace by..." in the menu that appears.
2. Select the block that you want to put instead of from the list.
In the 2D model window the axes located as follows:
Attention! One cell has dimensions of 17.5 × 17.5 centimeters or 50 × 50 pixels.
To create an empty XML file you should use your OS' standard tools such as Notepad in Windows or whatever.
To save the world model created in TRIK Studio:
Specify the location and file name to save.
The XML file contains tags and attributes.
Tag is a markup language element. There is the start (opening) and end (closing) tags. The text contained between the start and end tags is displayed and placed according to the properties specified in the start tag.
Example:
Attributes are tag properties that provide additional text formatting capabilities. They are recorded as a combination of "attribute name-value". Text values are enclosed in quotation marks.
In the above example, the attributes are:
begin="200:-200"
id="{a3ede76b-1d7e-4c72-9ed4-08d8ea9af4bf}"
end="200:150"
The simplest virtual world model without objects in .xml
the format is as follows:
The following tags are available for describing robots:
Defines a robot on stage. Used as a container, has no attributes.
Adds a robot to the scene. Can be used as a container.
Attention! You can not add multiple robots to the scene.
Defines sensors on a robot. Used as a container, has no attributes.
Sensors ports configuration.
There are 5 types of sensors for TRIK and 9 types of sensors for EV3:
Defines the starting position of the robot.
Motor ports configuration.
The following tags are available for describing objects:
Adds a wall to the scene.
Adds a skittle to the scene.
Adds a ball to the scene.
Adds a line to the scene.
Adds a Bezier curve.
Adds a rectangle.
Adds an ellipse.
Defines a stylus for drawing.
Allows you to draw arbitrary shapes using the stylus. This block of code consists of many segments.
Allows you to add regions to the scene. There are 2 types of regions:
rectangle
ellipse
You need to draw a barcode. The barcode consists of white and black lines of the same thickness. The black line specifies 1 in a binary number, and the white one 0. The first black line in the robot path is the first bit of the number.
The barcode lines order: 1001011011
.
In this task, the lines should be the same thickness and length. It’s very difficult to draw lines by hand using the Line or Stylus tool, so edit the lines manually:
1. Draw 10 lines on the scene.
2. Save the model of the world.
3. Open the resulting XML file in any convenient editor. Pay attention to the code block with the<line...>
tag.
4. For convenience, name each line black1-black5 and white1-white5. You can do this in the "id" attribute. Name the lines in the order shown above.
5. Specify the line thickness "50" in the stroke-width
attribute.
6. Assign the color to each line: #ff000000
is black, #ffffffff
is white. You can do this in the attribute fill
. Assign colors so that you get a barcode.
7. Set the position of each line in the begin
and end
attributes without gaps, so that you get a smooth barcode.
The result
The left bar contains the next tabs:
Language — environment language. After the change, a restart of TRIK Studio is required. The setting "<System language>" means that the language will be determined by the current language of the operating system.
Autosave — the option to enable or disable autosave of an open project, as well as set the autosave interval in seconds.
Delay after gesture — the time period of the system expectation between the finishing of a mouse gesture and its execution. Delay allows you to draw a gesture in a few strokes. The value is indicated in milliseconds.
Check for updates on start — connect at startup with the update server and start auto-update if necessary.
Touch mode — enable user interface optimization for touch screens.
Dockable mode — detaches windows for free alignment.
Antialiasing — the line drawing mode with smoothing improves the appearance of diagrams due to a slight decrease in the speed of the system.
Show splashscreen — enable / disable the display of the splashscreen with the TRIK Studio logo at startup.
Set of icons to use to display the diagram.
Size — configure the size of the buttons on the toolbar.
Use some of system fonts — replace the font for displaying labels on the diagram with one of the fonts installed in the system. The sizes of the labels on the blocks are set rigidly, so changing the font can lead to the crawl of the labels on each other, but you can experiment.
Show grid — display the alignment grid on the scene of the diagram editor.
Activate grid — align blocks on a grid.
Show alignment — display alignment lines on the scene of the diagram editor. Alignment lines appear when a block is on the same horizontal or vertical line with another block, and help align the blocks in the scene.
Activate alignment — align the blocks along the alignment lines.
Width — thickness of alignment lines. Adjustable depending on the brightness of the monitor or projector.
Cell size — size of one cell. The default size is selected so that the block covers four cells.
Line mode — mode of drawing links on the diagram.
broken — links are drawn as broken lines with break points that are added by the user.
square —connections are drawn as broken lines, each segment of which is parallel to the coordinate axes. Break points in this case are automatically added by the system.
curve — connections are drawn as smooth curves, the curvature of which can be set by the user.
Loop edges indent — indent size for loop connections.
Indent — indent of the built-in linker from the block icon.
Representation — choice between the mode of displaying icons and names or only icons in the palette.
Count of items in a row — the number of icons per line of the palette with the selected "Icons" mode.
The composition of this tab depends on the installed plug-ins and on the currently selected platform. Typical tab items are described below.
Choosing the type of execution model for the selected constructor. In most cases, this is a 2D model or a real robot, but for some robotics kits one of the models may not be available, in this case this item would not be displayed.
The appearance of the robot in a 2D model.
Kit-specific settings for connecting to the robot, such as the IP address for TRIK controllers or the COM port of the Bluetooth connection for Lego NXT controllers. If a connection in the selected mode is not required, the item would not be displayed.
Kit-specific settings for programs not supplied with TRIK Studio, which must be installed on the computer. For most operating modes, additional installed programs are not needed, so the corresponding items are not displayed in the window.
The section indicates which sensors are connected to the ports of the robot.
Running after uploading — run the program immediately after downloading it to the robot or not. Applicable only for some modes of some kits (for example, for Lego NXT in generation mode).
Sensors — interval in milliseconds after which a new point with a sensor reading is added.
Autoscaling — the interval in milliseconds after which the graph automatically changes its scale to optimally display the values.
Text info — the interval in milliseconds after which the labels with values are updated on the chart.
This tab allows you to set or change hotkeys for the most commonly used actions. To do this, select the cell corresponding to the action, and in the "Combination" line at the bottom of the window, press the desired key combination.
The "Clear" button removes the key combination from the cell.
All hotkeys installed by default, you can find in the article:
TRIK Studio allows you to export the current settings to a file for uploading them to another computer. To do this, click the "Export" button at the bottom of the window.
TRIK Studio allows you to import settings from a previously exported file. To do this, click the “Import” button at the bottom of the window and select the desired .ini
file.
Links between blocks in TRIK Studio indicate the control flow of interpretation between blocks.
Links can be created in two ways:
Hover over a block, hold down the right mouse button and draw a line to the second block. The line shape can be arbitrary. It is important that it starts strictly on one block and ends on the second.
If you move the mouse cursor over the link, gray markers are displayed at its ends. By pulling on one of these markers, you can control the link. To attach one of the ends of the connection to the block, you need to pull the corresponding gray marker and release it on the block of interest.
If you drop this relationship on an existing element, these elements will be connected.
If you release the left mouse button when the cursor is on an empty section of the diagram, a menu with the following items will appear:
Delete
Create new element
When you select the "Delete" menu item, the created link will be deleted.
When you hover over the menu item "Create a new element" a new menu appears, listing all the possible elements to create. When you select one of these items on the diagram, the corresponding element will be created and join the current link.
If you need to add a new block between two linked blocks, drag a block from the Palette panel to the link. Release the mouse button when you hover over a link (not a block).
Links in TRIK Studio can be broken lines. To add a breakpoint, move the mouse cursor over the link, click the left mouse button and drag the gray marker that appears.
If the breakpoint of the connection is positioned so that it and the two nearest to it will be located approximately on one straight line, this will lead to the destruction of this breakpoint and smoothing of the broken line in this place.
Create a new project. Open a saved project. Save the current project.
Cancel the operation. Repeat the operation.
Zoom in / out.
Run program. Stop program. 2D model mode. Real robot mode. Robot settings.
Generate code. Upload program to the robot.
Editor. Debug.
Defines walls. Used as a container, has no attributes. In addition to creating a of robots in TRIK Studio, you can do more flexible customization by editing an XML file: specify the location of objects, color, width, and other parameters more precisely.
First, you need to an XML file for the virtual model.
Switch to the mode.
Go to the .
Right-click on the scene and choose "Save world model..." in the context menu.
Open a saved XML file in a text editor. , for example.
A program in the TRIK Studio is represented as a sequence of the connected by the .
Each program corresponds to the , which may contain other . Diagrams are packaged in projects stored on the disk.
The main diagram is created when the . About adding and removing blocks to the , read the article:
The diagrams with subprograms are created automatically when you add the block "" to the scene. In this case, the subprogram is displayed by double-clicking on the "Subprogram" block on the scene.
To open TRIK Studio preferences press the corresponding item in the :Settings → Preferences...
.
.
.
.
.
.
The right bar contains the fields to edit for the current tab. " and " buttons at the bottom of the window allow you to save the current settings to a file and upload it on another computer.
Gestures — enable or disable recognition engine for .
Limit recent projects list — controls how many projects to show in the "Recent projects" menu item .
Drag area — the size of the area, pulling which you can change the size of the block".
Size — size of the built-in linker, i.e. a circle next to a block in a diagram that creates relationships between elements (for more details see the article ").
The robotics kit for which programs are written in the TRIK Studio. The list of all available blocks in the and available actions on the toolbar depends on this option.
Let it be necessary that after the delay the program ends immediately. To do this, connect the and blocks with a link pointing from the "Timer" block to the program end block.
.
.
The Linker is a colored circle to the right of the block that appears after the block is selected. When you click on this circle and move the mouse with the left button pressed, the link begins to stretch out of the element.
Links are removed in the same way as .