go away spammer

Author Topic: New C library - testers required  (Read 80316 times)

0 Members and 1 Guest are viewing this topic.

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: New C library - testers required
« Reply #90 on: January 16, 2010, 07:06:51 PM »
Taken offline,

Back to the regularly scheduled program:

It seems the gpsNEMA.c is hard coded to stay in DEBUG mode. I noticed when i setup my GPS for the first time, and got the NMEA string dumped onto my printf terminal.

I investigated, found gpsNEMA.c
 defines DEBUG,

then

Code: [Select]
                                        #ifdef DEBUG
// Dump out the message
rprintfStr(msg);
rprintfCRLF();
#endif

Did you mean to hard code DEBUG mode in your lib?

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #91 on: January 16, 2010, 07:28:41 PM »
But if you look in
Cameras/Surveyor/blackfin.h
you should see that the
#define BLACKIN_DEBUG
is commented out as its only used by me. Hence the code you've found will never be compiled anyway as the '#ifdef' will always fail and skip the code down to the '#endif'. Unless you've changed the h file and compiled your own version of the library.

If you look further into blackfin.h you will also see that MAKE_BLACKFIN_CAMERA has a different number of parameters depening on whether debug mode is enabled or not.
It has one parameter if debug is switched off, or two if it is enabled.

So if you've only got one parameter then DEBUG is definitely off - otherwise you would get compile errors.

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

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: New C library - testers required
« Reply #92 on: January 16, 2010, 07:38:18 PM »
Hmm, I am not 100% on what you are saying.

I know for a fact that i didn't mess with anything but added the following to my main c file

#include "gpsNMEA.h"
GPS_NMEA gps = MAKE_GPS_NMEA(UART2);
gpsNMEAprocess(&gps);

(in different places)

and i am suddenly getting the NMEA strings in my serial terminal that handles my rprintf.

Nevermind, i see what you are saying, because i tried commenting out #define DEBUG in gpsNEMA.c and it did not stop the nmea sentences in my terminal. So i guess what i am saying it the pre-complied gpsNEMA has DEBUG enabled.

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #93 on: January 16, 2010, 08:02:19 PM »
Nevermind, i see what you are saying, because i tried commenting out #define DEBUG in gpsNEMA.c and it did not stop the nmea sentences in my terminal. So i guess what i am saying it the pre-complied gpsNEMA has DEBUG enabled.
Well changing the gpsNMEA.c file would only take effect if you compiled it and placed your compiled version in the compiled '.a' file

If your 'blackfin.h' has the '#define BLACKFIN_DEBUG' line still commented out then the BLACKFIN_CAMERA doesn't have any variable to store what UART to use to send debug info to.
Heres the extract from blackfin.h
Code: [Select]
typedef struct s_blackfin {
UART* camera; // The UART used to talk to the camera
BLACKFIN_RESOLUTION res; // The current resolution of the camera
BLACKFIN_BLOB* blob; // The default area to read a blob into
COLOR* mean; // The last read mean value of the image
#ifdef BLACKFIN_DEBUG
UART*     debug; // The UART used to send debug output to
#endif
} BLACKFIN_CAMERA;
See that #ifdef  - its used to store the UART to send debug info to. If BLACKFIN_DEBUG isn't defined then the variable isn't there.

Your program just uses, correctly, the single parameter version:
GPS_NMEA gps = MAKE_GPS_NMEA(UART2);
Which, since it compiles, also suggests BLACKFIN_DEBUG isn't defined - otherwise you would need to specify the additional UART to send debug info out to.

So I'm confused

When you say it goes to 'my serial terminal' then what UART is that on?

Can you attach a mini-program that does the same thing as you see.


Since my debug version can dump stuff at runtime to ANY user specified UART then it needs you to specify the UART number at compile time. You aren't specifying a debug UART and so I dont know how its deciding to use a particular UART.
« Last Edit: January 16, 2010, 08:03:53 PM by Webbot »
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: New C library - testers required
« Reply #94 on: January 16, 2010, 08:10:35 PM »
where is blackfin coming from? I am not using a blackfin at all.

The gpsNEMA.c has this

#define DEBUG
#ifdef DEBUG
#include "rprintf.h"
#endif

and this

