The Geek Forum

  • April 28, 2024, 12:07:19 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Due to the prolific nature of these forums, poster aggression is advised.

*

Recent Forum Posts

Shout Box

Members
Stats
  • Total Posts: 129555
  • Total Topics: 7152
  • Online Today: 189
  • Online Ever: 1013
  • (January 12, 2023, 01:18:11 AM)

Author Topic: Path finding - Lego Mindstorms & Java  (Read 6724 times)

juanma101285

  • Annoying Newbie
  • *
  • Coolio Points: +0/-4
  • Offline Offline
  • Posts: 1
    • View Profile
Path finding - Lego Mindstorms & Java
« on: March 12, 2009, 02:41:23 PM »

I have this group project for which we have to make a program so our robot, a Lego Mindstorms car, can complete a whole lap in a race. We first have 3 practice laps, which I am using to introduce the coordinates of the track and the edges of the track into a hash map (the track has a darker colour so the two light sensors the robot has can detect it). I have heard that I can use some algorithms such as breadth-first search/Dijkstra for path planning (I'd really appreciate it if you could tell me about some others), but I am having some problems because as it is a circuit, the robot will start in coordinates (500, 500), and the possible finish points have to be in (SOMETHING, 500). So, if I used that algorithm it wouldn't go around the circuit, but just straight to the point.  :| What could I do so it does not turn straight to one of the finish points? Thanks a lot!  :-)
Logged

xolik

  • King of the Geekery
  • Hacker
  • ****
  • Coolio Points: +541/-25
  • Offline Offline
  • Gender: Male
  • Posts: 5176
  • HAY GUYS
    • View Profile
Re: Path finding - Lego Mindstorms & Java
« Reply #1 on: March 12, 2009, 02:44:40 PM »

I'm sorry, who are you again?
Logged
Barium: What you do if CPR fails.

=-=-=-=-=-=-=-=-=-=-=
[The Fade^C Compound]
-=-=-=-=-=-=-=-=-=-=-

Probie

  • Professional Blogger
  • ***
  • Coolio Points: +223/-5
  • Offline Offline
  • Posts: 644
  • The natural nap catalyst
    • View Profile
    • SoggyBlog
Re: Path finding - Lego Mindstorms & Java
« Reply #2 on: March 12, 2009, 02:48:44 PM »

I'm sorry, who are you again?

third princes of neptune
Logged
// ------- Probie ------- //
// ----------------------- //
// --- T3H GEEKERY --- //
// ----------------------- //
www.niccisixx.com - I can put this here, because I'm awesome.

HeavyJay

  • Hacker
  • ****
  • Coolio Points: +72/-1
  • Offline Offline
  • Posts: 1500
  • Gorn Tamer
    • View Profile
Re: Path finding - Lego Mindstorms & Java
« Reply #3 on: March 12, 2009, 02:48:59 PM »

BLAH BLAH BLAH HELP ME BLAH BLAH BLAH NO, I DIDN'T MAKE AN INTRO POST, FUCK THAT BLAH BLAH  What could I do so it does not turn straight to one of the finish points? Thanks a lot!  :-)

If you could just go ahead and die of ebola, that would be greeeeeat.

Thanks a lot! :-)
Logged
"Don't just eat that hamburger, eat the HELL out of it!" -- JR "Bob" Dobbs

xolik

  • King of the Geekery
  • Hacker
  • ****
  • Coolio Points: +541/-25
  • Offline Offline
  • Gender: Male
  • Posts: 5176
  • HAY GUYS
    • View Profile
Re: Path finding - Lego Mindstorms & Java
« Reply #4 on: March 12, 2009, 02:56:19 PM »

Logged
Barium: What you do if CPR fails.

=-=-=-=-=-=-=-=-=-=-=
[The Fade^C Compound]
-=-=-=-=-=-=-=-=-=-=-

ivan

  • Forum Moderator
  • Hacker
  • *
  • Coolio Points: +499/-50
  • Offline Offline
  • Posts: 4929
  • Not a Mod, nor a Rocker. A Mocker.
    • View Profile
Re: Path finding - Lego Mindstorms & Java
« Reply #5 on: March 12, 2009, 03:17:33 PM »

I have this group project for which we have to make a program so our robot, a Lego Mindstorms car, can complete a whole lap in a race. We first have 3 practice laps, which I am using to introduce the coordinates of the track and the edges of the track into a hash map (the track has a darker colour so the two light sensors the robot has can detect it). I have heard that I can use some algorithms such as breadth-first search/Dijkstra for path planning (I'd really appreciate it if you could tell me about some others), but I am having some problems because as it is a circuit, the robot will start in coordinates (500, 500), and the possible finish points have to be in (SOMETHING, 500). So, if I used that algorithm it wouldn't go around the circuit, but just straight to the point.  :| What could I do so it does not turn straight to one of the finish points? Thanks a lot!  :-)

Establish multiple finish points along straight stretches of the track.
Logged
"I TYPE 120 WORDS PER MINUTE, BUT IT'S IN MY OWN LANGUAGE!"  -Detta

xolik: WHERE IS OBAMA'S GIFT CERTIFICATE?
Demosthenes: Is that from the gifters movement?


Detta: Crappy old shorts and a tank top.  This is how I dress for work. Because my job is to get puked on.
Demosthenes: So is mine.  I work in IT.


bananaskittles: The world is 4chan and God is a troll.

Probie

  • Professional Blogger
  • ***
  • Coolio Points: +223/-5
  • Offline Offline
  • Posts: 644
  • The natural nap catalyst
    • View Profile
    • SoggyBlog
Re: Path finding - Lego Mindstorms & Java
« Reply #6 on: March 12, 2009, 03:37:05 PM »

Establish multiple finish points along straight stretches of the track.

show off.
Logged
// ------- Probie ------- //
// ----------------------- //
// --- T3H GEEKERY --- //
// ----------------------- //
www.niccisixx.com - I can put this here, because I'm awesome.

dcrog

  • Banned on the run
  • Hacker
  • ****
  • Coolio Points: +253/-2
  • Offline Offline
  • Posts: 1815
    • View Profile
Re: Path finding - Lego Mindstorms & Java
« Reply #7 on: March 12, 2009, 04:05:43 PM »

Get it a Tom Tom.
Logged

Old enough to know better.
Apparently not wise enough.

And who says with age come's wisdom?

Wunderkind

  • Hacker
  • ****
  • Coolio Points: +419/-36
  • Offline Offline
  • Gender: Female
  • Posts: 1921
  • drunk and practicing witchcraft
    • View Profile
Re: Path finding - Lego Mindstorms & Java
« Reply #8 on: March 12, 2009, 06:52:22 PM »

What could I do so it does not turn straight to one of the finish points? Thanks a lot!  :-)
Give the vehicle a religion and it will proudly march around in circles touting that the shortest distance between two points is not a straight line no matter what science or logic says because science and logic are evul.
Logged
Because you either live life - bruises, skinned knees and all - or you turn your back on it and start dying. -- Captain Pike
I clicked 12AX7's banner.

Demosthenes

  • Evil Ex-HN Moderator
  • Administrator
  • Hacker
  • *
  • Coolio Points: +567/-72
  • Offline Offline
  • Gender: Male
  • Posts: 9904
  • Just try me. See what happens.
    • View Profile
    • Zombo
Re: Path finding - Lego Mindstorms & Java
« Reply #9 on: March 13, 2009, 09:47:43 AM »

The Geekery (OMFGLOL) --- Helping clueless twats with their homework since 1983
Logged

Coolio Points: 89,000,998,776,554,211,222
Detta Puzzle Points: 45

Banning forum idiots since 2001

LuciferSam

  • Wannabe Professional Blogger
  • **
  • Coolio Points: +122/-122
  • Offline Offline
  • Posts: 592
  • ástellaþ: ("hálette eormengrund!")
    • View Profile
    • ZomboCom
Re: Path finding - Lego Mindstorms & Java
« Reply #10 on: March 13, 2009, 06:16:21 PM »

The only lego project resource you will ever need to focus your attention upon: *CLACK*
Logged

  • Q: What is green and homeomorphic to the open unit interval? A: The real lime!

pbsaurus

  • Hacker
  • ****
  • Coolio Points: +354/-31
  • Offline Offline
  • Gender: Male
  • Posts: 9981
  • Everyone Loves The King Of The Sea
    • View Profile
    • http://www.myspace.com/flipperpete
Re: Path finding - Lego Mindstorms & Java
« Reply #11 on: March 16, 2009, 04:48:29 PM »

Want!