2

Author Topic: Webbotlib examples (and suggestions)  (Read 815 times)

0 Members and 1 Guest are viewing this topic.

Offline totalisTopic starter

  • Full Member
  • ***
  • Posts: 89
  • Helpful? 0
Webbotlib examples (and suggestions)
« on: August 09, 2011, 04:47:41 PM »
I have been using webbotlib for almost a year and have come to the conclusion that it is brilliant. I have looked into using the Arduino library but i think i am still more impressed with webbotlib.  This got me thinking about my own learning curve with webbotlib and that there is no place to share code. I intend to change that.

I have now got a project box finished to a point i am happy with and so i am now free to develop code using webbotlib.

ITT: suggestions for code and ideas that people wish for me to give examples of, i am ultimately intent on integrating the wii motion plus and the wii nunchuck into webbotlib (with permission ofcourse) and thought that i may as well enjoy the ride.

I have all manner of sensors and gadgetry including sonar, touch buttons, pot's, 44780 screen etc so most stuff goes

tl;dr: need ideas for software to impliment

T

Offline corrado33

  • Supreme Robot
  • *****
  • Posts: 611
  • Helpful? 11
Re: Webbotlib examples (and suggestions)
« Reply #1 on: August 09, 2011, 05:16:22 PM »
I have no idea if this is possible or not, and even though this isn't on the MCU programming side, I think it'd be cool if you could select which devices you want webbotlib to support, so the library isn't as big.  

That'd have to be a computer program though.  :)  Maybe just a window with a bunch of checkboxes.  Or does that already happen in project designer?  I apologize for the ignorance if it does, I haven't seriously looked into webbotlib for a couple of years now.  

Anyway, I think programming support for previously unsupported devices would always be good.

Maybe webbot could give us a wish list.

Offline totalisTopic starter

  • Full Member
  • ***
  • Posts: 89
  • Helpful? 0
Re: Webbotlib examples (and suggestions)
« Reply #2 on: August 10, 2011, 02:36:32 PM »
If you use the project designer then it will only import one of the board config headers; if you try to import 2 manually then it will flag an error. I think the current project designer (v2.) already cuts out the extra un-needed code and so webbot got that covered.

On the subject of new boards and features, what did you have in mind? I am happy to invest in some devices if they are interesting.

and yeah, any feed back by webbot is always appreciated :)

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Webbotlib examples (and suggestions)
« Reply #3 on: August 11, 2011, 01:16:55 PM »
I forwarded this to Webbot. This gave me the idea of a user added custom module feature. May or may not be feasible/easy (or worth the effort), but in my head it sounds like a good idea :P

Offline corrado33

  • Supreme Robot
  • *****
  • Posts: 611
  • Helpful? 11
Re: Webbotlib examples (and suggestions)
« Reply #4 on: August 11, 2011, 05:24:37 PM »
I forwarded this to Webbot. This gave me the idea of a user added custom module feature. May or may not be feasible/easy (or worth the effort), but in my head it sounds like a good idea :P

I agree, I mean webbot is good, but he can't cover everything.  I think it'd be cool if he made a list of hardware he wanted to test/use.  If we got everyone to write some (really good, efficient) code, it could support a ton of different things a lot quicker. 

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,121
  • Helpful? 108
