• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Robot Navigation (Binary Matrix to Distance Transform Matrix)

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone, this is the first time I am trying to use this forum.

I'm trying to:
1. implement some binary matrix into distance transform matrix
2. calculate shortest path from a starting point to goal point
3. calculate shortest path considering additional safety from a starting point to goal point
4. implement method that will update cell value only one time to evaluate Distance Transform Matrix (starting from goal cell)
Detailed Explanations can be found here : https://docs.google.com/file/d/0BxRA6teW2ENUM2h3cjd4U0k5cDQ/edit

I'm using Java Eclipse for this one.

This is what I have compiled so far, but I think it has some errors in it. Help would be greatly appreciated. Questions and diagrams can be found in attachment

 
BlackBird Ssg
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To add more, I am looking for guidance, rather than someone putting codes. Putting me in right direction or guidance is what I am looking for.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Some notes about your code:

Class names should start with a capital letter and be in CamelCase. So, you should call your class RobotNav, for example.
Line 3: Why do you have nested classes; why is there a class builtpath inside class robotNav?
Line 6: Why are you using Integer instead of int here?
Lines 24-26: There are multiple problems with this. First of all, the syntax for the for-loop is invalid. Second, statements like a for-loop must be inside a method; this code is not inside a method.

The only thing that's in your code right now are some variable declarations, there's no logic implemented at all yet. Before you write your program in Java, make sure you have a precise idea of what it needs to do. You first have to have in your head exactly what and how the code is going to work before you start to think about how to write that down in Java.
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic