View unanswered posts | View active topics It is currently Thu Jul 31, 2014 6:58 pm






Reply to topic  [ 15 posts ] 
Various issues with Operation Reset 
Author Message
Rookie

Joined: Thu Jul 19, 2012 11:14 am
Posts: 18
Post Various issues with Operation Reset
The simulator does not work reliably for me.
1) Running "C6 Lift Insertion Point" I found that the robot would not reset properly and failed to start because a variable I defined to hold the value of nMotorEncoder[rightMotor] would keep its value from a previous run
2) Very small differences in motor speed determine the direction of the robot. I found motor[rightMotor] = 25 motor[leftMotor] = 40 makes the robot veer markedly to the right as expected but with motor[rightMotor] = 30 motor[leftMotor] = 40 the robot steers slowly to the left, which is not correct at all. (this is in the tunnel - is the ground flat there?)

3) after several runs the energy cube in the tunnel just disappeared.

Separately, what sensors are on the default robot?

Thanks for your help.

Rob


Sun Dec 09, 2012 11:37 pm
Profile
Rookie

Joined: Thu Jul 19, 2012 11:14 am
Posts: 18
Post Re: Various issues with Operation Reset
.Ok cube disappeared because I captured it in a previous run.
.Sensors listed in the config section but where are they on the robot?
.Motor command does not work properly at all

Having to go back to the beginning all the time to try new code makes this very frustrating to use.


Mon Dec 10, 2012 12:34 am
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: Various issues with Operation Reset
Thanks for taking the time to post your feedback. Would you be willing to post your entire program, so I could try to reproduce what you're seeing?

Quote:
Running "C6 Lift Insertion Point" I found that the robot would not reset properly and failed to start because a variable I defined to hold the value of nMotorEncoder[rightMotor] would keep its value from a previous run


When you create the variable, do you initialize it to zero? For example "int variableX = 0;"

Quote:
Sensors listed in the config section but where are they on the robot?


Good point. We should definitely make note of this in some of our next release. Quick details:
- right encoder is in the back right wheel
- left encoder is in the back left wheel
- light sensor is under the front of the robot
- sonar sensor is pointing forward out of the front of the robot
- compass is in the top-center of the robot

Quote:
Having to go back to the beginning all the time to try new code makes this very frustrating to use.


Did you deliver the charge cube to the communication tower in zone 1 (the first zone your robot is placed in)? If so, if you click on the "DASHBOARD" button in the game, you can click on any of the orange hex spaces to choose a different starting point for the robot. This video might help to show what i mean: https://www.youtube.com/watch?v=Yre3WUA ... r_embedded

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Mon Dec 10, 2012 9:11 am
Profile
Site Admin
Site Admin
User avatar

Joined: Tue Oct 09, 2012 10:34 am
Posts: 192
Post Re: Various issues with Operation Reset
jbflot wrote:
Quote:
Having to go back to the beginning all the time to try new code makes this very frustrating to use.


Did you deliver the charge cube to the communication tower in zone 1 (the first zone your robot is placed in)? If so, if you click on the "DASHBOARD" button in the game, you can click on any of the orange hex spaces to choose a different starting point for the robot. This video might help to show what i mean: https://www.youtube.com/watch?v=Yre3WUA ... r_embedded


Also, note that you don't have to close the Operation Reset window in order to re-download your program. Just switch to the RobotC window (or minimize the Operation Reset window) and selected Compile and Download and your program will be updated. If you want to reset to your last selected startpoint, just hit the reset button (circle-arrow button on the lower left side of the screen);

_________________
Ryan Cahoon
CMU Robotics Academy
RVW Software Developer

Robot Potato Head; Virtual NXT


Mon Dec 10, 2012 2:46 pm
Profile
Rookie

Joined: Thu Jul 19, 2012 11:14 am
Posts: 18
Post Re: Various issues with Operation Reset
I am in Zone 2. I completed Zone 1 ok.

Yes, I set my nMotorEncoder variable to 0 each time. I am wondering though why Reset does not do this automatically and instead seems to keep variable values from a previous run.

In the tunnel, I was trying a simple approach of just steering straight. Motor control is so finicky though I am going to need to use the sonar sensor to keep away from the walls.

What is the approach at the end of the tunnel? How can I use the sensors to steer to the comm tower? The tower is not a light source so that will not work. Using compass seems ad hoc as does trying to steer it by trial and error motor values (which are not accurately implemented anyway).

I use Compile and Download and Reset to run changes. It is still frustrating, however , for the robot to start way back at the beginning of the track each time. It would be great if you could save current state at any point and start from there.

Thanks for your help.


Mon Dec 10, 2012 7:54 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: Various issues with Operation Reset
Quote:
Yes, I set my nMotorEncoder variable to 0 each time. I am wondering though why Reset does not do this automatically and instead seems to keep variable values from a previous run.


I just created a Global Variable "x" and stored the value of one of the encoders in it at the end of the run. When I reset or restart my code, the variable is cleared.

Quote:
What is the approach at the end of the tunnel?


It's meant to be up to the programmer. Have you found the map: http://www.robotvirtualworlds.com/files ... t_Full.pdf ? It should help you plan how you want to get to the Communication Tower.

Quote:
Using compass seems ad hoc as does trying to steer it by trial and error motor values (which are not accurately implemented anyway).


Again, if you could share code that shows exactly what you mean, I'd be happy to try it out. As it is, the motor control seems pretty good on both my laptop and desktop computers.

Quote:
It would be great if you could save current state at any point and start from there.


Thanks for clarifying. We considered this, but Operation Reset is really meant to be a programming game, and we really wanted to encourage programming that required a handful of sequential "robot behaviors" (move forward, turn right, line track, etc). If we implement something like a "save anywhere", it can easily be abused so that the game can be solved using lots of short programs that only use motor and wait commands.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Mon Dec 10, 2012 11:28 pm
Profile
Rookie

Joined: Thu Jul 19, 2012 11:14 am
Posts: 18
Post Re: Various issues with Operation Reset
Thanks for your help Jesse.
I seem to have had more luck switching over to Natural Language C and its functions - at least in terms of steering the robot straight.
I used moveStraightForTime(time,motorB,motorC) and managed to complete Sector 2.
(btw how do you set the motor speed for this command? motor(motor, speed) does not seem to work.)

Thanks for the link to the map. Lots of compass readings on it, so I am guessing the navigation will largely be dead reckoning. Without any signal from the comms towers detectable by the sensors , I don't see how else it can be done.


Tue Dec 11, 2012 7:57 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: Various issues with Operation Reset
Glad to hear that you're having more luck with Natural Language.

Quote:
btw how do you set the motor speed for this command? motor(motor, speed) does not seem to work.


One of the limitations of the Natural Language is that you only have access to a limited number of the parameters. That said, if you right click on one of the moveStraightForTime commands in your code, you can choose to "Go to Definition". It will show you all of the code that belongs to the function, and you can speed the motors up if you want.

Quote:
Thanks for the link to the map. Lots of compass readings on it, so I am guessing the navigation will largely be dead reckoning. Without any signal from the comms towers detectable by the sensors , I don't see how else it can be done.


We try to put a number of "landmarks" (walls, boost pads, orientation circles, lines, etc) in the world so that it could be solved using more than just dead reckoning, but I would agree that many solutions will end up using encoder based movements. You bring up a great point that we hadn't considered, which is making the comm tower a beacon of sorts. We have the technology to do that with an IR type sensor (check out our FTC level pack). I'll definitely put it on the drawing board... it may be too much to ask of beginner programmers, but I think advanced ones would enjoy the challenge.

Thanks again.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Tue Dec 11, 2012 11:48 pm
Profile
Rookie

Joined: Thu Jul 19, 2012 11:14 am
Posts: 18
Post Re: Various issues with Operation Reset
jbflot wrote:

We try to put a number of "landmarks" (walls, boost pads, orientation circles, lines, etc) in the world so that it could be solved using more than just dead reckoning, but I would agree that many solutions will end up using encoder based movements. You bring up a great point that we hadn't considered, which is making the comm tower a beacon of sorts. We have the technology to do that with an IR type sensor (check out our FTC level pack). I'll definitely put it on the drawing board... it may be too much to ask of beginner programmers, but I think advanced ones would enjoy the challenge.


Having the robot find its own way as much as possible by using only the information available to its sensors (rather than relying on global information such as known compass bearings and distances) is of course the interesting - and difficult - programming challenge.

What features of the environment are detectable? Walls can be handled with sonar and the touch sensor (would be better if there were 2).
How about boost pads, the elevation transporter, etc.? I think you would need a light sensor to detect these.


Wed Dec 12, 2012 9:05 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: Various issues with Operation Reset
Quote:
What features of the environment are detectable? Walls can be handled with sonar and the touch sensor (would be better if there were 2).
How about boost pads, the elevation transporter, etc.? I think you would need a light sensor to detect these.


Like you said, walls can be detected using the sonar sensor.

There is a light sensor on the bottom, which will allow you to use the Orientation Circles in the world you may have seen (they look like crosshairs in a circle), the line tracking courses, boost pads and elevators. Detecting the elevators and boost pads will be a little trickier since the ground around them varies in darkness/color, but it can be done. :)

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Mon Dec 17, 2012 11:04 am
Profile
Rookie

Joined: Thu Jul 19, 2012 11:14 am
Posts: 18
Post Re: Various issues with Operation Reset
jbflot wrote:
Like you said, walls can be detected using the sonar sensor.

There is a light sensor on the bottom, which will allow you to use the Orientation Circles in the world you may have seen (they look like crosshairs in a circle), the line tracking courses, boost pads and elevators. Detecting the elevators and boost pads will be a little trickier since the ground around them varies in darkness/color, but it can be done. :)


I'll give it a go.


The robot does not respond sometimes when low motor speed values are specified. What's the story there?


Tue Dec 18, 2012 1:46 am
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: Various issues with Operation Reset
Quote:
The robot does not respond sometimes when low motor speed values are specified. What's the story there?


Just like a real robot, the virtual robot has a mass and friction, and you have to provide enough power to the motors to overcome them.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Tue Dec 18, 2012 10:31 am
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: Various issues with Operation Reset
here's a diagram:

Image

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Fri Mar 01, 2013 2:35 pm
Profile
Rookie

Joined: Wed Nov 20, 2013 10:38 am
Posts: 1
Post Re: Various issues with Operation Reset
I have activated the Keyboard controls in Operation Reset. But can not find a way to control the gripper? How do I control the Gripper? :shock:


Wed Nov 20, 2013 10:48 am
Profile
Site Admin
Site Admin
User avatar

Joined: Tue Oct 09, 2012 10:34 am
Posts: 192
Post Re: Various issues with Operation Reset
Hi DR,
Use the [ and ] keys to control the gripper.

Best,
--Ryan

_________________
Ryan Cahoon
CMU Robotics Academy
RVW Software Developer

Robot Potato Head; Virtual NXT


Wed Nov 20, 2013 11:02 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 15 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.