Archiv verlassen und diese Seite im Standarddesign anzeigen : First release of rp6simul, a simulator for the RP6 and m32
Hello all,
Although AREXX has an official forum, I figured posting this here as well made sense because the majority of the RP6 community seem to hang out in this place. Although I live next to Germany, my German is not in a very good shape, so I hope everyone excuses my use of English on this forum...
The past few months I have been busy with creating a simulator for the RP6 robot. The simulator is open source (GPL), cross-plaftorm (Windows and Linux binaries are provided) and both the RP6 and its m32 extension board can be simulated either independently or simultaneously. The simulator is especially useful if you want to debug or test your robot code, but also presents a nice 'soft' alternative when for instance your batteries ran out again, or you want to test-drive before acquiring the robot.
Although this is the first release, it is already contains many features. Most importantly, all the peripherals found on the RP6 and m32 (sensors, ADC devices, timers, motors, TWI, etc) are supported. The simulator itself is written in C++ and uses Qt extensively to provide a nice cross-platform interface with a system native look. Besides easy access to the robot state (sensor data, IO registers, etc), the simulator interface also provides a simple two-dimensional environment in which the robot can move and interact with obstacles and lighting.
So if you are interested, please visit the project homepage: http://sourceforge.net/p/rp6simul/
A more detailed description can be found on the about page: http://sourceforge.net/p/rp6simul/wiki/About/
And, finally some screenshots :)
Robot status overview (http://sourceforge.net/p/rp6simul/screenshot/robot-status.png)
Two-dimensional simulation environment (http://sourceforge.net/p/rp6simul/screenshot/map-complex.png)
m32 simulation (https://sourceforge.net/p/rp6simul/screenshot/m32-overview.png)
AN ALLE DIE HIER MITLESEN: -Rick- spricht besser englisch als deutsch. Trotzdem könnt ihr auf deutsch antworten, -Rick- wird sein bestes geben eure Antworten zu verstehen und wird dann auf englisch versuchen, euch zu helfen.
damaltor, 13.01.2012
Der Next Button im fenster "Projekt erstellen" ist inaktiv. Bug oder was anderes?
Hmm .. do you have write access to the selected directory? Can you try another one? I noticed that on Windows sometimes your 'home' directory doesn't work, but for instance "My Documents" does.
-schumi-
31.12.2011, 14:29
Hi Rick,
installing worked perfekt on Arch Linux x86_64 :)
Now i want to create a new project, but what the hell is this Plugin!? Is it the program running on the RP6 while simulation?
I downloadet "rp6simul-plugin", and as i understood i have to put the sourcecode of the program into the rp6-folder (I only want to simulate the Base, without M32).
But what next? In this folder i compiled the sourcecode and got a .hex-file, but i can't select it as plugin-file...
greetings
schumi
-schumi-
31.12.2011, 14:51
Ah, ok - now i know how to do it:
Copy your sourcecode into the rp6-folder (for example RP6Base_Move_05.c)
Rename it to "test.c"
In a terminal navigate to this folder and run "cmake CMakeLists.txt"
Now run "make all"
Open the simulator, File - New Projecet, select name and directory, then at "Plugin" chose the "rp6simul-plugin"-folder -> rp6 -> libplugin.so
Thada :-D when you click at the "map"-tab you can draw your map where RP6 drives
Now i have another question:
Is it possible to simulate the rp6 as fast as the pc can calculate? (like time lapse)
( https://www.roboternetz.de/community/threads/56077-RP6-soll-sich-selbst-beibringen-nicht-an-die-Wand-zu-fahren :twisted: :rolleyes: )
greetings
schumi
Ah, ok - now i know how to do it:
Copy your sourcecode into the rp6-folder (for example RP6Base_Move_05.c)
Rename it to "test.c"
In a terminal navigate to this folder and run "cmake CMakeLists.txt"
Now run "make all"
Open the simulator, File - New Projecet, select name and directory, then at "Plugin" chose the "rp6simul-plugin"-folder -> rp6 -> libplugin.so
Thada :-D when you click at the "map"-tab you can draw your map where RP6 drives
Okay, glad you found it out by yourself :)
The manual (which you can access via the menu or online (https://sourceforge.net/p/rp6simul/wiki/Manual/) also provides a nice guide using the GUI of cmake.
Now i have another question:
Is it possible to simulate the rp6 as fast as the pc can calculate? (like time lapse)
( https://www.roboternetz.de/community/threads/56077-RP6-soll-sich-selbst-beibringen-nicht-an-die-Wand-zu-fahren :twisted: :rolleyes: )
greetings
schumi
Actually, everything running outside any timer interrupts already runs at 'full speed'. Only the the timers run at 8 (or 16) MHz to provide realistic timing. If you would like to change the simulated AVR frequency you can take a look at the config.lua file in the src/lua/robot (and src/lua/m32) directories, but I don't expect that high values are really possible due the non-realtime operating systems we use :)
Great piece of work!
I added it to the list of the most interesting RP6 projects in RN-Wissen: http://www.rn-wissen.de/index.php/RP6_-_Programmierung
damaltor
01.01.2012, 21:04
Ich habe den Thread mal als "wichtig" markiert, was ihn auf der ersten Seite ganz oben hält.
I marked this thread as "important", wich will make it stick to the first line on first page of this forum.
Many thanks to -Rick-! Great cinema!
It works well under Ubuntu Lucid Lynx and also under Windows XP. Now, the Robby is beside me all the time. :cool:
Greetings JayWay
I installed it on Windows 7 64bit. It was working without any problems.
The manual, as well as -Rick-'s post, were very helpful. I had a little problems while runnig "make all" because my main-files return an "uint16_t" (as it is in the Arexx example Programms) and not only an "int".
After correcting that, i could use my .dll - Plugin.
I'm wondering if it also works with the Remotrol (https://www.roboternetz.de/community/threads/47704-RP6-Remotrol-1.3-Die-Opensource-RP6-Fernsteuerung?highlight=remotrol).
Thanks a lot!
Filou
Thanks everyone for the positive feedback!
I installed it on Windows 7 64bit. It was working without any problems.
The manual, as well as -Rick-'s post, were very helpful. I had a little problems while runnig "make all" because my main-files return an "uint16_t" (as it is in the Arexx example Programms) and not only an "int".
Hmm I didn't noticed that they do. As the compiler is actually compiling C++, and because this language is more strict, I guess it didn't like the 'non standard' return type.
I'm wondering if it also works with the Remotrol (https://www.roboternetz.de/community/threads/47704-RP6-Remotrol-1.3-Die-Opensource-RP6-Fernsteuerung?highlight=remotrol).
I don't have any experience with Remotrol, but if I inderstand correctly, it uses the serial port to communicate with the robot. If this is the case, it is most likely possible. To do so, you first need to install a virtual serial port, on Windows I know that com0com (http://com0com.sourceforge.net/) works. Using this software, you will need to create a pair of virtual ports, and connect one of the two with the simulator (via the settings screen) and the other with Remotrol. You can create a second pair if you also want to link the simulated m32.
fulltime
10.01.2012, 16:03
One short question. Is the rp6simul able to simulate the RP6 with the M32-Board?
fulltime
11.01.2012, 18:52
so you can simulate that the RP6 is driving around, and when it hears a noise it stops. For example
A short quote: "Sound interaction - When you have m32 simulation enabled, you can press the hand clap button generate a clapping noise. This noise will be registered by the MIC ADC channel of the m32 board. The sound level can be influenced by pressing and holding the hand clap button for a shot while."
There are a lot of other informations in the help file. ;)
Hello everyone,
I would like to use the Original RP6 Programs (http://www.arexx.com/rp6/downloads/RP6Examples_20080915.zip) directly to generate the Plugin.
Is this possible? how do i have to change the CMakeLists? Is it enough to change the Path in line 12 and 13 like this:
#from find_path(RP6LibPath RP6base RP6common ../RP6Lib) to
find_path(RP6LibPath RP6base RP6common ../../RP6Lib)
#from find_path(glueSrcPath glue.cpp ../avrglue)
find_path(glueSrcPath glue.cpp ../../avrglue)
Like this i wouldn't have to copy the files all the time.
Would it even be possible to create some kind of make.bat that i can run it directly from Programmers Notepad?!
[edit]
while running mingw32-make, i always get the error "avr/io.h: No such file or directory". How do i fix this?
Thanks a lot for your help!
Hello everyone,
I would like to use the Original RP6 Programs (http://www.arexx.com/rp6/downloads/RP6Examples_20080915.zip) directly to generate the Plugin.
Is this possible? how do i have to change the CMakeLists? Is it enough to change the Path in line 12 and 13 like this:
#from find_path(RP6LibPath RP6base RP6common ../RP6Lib) to
find_path(RP6LibPath RP6base RP6common ../../RP6Lib)
#from find_path(glueSrcPath glue.cpp ../avrglue)
find_path(glueSrcPath glue.cpp ../../avrglue)
Like this i wouldn't have to copy the files all the time.
Would it even be possible to create some kind of make.bat that i can run it directly from Programmers Notepad?!
[edit]
while running mingw32-make, i always get the error "avr/io.h: No such file or directory". How do i fix this?
Thanks a lot for your help!
Hello Filou89,
There are multiple things you could do, I just stuffed around a little and I think this is a fairly nice solution:
1) Extract the plugin source (the archive from the site) somewhere you would like. You can do this wherever you would like, and best of all you can reuse it for later projects.
2) Run the cmake gui as stated in the manual. In the GUI, pick either the rp6 or m32 directory as the 'source directory' (just as usual). However, for the build directory browse to the actual AVR source (i.e. one of the demo programs). As stated in the manual, it is recommended to use a different subdirectory within the source directory, for instance "<SOMEPATH>\Example_01_LEDs\build".
3) Hit the Configure button and modify the pluginSrcFiles variable. In line with the previous example this would be "../RP6Base_LEDs.c" (I just noticed the manual incorrectly tells to use current directory, i.e. without the "../" part).
3) Run Configure & Generate as usual
4) Now you should be able to run mingw32-make from the build directory to compile the plugin.
5) To automate it further, the next thing is to modify the "makefile" of the demo. What we want to do is add an additional make target, and add this to the default "all" target. So open the file, and modify the line that says
all: begin gccversion sizebefore build sizeafter end
to
begin gccversion sizebefore build sizeafter end rp6simul
Yes, this line is below the big warning that says you shouldn't modify anything ;)
Now add the following line somewhere (I just put it below the "sym: ..." line)
rp6simul:
cd build; mingw32-make
If everything went well, running make in the demo source directory should compile both the HEX file and plugin file.
Note: I only tested this on Linux.
damaltor
13.01.2012, 01:40
Hallo,
ich habe im ersten Post mal einen Hinweis angefügt, dass -Rick- auch ganz gut deutsch versteht und antworten auf deutsch kein Problem sind. So können wir versuchen, diesen interessanten Thread noch ein wenig berühmter zu machen.
i added a few words to the first post from -Rick-, stating that he is able to read German posts and tries his best to help German users, too.
damaltor
basteluwe
23.02.2016, 07:57
Hi Rick,
I'm wondering if your simulator can be used for the combination of RP6-Base and M256-WiFi extension module?
If not so, do you plan for an upgrade?
Regards Uwe
Powered by vBulletin® Version 4.2.5 Copyright ©2024 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.