View unanswered posts | View active topics It is currently Fri Jul 19, 2019 10:28 am






Reply to topic  [ 13 posts ] 
Repeated Decisions 4: Obstacle Detecting Until Red Line prob 
Author Message
Rookie

Joined: Fri Jul 25, 2014 3:11 pm
Posts: 7
Post Repeated Decisions 4: Obstacle Detecting Until Red Line prob
Can't successfully solve Repeated Decisions: Obstacle Detecting Until Red Line Challenge

Has anyone been able to successfully pass this challenge in the simulator? I had no trouble with the first part (pause when blocked, then proceed), but I can't seem to get the red/black line detection to work in the second part of the challenge.

There are a couple of things wrong here:

1. The challenge is described as "Obstacle Detecting Until Red Line", and "Obstacle Detecting Until Black Line" depending on where you look.
I think it's supposed to be "Black".

2. The provided sample solution looks wrong (motor logic is backwards), and does not work for me either...
Image

Here's my RobotC (v4.10, Challenge Pack v108) graphical program - same as sample but with the correct motor logic:
Image

And here's my RobotC Motors and Sensors setup:
Image

For my program, when I click run it just immediately returns INCOMPLETE!
It's as though the colorSensor is not working at all.

Any ideas?

Thanks, Scott


Tue Aug 05, 2014 3:06 pm
Profile
Moderator
Moderator

Joined: Mon Oct 04, 2010 2:18 pm
Posts: 196
Post Re: Repeated Decisions 4: Obstacle Detecting Until Red Line
Hi Scott,

Thanks so much for the question and catching the mistake in the curriculum. You are right, it should say move until black line and the logic with the motor commands is incorrect. The motors should stop when the distance sensor detects an object (the if branch) and then move when it doesn't detect an object (the else branch).

Your code looks correct to me. Two things, are you losing the line tracking robot? Second, did you get the internal build by submitting a support ticket? I believe you said you were. If so, you can go ahead an use port 3 for the color sensor.

Let me know if any of that works. Thanks again,


Tue Aug 05, 2014 9:52 pm
Profile
Rookie

Joined: Fri Jul 25, 2014 3:11 pm
Posts: 7
Post Re: Repeated Decisions 4: Obstacle Detecting Until Red Line
Hello Parkway,

Yes, I tried both Obstacle Detection and Line Tracking robots - both behave the same.
Sensor debug output shows the colorSensor never reads anything but "0" - even when I use a Forward command to move the 'bot out of the starting box.
So definitely something wrong with my colorSensor here...

Re: New version of RobotC
I submitted a Support Email on Monday and got back an auto-response, but I haven't heard back or received a link to download an updated version yet.

Thanks, Scott


Wed Aug 06, 2014 9:07 am
Profile
Moderator
Moderator

Joined: Mon Oct 04, 2010 2:18 pm
Posts: 196
Post Re: Repeated Decisions 4: Obstacle Detecting Until Red Line
Ok, let's try these two things. First, try your sensor is port 3. Second, put a stop multiple motors command block on line 8. So, after the robot reaches the sensor threshold in the repeat block, there is nothing telling it to stop. Try adding that block also. Let me know how that works. Thanks,


Wed Aug 06, 2014 11:54 am
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Jun 11, 2014 9:59 am
Posts: 115
Post Re: Repeated Decisions 4: Obstacle Detecting Until Red Line
Scott,

I think I may have found the issue. When you cross the black line, your motors are still on because there is nothing in the way of your robot. Try stopping all motors again after your "repeatuntil" loop.
Image

Also be sure to match your robots configuration to the configuration found in the table menu under the Robot tab. Depending on which build you have it may be different. If it is an older build it may be in port 9. The more recent builds will be in port 3.

Please let me know if this solves things.

Thanks, Lee


Wed Aug 06, 2014 11:59 am
Profile
Rookie

Joined: Fri Jul 25, 2014 3:11 pm
Posts: 7
Post Re: Repeated Decisions 4: Obstacle Detecting Until Red Line
Hello lcarrozza and Parkway -

Thanks for your suggestions. I've tried them both without success (see results below).

Re: put a stop multiple motors command block on line 8:
This makes good sense, but it didn't make any difference in my case. Besides, I would have expected to see the 'bot run off the end of the table (or at least fail by going too far) if this was the main problem.