#ifdef DEBUG
// Dump out the message
rprintfStr(msg);
rprintfCRLF();
#endif


So it is dumping out the string into the Uart i initialized rprintf to. ( or so i think). Regardless, I am getting NEMA strings in my terminal i have rprintf writing too. Can I stop that?
« Last Edit: January 16, 2010, 08:26:42 PM by madsci1016 »

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #95 on: January 16, 2010, 08:55:43 PM »
You are, of course, 100% correct and I was talking complete gibberish!! But then it is 2:57am here and brain a bit frazzled.
New interim Axon lib on its way to you with the debug turned off.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: New C library - testers required
« Reply #96 on: January 16, 2010, 09:03:36 PM »
LOl, Thanks. No more NEMA sentences showing up now.

And go get some sleep already, we can't have you programming like this!!!!

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: New C library - testers required
« Reply #97 on: January 16, 2010, 09:09:17 PM »
Actually, I think i spoke too soon, it seems the GPS function is completely broken now. The LED is flashing out a Uart RX buffer overflow almost immediately after powering on, (mine set to 80 bytes, i tried up to 200) and the GPS led shows it has a fix, but I'm not getting anything in my terminal, and i have this

if(gps.info.valid){
rprintf("We got signal \n");
}

« Last Edit: January 16, 2010, 09:11:20 PM by madsci1016 »

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #98 on: February 04, 2010, 08:10:50 PM »
Version 1.14 of WebbotLib released.
See http://webbot.org.uk/iPoint/35.page for info
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: New C library - testers required
« Reply #99 on: February 04, 2010, 08:54:53 PM »
Should project designer testers switch to the new 1.14?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: New C library - testers required
« Reply #100 on: February 04, 2010, 09:10:57 PM »
The updated Axon II WebbotLib demo program set for v1.14:
http://www.societyofrobots.com/axon2/downloads/Axon_WebbotLib_examples.zip (1.7mb)

Version numbers will always match that of WebbotLib, no matter how many updates I make to it. But I'll still specify the major updates made in the version information file.

I'm also keeping copies of demo programs supported by older WebbotLib versions, so just contact me if you by rare chance need it.

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #101 on: February 04, 2010, 09:17:15 PM »
Should project designer testers switch to the new 1.14?

A good question and one I didn't make clear.

The release of 1.14  (from SourceForge etc) is the first official release of 1.14. It replaces the alpha, pre release versions, made available to the Project Designer guinea pigs and is compatible with both Project Designer and the traditional WebbotLib API.

You still need to check version.h or the News section of my website - as there have been a few last minute additions. Although these tend to be standalone (like the AVRcam). If it doesn't work then hey ho: it was never there before and doesn't effect anything else. These new additions are aimed solely at users who have the relevant hardware (which I dont!) and they can get back to me with issues/successes.

So the "quick answer" is YES. Any reported bugs will only be fixed in the main codestream.

But note that Project Designer is still un-released. Maybe a day or two away from general release. There are a few minor releases that I will try to make in the net hour or so (before sleep time!) for those already using it. Changes will be installed next time you launch.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: New C library - testers required
« Reply #102 on: February 07, 2010, 01:40:36 PM »
From the 1.14 release info:

"Added HMC6352 compass - but untested as of yet. If you use it then let me know."

Has anyone tested it for you? I have the compass, but replaced it with a HMC6343. If it's still needs testing I can switch it back out, but I'd rather only spend the time testing if it's still needed.

I think Ro-Bot-X also has it.

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #103 on: February 07, 2010, 09:57:48 PM »
As of yet untested.
So if anyone wants to give it a try and let me know then it would be good to get it out of alpha.
As a Project Designer tester - then it will write the basic code for you. So hopefully not too much of a burden for a standalone test.

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

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: New C library - testers required
« Reply #104 on: February 07, 2010, 10:25:54 PM »
Scheduler question.

I am following the sample code exactly.

void myCallback(int*, TICK_COUNT, TICK_COUNT);

scheduleJob(&myCallback, NULL, clockGetus(), 100000);

void myCallback(int * data, TICK_COUNT lasttime, TICK_COUNT overflow){}

But i get a compiler warning "passing argument 1 of 'scheduleJob' from incompatible pointer type."

