View unanswered posts | View active topics It is currently Sun Oct 26, 2014 5:29 am






Reply to topic  [ 10 posts ] 
Bug in the Line tracker command 
Author Message
Rookie
User avatar

Joined: Sat May 12, 2012 7:07 am
Posts: 18
Location: Bangalore
Post Bug in the Line tracker command
Hi,
I was trying to solve "Obstacle_course" challenge in "Learning RobotC Tables" virtual worlds.
But I am unable to get the "RemBot" to track the black line which is the 3rd task in this challenge.

Following is the code written by me:
#pragma config(Sensor, S1, touchSensor, sensorTouch)
#pragma config(Sensor, S2, compassSensor, sensorVirtualCompass)
#pragma config(Sensor, S3, lightSensor, sensorLightActive)
#pragma config(Sensor, S4, sonarSensor, sensorSONAR)
#pragma config(Motor, motorA, gripperMotor, tmotorNormal, PIDControl, encoder)
#pragma config(Motor, motorB, rightMotor, tmotorNormal, PIDControl, encoder)
#pragma config(Motor, motorC, leftMotor, tmotorNormal, PIDControl, encoder)
//*!!Code automatically generated by \'ROBOTC\' configuration wizard !!*//

// This is for the NXT model, not TETRIX

/**********************************
**\\
|* ROBOTC Virtual World
*|
|*
*|
|* DO NOT OVERWRITE THIS FILE
*|
|* MAKE SURE TO \"SAVE AS\" INSTEAD
*|
\\**********************************
**/

task main()
{
forward(100);
untilTouch(S1);
stop();
wait(0.5);
pointTurn(left);
wait(0.54);
stop();
wait(0.5);
forward(100);
untilDark(15, S3);
lineTrackForRotations(35, 63, S3);
}

*********************************
Is it a problem with the threshold
value or is it a BUG? Kindly help.
Regards

_________________
Visit us: http://www.li2.in


Wed May 16, 2012 2:55 am
Profile WWW
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 405
Post Re: Bug in the Line tracker command
For testing out thresholds, we introduced the "Line Utility" table. Try calculating your threshold and testing out your line tracking behavior by itself, there.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Thu May 17, 2012 3:27 pm
Profile
Rookie
User avatar

Joined: Sat May 12, 2012 7:07 am
Posts: 18
Location: Bangalore
Post Re: Bug in the Line tracker command
Thanks for the reply jbflot. But the robot tracks the line like a beauty in "Line Utility" table and other tables too except in this "Obstacle Course".
The following images can give a better insight to the problem.
Attachment:
Until bump.jpg
Until bump.jpg [ 114.79 KiB | Viewed 5295 times ]

Attachment:
Line_track started.jpg
Line_track started.jpg [ 115.46 KiB | Viewed 5295 times ]

Attachment:
out of track.jpg
out of track.jpg [ 109.5 KiB | Viewed 5295 times ]


So this last image shows the robot getting out of the track!
The threshold values are correct, but I sense there is a bug in this Table exactly at that point.

_________________
Visit us: http://www.li2.in


Tue May 22, 2012 1:59 am
Profile WWW
Rookie

Joined: Sat Feb 12, 2011 6:17 pm
Posts: 12
Post Re: Bug in the Line tracker command
Hi,
Li2 Innovations wrote:
{
forward(100);
untilTouch(S1);
stop();
wait(0.5);
pointTurn(left);
wait(0.54);
stop();
wait(0.5);
forward(100);
untilDark(15, S3);
lineTrackForRotations(35, 63, S3);
}

Is it mandatory for you to use Natural Language in ROBOTC?

--
Alex Kolotov


Thu May 24, 2012 6:21 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3227
Location: Rotterdam, The Netherlands
Post Re: Bug in the Line tracker command
Koal,

I am sure there are reasons for the use of NL. I am not sure adding the full ROBOTC language to the mix is a good idea at this point. This stuff should work :)

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri May 25, 2012 12:19 am
Profile WWW
Rookie

Joined: Sat Feb 12, 2011 6:17 pm
Posts: 12
Post Re: Bug in the Line tracker command
Xander,

May be I said wrong. I would like to understand what was the reason to use NL. I see that it could be an educational reasons because NL is easier to teach. But if teaching of RobotC is not aim but they need to just learn robotics in RVW - other languages could be concerned.

Yesterday I spent some time to go through this challange by using nxc4rvw, so, probably they can use it also :)

--
Alex Kolotov


Fri May 25, 2012 1:09 am
Profile
Site Admin
Site Admin

Joined: Thu Jul 05, 2007 12:45 pm
Posts: 35
Location: Carnegie Mellon
Post Re: Bug in the Line tracker command
Natural Language was requested by middle school teachers. They thought that if kids had to learn how to navigate the IDE plus learn the code that it would be overwhelming.

We believe that NL provides a good first step, but also believe that kids need to transitioned out of it very early because it can lead to problems with their code quickly.

From what I've seen kids pick up programming pretty quickly.

Robin


Fri May 25, 2012 5:05 pm
Profile WWW
Rookie
User avatar

Joined: Sat May 12, 2012 7:07 am
Posts: 18
Location: Bangalore
Post Re: Bug in the Line tracker command
Robin Shoop is right. That's exactly why we want to use NL. Otherwise the Robot tracks the line completely when written in RobotC language.

_________________
Visit us: http://www.li2.in


Tue May 29, 2012 6:43 am
Profile WWW
Rookie

Joined: Sat Feb 12, 2011 6:17 pm
Posts: 12
Post Re: Bug in the Line tracker command
Li2 Innovations wrote:
Robin Shoop is right. That's exactly why we want to use NL. Otherwise the Robot tracks the line completely when written in RobotC language.

It is out of the main topic but anyway...
Let's look on another sort of NL:
Code:
RotateMotor(OUT_BC, 100, 720);

Code:
OnFwd(OUT_A, 50);
OnRev(OUT_B, 60);

Code:
until(SENSOR_1 == 1);

etc.

How difficult will it be to learn? For me, it is similar to RobotC NL.


Tue May 29, 2012 8:04 am
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 405
Post Re: Bug in the Line tracker command
In my experience, once you learn how to program well in one language, learning subsequent ones tends to go much faster. My guess is that you'd be able to pick up languages, like the one you're sharing.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Thu Jan 31, 2013 9:51 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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.