Skip to content

Commit

Permalink
fixed angle issue on mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
AndresRReina committed Jan 31, 2017
1 parent 5d7511f commit fbbcb4f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 1 addition & 2 deletions algorithms/src/checkboard_navigation_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ void* init_chessboard_navigation(void * stop_flag_ptr )
webcam_angle = 5;
long_turn = true;
}
FILE* file;
// std::string s = std::to_string(((int)webcam_angle)%180);
//char buffer[s.length()];
// for (int i = 0; i < s.length(); i++)
Expand All @@ -331,7 +330,7 @@ void* init_chessboard_navigation(void * stop_flag_ptr )
fprintf(file, "%d\n", (int)webcam_angle);
printf("Angle sent:%d\n", (int)webcam_angle);

double vehicle_angle = fmod2pi(webcam_angle*M_PI / 180. - atan2(y, x) - M_PI);
double vehicle_angle = -fmod2pi(webcam_angle*M_PI / 180. - atan2(y, x) - M_PI)-M_PI/2.;

cout << "webcam nav " << "x(cm) " << x << " y(cm) " << y << " "
<< "x(in) " << x/2.54 << " y(in) " << y/2.54 << endl
Expand Down
1 change: 1 addition & 0 deletions algorithms/src/debug_ip_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ void *connection_handler(void * pointer)
data.append( (char *) data_buffer , length);

*read_image=true;
std::cout<<"\033[0;31m"<<"IP SERVER image_read"<<"\033[0m\n";

std::string output;

Expand Down
6 changes: 4 additions & 2 deletions algorithms/src/kinect_obstacle_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ void* thread_depth(void* arg)
/**CONVERT POINT CLOUD INTO HEIGHT MAP**/
for(int i = 0; i<pointCount; ++i)
{
if(height(pointCloud[i].x, pointCloud[i].y) < pointCloud[i].z)
height(pointCloud[i].x, pointCloud[i].y) = pointCloud[i].z;
if(height(-pointCloud[i].x, pointCloud[i].y) < pointCloud[i].z)
height(-pointCloud[i].x, pointCloud[i].y) = pointCloud[i].z;
}
/**REMOVE STRANGE VALUES FROM MAP**/

Expand Down Expand Up @@ -338,6 +338,8 @@ void* thread_depth(void* arg)
}
}
tcpip_map_used = false;
std::cout<<"\033[0;31m"<<"IP SERVER image_ready"<<"\033[0m\n";

}

}
Expand Down

0 comments on commit fbbcb4f

Please sign in to comment.