What am I doing wrong?


Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #105 on: February 07, 2010, 11:00:27 PM »
The first parameter to 'myCallback' should be a 'void *'
ie
void myCallback(void* data, TICK_COUNT lasttime, TICK_COUNT overflow){}

This is because the scheduler itself does actually give a monkey nadgers as to the actual data type is - its up to you - its just the address of something (or NULL). So it basically means that 'scheduleJob' can pass in a pointer to anything and in 'myCallback' you give an explicit cast to cast it back into what you think it should be.

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

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: New C library - testers required
« Reply #106 on: February 07, 2010, 11:19:14 PM »
Got it, thanks for the correction.

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: New C library - testers required
« Reply #107 on: February 10, 2010, 02:27:01 PM »
You have code in place to stop users, and tell them the data they are polling from a given sensor is stale; hasn't updated.

But you don't have a method to tell if a new NMEA string has come in and been processed.

For example, I'd like to run my main loop at full speed, and only compute positional stuff when i know i have gotten an updated position from my gps.

Would it be simple enough to have 'gpsNMEAprocess()' return a TRUE/FALSE to show that updated GPS coordinates are ready?

I could just use a scheduler to loop at the same speed my GPS updates, 1Hz, but i could be just in front of the GPS message comming in and be 1 second off in my localization programming.
« Last Edit: February 10, 2010, 02:33:09 PM by madsci1016 »

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #108 on: February 10, 2010, 07:04:06 PM »
I need to give that thought - because the GPS can send various different sorts of messages. Each message updates a certain number of fields. But no message updates all of them.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: New C library - testers required
« Reply #109 on: February 10, 2010, 08:20:12 PM »
Looking through NEMA.c, it seems you only process GGA and RMC messages. Both messages give lat/long, but GGA gives 3D positioning. I would have that message set the flag.

Speed and track true from a GPS are somewhat delayed values as it is, it takes a few number crunching cycles for the GPS to update those values anyway. Functionally, anyone dependent on those two values to be temporally accurate are doomed already.

 But knowing if the 3D position has been updated and is not stale is very important for localization algorithms like kalman filters.

Or, you could just pass an extra parameter in the MAKE NEMA GPS that lets the user pick which message sets the 'fresh' flag.
« Last Edit: February 10, 2010, 08:21:50 PM by madsci1016 »

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #110 on: February 11, 2010, 12:13:42 PM »
Since different GPS devices reutrn different messages, and a given device may only implement a subset of the fields then I am thinking of returning a variable that is made of 'bits' to indicate which fields have been updated (even if the new value is the same as the old value).
You could then mask the fields you are interested in listening to.
This would be a more generic solution.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: New C library - testers required
« Reply #111 on: February 11, 2010, 05:07:36 PM »
Sounds good to me. Need a tester?  ;D

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #112 on: February 11, 2010, 06:01:59 PM »
Sounds good to me. Need a tester?  ;D


Life is chaotic at the moment!!

Trying to add things to WebbotLib - mainly displays and other stuff to. (And dont want to get into zillions of code branches!)
Some things have made changes to Webbot that have a knock on with Project Designer and vice versa.

Equally dont want to produce new versions of WebbotLib every few hours as folk will get fed up

So may need to wait for stuff to just settle a bit

Alternative is to learn how to build WebbotLib from source code using Ant. Then I could supply you a source file for something simple and you could make your own build!! Several others have done that already.
Next step is to subscribe to the source code at SourceForge. Then you can add it into the source and check in your change. But I still have veto if I don't like what you've done.
Then rather it being just me - it becomes a community. Ahah open source doesn't just mean you get the source - but also that you can change it! Linux wasn't built in a day nor by one person.


Too much stuff - not enough hours!!! Had a pkg of various LED displays thats been sitting next door un-opened.

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

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: New C library - testers required
« Reply #113 on: February 11, 2010, 06:36:13 PM »
I'd be happy to tackle some stuff on my own.

Do you have any quick links to teach myself Ant and how to use it to recompile the lib?

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #114 on: February 11, 2010, 08:00:50 PM »
If you want to contribute to source code then go through the Sourceforge pages.

Once subscribed you will be able to download, and share with other developers, the current source. As well as build a library. So we can work together.