Re: Webbotlib examples (and suggestions)
« Reply #5 on: August 13, 2011, 01:11:33 PM »
This is an interim reply as I've been under the Surgeons Knife recently :'(  :( and will need a few more weeks to recover.

Currently the way to contribute to WebbotLib is that you can join my site on sourceforge and I can give you developer status. This means that you can check code in and out. If you use a 'proper' IDE like, but not exclusively, Eclipse then this is easy to do. I would 'vet' all code before it is released as I would want to ensure that it fits with the existing design philosophy. This would also allow you to test any code where the author doesn't have access to the hardware. All contributed code would need to obey the open source license agreement for WebbotLib so that 'the world' has unrestricted access to it.
So contributing to the releases is something that can be done now - and I welcome anyone who wants to give it a go although I would keep it to a small number of people to start with so we can create a documented process for others to follow.

As for a more open community then there are several alternatives to consider:
1. A central respository where all 'contributed' code gets dumped. ie a single base URL for people to download from - preferably within the webbot.org.uk domain
or
2. An open repository where people place stuff wherever they want and tools like Project Designer hunt for what's out there (bit like adding download sites into Eclipse) - which I don't like as I think support etc would be a bit of a nightmare.

In general there are a number of considerations:-
1. The code itself (obviously) - ie what contributes a release and who can produce one
2. Adding new devices to Project Designer. This is done via an XML file. So if you understand XML then this should be fairly easy. But if someone can 'dump' code somewhere then they also need to be able to dump the 'XML' file somewhere that Project Designer can find.
3. Utilitiy code (ie stuff you can't add in Project Designer as it's not a 'device') such as a new 'code scheduler library' say would need to be in the main code base.
4. Documentation. I currently have to produce this for C and for C++ which is a pain. I would prefer to drop everything except Version 2 for C++ (ie everyone must use Project Designer). This would also allow me to tidy up the code quite a bit. This raises the issue as to how someone would contribute to the documentation. Currently I have it all in a database and this can generate the PDFs as well as the web docs and it can do some cool stuff like generating the class hierarchy diagram http://webbot.org.uk/WebbotLibDocs2/43885.html. With an open community then I think the whole documentation process would need to be dropped (especially PDFs) and move to a pure Web site for docs. I would then need to find a way to do a one-off population from my db.
5. All of the above should be 'downloadable' to the local machine so that its accessible when you aren't connected to the internet (coz you are at a robot competition!)

It needs more thought once I'm recovered !!

In the meantime if anyone would like to contribute any examples / tutorials etc then get in touch and I'll find a way to add them to webbot.org.uk but credited to you.

To those of you who have asked about what devices I would like help to add then I actually see it the other way around. WebbotLib provides a service to its customers - so its up to the customers (you guys) to decide what you want to see in it and let me know. Currently I'm driven by my own stuff, or requests from users via emails etc, as well as monitoring Sparkfun for new and best selling devices. If you are registered on webbot.org.uk then there is a 'poll' option which is barely used at the moment. Email me any 'requests' and I can place them on the poll - and everyone can vote.

Finally - let me stress that you all have access to Board Designer - so you can create designs for the boards you are using and then use Project Designer to use it in all the projects you create. So if you are using a board that isn't listed in Project Designer then why not create your own. You can even export these designs to share with others (either by sending them the file or - better - by placing it on the web somewhere). If its a commercial board, and could be useful to others, then I can build it into Project Designer if you send me the export.

@corrado33 - Altough the library itself is quite large your project only adds in the code that you have used. Project Designer is exactly the 'tick list' application that you mention - albeit slightly more complex as most devices require some kind of options. If you haven't tried it yet then I suggest you do - and then let me know what you think. Version 2 (which requires you to use Project Designer) generates smaller code because a lot of the checks can be moved out of the runtime library and into Project Designer instead. For example: lets assume you are trying to set up two PWM signals one at 1Hz and the other at 10kHz. If you use the same timer then this may not be possible and so Version 1 has lots of code to check this stuff and then 'flash' a runtime error. In Version 2 this is all done in Project Designer meaning that the library doesn't need to and can also report the problem to you before you even compile your code.

@Admin - The custom folder idea is already kinda supported in that Project Designer allows you to specify your own folder where custom code can be found. I know what you are hinting at - but the only issue is that if my code is made up of lots of C or C++ files and more than one of them include and use functions in your H files then I will get an error during the link process as the same code gets added all over the place. Thats the problem with a library based purely on H files.

@totalis - Thanks for the kind words.


Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

 


Get Your Ad Here