Update of /cvsroot/playerstage/code/player/server/drivers/shell
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6470/server/drivers/shell
Modified Files:
kartowriter.cc readlog.cc writelog.cc
Log Message:
Removed deprecated energy, sound and truth interfaces.
Index: writelog.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/shell/writelog.cc,v
retrieving revision 1.78
retrieving revision 1.79
diff -C2 -d -r1.78 -r1.79
*** writelog.cc 9 Jul 2007 17:18:02 -0000 1.78
--- writelog.cc 4 Aug 2007 03:12:07 -0000 1.79
***************
*** 33,38 ****
The writelog driver will write data from another device to a log file.
! Each data message is written to a separate line. The format for the
! file is given in the
@ref tutorial_datalog "data logging tutorial".
--- 33,38 ----
The writelog driver will write data from another device to a log file.
! Each data message is written to a separate line. The format for the
! file is given in the
@ref tutorial_datalog "data logging tutorial".
***************
*** 90,94 ****
- @ref interface_position3d
- @ref interface_power
- - @ref interface_truth
@par Configuration requests
--- 90,93 ----
***************
*** 203,207 ****
// Write PTZ data to file
private: int WritePTZ(player_msghdr_t* hdr, void *data);
!
// Write sonar data to file
private: int WriteSonar(player_msghdr_t* hdr, void *data);
--- 202,206 ----
// Write PTZ data to file
private: int WritePTZ(player_msghdr_t* hdr, void *data);
!
// Write sonar data to file
private: int WriteSonar(player_msghdr_t* hdr, void *data);
***************
*** 220,230 ****
// Write fixed range IRs data to file
private: int WriteIR(player_msghdr_t* hdr, void *data);
!
// Write IMU data to file
private: int WriteIMU (player_msghdr_t* hdr, void *data);
!
// Write PointCloud3D data to file
private: int WritePointCloud3d (player_msghdr_t* hdr, void *data);
!
// Write Actarray data to file
private: int WriteActarray (player_msghdr_t* hdr, void *data);
--- 219,229 ----
// Write fixed range IRs data to file
private: int WriteIR(player_msghdr_t* hdr, void *data);
!
// Write IMU data to file
private: int WriteIMU (player_msghdr_t* hdr, void *data);
!
// Write PointCloud3D data to file
private: int WritePointCloud3d (player_msghdr_t* hdr, void *data);
!
// Write Actarray data to file
private: int WriteActarray (player_msghdr_t* hdr, void *data);
***************
*** 544,548 ****
// oh well.
PLAYER_WARN("unable to get bumper geometry");
! }
else
{
--- 543,547 ----
// oh well.
PLAYER_WARN("unable to get bumper geometry");
! }
else
{
***************
*** 564,568 ****
// oh well.
PLAYER_WARN("unable to get ir geometry");
! }
else
{
--- 563,567 ----
// oh well.
PLAYER_WARN("unable to get ir geometry");
! }
else
{
***************
*** 1039,1043 ****
/** @ingroup tutorial_datalog
@defgroup player_driver_writelog_ptz ptz format
!
@brief PTZ log format
The format for each @ref interface_wsn message is:
--- 1038,1042 ----
/** @ingroup tutorial_datalog
@defgroup player_driver_writelog_ptz ptz format
!
@brief PTZ log format
The format for each @ref interface_wsn message is:
***************
*** 1078,1082 ****
}
}
!
/** @ingroup tutorial_datalog
@defgroup player_driver_writelog_sonar sonar format
--- 1077,1081 ----
}
}
!
/** @ingroup tutorial_datalog
@defgroup player_driver_writelog_sonar sonar format
***************
*** 1216,1223 ****
memcpy(ip, wdata->links[i].ip, wdata->links[i].ip_count);
memcpy(essid, wdata->links[i].essid, wdata->links[i].essid_count);
!
fprintf(this->file, "'%s' '%s' '%s' %d %d %d %d %d %d ",
mac, ip, essid,
! wdata->links[i].mode,
wdata->links[i].freq,
wdata->links[i].encrypt,
--- 1215,1222 ----
memcpy(ip, wdata->links[i].ip, wdata->links[i].ip_count);
memcpy(essid, wdata->links[i].essid, wdata->links[i].essid_count);
!
fprintf(this->file, "'%s' '%s' '%s' %d %d %d %d %d %d ",
mac, ip, essid,
! wdata->links[i].mode,
wdata->links[i].freq,
wdata->links[i].encrypt,
***************
*** 1273,1278 ****
wdata = (player_wsn_data_t*)data;
fprintf(this->file,"%d %d %d %f %f %f %f %f %f %f %f %f
%f",
! wdata->node_type,
! wdata->node_id,
wdata->node_parent_id,
wdata->data_packet.light,
--- 1272,1277 ----
wdata = (player_wsn_data_t*)data;
fprintf(this->file,"%d %d %d %f %f %f %f %f %f %f %f %f
%f",
! wdata->node_type,
! wdata->node_id,
wdata->node_parent_id,
wdata->data_packet.light,
***************
*** 1360,1368 ****
idata = (player_imu_data_state_t*)data;
fprintf (this->file,"%f %f %f %f %f %f",
! idata->pose.px,
! idata->pose.py,
! idata->pose.pz,
! idata->pose.proll,
! idata->pose.ppitch,
idata->pose.pyaw);
return (0);
--- 1359,1367 ----
idata = (player_imu_data_state_t*)data;
fprintf (this->file,"%f %f %f %f %f %f",
! idata->pose.px,
! idata->pose.py,
! idata->pose.pz,
! idata->pose.proll,
! idata->pose.ppitch,
idata->pose.pyaw);
return (0);
***************
*** 1374,1382 ****
idata = (player_imu_data_calib_t*)data;
fprintf (this->file,"%f %f %f %f %f %f %f %f %f",
! idata->accel_x,
! idata->accel_y,
! idata->accel_z,
! idata->gyro_x,
! idata->gyro_y,
idata->gyro_z,
idata->magn_x,
--- 1373,1381 ----
idata = (player_imu_data_calib_t*)data;
fprintf (this->file,"%f %f %f %f %f %f %f %f %f",
! idata->accel_x,
! idata->accel_y,
! idata->accel_z,
! idata->gyro_x,
! idata->gyro_y,
idata->gyro_z,
idata->magn_x,
***************
*** 1391,1410 ****
idata = (player_imu_data_quat_t*)data;
fprintf (this->file,"%f %f %f %f %f %f %f %f %f %f %f %f
%f",
! idata->calib_data.accel_x,
! idata->calib_data.accel_y,
! idata->calib_data.accel_z,
! idata->calib_data.gyro_x,
! idata->calib_data.gyro_y,
idata->calib_data.gyro_z,
idata->calib_data.magn_x,
idata->calib_data.magn_y,
idata->calib_data.magn_z,
! idata->q0,
! idata->q1,
! idata->q2,
idata->q3);
return (0);
}
!
case PLAYER_IMU_DATA_EULER:
{
--- 1390,1409 ----
idata = (player_imu_data_quat_t*)data;
fprintf (this->file,"%f %f %f %f %f %f %f %f %f %f %f %f
%f",
! idata->calib_data.accel_x,
! idata->calib_data.accel_y,
! idata->calib_data.accel_z,
! idata->calib_data.gyro_x,
! idata->calib_data.gyro_y,
idata->calib_data.gyro_z,
idata->calib_data.magn_x,
idata->calib_data.magn_y,
idata->calib_data.magn_z,
! idata->q0,
! idata->q1,
! idata->q2,
idata->q3);
return (0);
}
!
case PLAYER_IMU_DATA_EULER:
{
***************
*** 1412,1430 ****
idata = (player_imu_data_euler_t*)data;
fprintf (this->file,"%f %f %f %f %f %f %f %f %f %f %f %f",
! idata->calib_data.accel_x,
! idata->calib_data.accel_y,
! idata->calib_data.accel_z,
! idata->calib_data.gyro_x,
! idata->calib_data.gyro_y,
idata->calib_data.gyro_z,
idata->calib_data.magn_x,
idata->calib_data.magn_y,
idata->calib_data.magn_z,
! idata->orientation.proll,
! idata->orientation.ppitch,
idata->orientation.pyaw);
return (0);
}
!
default:
return (-1);
--- 1411,1429 ----
idata = (player_imu_data_euler_t*)data;
fprintf (this->file,"%f %f %f %f %f %f %f %f %f %f %f %f",
! idata->calib_data.accel_x,
! idata->calib_data.accel_y,
! idata->calib_data.accel_z,
! idata->calib_data.gyro_x,
! idata->calib_data.gyro_y,
idata->calib_data.gyro_z,
idata->calib_data.magn_x,
idata->calib_data.magn_y,
idata->calib_data.magn_z,
! idata->orientation.proll,
! idata->orientation.ppitch,
idata->orientation.pyaw);
return (0);
}
!
default:
return (-1);
***************
*** 1466,1471 ****
for (i = 0; i < pdata->points_count; i++)
fprintf (this->file,"%f %f %f ",
! pdata->points[i].point.px,
! pdata->points[i].point.py,
pdata->points[i].point.pz);
return (0);
--- 1465,1470 ----
for (i = 0; i < pdata->points_count; i++)
fprintf (this->file,"%f %f %f ",
! pdata->points[i].point.px,
! pdata->points[i].point.py,
pdata->points[i].point.pz);
return (0);
***************
*** 1514,1521 ****
for (i = 0; i < pdata->actuators_count; i++)
fprintf (this->file,"%f %f %f %f %d ",
! pdata->actuators[i].position,
! pdata->actuators[i].speed,
! pdata->actuators[i].acceleration,
! pdata->actuators[i].current,
pdata->actuators[i].state);
fprintf (this->file, "%d ", pdata->motor_state);
--- 1513,1520 ----
for (i = 0; i < pdata->actuators_count; i++)
fprintf (this->file,"%f %f %f %f %d ",
! pdata->actuators[i].position,
! pdata->actuators[i].speed,
! pdata->actuators[i].acceleration,
! pdata->actuators[i].current,
pdata->actuators[i].state);
fprintf (this->file, "%d ", pdata->motor_state);
***************
*** 1712,1719 ****
// Format:
// bumpers_count bumper0 bumper1 ...
! ir_data = ( player_ir_data_t*)data;
fprintf(this->file, "%u ", ir_data->ranges_count);
for(i=0;i<ir_data->ranges_count;i++)
! // P2OS infrared lights are binary but I will use the %3.3f
format
fprintf(this->file, "%3.3f ", ir_data->ranges[i]);
--- 1711,1718 ----
// Format:
// bumpers_count bumper0 bumper1 ...
! ir_data = ( player_ir_data_t*)data;
fprintf(this->file, "%u ", ir_data->ranges_count);
for(i=0;i<ir_data->ranges_count;i++)
! // P2OS infrared lights are binary but I will use the %3.3f format
fprintf(this->file, "%3.3f ", ir_data->ranges[i]);
Index: readlog.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/shell/readlog.cc,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** readlog.cc 9 Jul 2007 17:18:02 -0000 1.48
--- readlog.cc 4 Aug 2007 03:12:07 -0000 1.49
***************
*** 328,337 ****
int token_count, char **tokens, double time);
- // Parse truth data
- private: int ParseTruth(player_devaddr_t id,
- unsigned short type, unsigned short subtype,
- int linenum,
- int token_count, char **tokens, double time);
-
#endif
--- 328,331 ----
***************
*** 1211,1217 ****
return this->ParsePosition3d(id, type, subtype, linenum,
token_count, tokens, time);
- else if (id.interf == PLAYER_TRUTH_CODE)
- return this->ParseTruth(id, type, subtype, linenum,
- token_count, tokens, time);
#endif
--- 1205,1208 ----
***************
*** 1783,1787 ****
////////////////////////////////////////////////////////////////////////////
// Parse wifi data
! int ReadLog::ParseWifi(player_devaddr_t id,
unsigned short type, unsigned short subtype,
int linenum,
--- 1774,1778 ----
////////////////////////////////////////////////////////////////////////////
// Parse wifi data
! int ReadLog::ParseWifi(player_devaddr_t id,
unsigned short type, unsigned short subtype,
int linenum,
***************
*** 1846,1850 ****
////////////////////////////////////////////////////////////////////////////
// Parse WSN data
! int ReadLog::ParseWSN(player_devaddr_t id,
unsigned short type, unsigned short subtype,
int linenum,
--- 1837,1841 ----
////////////////////////////////////////////////////////////////////////////
// Parse WSN data
! int ReadLog::ParseWSN(player_devaddr_t id,
unsigned short type, unsigned short subtype,
int linenum,
***************
*** 1896,1900 ****
////////////////////////////////////////////////////////////////////////////
// Parse IMU data
! int ReadLog::ParseIMU (player_devaddr_t id,
unsigned short type, unsigned short subtype,
int linenum,
--- 1887,1891 ----
////////////////////////////////////////////////////////////////////////////
// Parse IMU data
! int ReadLog::ParseIMU (player_devaddr_t id,
unsigned short type, unsigned short subtype,
int linenum,
***************
*** 1914,1918 ****
}
player_imu_data_state_t data;
!
data.pose.px = atof (tokens[7]);
data.pose.py = atof (tokens[8]);
--- 1905,1909 ----
}
player_imu_data_state_t data;
!
data.pose.px = atof (tokens[7]);
data.pose.py = atof (tokens[8]);
***************
*** 1921,1930 ****
data.pose.ppitch = atof (tokens[11]);
data.pose.pyaw = atof (tokens[12]);
!
this->Publish (id, NULL, type, subtype,
(void*)&data, sizeof(data), &time);
return (0);
}
!
case PLAYER_IMU_DATA_CALIB:
{
--- 1912,1921 ----
data.pose.ppitch = atof (tokens[11]);
data.pose.pyaw = atof (tokens[12]);
!
this->Publish (id, NULL, type, subtype,
(void*)&data, sizeof(data), &time);
return (0);
}
!
case PLAYER_IMU_DATA_CALIB:
{
***************
*** 1935,1939 ****
}
player_imu_data_calib_t data;
!
data.accel_x = atof (tokens[7]);
data.accel_y = atof (tokens[8]);
--- 1926,1930 ----
}
player_imu_data_calib_t data;
!
data.accel_x = atof (tokens[7]);
data.accel_y = atof (tokens[8]);
***************
*** 1945,1954 ****
data.magn_y = atof (tokens[14]);
data.magn_z = atof (tokens[15]);
!
this->Publish (id, NULL, type, subtype,
(void*)&data, sizeof(data), &time);
return (0);
}
!
case PLAYER_IMU_DATA_QUAT:
{
--- 1936,1945 ----
data.magn_y = atof (tokens[14]);
data.magn_z = atof (tokens[15]);
!
this->Publish (id, NULL, type, subtype,
(void*)&data, sizeof(data), &time);
return (0);
}
!
case PLAYER_IMU_DATA_QUAT:
{
***************
*** 1959,1963 ****
}
player_imu_data_quat_t data;
!
data.calib_data.accel_x = atof (tokens[7]);
data.calib_data.accel_y = atof (tokens[8]);
--- 1950,1954 ----
}
player_imu_data_quat_t data;
!
data.calib_data.accel_x = atof (tokens[7]);
data.calib_data.accel_y = atof (tokens[8]);
***************
*** 1973,1982 ****
data.q2 = atof (tokens[18]);
data.q3 = atof (tokens[19]);
!
this->Publish (id, NULL, type, subtype,
(void*)&data, sizeof(data), &time);
return (0);
}
!
case PLAYER_IMU_DATA_EULER:
{
--- 1964,1973 ----
data.q2 = atof (tokens[18]);
data.q3 = atof (tokens[19]);
!
this->Publish (id, NULL, type, subtype,
(void*)&data, sizeof(data), &time);
return (0);
}
!
case PLAYER_IMU_DATA_EULER:
{
***************
*** 1987,1991 ****
}
player_imu_data_euler_t data;
!
data.calib_data.accel_x = atof (tokens[7]);
data.calib_data.accel_y = atof (tokens[8]);
--- 1978,1982 ----
}
player_imu_data_euler_t data;
!
data.calib_data.accel_x = atof (tokens[7]);
data.calib_data.accel_y = atof (tokens[8]);
***************
*** 2000,2004 ****
data.orientation.ppitch = atof (tokens[17]);
data.orientation.pyaw = atof (tokens[18]);
!
this->Publish (id, NULL, type, subtype,
(void*)&data, sizeof(data), &time);
--- 1991,1995 ----
data.orientation.ppitch = atof (tokens[17]);
data.orientation.pyaw = atof (tokens[18]);
!
this->Publish (id, NULL, type, subtype,
(void*)&data, sizeof(data), &time);
***************
*** 2017,2021 ****
////////////////////////////////////////////////////////////////////////////
// Parse PointCloud3d data
! int ReadLog::ParsePointCloud3d (player_devaddr_t id,
unsigned short type, unsigned short subtype,
int linenum,
--- 2008,2012 ----
////////////////////////////////////////////////////////////////////////////
// Parse PointCloud3d data
! int ReadLog::ParsePointCloud3d (player_devaddr_t id,
unsigned short type, unsigned short subtype,
int linenum,
***************
*** 2047,2056 ****
data.points[i] = element;
}
!
this->Publish (id, NULL, type, subtype,
(void*)&data, sizeof(data), &time);
return (0);
}
!
default:
PLAYER_ERROR1 ("unknown PointCloud3d data subtype %d\n",
subtype);
--- 2038,2047 ----
data.points[i] = element;
}
!
this->Publish (id, NULL, type, subtype,
(void*)&data, sizeof(data), &time);
return (0);
}
!
default:
PLAYER_ERROR1 ("unknown PointCloud3d data subtype %d\n",
subtype);
***************
*** 2065,2069 ****
////////////////////////////////////////////////////////////////////////////
// Parse PTZ data
! int ReadLog::ParsePTZ (player_devaddr_t id,
unsigned short type, unsigned short subtype,
int linenum,
--- 2056,2060 ----
////////////////////////////////////////////////////////////////////////////
// Parse PTZ data
! int ReadLog::ParsePTZ (player_devaddr_t id,
unsigned short type, unsigned short subtype,
int linenum,
***************
*** 2083,2087 ****
}
player_ptz_data_t data;
!
data.pan = atof (tokens[7]);
data.tilt = atof (tokens[8]);
--- 2074,2078 ----
}
player_ptz_data_t data;
!
data.pan = atof (tokens[7]);
data.tilt = atof (tokens[8]);
***************
*** 2089,2098 ****
data.panspeed = atof (tokens[10]);
data.tiltspeed = atof (tokens[11]);
!
this->Publish (id, NULL, type, subtype,
(void*)&data, sizeof(data), &time);
return (0);
}
!
default:
PLAYER_ERROR1 ("unknown PTZ data subtype %d\n", subtype);
--- 2080,2089 ----
data.panspeed = atof (tokens[10]);
data.tiltspeed = atof (tokens[11]);
!
this->Publish (id, NULL, type, subtype,
(void*)&data, sizeof(data), &time);
return (0);
}
!
default:
PLAYER_ERROR1 ("unknown PTZ data subtype %d\n", subtype);
***************
*** 2107,2111 ****
////////////////////////////////////////////////////////////////////////////
// Parse Actarray data
! int ReadLog::ParseActarray (player_devaddr_t id,
unsigned short type, unsigned short subtype,
int linenum,
--- 2098,2102 ----
////////////////////////////////////////////////////////////////////////////
// Parse Actarray data
! int ReadLog::ParseActarray (player_devaddr_t id,
unsigned short type, unsigned short subtype,
int linenum,
***************
*** 2138,2147 ****
}
data.motor_state = atoi (tokens[data.actuators_count*5 +
8]);
!
this->Publish (id, NULL, type, subtype,
(void*)&data, sizeof(data), &time);
return (0);
}
!
default:
PLAYER_ERROR1 ("unknown Actarray data subtype %d\n",
subtype);
--- 2129,2138 ----
}
data.motor_state = atoi (tokens[data.actuators_count*5 +
8]);
!
this->Publish (id, NULL, type, subtype,
(void*)&data, sizeof(data), &time);
return (0);
}
!
default:
PLAYER_ERROR1 ("unknown Actarray data subtype %d\n",
subtype);
***************
*** 2354,2384 ****
}
- ////////////////////////////////////////////////////////////////////////////
- // Parse truth data
- int ReadLog::ParseTruth(player_devaddr_t id, int linenum,
- int token_count, char **tokens, struct timeval
time)
- {
- player_truth_data_t data;
-
- if (token_count < 11)
- {
- PLAYER_ERROR2("incomplete line at %s:%d", this->filename, linenum);
- return -1;
- }
-
- data.pos[0] = NINT32(M_MM(atof(tokens[6])));
- data.pos[1] = NINT32(M_MM(atof(tokens[7])));
- data.pos[2] = NINT32(M_MM(atof(tokens[8])));
-
- data.rot[0] = NINT32(M_MM(atof(tokens[9])));
- data.rot[1] = NINT32(M_MM(atof(tokens[10])));
- data.rot[2] = NINT32(M_MM(atof(tokens[11])));
-
- this->PutMsg(id,NULL,PLAYER_MSGTYPE_DATA,0, &data, sizeof(data), &time);
-
- return 0;
- }
-
-
#endif
--- 2345,2348 ----
Index: kartowriter.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/shell/kartowriter.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** kartowriter.cc 2 May 2007 22:29:04 -0000 1.2
--- kartowriter.cc 4 Aug 2007 03:12:07 -0000 1.3
***************
*** 46,51 ****
- gzip (boolean)
- default: 0 (disable)
! - compress the log file
!
@par Configuration file options
- file (string)
--- 46,51 ----
- gzip (boolean)
- default: 0 (disable)
! - compress the log file
!
@par Configuration file options
- file (string)
***************
*** 59,63 ****
- PLAYER_LOG_SET_FILENAME (not yet implemented)
! @par Example
@verbatim
--- 59,63 ----
- PLAYER_LOG_SET_FILENAME (not yet implemented)
! @par Example
@verbatim
***************
*** 65,69 ****
(
name "readlog"
! filename "jwing.log"
speed 1
provides ["log:0" "laser:0" "laser:1" "position2d:0"]
--- 65,69 ----
(
name "readlog"
! filename "jwing.log"
speed 1
provides ["log:0" "laser:0" "laser:1" "position2d:0"]
***************
*** 89,95 ****
#include <stdio.h>
#include <errno.h>
! #include <fcntl.h>
! #include <string.h>
! #include <stdlib.h>
#include <pthread.h>
#include <libplayercore/playercore.h>
--- 89,95 ----
#include <stdio.h>
#include <errno.h>
! #include <fcntl.h>
! #include <string.h>
! #include <stdlib.h>
#include <pthread.h>
#include <libplayercore/playercore.h>
***************
*** 109,118 ****
public:
! player_devaddr_t addr;
Device* device;
char *uid;
! // constructor
! LogDevice(player_devaddr_t* addr);
//destructor
--- 109,118 ----
public:
! player_devaddr_t addr;
Device* device;
char *uid;
! // constructor
! LogDevice(player_devaddr_t* addr);
//destructor
***************
*** 120,124 ****
//prints the Device unique ID
! char* LogDevice::getUID();
};
--- 120,124 ----
//prints the Device unique ID
! char* getUID();
};
***************
*** 137,141 ****
! class KartoLogger:public Driver
{
private:
--- 137,141 ----
! class KartoLogger:public Driver
{
private:
***************
*** 149,159 ****
bool enable; // Enabling flag
bool compress; // Compress flag (use gzip at the end or not)
!
// The current robot pose
! player_pose_t position_pose;
// When we start logging
! double start_time;
// Functions to open and close the log file
--- 149,159 ----
bool enable; // Enabling flag
bool compress; // Compress flag (use gzip at the end or not)
!
// The current robot pose
! player_pose2d_t position_pose;
// When we start logging
! double start_time;
// Functions to open and close the log file
***************
*** 174,178 ****
int KartoLoggerDestroy();
! // constructor
KartoLogger( ConfigFile* cf, int section);
--- 174,178 ----
int KartoLoggerDestroy();
! // constructor
KartoLogger( ConfigFile* cf, int section);
***************
*** 183,187 ****
int Shutdown();
! char* KartoLogger::getUID(player_devaddr_t dev);
virtual int Unsubscribe(Device* id);
--- 183,187 ----
int Shutdown();
! char* getUID(player_devaddr_t dev);
virtual int Unsubscribe(Device* id);
***************
*** 282,286 ****
for (iter=devices.begin(); iter != devices.end(); iter++)
{
! LogDevice* device = (*iter);
if((device->addr.host == hdr->addr.host) &&
(device->addr.robot == hdr->addr.robot) &&
--- 282,286 ----
for (iter=devices.begin(); iter != devices.end(); iter++)
{
! LogDevice* device = (*iter);
if((device->addr.host == hdr->addr.host) &&
(device->addr.robot == hdr->addr.robot) &&
***************
*** 344,348 ****
if(this->karto_file == NULL)
{
! PLAYER_ERROR2("unable to open [%s]: %s\n",
this->karto_filename, strerror(errno));
return(-1);
}
--- 344,348 ----
if(this->karto_file == NULL)
{
! PLAYER_ERROR2("unable to open [%s]: %s\n",
this->karto_filename, strerror(errno));
return(-1);
}
***************
*** 364,368 ****
fflush(this->karto_file);
fclose(this->karto_file);
! if (this->compress)
printf("Sorry gzip compression is not yet
implemented\n");
this->karto_file = NULL;
--- 364,368 ----
fflush(this->karto_file);
fclose(this->karto_file);
! if (this->compress)
printf("Sorry gzip compression is not yet
implemented\n");
this->karto_file = NULL;
***************
*** 417,421 ****
KartoLogger::KartoLogger( ConfigFile* cf, int section) :
Driver(cf, section, false, PLAYER_MSGQUEUE_DEFAULT_MAXLEN,PLAYER_LOG_CODE )
! {
player_devaddr_t addr;
--- 417,421 ----
KartoLogger::KartoLogger( ConfigFile* cf, int section) :
Driver(cf, section, false, PLAYER_MSGQUEUE_DEFAULT_MAXLEN,PLAYER_LOG_CODE )
! {
player_devaddr_t addr;
***************
*** 446,450 ****
else
this->compress = false;
!
}
--- 446,450 ----
else
this->compress = false;
!
}
***************
*** 463,467 ****
//
// a driver registration function
! void
KartoLogger_Register(DriverTable* table)
{
--- 463,467 ----
//
// a driver registration function
! void
KartoLogger_Register(DriverTable* table)
{
***************
*** 481,485 ****
PLAYER_LASER_REQ_GET_GEOM,
NULL, 0, NULL,false)))
! {
PLAYER_ERROR("failed to get laser geometry");
return -1;
--- 481,485 ----
PLAYER_LASER_REQ_GET_GEOM,
NULL, 0, NULL,false)))
! {
PLAYER_ERROR("failed to get laser geometry");
return -1;
***************
*** 490,494 ****
packedaddr_to_dottedip(hostname,256,dev->addr.host);
double x,y,z,w;
! computeQuaternion(laser_geom.pose.pa,0,0,&x,&y,&z,&w);
fprintf(this->karto_file,"<LaserRangeFinder>\n\t<ID>%s</ID>\n\t<Pose>\n\t\t<Position>\n\t\t\t<X>%.3f</X>\n\t\t\t<Y>0.0</Y>\n\t\t\t<Z>%.3f</Z>\n\t\t</Position>\n\t\t<Orientation>\n\t\t\t<X>%f</X>\n\t\t\t<Y>%f</Y>\n\t\t\t<Z>%f</Z>\n\t\t\t<W>%f</W>\n\t\t</Orientation>\n\t</Pose>\n</LaserRangeFinder>\n",dev->getUID(),laser_geom.pose.py,laser_geom.pose.px,x,y,z,w);
break;
--- 490,494 ----
packedaddr_to_dottedip(hostname,256,dev->addr.host);
double x,y,z,w;
! computeQuaternion(laser_geom.pose.pyaw,0,0,&x,&y,&z,&w);
fprintf(this->karto_file,"<LaserRangeFinder>\n\t<ID>%s</ID>\n\t<Pose>\n\t\t<Position>\n\t\t\t<X>%.3f</X>\n\t\t\t<Y>0.0</Y>\n\t\t\t<Z>%.3f</Z>\n\t\t</Position>\n\t\t<Orientation>\n\t\t\t<X>%f</X>\n\t\t\t<Y>%f</Y>\n\t\t\t<Z>%f</Z>\n\t\t\t<W>%f</W>\n\t\t</Orientation>\n\t</Pose>\n</LaserRangeFinder>\n",dev->getUID(),laser_geom.pose.py,laser_geom.pose.px,x,y,z,w);
break;
***************
*** 497,501 ****
{
// Get the sonar poses
! if(!(msg = dev->device->Request(this->InQueue,
PLAYER_MSGTYPE_REQ,
PLAYER_SONAR_REQ_GET_GEOM,
--- 497,501 ----
{
// Get the sonar poses
! if(!(msg = dev->device->Request(this->InQueue,
PLAYER_MSGTYPE_REQ,
PLAYER_SONAR_REQ_GET_GEOM,
***************
*** 547,551 ****
// KartoLogger:
//
! char* LogDevice::getUID() {
char* id = (char*)malloc(ID_MAX_SIZE);
if (this->uid == NULL) {
--- 547,551 ----
// KartoLogger:
//
! char* LogDevice::getUID() {
char* id = (char*)malloc(ID_MAX_SIZE);
if (this->uid == NULL) {
***************
*** 567,571 ****
return (id);
}
! else
return (this->uid);
}
--- 567,571 ----
return (id);
}
! else
return (this->uid);
}
***************
*** 574,579 ****
// KartoLogger:
//
! void
! KartoLogger::WriteLaserScan(player_devaddr_t dev, player_msghdr_t* hdr,
player_laser_data_t* scan)
{
--- 574,579 ----
// KartoLogger:
//
! void
! KartoLogger::WriteLaserScan(player_devaddr_t dev, player_msghdr_t* hdr,
player_laser_data_t* scan)
{
***************
*** 610,615 ****
// KartoLogger:
//
! void
! KartoLogger::WriteSonarScan(player_devaddr_t dev, player_msghdr_t* hdr,
player_sonar_data_t* scan)
{
--- 610,615 ----
// KartoLogger:
//
! void
! KartoLogger::WriteSonarScan(player_devaddr_t dev, player_msghdr_t* hdr,
player_sonar_data_t* scan)
{
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit