logobot simulator

0 views
Skip to first unread message

Damian Axford

unread,
Jul 23, 2015, 12:48:13 PM7/23/15
to swindon-hackspace
got distracted for a bit...  started making an in-browser simulator for Logobot, that uses the same command syntax as the real Logobot.  Got a basic scene going, with position info, mouse controls and animation loop:


The objective is to have a sensible framework for demonstrating/testing the more complex commands without needing a physical robot on hand.  Javascript being fairly easy to port to Arduino/C.


Might go nowhere, might turn out to be useful... who knows :)




Damian Axford

unread,
Jul 23, 2015, 3:53:42 PM7/23/15
to swindon-hackspace, dam...@axford.me.uk, dam...@axford.me.uk
made it load the STLs from the proper bot ... hehe :)


Robert Longbottom

unread,
Jul 23, 2015, 3:54:55 PM7/23/15
to swindon-...@googlegroups.com
Cute :-)


On 23/07/2015 20:53, Damian Axford wrote:
made it load the STLs from the proper bot ... hehe :)


--
You received this message because you are subscribed to the Google Groups "swindon-hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swindon-hacksp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jamie Osborne

unread,
Jul 23, 2015, 3:56:06 PM7/23/15
to swindon-...@googlegroups.com
Looks awesome!

Jamie

On 23 Jul 2015, at 20:53, Damian Axford <dam...@axford.me.uk> wrote:

made it load the STLs from the proper bot ... hehe :)


Damian Axford

unread,
Jul 24, 2015, 5:39:46 AM7/24/15
to swindon-hackspace, jme...@me.com, jme...@me.com
Got a bit further with the simulator last night...  
  • Supports the drive/turn and driveTo commands
  • Simulates wheel and bot movement accurately
  • Has early support for velocity/acceleration
  • Command queue, same as the firmware
  • If you click on the ground, it'll use driveTo to turn and drive to that location



Damian Axford

unread,
Jul 24, 2015, 7:30:23 AM7/24/15
to swindon-hackspace, dam...@axford.me.uk, jme...@me.com, dam...@axford.me.uk
now support pen up/down (with basic servo model) and draws!!  ...using a low res texture map (1 pixel = 1mm2)


Robert Longbottom

unread,
Jul 24, 2015, 7:38:08 AM7/24/15
to swindon-...@googlegroups.com

Nice, when is the first code release?

And my real one is still better ;-). It's too easy in the perfect world of simulators.

On 24 July 2015 12:30:25 Damian Axford <dam...@axford.me.uk> wrote:

now support pen up/down (with basic servo model) and draws!!  ...using a low res texture map (1 pixel = 1mm2)


Damian Axford

unread,
Jul 24, 2015, 11:02:44 AM7/24/15
to swindon-hackspace, Robe...@iname.com, Robe...@iname.com

Robert Longbottom

unread,
Jul 24, 2015, 11:19:14 AM7/24/15
to swindon-...@googlegroups.com

Very nice.  But what does the waddle button do???

On 24 July 2015 16:02:46 Damian Axford <dam...@axford.me.uk> wrote:

Damian Axford

unread,
Jul 24, 2015, 11:24:41 AM7/24/15
to swindon-hackspace, Robe...@iname.com, Robe...@iname.com
makes it waddle :)  just generates random target rotations for each wheel...  very useful for validating that the physical simulation is working properly.

Damian Axford

unread,
Jul 24, 2015, 1:07:20 PM7/24/15
to swindon-hackspace, dam...@axford.me.uk, Robe...@iname.com, dam...@axford.me.uk
committed the simulator....   and it seems to work just fine via rawgithub:


Robert Longbottom

unread,
Jul 24, 2015, 1:16:16 PM7/24/15
to swindon-...@googlegroups.com
Very nice, I will have a look at the code later. 

I think (can't quite tell from random clicking on the screen) you need to implement an improvement I've just committed to the firmware to pick the shortest angle when doing turns in driveTo().  See the commit with comment "Optimise turn to take the shortest angle"


On 24/07/2015 18:07, Damian Axford wrote:
committed the simulator....   and it seems to work just fine via rawgithub:


Damian Axford

unread,
Jul 24, 2015, 1:40:23 PM7/24/15
to swindon-hackspace, Robe...@iname.com, Robe...@iname.com
yes, i've been meaning to do that - at least now I can copy your code :)

just committed an update that supports an arcTo function.  now it's validated in the simulator, I'll look at porting the logic into the firmware.

Damian Axford

unread,
Jul 24, 2015, 4:12:11 PM7/24/15
to swindon-hackspace, dam...@axford.me.uk, Robe...@iname.com, dam...@axford.me.uk
simulator enhancement.... better pen simulation, now with anti-aliasing :)


Damian Axford

unread,
Jul 24, 2015, 4:45:13 PM7/24/15
to swindon-hackspace, dam...@axford.me.uk, Robe...@iname.com, dam...@axford.me.uk
and text support...


Robert Longbottom

unread,
Jul 24, 2015, 5:15:01 PM7/24/15
to swindon-...@googlegroups.com
Very smart.  The raw github link works for me, but when I open the local html file in Chrome it doesn't load the .stl files so I just get a solid base and wheels.  Some error about cross origin request not allowed.  Everything works though, it just doesn't look pretty.

On 24/07/2015 21:45, Damian Axford wrote:
and text support...


Damian Axford

unread,
Jul 24, 2015, 6:32:12 PM7/24/15
to swindon-hackspace, Robe...@iname.com
Ta.. And yeah, it needs to be accessed via a web server to avoid the cross origin crud. Stupid security, we should all just leave free with the viruses like some tech hippee utopia

Damian Axford

unread,
Jul 24, 2015, 7:42:52 PM7/24/15
to swindon-hackspace, dam...@axford.me.uk, Robe...@iname.com, dam...@axford.me.uk
...with curvy letters, using the ARC command:


Reply all
Reply to author
Forward
0 new messages