Update of /cvsroot/playerstage/code/player/server/drivers/mixed/evolution/er1
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10946/server/drivers/mixed/evolution/er1
Modified Files:
.cvsignore er.cc er.h
Log Message:
applied Toby's patch to replace fixed-size arrays
Index: .cvsignore
===================================================================
RCS file:
/cvsroot/playerstage/code/player/server/drivers/mixed/evolution/er1/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** .cvsignore 17 Sep 2007 02:18:56 -0000 1.2
--- .cvsignore 1 Nov 2007 22:16:20 -0000 1.3
***************
*** 4,5 ****
--- 4,7 ----
*.la
*.a
+ .libs
+ *.lo
Index: er.cc
===================================================================
RCS file:
/cvsroot/playerstage/code/player/server/drivers/mixed/evolution/er1/er.cc,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** er.cc 23 Aug 2007 19:58:45 -0000 1.19
--- er.cc 1 Nov 2007 22:16:20 -0000 1.20
***************
*** 1,40 ****
/*
! * Player - One Hell of a Robot Server
! * Copyright (C) 2000-2003
! *
! * David Feil-Seifer
! *
! *
! * This program is free software; you can redistribute it and/or modify
! * it under the terms of the GNU General Public License as published by
! * the Free Software Foundation; either version 2 of the License, or
[...1977 lines suppressed...]
! int
! ER::ChangeMotorState(int state)
! {
! if (!state) {
! SetVelocity (0, 0);
! this->_powered = false;
! } else {
! this->_powered = true;
! }
! return 0;
! }
! static void
! StopRobot(void* erdev)
! {
! ER* er = (ER*)erdev;
!
! er->Stop (FULL_STOP);
! }
\ No newline at end of file
Index: er.h
===================================================================
RCS file:
/cvsroot/playerstage/code/player/server/drivers/mixed/evolution/er1/er.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** er.h 23 Aug 2007 19:58:45 -0000 1.5
--- er.h 1 Nov 2007 22:16:20 -0000 1.6
***************
*** 67,74 ****
#define ER_WHEEL_CIRC .345575197
#define ER_WHEEL_STEP .45
! #define ER_M_PER_TICK .00000602836879
/* for safety */
! #define ER_MAX_WHEELSPEED 500
#define ER_MPS_PER_TICK 1
--- 67,76 ----
#define ER_WHEEL_CIRC .345575197
#define ER_WHEEL_STEP .45
! #define ER_M_PER_TICK .0000058351 //JM 12/11/06
! //#define ER_M_PER_TICK .00000602836879 // NdT 1/4/06
! //#define ER_M_PER_TICK .000005700 // THC 1/23/06
/* for safety */
! #define ER_MAX_WHEELSPEED .500
#define ER_MPS_PER_TICK 1
***************
*** 77,81 ****
! #include <libplayercore/playercore.h>
typedef struct
--- 79,87 ----
! #include <player.h>
!
! #include <driver.h>
! #include <drivertable.h>
!
typedef struct
***************
*** 108,120 ****
// MessageHandler
! virtual int ProcessMessage(QueuePointer &resp_queue,
player_msghdr * hdr,
void * data);
//void HandlePositionCommand(player_position2d_cmd_t position_cmd);
!
private:
// this function will be run in a separate thread
! int InitOdom();
int InitRobot();
--- 114,126 ----
// MessageHandler
! virtual int ProcessMessage(MessageQueue * resp_queue,
player_msghdr * hdr,
void * data);
//void HandlePositionCommand(player_position2d_cmd_t position_cmd);
! void Test();
private:
// this function will be run in a separate thread
! int InitOdom();
int InitRobot();
***************
*** 129,132 ****
--- 135,140 ----
int ReadBuf(unsigned char* s, size_t len);
int SendCommand(unsigned char * cmd, int cmd_len, unsigned char *
ret_val, int ret_len);
+ int checksum_ok (unsigned char *buf, int len);
+
int ComputeTickDiff(int from, int to);
int ChangeMotorState(int state);
***************
*** 135,143 ****
void UpdateOdom(int ltics, int rtics);
void SpeedCommand( unsigned char address, double speed, int dir );
//periodic functions
! int GetOdom(int *ltics, int *rtics, int *lvel, int *rvel);
int GetBatteryVoltage(int* voltage);
! int GetRangeSensor( int s, float * val );
! void MotorSpeed();
//er values
--- 143,153 ----
void UpdateOdom(int ltics, int rtics);
void SpeedCommand( unsigned char address, double speed, int dir );
+ void SetOdometry (long,long,long);
+ void ResetOdometry();
//periodic functions
! int GetOdom(int *ltics, int *rtics);
int GetBatteryVoltage(int* voltage);
! int GetRangeSensor( int s, float * val );
! void MotorSpeed();
//er values
***************
*** 147,156 ****
//internal info
! bool _debug;
! bool _need_to_set_speed;
bool _odom_initialized;
! bool _stopped;
int _last_ltics, _last_rtics;
double _px, _py, _pa; // integrated odometric pose (m,m,rad)
int send_command( unsigned char address, unsigned char c, int ret_num,
unsigned char * ret );
--- 157,167 ----
//internal info
! bool _debug;
! bool _need_to_set_speed;
bool _odom_initialized;
! bool _stopped;
int _last_ltics, _last_rtics;
double _px, _py, _pa; // integrated odometric pose (m,m,rad)
+ int _powered, _resting; // If _powered is false, no constant updates.
_resting means the last update was a 0,0 one.
int send_command( unsigned char address, unsigned char c, int ret_num,
unsigned char * ret );
***************
*** 159,161 ****
};
! #endif
--- 170,172 ----
};
! #endif
\ No newline at end of file
-------------------------------------------------------------------------
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