Information: YAKINDU Statechart Tools Is Now itemis CREATE
Time and time again we’re amazed by the various use cases in which YAKINDU Statechart Tools comes into operation. Recently we presented Pinewood Car race, where the lightings of one of the cars were controlled with YAKINDU Statechart Tools. Now, we’d like to present another competition – the French Cup of Robotics at EUROBOT 2018 on the 12th of May. One of the teams uses YAKINDU Statechart Tools to control their robots. Below, they present their task and work.
Club Robotique La Garenne (CRLG) is a robotics club that participates in the French Cup of Robotics each year. The principle is simple, two robots circulate on a surface of 2 m to 3 m and carry out a variety of actions to gain points. Whichever has the most points wins the game. The actions can be as simple as pushing a ball or as complicated as sorting balls according to colors and ballistic shooting to deposit them in a remote receptacle.
All this is done autonomously: Once the match is started, the robot operates on its own. It uses its sensors, its actuators, and its main program to perform its actions or to roll out a strategy based on the actions of the opposing robot.
The electronic architecture of CRLG's robot is quite simple. An MBED PCB (with an ARM microprocessor) is integrated in a homemade PCB that retrieves and formats the signals from the sensors and sends the instructions to the actuators (PWM, TTL, I2C, RS232, etc.).
The informatics side is based on a strategy developed with YAKINDU Statechart Tools. In return, several service functions employ this strategy.
At the highest level, it's a simple scheduler:
Scheduling |
Tasks |
10 ms |
Set servos values. Receive messages from PC or a Raspberry Pi, if one is connected |
20 ms |
Get sensors value. Process the servomechanism (moving the robot) Run the “YAKINDU task”: runCycle() (the code is generated by YAKINDU Statechart Tools for a cycle-based execution scheme) |
200 ms |
Send messages to PC or a Raspberry Pi, if one is connected. |
For the strategy, we use the C++ class generated by YAKINDU Statechart Tools’ C++ generator. The implementation of the interface of this class is available on the CRLG GitHub page. and mainly focuses on the Cmatch.cpp file; comments are mainly in French.
For some cases, we run YAKINDU Statechart Tools on Windows 10, but mostly on Ubuntu 16.04 LTS with the GNU gcc compiler, which is included in the package named GCC4MBED.
The first thing that convinced us to use YAKINDU Statechart Tools is its complete implementation of finite state machines (FSM) with history states and parallel execution events. We also appreciated the automatic and fast generation of code, which allows us to drastically reduce the development time spent on the robots. This is especially important because the competition lasts only three days, and every second is precious. Additionally, YAKINDU Statechart Tools has a lot of valuable features that will certainly allow us to be even more successful. One of them is the simulation feature.
If you're interested please find an example of a match available on our YouTube channel.
Our club:
- Bichon: President of the club. He is distinguished by the use of Légo© to make robots.
- Nico: He is not only a developer, but also our electronics master. He's the one who introduced us to YAKINDU Statechart Tools.
- Laurent: Our mechanics and cinematics specialist who designed and built rather impressive assemblies, e.g. coders on suspensions printed in 3D.
- Guigui: Our regulators specialist. He knows how to set a PID by ? it. You can have a glimpse of his art in the CAsservissement.cpp file.
- Alexis: He particularly likes metal shavings, without him the lathe of the club would be only an ordinary dust collector.
- Doudou: Like the president, he remains passionate about the union between Lego and robotics.
- Laguiche: A little touch to everything, he works mainly in the development and video recognition.
If you have any fun project realized with YAKINDU Statechart Tools just contact us – we're excited to hear how you work with YSCT. And if you want to try it just download the newest version.
Comments