Shop OBEX P1 Docs P2 Docs Learn Events
ActivityBot - Calibration Failure — Parallax Forums

ActivityBot - Calibration Failure

cmeehancmeehan Posts: 8
edited 2013-10-05 09:00 in Learn with BlocklyProp
I can't compile the ActivityBot Calibrate.side. Output below.


####################


Project Directory: C:/Users/Chris/Documents/SimpleIDE/Learn/Examples/ActivityBot Tutorial/


propeller-elf-gcc.exe -I . -L . -I ../../Simple Libraries/Utility/libsimpletools -L ../../Simple Libraries/Utility/libsimpletools/cmm/ -I ../../Simple Libraries/ActivityBot/ActivityBot 2013-09-03b/libabcalibrate -L ../../Simple Libraries/ActivityBot/ActivityBot 2013-09-03b/libabcalibrate/cmm/ -o cmm/ActivityBot Calibrate.elf -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 ActivityBot Calibrate.c -lm -lsimpletools -labcalibrate
In file included from ActivityBot Calibrate.c:12:0:


../../Simple Libraries/ActivityBot/ActivityBot 2013-09-03b/libabcalibrate/abcalibrate.h:32:19: fatal error: servo.h: No such file or directory


compilation terminated.


Done. Build Failed!


Click error or warning messages above to debug.


###################

The fatal error looking for abcalibrate.h line, abcalibrate.h is in that directory.


The code for abcalibrate.h open in a window with the line #include "servo.h" highlighted in yellow.
I have run Standard Servo Position.side, and it works. I thought that it might have something to with the servo.h file being highlighted


I have unzipped ActivityBot_Navigate(2013-09-03a) and put it into My Documents\SimpleIDE\Learn\Examples\ActivityBot Tutorial
I have unzipped ActivityBot 2013-09-03b renamed it and put it into My Documents\SimpleIDE\Learn\Simple Libraries

I am probably missing something simple, compilers hate me.
Anybody have a clue what is going on.

Thanks
Chris

