View unanswered posts | View active topics It is currently Fri Oct 23, 2020 1:45 am

 Page 1 of 2 [ 16 posts ] Go to page 1, 2  Next
 Print view Previous topic | Next topic
Gripper Control Challenge
Author Message
Rookie

Joined: Mon Jun 16, 2014 10:54 pm
Posts: 1
Gripper Control Challenge
 Code:forward(0.08,seconds, 50);moveMotor(motor10; 315, degrees, 50);moveMotor(motor10; -315, degree, 50);moveMotor(motor11; 0.03, rotations, 50);moveMotor(motor10; 315, degrees, 50);

After closing the gripper, the next line is never executed.

Does anyknow why?
I tried to set "0.028" rotations to motor 11, and yes the last line was executed. However, the box wasn't completely grabbed if I used 0.028

Tue Jun 17, 2014 5:03 pm
Moderator

Joined: Mon Oct 04, 2010 2:18 pm
Posts: 196
Re: Gripper Control Challenge
Great Question. Use time instead of degrees or rotations to close the gripper on the object. That should take care of the problem for you.

Wed Jun 18, 2014 2:36 pm

Joined: Thu May 24, 2012 12:15 pm
Posts: 722
Re: Gripper Control Challenge
vtran40 wrote:
 Code:forward(0.08,seconds, 50);moveMotor(motor10; 315, degrees, 50);moveMotor(motor10; -315, degree, 50);moveMotor(motor11; 0.03, rotations, 50);moveMotor(motor10; 315, degrees, 50);

Something else to note; you want to make sure you are using commas after your motor port assignments, not semi-colons. Commas are used to separate parameters, while semi-colons designate the end of a function or command.

 Code:forward(0.08,seconds, 50);moveMotor(motor10, 315, degrees, 50);moveMotor(motor10, -315, degree, 50);moveMotor(motor11, 0.03, rotations, 50);moveMotor(motor10, 315, degrees, 50);

If you're using Graphical Natural Language, this will be done for you automatically but it is a good thing to keep in mind regardless.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our updated help documentation and the ROBOTC Forums.

Wed Jun 18, 2014 3:44 pm
Rookie

Joined: Thu Jul 03, 2014 1:33 pm
Posts: 23
Re: Gripper Control Challenge
This may be a stupid question, but are all the challenges trial and error? Was any information provided on how to control the gripper - degrees, rotations, etc..., or do we just play around with things until we discover a solution.....

Thu Jul 17, 2014 12:05 pm
Rookie

Joined: Thu Jul 03, 2014 1:33 pm
Posts: 23
Re: Gripper Control Challenge
Does anyone know why the command to close the gripper will not execute?

Using graphical language:

Forward 3.5 rotations, 50 (moves him to the object)
movemotor - port10 - -315, 50 (lowers arm)
movemoter - port 11 - 10 or 100 ms, 50 (should close gripper, does nothing)

If I comment out the first two, and then execute, it closes gripper and gives success message...

Thu Jul 17, 2014 12:14 pm

Joined: Thu May 24, 2012 12:15 pm
Posts: 722
Re: Gripper Control Challenge
Without seeing the full execution of the code in real time, my guess would be that the arm is hitting the ground (and stopping its movement) before the -315 encoder counts are reached. The program flow gets stuck in the 'moveMotor' command as a result, and never moves on to the next line of code. Try lowering the value to -180 and see if that works, then tweak the value until it both lowers the arm and opens the claw consistently.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our updated help documentation and the ROBOTC Forums.

Thu Jul 17, 2014 12:47 pm
Rookie

Joined: Thu Jul 03, 2014 1:33 pm
Posts: 23
Re: Gripper Control Challenge
Thanks John, I will try that. Are there instructions on how to control the gripper arm somewhere? Should you do degrees, rotations, time, etc..., to comtrol the gripper?

Thu Jul 17, 2014 1:40 pm
Moderator

