View unanswered posts | View active topics It is currently Sat Nov 22, 2014 10:14 pm






Reply to topic  [ 3 posts ] 
RobotC V3.60 & RVW 3.00 Bugs 
Author Message
Rookie

Joined: Wed Sep 18, 2013 4:25 pm
Posts: 1
Post RobotC V3.60 & RVW 3.00 Bugs
OS: Windows 7 64-bit w/32GB RAM
RobotC: Version 3.62
RVW: Version 3.00
Robots: LEGO REMBot, REMBot (w/Touch), TETRIX Mantis, TEXTRIX Ranger, Buggy Bot, Mammal Bot

To whom it may concern,

I am trying to finish my certifications, but I am experiencing some problems which appear to be with your software and/or Robot Virtual Worlds. I sent a message to Technical Support, but I have yet to hear back from anyone. It has been several days now, so I figured I'd post here in hopes someone else might have an answer for me.

SCENARIO #1
===========
Just a simple movement test using the examples provided in the documentation. I have tried with all of my included robots (see above) and none of them work.

Expected Output: The bot moves forward for the distance of 1 revolution of it's wheel.

Actual Output: The robot sits there and nothing happens (nMotorRunState is always runStateIdle).


Code:
// Define these so it's easy to change robots
#define LEFT_MOTOR      motorC
#define RIGHT_MOTOR      motorB

task main()
{
   nMotorEncoder[LEFT_MOTOR ] = 0;
   nMotorEncoder[RIGHT_MOTOR] = 0;

   nMotorEncoderTarget[LEFT_MOTOR ] = 360;
   nMotorEncoderTarget[RIGHT_MOTOR] = 360;

   motor[LEFT_MOTOR ] = 75;
   motor[RIGHT_MOTOR] = 75;

   while (nMotorRunState[LEFT_MOTOR] != runStateIdle || nMotorRunState[RIGHT_MOTOR] != runStateIdle)
   { /* Do nothing while we wait to reach our destination */ }

   motor[LEFT_MOTOR ] = 0;
   motor[RIGHT_MOTOR] = 0;
}



SCENARIO #2
===========
Frustrated that wasn't working, I tried replacing the while loop with a simple wait1Msec(30000) statement.

Expected Output: The robot moves forward the distance of 1 revolution of it's wheel.

Actual Output: The robot keeps moving forward for 30 seconds (or until it falls off)


SCENARIO #3
===========
So, out of frustration - I modified the while loop in the above example as follows. I tried this with several different robots as well and got very different results with the TETRIX robots.

Expected Output: The robot moves forward the distance of 1 revolution of it's wheel.
LEGO REMBot - Wheel radius of 2.8cm should travel 17.5929cm
TETRIX Mantis - Wheel radius of 3.5cm should travel 21.9911cm
TETRIX Ranger - Wheel radius of 3.5cm should travel 21.9911cm
Buggy Bot - Wheel radius of 3.0cm should travel 18.8495cm
Mammal Bot - Wheel radius of 3.7cm should travel 23.2477cm

Actual Output:
LEGO REMBot - Wheel radius of 2.8cm actually traveled ~17cm (Good!)
TETRIX Mantis - Wheel radius of 3.5cm actually traveled ~5cm??
TETRIX Ranger - Wheel radius of 3.5cm actually traveled ~6cm??
Buggy Bot - Wheel radius of 3.0cm actually traveled ~18cm (Good!)
Mammal Bot - Wheel radius of 3.7cm actually traveled ~23cm (Good!)


Code:
   while (nMotorEncoder[LEFT_MOTOR] < 360 && nMotorEncoder[RIGHT_MOTOR] < 360)
   { /* Do nothing until our wheel encoders show our destination */ }


And I know the above code isn't correct, it doesn't account for wheel variances, etc. I was just looking to make something happen.


SCENARIO #4
===========
Working on the obstacle course, I've tried a couple different robots. I am able to make it all the way thru the course using the REMBot (the only bot I have that has Touch), I even get the congratulations! But I never get any of the achievements... Not the forward until touch, not the back up, line tracking, etc. Not even the obstacle course completion (even though it says Congratulations! You've completed this!).


SCENARIO #5
===========
There are some challenges that require you to use the sonar of the robot to detect walls, etc. I was having issues with the sonar either not working at all (constantly reporting -1) or working for the first few seconds, and then reporting -1. I have even tried just ignoring it when it's -1 and only using the value when it's a positive
number, but many times it never becomes postive. Using the robot Mantis on the field Sensing->Obstacle Course with the following code:

Expected Output: The robot moves forward until it gets near the box, and then stops.

Actual Output: The robot just sits there because the sonar sensor is -1.


Code:
task main()
{
   motor[motorC] = 25;
   motor[motorB] = 25;
   
   while(SensorValue[sonar] > 25)
   { /* Do nothing until we get close to the wall */ }

   motor[motorC] = 0;
   motor[motorB] = 0;
}


Wed Sep 18, 2013 4:52 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Tue Oct 09, 2012 10:34 am
Posts: 192
Post Re: RobotC V3.60 & RVW 3.00 Bugs
Hi oeginc,
I'm sorry this has caused so much frustration. Let me see if I can help elucidate some of these situations:

Scenario #1 and #2:
RVW doesn't support nMotorEncoderTarget moves.
So in scenario 1, I suspect the motors are staying in the IDLE state, so the while loop immediate exits, the motors are set to off, and the program ends.
In scenario 2, the RVW firmware won't stop the motors due to encoder counts, so the motors continue moving for the entire 30 second wait.

Scenario #3:
The actual hardware TETRIX encoders have 4x the ticks per revolution that the NXT and VEX encoders do, and we match this in the RVW. This is why you're seeing 1/4 the anticipated movement from the TETRIX robots.

Scenario #4:
I've confirmed this issue and submitted a fix. There should be fixed version available for download by tomorrow, if not earlier.

Scenario #5:
A value of -1 means the sonar sensor isn't detecting any objects. See here for more information.
If you press the bottom-right button on the in-game interface (looks like a camera with waves coming from it), you can see what the sonar sensor is sensing. Does this give any more information about why it's not working for you?

Best,
--Ryan

_________________
Ryan Cahoon
CMU Robotics Academy
RVW Software Developer

Robot Potato Head; Virtual NXT


Thu Sep 19, 2013 12:13 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 406
Post Re: RobotC V3.60 & RVW 3.00 Bugs
The issue should be fixed in this version of the software: http://www.robotc.net/files/RVWLevelPac ... les301.exe

Thanks!

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Thu Sep 19, 2013 2:36 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 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.