Update of /cvsroot/playerstage/code/player/utils/playernav
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20337
Modified Files:
Tag: release-2-0-patches
playernav.c
Log Message:
applied modified version of Macro Paladini's patch to enable map update in
playernav
Index: playernav.c
===================================================================
RCS file: /cvsroot/playerstage/code/player/utils/playernav/playernav.c,v
retrieving revision 1.47.2.1
retrieving revision 1.47.2.2
diff -C2 -d -r1.47.2.1 -r1.47.2.2
*** playernav.c 7 Jun 2006 16:12:55 -0000 1.47.2.1
--- playernav.c 15 Sep 2006 17:54:30 -0000 1.47.2.2
***************
*** 126,130 ****
int dumpp;
int showparticlesp;
! double mapupdatefreq;
int get_waypoints=1;
--- 126,130 ----
int dumpp;
int showparticlesp;
! double mapupdatefreq=0.0;
int get_waypoints=1;
***************
*** 160,168 ****
}
peek = playerc_mclient_peek(gui_data->mclient,10);
if(peek < 0)
{
! fprintf(stderr, "Error on read\n");
! gtk_main_quit();
}
else if(peek == 0)
--- 160,184 ----
}
+ // update map
+
+ if(mapupdatefreq)
+ {
+ gettimeofday(&curr,NULL);
+ diff = (curr.tv_sec + curr.tv_usec/1e6) -
+ (lastmapupdate.tv_sec + lastmapupdate.tv_usec/1e6);
+ if(diff >= 1.0/mapupdatefreq)
+ {
+ update_map(gui_data);
+ lastmapupdate = curr;
+ }
+ }
+
+
peek = playerc_mclient_peek(gui_data->mclient,10);
if(peek < 0)
{
! //fprintf(stderr, "Error on peek\n");
! //gtk_main_quit();
! return(TRUE);
}
else if(peek == 0)
***************
*** 178,188 ****
for(i=0;i<gui_data->num_robots;i++)
{
- #if 0
- if(gui_data->localizes[i] && gui_data->localizes[i]->info.fresh)
- {
- robot_pose.px = gui_data->localizes[i]->hypoths[0].mean.px;
- robot_pose.py = gui_data->localizes[i]->hypoths[0].mean.py;
- robot_pose.pa = gui_data->localizes[i]->hypoths[0].mean.pa;
- #endif
if(gui_data->planners[i] && gui_data->planners[i]->info.fresh)
--- 194,197 ----
***************
*** 289,304 ****
}
- // update map
- if(mapupdatefreq)
- {
- gettimeofday(&curr,NULL);
- diff = (curr.tv_sec + curr.tv_usec/1e6) -
- (lastmapupdate.tv_sec + lastmapupdate.tv_usec/1e6);
- if(diff >= 1.0/mapupdatefreq)
- {
- update_map(gui_data);
- lastmapupdate = curr;
- }
- }
count++;
--- 298,301 ----
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit