Difference between revisions of "AnyKode Marilou"
(→Source Code) |
(→Screens) |
||
Line 101: | Line 101: | ||
</source> | </source> | ||
+ | ==Moja skúsenosť== | ||
+ | Prvé čo som spravil bolo, že som navšívil stranku [http://www.anykode.com/downloads.php Marilou]. | ||
+ | Kde som našiel všetko potrebné. | ||
+ | *Produkt na stiahnutie | ||
+ | *Dokumentáciu | ||
+ | *Video tutorial | ||
+ | |||
+ | Po úspešnom stiahnutí a nainštalovaní som sa pokúsil spustiť program. | ||
+ | Po prvom okukaní, som sa rozhodol spustiť nejakú ukážku. Spustil som Eurobot 2007 cup z ktorej simulácie nájdete video nižšie. | ||
+ | |||
+ | Potom podla 1.video tutorialu som si vytvoril moju simulaciu:<br/> | ||
+ | [[Image:Moj.jpg|left|320px|Moja simulacia]] | ||
+ | <br/><br/><br/><br/><br/><br/><br/><br/><br/> | ||
==Screens== | ==Screens== | ||
Marilou editor<br/> | Marilou editor<br/> | ||
Line 108: | Line 121: | ||
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> | <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> | ||
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> | <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> | ||
+ | |||
==Video== | ==Video== | ||
Video Eurobot 2007 cup | Video Eurobot 2007 cup |
Revision as of 08:51, 1 July 2012
Contents
About project
anyKode Marilou is a modeling and simulation environment for mobile robots, humanoids, articulated arms and parallels robots operating in real-world conditions that respect the laws of physics. This robotics suite is used in research centers as well as industry for various projects like humanoid architectures, wheeled and multi legged vehicles and multi-robot systems (Multi-agents). Marilou real-time engine uses the ODE (Open Dynamics Engine) for collisions detecting and dynamics management. Various 'real world' variables like forces, torques, masses, damping, friction and others can be adjusted directly to the objects surfaces
Scenes modeling
Marilou's entities editor allows to design robots collision model using any of the static or dynamic objects in the simulated world. CAD-style editing tools are entirely graphical, easy to use, and allow to make changes and set-up new situations quickly. Scenes, dynamics and robots properties can be changed from a view/document/properties IHM style. Also the editor takes in charge re-usable physicals entities as well as pure 3D models. The most complex objects can be made easily by assembling sub-parts. Marilou uses a hierarchical system to present entire objects at the highest level (the current world). This approach makes it possible to reuse members of a complex object as sub-parts of another object.
Robots programming
MODA (Marilou Open Devices Access) is the Marilou generic SDK for handling simulated robots and their embedded devices, such as sensors and actuators. Depending on chosen language, MODA provides libraries (.lib / .a) or .Net assembly (.dll) for accessing simulation over the network. Synchronized to a simulated clock, algorithms can run on any computer in the network. Individual robots may run several programs. In addition, one MODA program can control several robots, whether or not they be in the same world. MODA TCP server can be embedded in real robot.
- Languages: C/C++, C++ CLI, C#, J#, VB#
- Compilers: Microsoft Visual Studio suites, DevC++, Borland C++ RAD Studio, G++ for Linux, CodeBlocks
- MODA is Open-source and compatible Linux (Mac coming soon)
Source Code
#include "ModaCPP.h"
int main(int argc, CHAR* argv[])
{
//process the command line
ModaCPP::CommandLine::ProcessCommandLine(argc,argv);
//Connect to MODA server
ModaCPP::Connection *pConnection=new ModaCPP::Connection(true);
if(pConnection->Connect( ModaCPP::CommandLine::GetArgumentValue("/modaserver","127.0.0.1"),ModaCPP::CommandLine::GetArgumentValueINT("/modaport",0),false))
{
_cprintf("Connection ok to moda server\r\n");
//Find the robot
ModaCPP::RobotPHX *robot=pConnection->QueryRobotPHX("/");
if(robot)
{
_cprintf("Robot found in this world\r\n");
ModaCPP::DeviceMotor *pMotorLeft=robot->QueryDeviceMotor("JointLeft/axis/motor");
ModaCPP::DeviceMotor *pMotorRight=robot->QueryDeviceMotor("Jointright/axis/motor");
ModaCPP::DeviceGPS *pGPS=robot->QueryDeviceGPS("socle/gps");
if(pMotorLeft && pMotorRight && pGPS)
{
//read the GPS configuration
GPSConfigStruct GPSConfig=pGPS->GetSettings();
GPSValuesStruct GPS;
_cprintf("Intrinsic error:%f, %f, %f (m) Noise:%f (m) Update: %u ms\r\n",GPSConfig.IntrinsicError.x,GPSConfig.IntrinsicError.y,GPSConfig.IntrinsicError.z,
GPSConfig.Noise,GPSConfig.UpdateDelay);
while(!_kbhit())
{
//Read GPS position
pGPS->GetValues(&GPS);
_cprintf("Position: %f %f %f, speed: %f, North/Dir: %f°\r\n",GPS.XPos,GPS.YPos,GPS.ZPos,GPS.LinearSpeed, Moda::Commons::MathFunctions::ToDeg(GPS.NorthAngleRad));
//Move the robot
pMotorLeft->SetVelocityDPS(90);
pMotorRight->SetVelocityDPS(180);
pConnection->Sleep(4000);
//Read GPS position
pGPS->GetValues(&GPS);
_cprintf("Position: %f %f %f, speed: %f, North/Dir: %f°\r\n",GPS.XPos,GPS.YPos,GPS.ZPos,GPS.LinearSpeed, Moda::Commons::MathFunctions::ToDeg(GPS.NorthAngleRad));
//Move the robot
pMotorLeft->SetVelocityDPS(180);
pMotorRight->SetVelocityDPS(90);
pConnection->Sleep(4000);
//Read GPS position
pGPS->GetValues(&GPS);
_cprintf("Position: %f %f %f, speed: %f, North/Dir: %f°\r\n",GPS.XPos,GPS.YPos,GPS.ZPos,GPS.LinearSpeed, Moda::Commons::MathFunctions::ToDeg(GPS.NorthAngleRad));
//Move the robot
pMotorLeft->SetVelocityDPS(90);
pMotorRight->SetVelocityDPS(-90);
pConnection->Sleep(4000);
}
delete pMotorLeft;
delete pMotorRight;
delete pGPS;
}
else
{
_cprintf("motor(s) and/or GPS not found ...\r\n");
}
delete robot;
}
else
{
_cprintf("Robot not found in this world\r\n");
}
}
else
{
_cprintf("Unable to connect to moda server : be sure Exec is running and MODA TCP/UDP ports are open\r\n");
}
pConnection->Disconnect();
delete pConnection;
return 0;
}
Moja skúsenosť
Prvé čo som spravil bolo, že som navšívil stranku Marilou. Kde som našiel všetko potrebné.
- Produkt na stiahnutie
- Dokumentáciu
- Video tutorial
Po úspešnom stiahnutí a nainštalovaní som sa pokúsil spustiť program. Po prvom okukaní, som sa rozhodol spustiť nejakú ukážku. Spustil som Eurobot 2007 cup z ktorej simulácie nájdete video nižšie.
Potom podla 1.video tutorialu som si vytvoril moju simulaciu:
Screens
Marilou editor
Video
Video Eurobot 2007 cup Media:Cup2007-01.avi
Links
http://en.wikipedia.org/wiki/AnyKode_Marilou
http://www.anykode.com
ODE :
http://ode.org/