Comments

  • edited 2013-09-30 10:11
    Hi Chris,

    Sorry I missed this last week. From your description, everything seems in order, but it definitely cannot see servo.h.

    In the compiler messages, I expected to see this line right after the project directory:

    propeller-elf-gcc.exe -v GCC 4.6.1 (propellergcc_v1_0_0_2090)

    Do you have SimpleIDE 0.9.43 installed? Use Help -> About (Windows) or SimpleIDE -> About SimpleIDE (Mac).

    If you do have 0.9.43, what are the entries in Tools -> Properties -> GCC folders -> GCC Compiler, Library Folder, and Workspace Folder. Also, what does it say in General -> Loader Folder?

    Andy
  • cmeehancmeehan Posts: 8
    edited 2013-09-30 14:27
    Hi,

    I had an older version of SimpleIDE installed. It works now

    Thanks
  • edited 2013-09-30 14:30
    Ah, good then; thanks for the update. I'll go ahead and mark this mystery "Solved".

    Andy
  • NikosGNikosG Posts: 705
    edited 2013-10-01 12:20
    Hi Andy,

    Great work the Propeller C and the ActivityBot!!!! Congratulations!!!!!

    I've just finished the robot's assembly and I'm trying the tutorials. (I made an introduction video of the robot for the Greek students) and I'm trying to do the navigation activities in order to capture the final video)

    I run succesfully the "Hello" demo but I have problem with the calibration test

    I downloaded the latest SimpleIDE version 0.9.43. However something is going wrong (Possibly with libraries....?)

    Nikos
    1024 x 826 - 100K
    1024 x 702 - 84K
  • edited 2013-10-01 12:29
    Thank you very much Nikos!

    Have you copied the ActivityBot folder from the zip to your Simple Libraries folder? The zip lives here.

    http://learn.parallax.com/activitybot/software-and-programming

    After copying, make sure to restart the SimpleIDE software. (Then try again.)

    Andy
  • NikosGNikosG Posts: 705
    edited 2013-10-01 13:07
    Andy,

    I copied the ActivityBot folder to my Simlpe Libraries Folder (I also renamed it according the instructions) .
    The unziped folder has and a second sub-folder inside with the name ActivityBot 2013-09-03-b Is this right or I must rename and this folder too?
    1024 x 557 - 58K
  • edited 2013-10-01 13:34
    Hi Nikos,

    Hmmm, yeah, that looks right. You can remove the nested ActivityBot 2013-09-03b folder. I do not think it is causing problems, just not needed. The rest looks good.

    So, next question, where does SimpleIDE look when it's trying to find Simple Libraries. Click Tools and select Properties. The main concern is going to be the Library folder. For me, it's C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries. For you, make sure it's pointing to the folder you screen captured.

    Andy
  • edited 2013-10-01 13:50
    Woops, sorry, you posted screen captures of the compiler settings. I'll take a closer look.
  • edited 2013-10-01 13:55
    Alright, let's try this:

    In your project manager, click and delete each of these entries:

    -I../../Simple Libraries/Utility/libsimpletools
    -L../../Simple Libraries/Utility/libsimpletools

    Also, click the Linker tab, and if it says -lsimpletools, delete that too.

    Then, try compiling again.

    Andy
  • NikosGNikosG Posts: 705
    edited 2013-10-01 14:02
    Dear Andy thank you for your time,

    I'll try again......

    Nikos
  • NikosGNikosG Posts: 705
    edited 2013-10-01 14:08
    Alright, let's try this:

    In your project manager, click and delete each of these entries:

    -I../../Simple Libraries/Utility/libsimpletools
    -L../../Simple Libraries/Utility/libsimpletools

    Also, click the Linker tab, and if it says -lsimpletools, delete that too.

    Then, try compiling again.

    Andy


    ..... Project manager...........? Where I can find this? Is the 2nd menu on SimpleIDE application or another windows application?



    Ok....... I find it.


    I did it .....but unfortunatelly the problem remains.......
    1024 x 819 - 94K
  • edited 2013-10-01 16:36
    Okay, that all looks good.

    Next question:

    Did you have an older version of SimpleIDE before installing v0.9.43? If so, you may have an old Learn folder (that is missing simpletext).

    If that finally turns out to be the problem, the easiest way to fix that would be to:

    1) Close SimpleIDE
    2) Go to ...Documents and rename the SimpleIDE folder to SimpleIDEold.
    3) Run SimpleIDE. It should automatically create a new folder for you.
    4) Copy the ActivityBot folders from SimpleIDEold to their correct locations in the newly created SimpleIDE folder. That's ...Documents/SimpleIDE/Learn/Examples/ActivityBot Tutorials and ...Documents/SimpleIDE/Learn/Simple Libraries/ActivityBot
    5) Open SimpleIDE
    6) Open the calibrate example again.
    7) Try compiling.

    Andy
  • NikosGNikosG Posts: 705
    edited 2013-10-01 23:46
    Andy,

    Yes I had an older version of the SimpleIDE before install the latest. (but I removed it from windows program manager)

    I followed your instructions (step by step exactly what tou said) but nothing again........ The progress stops at 93%
    1024 x 819 - 74K
  • NikosGNikosG Posts: 705
    edited 2013-10-02 00:15
    And something more ......

    The Tutorial "Test Ping" goes perfect. I can run it and I also have the right results on my terminal screen
    With the other 2 tutorias "Follow with Ping" and "Detect and Turn from Obstacle" although they havan't any problem with SimpleIDE they haven't any result. The robot can't move ....

    In fact runing the "Detect and Turn from Obstacle" the robot moved forward unlimited only when it was connected with USB cable


    Nikos
  • jazzedjazzed Posts: 11,803
    edited 2013-10-02 00:48
    Hi.

    Can you please check the Properties to ensure Auto Include Simple Libraries is checked as shown in this picture?

    attachment.php?attachmentid=104196&d=1380700032
    519 x 354 - 43K
  • NikosGNikosG Posts: 705
    edited 2013-10-02 07:46
    Hi Jazzed,

    Yes, it was right as you said (this is not the reason of the problem).

    On post #5 I have a screenshot from my PC that shows all the sheets from the SimpleIDE properties window.

    Can you check please is you see something wrong?

    Thanks
    Nikos
  • jazzedjazzed Posts: 11,803
    edited 2013-10-02 09:55
    I'm sorry that I missed post #5. I shouldn't post after midnight here.

    I see from post #15 that you have had some success.

    You mentioned the BOT working in a certain case as long as it is connected to USB. The first question that comes to mind is do you have good batteries in the BOT?

    Sorry if it is obvious and you may have checked the batteries already, but I recall my father reminding me many times to thoroughly check the batteries first ... (this was after I took toys apart with a claw hammer, and he took me apart with his leather belt).


    Does post #15 mean you are past your build problems? If not, can you tell me which projects build and which projects do not build.

    Any project that comes with the SimpleIDE package including Welcome should build with memory model CMM without modifications (i.e. click the hammer, no errors).
  • edited 2013-10-02 11:21
    Hi Nikos,

    Back in post #12, the application could not see the simpletext library. After the SimpleIDE folder update from post #13, the capture you show in post #14 cannot find abdrive. I would want to double check and make sure that the ActivityBot folder in the Simple Libraries folder has both libabdrive and libabcalibrate. Additionally, look inside libabcalibrate and verify that you can find abcalibrate.h, and a cmm folder with libabcalibrate.a. Also, check for files that follow the same pattern inside the libabdrive folder.

    Please continue posting all the text from the Build Status windowpane at the bottom of the SimpleIDE window. Ideally, paste it between [noparse]
    and
    
    [/noparse]tags in your posts. For example, here is the info from when I deleted my ActivityBot folder from Simple Libraries.
    Project Directory: C:/Users/alindsay/Documents/SimpleIDE/Learn/Examples/ActivityBot Tutorials/
    
    propeller-elf-gcc.exe -v GCC 4.6.1 (propellergcc_v1_0_0_2090)
    propeller-elf-gcc.exe -I . -L . -I C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools -L C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/cmm/ -I C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libsimpletext -L C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libsimpletext/cmm/ -I C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c -L C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c/cmm/ -o cmm/ActivitiyBot Display Calibration.elf -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 ActivitiyBot Display Calibration.c -lm -lsimpletools -lsimpletext -lsimplei2c -lm -lsimpletools -lsimpletext -lm -lsimpletools -lm
    ActivitiyBot Display Calibration.c:12:21: fatal error: abdrive.h: No such file or directory
    compilation terminated.
    Done. Build Failed!
    
    Click error or warning messages above to debug.
    

    About post #15. It might be that the robot will not move until it has completed calibration. Another possible explanation would be if someone from Parallax sent you pre-release revisions of ActivityBot folders? Reason being, the compiler appears to see the abdrive library but cannot recognize drive_displayInterpolation(); If so, please make sure to remove them from your SimpleIDE folder. Also, make sure you are using the pre-written example code from ActivityBot the ActivityBot tutorials folder.

    Andy
  • NikosGNikosG Posts: 705
    edited 2013-10-02 13:38
    @ Andy,

    The ActivityBot folder in the Simple Libraries folder has both: libabdrive and libabcalibrate. inside libabcalibrate also exist: abcalibrate.h, and a cmm folder with libabcalibrate.a.
    All files also exist inside libabdrive folder (I’ve attached an image of my simpleIDE folder tree )


    @Andy and Jazzed,

    For the post #15 it was my fault! Battery was in good condition. It was the first thing I checked. The problem was mine! : Instead of the “Load EEPROM & run” button I pressed the next button: “Load RAM & run”. So the activitybot after the switch off had nothing to run. Sorry I’m feeling completely silly for this.



    The problem with the file “ActivityBot Calibrate.c “ still exists:

    Here is the text from the Build Status windowpane as suggested Andy:

    Project Directory: C:/Users/NIKOS/Documents/SimpleIDE/Learn/Examples/ActivityBot Tutorial/
    
    propeller-elf-gcc.exe -v GCC 4.6.1 (propellergcc_v1_0_0_2090)
    propeller-elf-gcc.exe -I . -L . -I ../../Simple Libraries/Utility/libsimpletools -L ../../Simple Libraries/Utility/libsimpletools/cmm/ -I C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools -L C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/cmm/ -I C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libsimpletext -L C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libsimpletext/cmm/ -I C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c -L C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c/cmm/ -I C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/ActivityBot/libabcalibrate -L C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/ActivityBot/libabcalibrate/cmm/ -I C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Motor/libservo -L C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Motor/libservo/cmm/ -I C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libfdserial -L C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libfdserial/cmm/ -o cmm/ActivityBot Calibrate.elf -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 ActivityBot Calibrate.c -ltiny -lsimpletools -ltiny -lsimpletools -lsimpletext -lsimplei2c -labcalibrate -lservo -lfdserial -ltiny -ltiny -lsimpletools -ltiny -lsimpletools -lsimpletext -lsimplei2c -labcalibrate -lservo -lfdserial -ltiny -lsimpletools -ltiny -lsimpletools -lsimpletext -lsimplei2c -labcalibrate -lservo -ltiny -lsimpletools -ltiny -lsimpletools -lsimpletext -lsimplei2c -labcalibrate -ltiny -lsimpletools -ltiny -lsimpletools -lsimpletext -lsimplei2c -ltiny -lsimpletools -ltiny -lsimpletools -lsimpletext -ltiny -lsimpletools -ltiny -lsimpletools -ltiny -lsimpletools -ltiny -ltiny -lsimpletools -ltiny
    ActivityBot Calibrate.c: In function 'main':
    ActivityBot Calibrate.c:12:3: warning: implicit declaration of function 'servo_pins' [-Wimplicit-function-declaration]
    ActivityBot Calibrate.c:13:3: warning: implicit declaration of function 'encoder_pins' [-Wimplicit-function-declaration]
    ActivityBot Calibrate.c: At top level:
    ActivityBot Calibrate.c:20:2: error: expected identifier or '(' before '}' token
    Done. Build Failed!
    
    Click error or warning messages above to debug.
    
    1024 x 485 - 51K
  • edited 2013-10-02 13:49
    Okay Nikos,

    That Build Status info really helps, thanks! It is currently looking at a syntax error in ActivityBot Calibrate.c, on line 20.

    Maybe try pasting this in over it?
    /* 
    
      ActivityBot Calibrate.c
    
      Calibrate the ActivityBot's servos and encoders
    
      http://learn.parallax.com/activitybot
    
    */
    
    #include "simpletools.h"
    #include "abcalibrate.h"    
    
    int main()
    {
      servo_pins(12, 13);
      encoder_pins(14, 15);
    
      high(26);
      high(27);
      cal_activityBot();
      low(26);
      low(27);
    }
    
  • NikosGNikosG Posts: 705
    edited 2013-10-02 14:12
    Andy, SUPER!!!!!!!

    Now it is run without problem!


    Can you also give me the correct new code for the file "ActivityBot Calibration Display.c" please?
    The existin version that I have, gives the following message in the Build Status windowpane:
    Project Directory: C:/Users/NIKOS/Documents/SimpleIDE/Learn/Examples/ActivityBot Tutorial/
    
    propeller-elf-gcc.exe -v GCC 4.6.1 (propellergcc_v1_0_0_2090)
    propeller-elf-gcc.exe -I . -L . -I C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools -L C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/cmm/ -I C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libsimpletext -L C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libsimpletext/cmm/ -I C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c -L C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c/cmm/ -I C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/ActivityBot/libabdrive -L C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/ActivityBot/libabdrive/cmm/ -I C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libfdserial -L C:/Users/NIKOS/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libfdserial/cmm/ -o cmm/ActivityBot Calibration Display.elf -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 ActivityBot Calibration Display.c -ltiny -lsimpletools -lsimpletext -lsimplei2c -labdrive -lfdserial -ltiny -ltiny -lsimpletools -lsimpletext -lsimplei2c -labdrive -lfdserial -ltiny -lsimpletools -lsimpletext -lsimplei2c -labdrive -ltiny -lsimpletools -lsimpletext -lsimplei2c -ltiny -lsimpletools -lsimpletext -ltiny -lsimpletools -ltiny
    ActivityBot Calibration Display.c: In function 'main':
    ActivityBot Calibration Display.c:15:5: warning: implicit declaration of function 'drive_displayIntrerpolation' [-Wimplicit-function-declaration]
    C:\Users\NIKOS\AppData\Local\Temp\cc0OdXLG.o: In function `_main':
    (.text+0x3): undefined reference to `_drive_displayIntrerpolation'
    collect2: ld returned 1 exit status
    Done. Build Failed!
    
    Check source for bad function call or global variable name `_drive_displayIntrerpolation'
    
    
    


    @Andy,

    Why this happens? The problem is mine or the old code had sometype of "Bug"?
  • edited 2013-10-02 16:03
    Hi Nikos,

    Great!!! I'm so glad it is working for you now.

    In answer to your question about what's the cause, there are several possibilities. The type of errors that I'm seeing often result from hand-entered code. For example, this compiler error:

    "Check source for bad function call or global variable name `_drive_displayIntrerpolation'"

    ...is telling me that the function call that should have been spelled drive_displayInterpolation() was instead spelled drive_displayIntrerpolation(). <<< There's an extra 'r' next to the 't'.

    Hand entering code is one of the best ways to learn it, but it will require debugging for entry errors. If you prefer to hand enter code and get stuck debugging compiler errors, try comparing it to the original. There's a download link with the zips of the originals on the first page of every front page:

    For example, http://learn.parallax.com/activitybot/navigation-basics has a link labeled: "Download the ActivityBot Navigation Basics Code". There is a similar download link on each of these pages:

    http://learn.parallax.com/activitybot/navigation-basics
    http://learn.parallax.com/activitybot/navigate-touch
    http://learn.parallax.com/activitybot/navigate-ultrasound
    http://learn.parallax.com/activitybot/navigate-visible-light
    http://learn.parallax.com/activitybot/navigate-infrared-flashlights

    Each activity is designed so that the reader starts with a pre-written code example that they open after unzipping into ...Documents/SimpleIDE/Learn/Examples/ActivityBot Tutorials. Then, the Try This section guides through a modification, but with a screen capture. The screen capture encourages the student to hand enter the modification. Then, the Your Turn section challenges the student to extend the modification, writing more code on their own. Teachers can assign and grade both Try This and Your Turn.

    Now, if you are starting with the pre-written code examples after unzipping them, and are getting these kind of errors, we might have a new mystery on our hands. For me, if I 'm working from home, sometimes that mystery is solved by cat paw prints on my keyboard, indicating that when I went to make some tea, my cat walked across my keyboard and modified my program.

    At any rate, the next thing to try would be to unzip (or re-unzip) ActivityBot Navigation Basics Code into ...Examples/ActivityBot Tutorials, and try out a fresh copy of ActivityBot Calibration Display. Let me know if it works. Here also is a copy/paste of it.
    /* 
    
      ActivityBot Display Calibration.c
    
      Display interpolation table values from calibration
    
      http://learn.parallax.com/activitybot
    
    */
    
    #include "simpletools.h"
    #include "abdrive.h"
    
    int main()                   
    {
      drive_displayInterpolation();
    }
    

    Andy
  • NikosGNikosG Posts: 705
    edited 2013-10-05 08:50
    Dear Andy,

    Thanks for your patience to help me,

    Now everything is ok.

    I copied all the ActivityBot Navigation Basics Code into ...Examples/ActivityBot Tutorials, and everything goes well. Till now I run successfully calibration and ultrasound activities and everything was right as it was expected!

    I had the opportunity to admire this robot as it made the calibration on my floor and watching its blinking LEDs…… I admired the beauty of the product and all the knowledge background behind it. This combination C and robotics is unique! Congratulation for another time!

    One view is enough for someone to understand that this robot is something VERY SPECIAL!

    I’m in the process to create a Video and an article both in Greek in order to introduce this robot in Greek robotics community. I’m sure that will create a lot of interest because C language is very popular on academic word (universities etc.)

    As I’ will continue to explore ActivitiyBot I’m sure that I’ll have a lot of questions and I hope for your farther support.

    Thank you again,

    Nikos

    P.s. Your cat must be the most sophisticated cat in the world, as it has access on the computer where produced such amazing code for robots….. 
  • jazzedjazzed Posts: 11,803
    edited 2013-10-05 09:00
    Nikos,

    Would you be interested in translating SimpleIDE to Greek?
    Send me a private message.

    Thanks,
    --Steve
Sign In or Register to comment.