Re: try your sensor in port 3:
I tried this, and it did not make any difference - still does nothing and/or immediately returns "INCOMPLETE!" message (checked with both 'bots).

Given that the colorSensor never moves from a value of "0" in the debug window, makes me think this is where the problem is...

Hopefully I'll hear back soon on the new build of RobotC so I can re-test with that.

Question: has anyone been successful with this challenge using RobotC v4.10 June 11, 2014?

I'm happy to try other options as well - let me know.

Cheers, Scott


Wed Aug 06, 2014 12:31 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Jun 11, 2014 9:59 am
Posts: 115
Post Re: Repeated Decisions 4: Obstacle Detecting Until Red Line
Scott, thank you for trying this out for me.

I cannot replicate the issue you are having, so this makes me believe you need an updated version of ROBOTC Graphical. I am happy to see that you have already opened a ticket for an update. Your code/logic is correct so when you get the newest version of ROBOTC Graphical (should be receiving it shortly), please try the activity again.

If this problem still exist after, please let me know.

Thanks, Lee


Wed Aug 06, 2014 1:25 pm
Profile
Rookie

Joined: Fri Jul 25, 2014 3:11 pm
Posts: 7
Post Re: Repeated Decisions 4: Obstacle Detecting Until Red Line
I heard back from RobotC Support and got the link for the pre-release build of RobotC (thanks John!), so here's an update on my 2 issues:
random freezes/crashes of IDE and failure of the colorSensor...

First I uninstalled all Robomatter products and deleted any remaining files/folders in the following directories:

C:\Program Files\Robomatter Inc
C:\Program Files\Robot Virtual Worlds

Then I installed the new version of RobotC: v4.11
And then installed the latest ChallengePack: v108

The short answer is IT WORKED! My programs that use the colorSensor are now successful - Yay!
And so far I haven't seen any RobotC IDE freezes, hangs or crashes. I'll report 'em if I do.


The longer answer is that the process was a bit rough (for me anyway). So if others will be doing the same, here's the gory details.
If not -- no need to read below this!

Gotchas / Bugs seen on semi-fresh install of RobotC 4.11:

BTW - I say "semi-fresh" because tho I uninstalled all RoboMatter products, I didn't purge the Windows Registry or delete all my previous programs (authored in v4.10). So consequently my license keys were already present, and maybe some other cruft (in the Registry).

Issue 1: After installing RobotC v4.11, I installed ChallengePack-v108 and accepted all defaults (esp: Program Maintenance setting of "Modify"):

Image

Though it successfully completes, this results in an bogus install that actually reports as v105 when you download a program to your virtual 'bot. To fix this you have to run the ChallengePack-v108 installer and be sure to select the "Repair" option on the Program Maintenance screen. That should give you the full set of v108 files.

Issue 2: For me, every time I run RobotC Graphical I have to go to the menus and change the settings from NXT to VX IQ, Virtual Worlds, and use Challenge Pack for VEX IQ:

These menu settings should be "sticky" across sessions:
Robot-> Platform Type-> VEX IQ
Robot-> Compiler Target-> Virtual Worlds
Window->Select Virtual World to Use->Challenge Pack for VEX IQ

Issue 3: Opening programs written by a previous version of RobotC will result in some strange function formatting that will need to be corrected before your program will compile without errors.

For example:

Image

This can be fixed by manually choosing the correct function options from the drop-down control on each affected function in your program - tedious, but it works. But note that if your pull-downs don't have the full set of parameters you need to check and reset your Robot-> Motors and Sensors Setup screen. I had to select the Standard Models VEX IQ Clawbot to get the Devices tab to populate correctly.

Image

There are probably other issues, but this post is long enough already ;)
Can't wait to get after the line following activities!

Cheers, Scott


Wed Aug 06, 2014 8:57 pm
Profile
Rookie

Joined: Thu Jun 19, 2014 9:25 pm
Posts: 34
Post Re: Repeated Decisions 4: Obstacle Detecting Until Red Line
I was finally able to get the forward until black line challenge to work with the new version of ROBOTC. My question is why does the line tracking robot work but the obstacle avoidance robot not work? They both have the colour sensor in port three.

_________________
www.disneymaingatecondo.com
@Oakwater2739


Sat Aug 16, 2014 9:43 am
Profile
Moderator
Moderator

Joined: Mon Oct 04, 2010 2:18 pm
Posts: 196
Post Re: Repeated Decisions 4: Obstacle Detecting Until Red Line
Hi Rick,

Can you clarify what you mean by the obstacle avoidance robot? Thanks,


Sun Aug 17, 2014 6:40 pm
Profile
Rookie

Joined: Thu Jun 19, 2014 9:25 pm
Posts: 34
Post Re: Repeated Decisions 4: Obstacle Detecting Until Red Line
In the curriculum challenge package, you have different robots to use. A line following one and an obstacle avoidance one. They both have the color sensor in port three and mounted on the front of the robot. The line following works with the line following robot but not if I pick the obstacle avoidance robot.

_________________
www.disneymaingatecondo.com
@Oakwater2739


Sun Aug 17, 2014 7:10 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Jun 11, 2014 9:59 am
Posts: 115
Post Re: Repeated Decisions 4: Obstacle Detecting Until Red Line
rseniuk,

The reason why the Obstacle Avoidance robot will not work in this challenge is because of where the light sensor is mounted on the robot. The line tracking robot has the light sensor pointed to the floor, while the obstacle avoidance robot has the light sensor mounted on the gripper; Therefore the light sensor on the obstacle avoidance robot will not be able to see the black line on the ground.

I hope this answered your question.

Thanks, Lee


Mon Aug 18, 2014 3:51 pm
Profile
Rookie

Joined: Thu Jun 19, 2014 9:25 pm
Posts: 34
Post Re: Repeated Decisions 4: Obstacle Detecting Until Red Line
Thanks Lee
That is what I thouoght but in the virtual robot it is hard to see exactly where the light sensor is located.

_________________
www.disneymaingatecondo.com
@Oakwater2739


Mon Aug 18, 2014 4:03 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 13 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.