# HELP! in Robot Navigation (Binary Matrix to Distance Transform Mat

Page 1 of 1

## 3 Replies - 1368 Views - Last Post: 24 September 2013 - 12:12 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=329749&amp;s=b93a7be30de9c4a12fba74499a16afc2&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 blackbirdssg

Reputation: 0
• Posts: 2
• Joined: 22-September 13

# HELP! in Robot Navigation (Binary Matrix to Distance Transform Mat

Posted 22 September 2013 - 04:32 PM

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....jd4U0k5cDQ/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.

```public class robotNav {

public class builtpath {
//implementing the distance transform algorithm

final static Integer n = Interger.MAX_VALUE;
private int min;
final int height;
final int width;
final int a = 1;
final int d = 2;

int [ ][ ] grid = {
{ 100, 100, 100, 100, 100, 100, 100, 0, 0, 0 },
{ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 },
{ 0, 0, 0, 0, 100, 100, 100, 100, 100, 100 },
{ 100, 100, 100, 0, 100, 100, 100, 100, 100, 100 },
{ 100, 100, 100, 0, 100, 100, 100, 0, 100, 100 },
{ 100, 100, 100, 100, 100, 100, 100, 0, 100, 100 },
{ 100, 100, 100, 100, 100, 100, 100, 0, 100, 100 },
{ 100, 100, 100, 100, 100, 100, 100, 0, 100, 100 }
};

for(i=1, i++){

}

public static void main (String [] args){

}
}
}

```

Is This A Good Question/Topic? 0

## Replies To: HELP! in Robot Navigation (Binary Matrix to Distance Transform Mat

### #2 blackbirdssg

Reputation: 0
• Posts: 2
• Joined: 22-September 13

## Re: HELP! in Robot Navigation (Binary Matrix to Distance Transform Mat

Posted 22 September 2013 - 04:58 PM

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.

### #3 modi123_1

• Suitor #2

Reputation: 11597
• Posts: 45,762
• Joined: 12-June 08

## Re: HELP! in Robot Navigation (Binary Matrix to Distance Transform Mat

Posted 22 September 2013 - 06:35 PM

Quote

This is what I have compiled so far, but I think it has some errors in it.

Why do you think you have errors in it? If you are getting errors please tell us the error text and what line it is happening on. If you are getting odd behavior tell us what the program is doing and what it SHOULD be doing. Remember - we are not there, looking over your shoulder. The more you tell us the better folks can help you.

### #4 MentalFloss

• .

Reputation: 576
• Posts: 1,500
• Joined: 02-September 09

## Re: HELP! in Robot Navigation (Binary Matrix to Distance Transform Mat

Posted 24 September 2013 - 12:12 PM

Hmm didn't know main could go in a nested class like that.