You will also have access to the 'build.xml' for WebbotLib which has been the subject of posts with others ie my view was 'unless you are changing the library code' then why would you need to build it? But it will be included in future releases.

So once you're Sourceforge application has been agreed then you have access to the full CVS repository.

So how do you build?

You must also have a Java SDK - if not then see  http://java.sun.com/javase/downloads/index.jsp
Download Apache Ant http://ant.apache.org/

Once you've got both then launch a command prompt
Go to the root folder of WebbotLib
Type ant -projecthelp
And you will see a list of options of which the default is just
ant
which will buld everything
or
ant clean
which will delete all binaries. Follow with an
ant
to rebuild given that all intermediate stuff has gone. So rebuild from scratch.

The Ant website gives all sort of html doc help for your own ref. You shouldn't need to change build.xml

Assuming you are now 'sourceforged' so that we can share source code then also note:-
I can veto your changes
Only I can make releases.
But you can make your own internal releases for testing your own changes.

All I would ask is that if you write something then:-
1 - Do not release it any third party manner. WebbotLib belongs to me - and has required a substantial amount of work. You cannot release 'official' versions of the lib and I will come down hard, legally, on anyone who makes their own release via other websites.
2. - By checking code back into WebbotLib then you are agreeing to make it available as a part of WebbotLib and any copyright, if your changes are adopted by a release, belong to WebbotLib. Sounds heavy! Well you are either contributing free stuff (like me) or you ain't. If your code is precious then keep it to yourself, dont publish it, and become an island. Simple.



Ok lets get away from this heavy stuff. WebbotLib is out there for everyone. I just want contributors to have the same mind set.


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

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #115 on: February 17, 2010, 11:17:54 PM »
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #116 on: February 21, 2010, 03:20:49 PM »
Version 1.15b released.

A few internal speed changes - but nothing that will need a change to your own programs.

New version of Project Designer - see http://webbot.org.uk - but this will now attempt, if you are using windoze, to create an AVRStudio project file if there isn't an existing one in your project folder. It will NOT allow you to over-write an existing AVRStudio file

First use will ask you to identify where your WebbotLib code is installed.

This is kinda 'unsupported' in so far as I'm clobbered by AVRStudio versions and how they change their (unpublished) format. If it gets hairy then I may have to drop it. But works, for me, for now! If you have problems then let me know about your AVRStudio version and WebbotLib version.

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

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #117 on: March 19, 2010, 10:01:16 PM »
Version 1.16 released

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

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #118 on: April 02, 2010, 11:39:52 AM »
Version 1.17 released

See http://webbot.org.uk/iPoint/35.page for details.

Main changes are SPI and I2C EEPROM devices (up to 128kb of storage for a few bucks), as well as support for the 'most excellent' Dynamixel AX-12 servos.

The Dynamixel servos are 'excellent' IMHO - but therefore not cheap - http://www.trossenrobotics.com/dynamixel-ax-12-robot-actuator.aspx

They can act as normal servos, or as modified servos (motors) - no need for drilling/gluing etc - its all done in software - and have excellent torque. The current 'state' of each servo can be retrieved - such as 'load', 'temperature', etc, etc

Drive hundreds (yes - hundreds) of them over a single UART! They have thermal shutdown and are very hard to destroy!! (But I'm still trying  ;D).

The only additional hardware you need is shown in my manual and in their datasheet. It is a very simple ( 2 x chips), and very cheap, circuit allowing communication to happen over a single UART wire to ALL servos!!

NB I am aware of some software implementations which choose to 'simulate' this hardware using software. But I decided not to use those techniques as they involve short circuiting the Tx and Rx pins of the UART and could blow up your processor if you load another program but still have the 'shorting wire' present.

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

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: New C library - testers required
« Reply #119 on: April 04, 2010, 12:59:37 PM »
I'd quite like to build a 'gallery' on the WebbotLib web site as its rather 'text only' at the moment. (Too busy writing code to build robots!)

So if you're willing to contribute then PM me with your 'powered by WebbotLib' robots: giving links to videos (YouTube?) or jpeg images - and perhaps a very brief description of what it does.

Even better: if you want to supply a 'quote' then even better.

Showcase your stuff!!

Thnx
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

data_list