Joined: Mon Oct 04, 2010 2:18 pm
Posts: 196
Re: Gripper Control Challenge
Gripper motor is in port 11. You can use the moveMotor command block to operate the gripper. As I mentioned, I would use time to operate the motor.

Thanks,

Thu Jul 17, 2014 2:12 pm
Rookie

Joined: Thu Jul 03, 2014 1:33 pm
Posts: 23
Re: Gripper Control Challenge
Thanks parkway, but one other question - using time works better for sure, but how do you open the gripper to release an object? Does the motor move the opposite way on the second command with time?

Thu Jul 17, 2014 6:30 pm
Rookie

Joined: Thu Jul 03, 2014 1:33 pm
Posts: 23
Re: Gripper Control Challenge
Parkway,

How do we copy and paste snippet of code in this forum? copy/paste not working.......and I see you copied a command below.

Thanks.....

Thu Jul 17, 2014 6:37 pm
Moderator

Joined: Mon Oct 04, 2010 2:18 pm
Posts: 196
Re: Gripper Control Challenge
That is just a screenshot. That's what I used to post the code snippets.

Thu Jul 17, 2014 8:42 pm
Rookie

Joined: Thu Jul 03, 2014 1:33 pm
Posts: 23
Re: Gripper Control Challenge
I have tried printscreen and the windows snippet tool, but it will not let me paste a screenshot in this box....not sure why....

Thu Jul 17, 2014 9:12 pm
Moderator

Joined: Mon Oct 04, 2010 2:18 pm
Posts: 196
Re: Gripper Control Challenge
I use ShareX, which is a free download, to capture what I want on the screen. When the capture occurs, you are given a URL. I put the URL between the Img tags, and the code appears. Try using it.

Thu Jul 17, 2014 10:19 pm
Rookie

Joined: Thu Jul 03, 2014 1:33 pm
Posts: 23
Re: Gripper Control Challenge
Thanks, will do....

Thu Jul 17, 2014 10:24 pm
Rookie

Joined: Thu Mar 13, 2014 8:22 am
Posts: 10
Re: Gripper Control Challenge
And to answer your other question, set the motor speed to a negative value to move the gripper the other direction.

This code will move the gripper closed and then open.

Fri Jul 18, 2014 9:29 am
Display posts from previous:  Sort by
 Page 1 of 2 [ 16 posts ] Go to page 1, 2  Next

#### Who is online

Users browsing this forum: No registered users and 2 guests

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

Search for:
 Jump to:  Select a forum ------------------ ROBOTC Applications    ROBOTC for LEGO MINDSTORMS       Third-party sensors    ROBOTC for CORTEX & PIC    ROBOTC for VEX IQ    ROBOTC for Arduino    Robot Virtual Worlds    Multi-Robot Communications    Issues and Bugs Competitions & Partners    Mini Urban Challenge    CS2N Robot Virtual Worlds Competitions       VEX Skyrise Competition 2014-2015       VEX Toss Up 2013-2014       FTC Block Party! 2013-2014    Competitions using VEX - BEST, TSA, VEX, and RoboFest!    FTC Programming    RoboCup Junior and Other ROBOT Competitions Virtual Brick Robotics Discussions    General Discussions    Project Discussions Off-Topic ROBOTC Forum & ROBOTC.net Suggestions/Feedback    ROBOTC Forums Suggestions/Comments    ROBOTC.net Suggestions/Comments       NXT Programming: Tips for Beginning with ROBOTC       VEX Programming: Tips for Beginning with ROBOTC    2013 Robotics Summer Of Learning       VEX Toss Up Programming Challenge       FTC Ring It Up! Programming Challenge    International Forums       Spanish Forums          ROBOTC for MINDSTORMS          ROBOTC for VEX       French Forums          ROBOTC pour Mindstorms          ROBOTC pour IFI VEX       Japanese Forums （日本語のフォーラム）       German Forums    2015 Spring Carnival Event    PLTW (Project Lead The Way)    Robotics Merit Badge    2014 Robotics Academy Summer of Learning