Revision: 8920
http://playerstage.svn.sourceforge.net/playerstage/?rev=8920&view=rev
Author: jpgr87
Date: 2010-09-27 23:49:19 +0000 (Mon, 27 Sep 2010)
Log Message:
-----------
Applied patch #3043954: fixes for saphconv (for reading Pioneer parameters)
(take 2)
Modified Paths:
--------------
code/player/trunk/server/codetools/saphconv/mktypedef.tcl
code/player/trunk/server/drivers/mixed/p2os/robot_params.cc
code/player/trunk/server/drivers/mixed/p2os/robot_params.h
Modified: code/player/trunk/server/codetools/saphconv/mktypedef.tcl
===================================================================
--- code/player/trunk/server/codetools/saphconv/mktypedef.tcl 2010-09-22
20:50:29 UTC (rev 8919)
+++ code/player/trunk/server/codetools/saphconv/mktypedef.tcl 2010-09-27
23:49:19 UTC (rev 8920)
@@ -82,6 +82,7 @@
set comment [lrange $line 3 end]
}
+ # These parameters are known to be strings
if {![string compare $name Class] ||
![string compare $name LaserType] ||
![string compare $name LaserPort] ||
@@ -99,12 +100,19 @@
set isstring 0
}
+ # If the value is a string, use char*.
+ # If the value is true, false, is an integer, or the parameter name is
SonarNum,
+ # but the parameter name does not contain the substring "ConvFactor", use
int.
+ # Otherwise use double.
if {$isstring} {
puts " char* ${name}; // $comment"
- } elseif {![string compare $value true] ||
- ![string compare $value false] ||
- ![string compare $value [expr round($value)]] ||
- ![string compare $name SonarNum]} {
+ } elseif { [string first "ConvFactor" $name] >= 0 } {
+ puts " double $name; // $comment"
+ } elseif { ![string compare $value true] ||
+ ![string compare $value false] ||
+ ![string compare $value [expr round($value)]] ||
+ ![string compare $name SonarNum]
+ } {
puts " int $name; // $comment"
} else {
puts " double $name; // $comment"
Modified: code/player/trunk/server/drivers/mixed/p2os/robot_params.cc
===================================================================
--- code/player/trunk/server/drivers/mixed/p2os/robot_params.cc 2010-09-22
20:50:29 UTC (rev 8919)
+++ code/player/trunk/server/drivers/mixed/p2os/robot_params.cc 2010-09-27
23:49:19 UTC (rev 8920)
@@ -25,41 +25,42 @@
*
* ActivMedia robot parameters, automatically generated by saphconv.tcl from
* Saphira parameter files:
- * Aria/params/amigo-sh.p
- * Aria/params/amigo.p
- * Aria/params/p2at.p
- * Aria/params/p2at8+.p
- * Aria/params/p2at8.p
- * Aria/params/p2ce.p
- * Aria/params/p2d8+.p
- * Aria/params/p2d8.p
- * Aria/params/p2de.p
- * Aria/params/p2df.p
- * Aria/params/p2dx.p
- * Aria/params/p2it.p
- * Aria/params/p2pb.p
- * Aria/params/p2pp.p
- * Aria/params/p3at-sh.p
- * Aria/params/p3at.p
- * Aria/params/p3atiw-sh.p
- * Aria/params/p3dx-sh.p
- * Aria/params/p3dx.p
- * Aria/params/patrolbot-sh.p
- * Aria/params/peoplebot-sh.p
- * Aria/params/perfpb+.p
- * Aria/params/perfpb.p
- * Aria/params/pion1m.p
- * Aria/params/pion1x.p
- * Aria/params/pionat.p
- * Aria/params/powerbot-sh.p
- * Aria/params/powerbot.p
- * Aria/params/psos1m.p
- * Aria/params/psos1x.p
- * Aria/params/psos43m.p
- * Aria/params/researchPB.p
- * Aria/params/seekur.p
- * Aria/params/seekurjr.p
- * Aria/params/wheelchair-sh.p
+ * Aria-2.7.3/params/amigo-sh.p
+ * Aria-2.7.3/params/amigo.p
+ * Aria-2.7.3/params/p2at.p
+ * Aria-2.7.3/params/p2at8+.p
+ * Aria-2.7.3/params/p2at8.p
+ * Aria-2.7.3/params/p2ce.p
+ * Aria-2.7.3/params/p2d8+.p
+ * Aria-2.7.3/params/p2d8.p
+ * Aria-2.7.3/params/p2de.p
+ * Aria-2.7.3/params/p2df.p
+ * Aria-2.7.3/params/p2dx.p
+ * Aria-2.7.3/params/p2it.p
+ * Aria-2.7.3/params/p2pb.p
+ * Aria-2.7.3/params/p2pp.p
+ * Aria-2.7.3/params/p3at-sh.p
+ * Aria-2.7.3/params/p3at.p
+ * Aria-2.7.3/params/p3atiw-sh.p
+ * Aria-2.7.3/params/p3dx-sh.p
+ * Aria-2.7.3/params/p3dx.p
+ * Aria-2.7.3/params/patrolbot-sh.p
+ * Aria-2.7.3/params/peoplebot-sh.p
+ * Aria-2.7.3/params/perfpb+.p
+ * Aria-2.7.3/params/perfpb.p
+ * Aria-2.7.3/params/pion1m.p
+ * Aria-2.7.3/params/pion1x.p
+ * Aria-2.7.3/params/pionat.p
+ * Aria-2.7.3/params/powerbot-sh-uarcs.p
+ * Aria-2.7.3/params/powerbot-sh.p
+ * Aria-2.7.3/params/powerbot.p
+ * Aria-2.7.3/params/psos1m.p
+ * Aria-2.7.3/params/psos1x.p
+ * Aria-2.7.3/params/psos43m.p
+ * Aria-2.7.3/params/researchPB.p
+ * Aria-2.7.3/params/seekur.p
+ * Aria-2.7.3/params/seekurjr.p
+ * Aria-2.7.3/params/wheelchair-sh.p
*/
#include "robot_params.h"
@@ -2971,6 +2972,117 @@
}
};
+RobotParams_t powerbot_sh_uarcs_params =
+{
+ 0.001534, // AngleConvFactor
+ "Pioneer", // Class
+ "", // CompassPort
+ "robot", // CompassType
+ 0.00373, // DiffConvFactor
+ 1, // DistConvFactor
+ 1, // FrontBumpers
+ 9600, // GPSBaud
+ 0, // GPSPX
+ 0, // GPSPY
+ "COM3", // GPSPort
+ "standard", // GPSType
+ 1.626, // GyroScaler
+ 0, // HasLatVel
+ 1, // HasMoveCommand
+ 1, // Holonomic
+ 0, // IRNum
+ 0, // IRUnit
+ 0, // LaserAutoBaudChoice
+ 0, // LaserAutoConnect
+ 0, // LaserCumulativeBufferSize
+ 0, // LaserDegreesChoice
+ 0, // LaserEndDegrees
+ 0, // LaserFlipped
+ "", // LaserIgnore
+ 0, // LaserIncrement
+ 0, // LaserIncrementChoice
+ 0, // LaserMaxRange
+ "", // LaserPort
+ "", // LaserPortType
+ 1, // LaserPowerControlled
+ 0, // LaserReflectorBitsChoice
+ 0, // LaserStartDegrees
+ 0, // LaserStartingBaudChoice
+ 0, // LaserTh
+ "", // LaserType
+ "", // LaserUnitsChoice
+ 0, // LaserX
+ 0, // LaserY
+ 0, // LaserZ
+ 0, // LatAccel
+ 0, // LatDecel
+ 0, // LatVelMax
+ 0, // MaxLatVelocity
+ 360, // MaxRVelocity
+ 2000, // MaxVelocity
+ 0, // NewTableSensingIR
+ 7, // NumFrontBumpers
+ 5, // NumRearBumpers
+ 1, // RangeConvFactor
+ 1, // RearBumpers
+ 0, // RequestEncoderPackets
+ 0, // RequestIOPackets
+ 240, // RobotDiagonal
+ 911, // RobotLength
+ 369, // RobotLengthFront
+ 542, // RobotLengthRear
+ 550, // RobotRadius
+ 680, // RobotWidth
+ 0, // RotAccel
+ 0, // RotDecel
+ 0, // RotVelMax
+ 1, // SettableAccsDecs
+ 1, // SettableVelMaxes
+ 16, // SonarNum
+ "powerbot-sh-uarcs", // Subclass
+ 38400, // SwitchToBaudRate
+ 0, // TableSensingIR
+ 0, // TransAccel
+ 0, // TransDecel
+ 0, // TransVelMax
+ 20, // Vel2Divisor
+ 1, // VelConvFactor
+ // sonar_pose (from SonarUnit param):
+ {
+ { -298, -278, -90 },
+ { -347, -267, -115 },
+ { -388, -238, -135 },
+ { -420, -200, -145 },
+ { -447, -153, -155 },
+ { -467, -96, -165 },
+ { -478, -33, -175 },
+ { 0, 0, -180 },
+ { -478, 33, 175 },
+ { -467, 96, 165 },
+ { -447, 153, 155 },
+ { -420, 200, 145 },
+ { -388, 238, 135 },
+ { -347, 267, 115 },
+ { -298, 278, 90 },
+ { 0, 0, -180 },
+ },
+ // bumper geom:
+ {
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ }
+};
+
RobotParams_t powerbot_sh_params =
{
0.001534, // AngleConvFactor
@@ -3957,13 +4069,14 @@
PlayerRobotParams[23] = pion1m_params;
PlayerRobotParams[24] = pion1x_params;
PlayerRobotParams[25] = pionat_params;
- PlayerRobotParams[26] = powerbot_sh_params;
- PlayerRobotParams[27] = powerbot_params;
- PlayerRobotParams[28] = psos1m_params;
- PlayerRobotParams[29] = psos1x_params;
- PlayerRobotParams[30] = psos43m_params;
- PlayerRobotParams[31] = researchPB_params;
- PlayerRobotParams[32] = seekur_params;
- PlayerRobotParams[33] = seekurjr_params;
- PlayerRobotParams[34] = wheelchair_sh_params;
+ PlayerRobotParams[26] = powerbot_sh_uarcs_params;
+ PlayerRobotParams[27] = powerbot_sh_params;
+ PlayerRobotParams[28] = powerbot_params;
+ PlayerRobotParams[29] = psos1m_params;
+ PlayerRobotParams[30] = psos1x_params;
+ PlayerRobotParams[31] = psos43m_params;
+ PlayerRobotParams[32] = researchPB_params;
+ PlayerRobotParams[33] = seekur_params;
+ PlayerRobotParams[34] = seekurjr_params;
+ PlayerRobotParams[35] = wheelchair_sh_params;
}
Modified: code/player/trunk/server/drivers/mixed/p2os/robot_params.h
===================================================================
--- code/player/trunk/server/drivers/mixed/p2os/robot_params.h 2010-09-22
20:50:29 UTC (rev 8919)
+++ code/player/trunk/server/drivers/mixed/p2os/robot_params.h 2010-09-27
23:49:19 UTC (rev 8920)
@@ -25,41 +25,42 @@
*
* ActivMedia robot parameters, automatically generated by saphconv.tcl from
* Saphira parameter files:
- * Aria/params/amigo-sh.p
- * Aria/params/amigo.p
- * Aria/params/p2at.p
- * Aria/params/p2at8+.p
- * Aria/params/p2at8.p
- * Aria/params/p2ce.p
- * Aria/params/p2d8+.p
- * Aria/params/p2d8.p
- * Aria/params/p2de.p
- * Aria/params/p2df.p
- * Aria/params/p2dx.p
- * Aria/params/p2it.p
- * Aria/params/p2pb.p
- * Aria/params/p2pp.p
- * Aria/params/p3at-sh.p
- * Aria/params/p3at.p
- * Aria/params/p3atiw-sh.p
- * Aria/params/p3dx-sh.p
- * Aria/params/p3dx.p
- * Aria/params/patrolbot-sh.p
- * Aria/params/peoplebot-sh.p
- * Aria/params/perfpb+.p
- * Aria/params/perfpb.p
- * Aria/params/pion1m.p
- * Aria/params/pion1x.p
- * Aria/params/pionat.p
- * Aria/params/powerbot-sh.p
- * Aria/params/powerbot.p
- * Aria/params/psos1m.p
- * Aria/params/psos1x.p
- * Aria/params/psos43m.p
- * Aria/params/researchPB.p
- * Aria/params/seekur.p
- * Aria/params/seekurjr.p
- * Aria/params/wheelchair-sh.p
+ * Aria-2.7.3/params/amigo-sh.p
+ * Aria-2.7.3/params/amigo.p
+ * Aria-2.7.3/params/p2at.p
+ * Aria-2.7.3/params/p2at8+.p
+ * Aria-2.7.3/params/p2at8.p
+ * Aria-2.7.3/params/p2ce.p
+ * Aria-2.7.3/params/p2d8+.p
+ * Aria-2.7.3/params/p2d8.p
+ * Aria-2.7.3/params/p2de.p
+ * Aria-2.7.3/params/p2df.p
+ * Aria-2.7.3/params/p2dx.p
+ * Aria-2.7.3/params/p2it.p
+ * Aria-2.7.3/params/p2pb.p
+ * Aria-2.7.3/params/p2pp.p
+ * Aria-2.7.3/params/p3at-sh.p
+ * Aria-2.7.3/params/p3at.p
+ * Aria-2.7.3/params/p3atiw-sh.p
+ * Aria-2.7.3/params/p3dx-sh.p
+ * Aria-2.7.3/params/p3dx.p
+ * Aria-2.7.3/params/patrolbot-sh.p
+ * Aria-2.7.3/params/peoplebot-sh.p
+ * Aria-2.7.3/params/perfpb+.p
+ * Aria-2.7.3/params/perfpb.p
+ * Aria-2.7.3/params/pion1m.p
+ * Aria-2.7.3/params/pion1x.p
+ * Aria-2.7.3/params/pionat.p
+ * Aria-2.7.3/params/powerbot-sh-uarcs.p
+ * Aria-2.7.3/params/powerbot-sh.p
+ * Aria-2.7.3/params/powerbot.p
+ * Aria-2.7.3/params/psos1m.p
+ * Aria-2.7.3/params/psos1x.p
+ * Aria-2.7.3/params/psos43m.p
+ * Aria-2.7.3/params/researchPB.p
+ * Aria-2.7.3/params/seekur.p
+ * Aria-2.7.3/params/seekurjr.p
+ * Aria-2.7.3/params/wheelchair-sh.p
*/
#ifndef _ROBOT_PARAMS_H
@@ -68,7 +69,7 @@
void initialize_robot_params(void);
-#define PLAYER_NUM_ROBOT_TYPES 35
+#define PLAYER_NUM_ROBOT_TYPES 36
typedef struct
@@ -91,152 +92,79 @@
typedef struct
{
- //AngleConvFactor is (0.001534)
double AngleConvFactor; //
- //Class is (Pioneer)
char* Class; //
- //CompassPort is (;)
char* CompassPort; //
- //CompassType is (robot)
char* CompassType; //
- //DiffConvFactor is (0.00373)
double DiffConvFactor; //
- //DistConvFactor is (1)
- int DistConvFactor; //
- //FrontBumpers is (true)
+ double DistConvFactor; //
int FrontBumpers; //
- //GPSBaud is (9600)
int GPSBaud; //
- //GPSPX is (0)
int GPSPX; //
- //GPSPY is (0)
int GPSPY; //
- //GPSPort is (COM3)
char* GPSPort; //
- //GPSType is (standard)
char* GPSType; //
- //GyroScaler is (1.626)
double GyroScaler; //
- //HasLatVel is (false)
int HasLatVel; //
- //HasMoveCommand is (true)
int HasMoveCommand; //
- //Holonomic is (true)
int Holonomic; //
- //IRNum is (0)
int IRNum; //
- //IRUnit is (3)
int IRUnit; //
- //LaserAutoBaudChoice is (;)
char* LaserAutoBaudChoice; //
- //LaserAutoConnect is (false)
int LaserAutoConnect; //
- //LaserCumulativeBufferSize is (0)
int LaserCumulativeBufferSize; //
- //LaserDegreesChoice is (;)
char* LaserDegreesChoice; //
- //LaserEndDegrees is (;)
char* LaserEndDegrees; //
- //LaserFlipped is (false)
int LaserFlipped; //
- //LaserIgnore is (;)
char* LaserIgnore; //
- //LaserIncrement is (;)
char* LaserIncrement; //
- //LaserIncrementChoice is (;)
char* LaserIncrementChoice; //
- //LaserMaxRange is (0)
int LaserMaxRange; //
- //LaserPort is (;)
char* LaserPort; //
- //LaserPortType is (;)
char* LaserPortType; //
- //LaserPowerControlled is (true)
int LaserPowerControlled; //
- //LaserReflectorBitsChoice is (;)
char* LaserReflectorBitsChoice; //
- //LaserStartDegrees is (;)
char* LaserStartDegrees; //
- //LaserStartingBaudChoice is (;)
char* LaserStartingBaudChoice; //
- //LaserTh is (0)
int LaserTh; //
- //LaserType is (;)
char* LaserType; //
- //LaserUnitsChoice is (;)
char* LaserUnitsChoice; //
- //LaserX is (0)
int LaserX; //
- //LaserY is (0)
int LaserY; //
- //LaserZ is (0)
int LaserZ; //
- //LatAccel is (0)
int LatAccel; //
- //LatDecel is (0)
int LatDecel; //
- //LatVelMax is (0)
int LatVelMax; //
- //MaxLatVelocity is (0)
int MaxLatVelocity; //
- //MaxRVelocity is (360)
int MaxRVelocity; //
- //MaxVelocity is (2000)
int MaxVelocity; //
- //NewTableSensingIR is (false)
int NewTableSensingIR; //
- //NumFrontBumpers is (4)
int NumFrontBumpers; //
- //NumRearBumpers is (3)
int NumRearBumpers; //
- //RangeConvFactor is (1)
- int RangeConvFactor; //
- //RearBumpers is (true)
+ double RangeConvFactor; //
int RearBumpers; //
- //RequestEncoderPackets is (false)
int RequestEncoderPackets; //
- //RequestIOPackets is (false)
int RequestIOPackets; //
- //RobotDiagonal is (300)
int RobotDiagonal; //
- //RobotLength is (1340)
int RobotLength; //
- //RobotLengthFront is (0)
int RobotLengthFront; //
- //RobotLengthRear is (0)
int RobotLengthRear; //
- //RobotRadius is (550)
int RobotRadius; //
- //RobotWidth is (680)
int RobotWidth; //
- //RotAccel is (0)
int RotAccel; //
- //RotDecel is (0)
int RotDecel; //
- //RotVelMax is (0)
int RotVelMax; //
- //SettableAccsDecs is (true)
int SettableAccsDecs; //
- //SettableVelMaxes is (false)
int SettableVelMaxes; //
- //SonarNum is (0)
int SonarNum; //
- //Subclass is (wheelchair-sh)
char* Subclass; //
- //SwitchToBaudRate is (38400)
int SwitchToBaudRate; //
- //TableSensingIR is (false)
int TableSensingIR; //
- //TransAccel is (0)
int TransAccel; //
- //TransDecel is (0)
int TransDecel; //
- //TransVelMax is (0)
int TransVelMax; //
- //Vel2Divisor is (20)
int Vel2Divisor; //
- //VelConvFactor is (1)
- int VelConvFactor; //
+ double VelConvFactor; //
sonar_pose_t sonar_pose[32];
bumper_def_t bumper_geom[12];
} RobotParams_t;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit