-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change the environment and add some control button to the simulator ? #16
Comments
Hey Arsyad, As for control buttons I believe you need to take a look into the +simiam/+ui/AppWindow.m file. You can add whatever buttons you like there. |
thanks a lots for your help, |
Hey Arsyad, no worries, everyone has to start somewhere. Can you be a bit more specific of what kind of buttons you want to add + what the functionality should be? In my version of the simulator I have added a second figure with some control buttons that allow to turn on/off certain features, but I have not yet added this to my fork, but I was planning to do so this weekend. |
actually, i want to control the robot speed with a slider and the movement with A (Left) and D (Right) keyboard button. |
Hey Arsyad, what you want should be possible. I remember that when I first got the simulator I was able to change the robot speed online. I have looked through my old code and it does not seem to work the same way in the new version of simiam. However, having a second window for a some control input buttons is not a problem. You can have a look at my fork if you want while I try to find out how to access the robot/controllers from the +simiam/+ui/AppWindow.m file. |
You can now use the slider to reduce the speed of the trailing Khepera robot |
thanks a lot, |
Hey Arsyad, I think in order to add a new robot you have to create a new one +simiam/robot, but I am not 100% on this (I will check later this week). |
no, |
how to do that please.... |
Okay, that should not be so hard. If you can figure out the figure handle you should be able to apply any modifications you desire to the figure. I believe the figures you are talking about are usually launched as figure 2 and 3 (one for each robot). It might help to give a specific name to these figures to find them back more consistently. I believe they are created in +simiam/+util/Plotter.m Hope that helps |
actually, i want to build platooning (leader-follower) formation using this simulator.
|
Marcus, sorry to bother you
for all of that things (checkbox and two slider) i already build the figure in the option figure window, but i haven't create the callback function. please teach me how to formulating function for that operation |
Hey Arsyad,
I hope I was able to give you some hints. I can have another look this weekend |
marcus, |
marcus, i need a little help please... |
Where do you need the line? In the simulator, or do you just want to know the path the robots have executed during the simulation once it is over?
|
i want to do the option 2, |
Hey Arsyad, I am not 100% on this, but I don t think AppWindow.m is where you want to put this. My firt guess would be to put it in Simulator.m (somewhere in the function "step"). If you do:
somewhere in there I think you should succeed. A couple of things though. It is probably better to work with the figure handle to always refer to the correct figure and it might be necessary to add a "hold on":
Otherwise the figure might be reloaded with out its history (so always just the current position of the robot). |
is it possible to draw the line inside the simulator field (option 1) ? |
Well, I feel like this will be much more complicated. For now the figure displays all the objects that you provided in the settings.xml file. Don t get me wrong, nothing is impossible, but for further help I would need to know what your aim is. |
marcus, did you try the simulink demo of simiam ? |
Hey Arsyad, Unfortunately I have not tried the simulink demo so far. I would suggest that you open a new question for these, so people with more experience with the simulink version can see it and help you. :) Marcus |
i've succeed to put 3 robot in the simulator, and i want to make linear platooning formation of them.... |
Good morning which version have you used to be able to put 3 robot in the simulator ? |
the latest demo version... |
hi, i want to ask about how to change the environment and add some control button to the simulator ?
please i need to help...
if you don't mind....
The text was updated successfully, but these errors were encountered: