Browse Search Popular Register Upload Rules User list Login:
Search:
Amazing Robot Arm - now with virtual framerate

Image:
screenshot of the scene

Author: pixartist

Group: Default

Filesize: 44.75 kB

Date added: 2010-01-22

Rating: 7.8

Downloads: 4095

Views: 1705

Comments: 11

Ratings: 12

Times favored: 1

Made with: Algodoo before v1.8.5

Tags:

Scene tag

I rewrote parts of the code, now the scripting features a "virtual framerate" for the movement commands! What does that mean? It works now at any FPS and any simulation speed since the code execution is synchronized to the hinge speed! Report any bugs here!

Please vote if you like this :coolgrin:

edit: fixed a bug that prevented boxes being pushed into their position
Last edited at 2010/01/23 11:21:42 by pixartist
Please log in to rate this scene
edit
Similar scenes
Title: Morgan's Flying Robot
Rating: 5
Filesize: 20 kB
Downloads: 469
Comments: 1
Ratings: 1
Date added: 2015/06/14 16:32:02
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: maze for contest
Rating: 5.625
Filesize: 5.37 kB
Downloads: 860
Comments: 0
Ratings: 2
Date added: 2009/06/14 10:19:31
Made with: Phun
Rating: rated 5.6
download
Title: spider robot epsoide 1
Rating: 5
Filesize: 210.54 kB
Downloads: 425
Comments: 0
Ratings: 1
Date added: 2014/01/01 16:50:04
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: S.D.K.R the robot
Rating: 5.5
Filesize: 8.58 kB
Downloads: 681
Comments: 3
Ratings: 2
Date added: 2012/11/26 07:33:07
Made with: Algodoo v2.0.1
Rating: rated 5.5
download
Title: virtual buddy
Rating: 4.5
Filesize: 1.86 MB
Downloads: 1618
Comments: 1
Ratings: 2
Date added: 2009/06/09 19:46:04
Made with: Phun
Rating: rated 4.5
download
Title: Box Fighting Robot (BFR) ver. 1.00
Rating: 5
Filesize: 424.39 kB
Downloads: 557
Comments: 0
Ratings: 1
Date added: 2014/12/15 01:23:39
Made with: Algodoo v2.1.0
Rating: rated 5
download
This scene is a response to:
Title Author Rating Downloads Comments Date added
Robot Arm Boxpacker pixartist 6.6 (5 votes) 1496 7 2010/01/22 14:59:03
show grid
if anyone cares, here's the main code in a readable format:
Programming:
Scene.my.robotMoves_0 = [30, 0, 1.6, 100, 0.79, 110, 0.76, 180, 0.76, 220, 1.06, 240, 0.96, 315, 0.96, 320, 1.0, 420, 0.6, 450, 0.59, 500, 0.58, 550, 0.75, 600, 0.8, 750, 0.7, 850, 0.7, 880, 0.79, 950, 0.78, 960, 0.76, 1100, 0.8, 1180, 0.8, 1200, 0.8, 1250, 0.864, 1380, 0.87, 1400, 1, 1500, 1.7, 1600, 1.6, 1700, 1.4, 1750, 1.3, 1800, 1.3, 1900, 1.5]
Scene.my.robotMoves_1 = [30, 0, 1.4, 100, 0.72, 110, 0.77, 180, 0.78, 220, 0.6, 250, 0.83, 320, 0.86, 350, 0.8, 430, 0.78, 500, 0.73, 550, 0.77, 600, 0.8, 630, 0.47, 700, 0.47, 750, 0.73, 850, 0.73, 900, 0.825, 920, 0.825, 960, 0.75, 1100, 0.7, 1200, 0.6, 1250, 0.87, 1380, 0.86, 1420, 0.6, 1500, 1.2, 1650, 1.7, 1750, 1.7, 1780, 1.7, 1840, 1.65, 1930, 1.7]

Scene.my.robotMoves_2 = [17, 0, 1, 250, 0.95, 270, 1.25, 320, 1.25, 350, 0.5, 600, 0.49, 750, 1.5, 880, 1.497, 950, 1.44, 1000, 1.4, 1100, 1.5, 1250, 1.405, 1300, 1.4, 1350, 1.5, 1500, 1.5, 1700, 1.6, 1720, 1.49]


Main code:

(e)=>{
Scene.my.timer = math.toInt((Sim.time-Scene.my.timersub) * 45);
Scene.my.frame(180) == 1 ? {Scene.my.grabber = 0.4} : {};
Scene.my.frame(300) == 1 ? {Scene.my.grabber = 0.15} : {};
Scene.my.frame(490) == 1 ? {Scene.my.grabber = 0.5} : {};
Scene.my.frame(920) == 1 ? {Scene.my.grabber = 0.15} : {};
Scene.my.frame(950) == 1 ? {Scene.my.lidcloser = 1.5} : {};
Scene.my.frame(1380) == 1 ? {Scene.my.grabber = 0.5} : {};
Scene.my.frame(1700) == 1 ? {
Scene.my.grabber = 0.15;
Scene.my.boxpusher = 1.5;
Scene.my.lidpusher = 1.5;
Scene.my.ballsupply = 0.2
} : {};
Scene.my.frame(2000) == 1 ? {
Scene.my.timer = 0;
Scene.my.step_0 = 0;
Scene.my.step_1 = 0;
Scene.my.step_2 = 0;
Scene.my.timersub = Sim.time;
} : {};
Scene.my.prevtimer = scene.my.timer;
Scene.my.step_0 < (Scene.my.robotMoves_0(0) - 1) ? {
scene.my.current_0 = scene.my.robotMoves_0((scene.my.step_0 * 2) + 2);
scene.my.next_0 = scene.my.robotMoves_0((scene.my.step_0 + 1) * 2 + 2);
scene.my.current_0_t = scene.my.robotMoves_0((scene.my.step_0 * 2) + 1);
scene.my.next_0_t = scene.my.robotMoves_0((scene.my.step_0 + 1) * 2 + 1);
Scene.my.phase_0 = (math.toFloat(Scene.my.timer - scene.my.current_0_t) / math.toFloat(scene.my.next_0_t - scene.my.current_0_t));
Scene.my.angle_0_target = (((1 - Scene.my.phase_0) * scene.my.current_0) + (Scene.my.phase_0 * scene.my.next_0)) * ( - math.pi);
Scene.my.timer > scene.my.robotMoves_0(((scene.my.step_0 + 1) * 2) + 1) ? {
Scene.my.step_0 = Scene.my.step_0 + 1
} : {}
} : {
scene.my.robotMoves_0(2)
};
Scene.my.step_1 < (Scene.my.robotMoves_1(0) - 1) ? {
scene.my.current_1 = scene.my.robotMoves_1((scene.my.step_1 * 2) + 2);
scene.my.next_1 = scene.my.robotMoves_1((scene.my.step_1 + 1) * 2 + 2);
scene.my.current_1_t = scene.my.robotMoves_1((scene.my.step_1 * 2) + 1);
scene.my.next_1_t = scene.my.robotMoves_1((scene.my.step_1 + 1) * 2 + 1);
Scene.my.phase_1 = (math.toFloat(Scene.my.timer - scene.my.current_1_t) / math.toFloat(scene.my.next_1_t - scene.my.current_1_t));
Scene.my.angle_1_target = (((1 - Scene.my.phase_1) * scene.my.current_1) + (Scene.my.phase_1 * scene.my.next_1)) * ( - math.pi);
Scene.my.timer > scene.my.robotMoves_1(((scene.my.step_1 + 1) * 2) + 1) ? {
Scene.my.step_1 = Scene.my.step_1 + 1} : {}
} : {
scene.my.robotMoves_1(2)
};
Scene.my.step_2 < (Scene.my.robotMoves_2(0) - 1) ? {
scene.my.current_2 = scene.my.robotMoves_2((scene.my.step_2 * 2) + 2);
scene.my.next_2 = scene.my.robotMoves_2((scene.my.step_2 + 1) * 2 + 2);
scene.my.current_2_t = scene.my.robotMoves_2((scene.my.step_2 * 2) + 1);
scene.my.next_2_t = scene.my.robotMoves_2((scene.my.step_2 + 1) * 2 + 1);
Scene.my.phase_2 = (math.toFloat(Scene.my.timer - scene.my.current_2_t) / math.toFloat(scene.my.next_2_t - scene.my.current_2_t));
Scene.my.angle_2_target = (((1 - Scene.my.phase_2) * scene.my.current_2) + (Scene.my.phase_2 * scene.my.next_2)) * ( - math.pi);
Scene.my.timer > scene.my.robotMoves_2(((scene.my.step_2 + 1) * 2) + 1) ? {
Scene.my.step_2 = Scene.my.step_2 + 1} : {}
} : {
scene.my.robotMoves_2(2)
}
}
Last edited at 2010/01/22 19:25:34 by pixartist
awesome but only the first box works.. 10*
works perfectly for me 10/10
LShome .. what? Oo
what happens after the 1. box ?
Last edited at 2010/01/22 20:15:28 by pixartist
ah , works perfectly now , must off been a hell of a job to write all the coding:D

10/10 for all the hard work
doesn't work perfect when it is supposed to get the "lid" on it slightly lower than it should be but 8/10 for the code:tup:
it works 100% perfect 100% of the time for, wtf is going on ? are you sure you didn't modify the phun settings ? (e.g. frequency)
Eu nunca vi nada assim! Muito bom! 10 / 10!
 : lol:: tup:: tup:
quite simply amazing _o_ _o_

OMG
Wow!!! Good work! i will get 10/10!