From: Joschka B. <jbo...@us...> - 2006-01-22 11:57:57
|
Update of /cvsroot/simspark/simspark/spark/plugin/sparkagent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30965 Modified Files: universaljointaction.h universaljointperceptor.cpp Log Message: sync with rcssserver3D Index: universaljointaction.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/universaljointaction.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** universaljointaction.h 6 Jan 2006 13:57:36 -0000 1.1 --- universaljointaction.h 22 Jan 2006 11:57:40 -0000 1.2 *************** *** 27,31 **** public: UniversalJointAction(const std::string& predicate, float velocity1, float velocity2) ! : ActionObject(predicate), mVelocityAxis1(velocity1), mVelocityAxis2(velocity2) {}; virtual ~UniversalJointAction() {} --- 27,32 ---- public: UniversalJointAction(const std::string& predicate, float velocity1, float velocity2) ! : ActionObject(predicate), mVelocityAxis1(velocity1), mVelocityAxis2(velocity2) ! {}; virtual ~UniversalJointAction() {} *************** *** 33,37 **** float GetMotorVelocity(oxygen::Joint::EAxisIndex idx) { ! if (oxygen::Joint::AI_FIRST) return mVelocityAxis1; else --- 34,38 ---- float GetMotorVelocity(oxygen::Joint::EAxisIndex idx) { ! if (idx == oxygen::Joint::AI_FIRST) return mVelocityAxis1; else Index: universaljointperceptor.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/universaljointperceptor.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** universaljointperceptor.cpp 6 Jan 2006 13:57:36 -0000 1.1 --- universaljointperceptor.cpp 22 Jan 2006 11:57:40 -0000 1.2 *************** *** 54,59 **** { ParameterList& axisElement = predicate.parameter.AddList(); ! axisElement.AddValue(string("axis")); ! axisElement.AddValue(mJoint->GetAngle(idx)); } --- 54,67 ---- { ParameterList& axisElement = predicate.parameter.AddList(); ! if (idx == Joint::AI_FIRST) ! { ! axisElement.AddValue(string("axis1")); ! axisElement.AddValue(mJoint->GetAngle(Joint::AI_FIRST)); ! } ! else ! { ! axisElement.AddValue(string("axis2")); ! axisElement.AddValue(mJoint->GetAngle(Joint::AI_SECOND)); ! } } *************** *** 61,66 **** { ParameterList& axisElement = predicate.parameter.AddList(); ! axisElement.AddValue(string("rate")); ! axisElement.AddValue(mJoint->GetAngleRate(idx)); } --- 69,82 ---- { ParameterList& axisElement = predicate.parameter.AddList(); ! if (idx == Joint::AI_FIRST) ! { ! axisElement.AddValue(string("rate1")); ! axisElement.AddValue(mJoint->GetAngleRate(Joint::AI_FIRST)); ! } ! else ! { ! axisElement.AddValue(string("rate2")); ! axisElement.AddValue(mJoint->GetAngleRate(Joint::AI_SECOND)); ! } } |