From: Dominic L. <ma...@us...> - 2004-06-02 19:37:58
|
Update of /cvsroot/robotflow/RobotFlow/Player/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2669 Modified Files: PlayerVelocity.cc Log Message: units changed to meters and rads Index: PlayerVelocity.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Player/src/PlayerVelocity.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PlayerVelocity.cc 2 Jun 2004 18:39:35 -0000 1.9 --- PlayerVelocity.cc 2 Jun 2004 19:37:49 -0000 1.10 *************** *** 121,125 **** // write commands to robot if (m_lastVelocity != vel || m_lastHeading != rot){ ! m_positionProxy->SetSpeed(vel,rot); m_lastVelocity = vel; m_lastHeading = rot; --- 121,125 ---- // write commands to robot if (m_lastVelocity != vel || m_lastHeading != rot){ ! m_positionProxy->SetSpeed((double)vel / 1000.0 ,(double) rot * M_PI / 180.0); m_lastVelocity = vel; m_lastHeading = rot; *************** *** 130,134 **** // write commands to robot if (m_lastHeading != rot){ ! m_positionProxy->SetSpeed(0,rot); m_lastHeading = rot; } --- 130,134 ---- // write commands to robot if (m_lastHeading != rot){ ! m_positionProxy->SetSpeed(0,(double)rot * M_PI / 180.0); m_lastHeading = rot; } *************** *** 138,142 **** // write commands to robot if (m_lastVelocity != vel){ ! m_positionProxy->SetSpeed(vel,0); m_lastVelocity = vel; } --- 138,142 ---- // write commands to robot if (m_lastVelocity != vel){ ! m_positionProxy->SetSpeed((double)vel / 1000.0,0); m_lastVelocity = vel; } *************** *** 149,171 **** } } - /**** old - if (!VelocityValue->isNil() && !HeadingValue->isNil()) { - int vel = dereference_cast<int>(VelocityValue); - int rot = dereference_cast<int>(HeadingValue); - // write commands to robot - m_positionProxy->SetSpeed(vel,rot); - } - - else if (VelocityValue->isNil() && !HeadingValue->isNil()) { - int rot = dereference_cast<int>(HeadingValue); - // write commands to robot - m_positionProxy->SetSpeed(0,rot); - } - else if (!VelocityValue->isNil() && HeadingValue->isNil()) { - int vel = dereference_cast<int>(VelocityValue); - // write commands to robot - m_positionProxy->SetSpeed(vel,0); - } - ***/ //write output --- 149,152 ---- |