02-14-2011 06:42 AM
Hi,
I am currently undertaking a project concerned with swarm robotics. We have 5 robots and a system which calculates their position within an area in terms of x and y coordinates.
The positioning system will constantly update the position of the robots and the direction which they are facing.
I am looking to try and use labview to try and show the position of these robots in real time. I was thinking of using simple shapes (rectangles) to represent the robots and these shapes could be displayed on a screen to show where the robot is positioned on the grid.
I have searched through the forums and can't seem to find anything similar.
Thanks
02-14-2011 08:39 AM
Would something like this help?
http://decibel.ni.com/content/docs/DOC-13150
You can download the code used for this project at http://decibel.ni.com/content/docs/DOC-13031
Cheers,
Karl M.
02-14-2011 10:18 AM
Define real-time.
I would go with a picture indicator, draw the robot as a rotated triangle pointing in the direction of travel. you can make a single subvi to draw the triangel takes a X,Y, Angle and color. Itterate over an array of clusters with this parameter for each update. Should be able to run this fast I wouldnt show this faster than a few hz since you will not know the difference.
02-16-2011 07:14 AM
Thank you for the sample code given above.
I have adapted in the way in which I would like the picture to appear.
I would now like to try and place multiple robot images on the picture as we have multiple robots in our demonstration. These robots will have different coordinates to each other.
I had thought of using a for loop which could repeat N times (with N being the number of robots) but I am not sure how to implement this.
I have attached the .vi as it currently stands.
Thanks
02-16-2011 07:36 AM
Something like this should work. I added a loop and arrays for your coordinates and the robot picture and color.
02-16-2011 07:56 AM
Thanks but I can't seem to get the picture to display anything.
02-16-2011 09:57 AM
Did you add the pictures to the array? If you have multipule data sets you will need the same number of pictures and colors.
02-17-2011 04:19 AM
I am not really sure what you mean. I have tried changing the inputs on the front panel but cannot get the picture to display any image when it is run.
02-17-2011 07:22 AM
I made a few small changes I did not make it so that you can chane the color of your robot. That will take a little more effort. I also took out the check for posture vi so that I could get it to run this time. It seems to work.
02-17-2011 07:52 AM
OK this one does multi colors.