|
From: <sac...@us...> - 2008-07-24 20:26:57
|
Revision: 2071
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=2071&view=rev
Author: sachinchitta
Date: 2008-07-24 20:27:06 +0000 (Thu, 24 Jul 2008)
Log Message:
-----------
Changed MechanismControl class definition to BaseControl class definition
Modified Paths:
--------------
pkg/trunk/mechanism/mechanism_control/include/mechanism_control/base_control.h
pkg/trunk/mechanism/mechanism_control/src/base_control.cpp
pkg/trunk/robot_control_loops/pr2_etherDrive/src/pr2BaseEtherdrive.cpp
Modified: pkg/trunk/mechanism/mechanism_control/include/mechanism_control/base_control.h
===================================================================
--- pkg/trunk/mechanism/mechanism_control/include/mechanism_control/base_control.h 2008-07-24 20:07:32 UTC (rev 2070)
+++ pkg/trunk/mechanism/mechanism_control/include/mechanism_control/base_control.h 2008-07-24 20:27:06 UTC (rev 2071)
@@ -24,8 +24,8 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//////////////////////////////////////////////////////////////////////////////
-#ifndef MECHANISM_CONTROL_H
-#define MECHANISM_CONTROL_H
+#ifndef BASE_CONTROL_H
+#define BASE_CONTROL_H
#include <mechanism_model/robot.h>
#include <rosthread/mutex.h>
@@ -46,11 +46,11 @@
typedef Controller*(*ControllerAllocationFunc)(const char *);
-class MechanismControl{
+class BaseControl{
public:
- MechanismControl();
+ BaseControl();
void update(); //Must be realtime safe
Modified: pkg/trunk/mechanism/mechanism_control/src/base_control.cpp
===================================================================
--- pkg/trunk/mechanism/mechanism_control/src/base_control.cpp 2008-07-24 20:07:32 UTC (rev 2070)
+++ pkg/trunk/mechanism/mechanism_control/src/base_control.cpp 2008-07-24 20:27:06 UTC (rev 2071)
@@ -37,11 +37,11 @@
using namespace std;
-MechanismControl::MechanismControl(){
+BaseControl::BaseControl(){
this->hw = NULL;
}
-void MechanismControl::init(HardwareInterface *hw){
+void BaseControl::init(HardwareInterface *hw){
this->hw = hw;
@@ -50,7 +50,7 @@
this->initControllers();
}
-void MechanismControl::initRobot(){
+void BaseControl::initRobot(){
r = new Robot("robot");
r->numJoints = NUM_JOINTS;
@@ -72,7 +72,7 @@
}
}
-void MechanismControl::initControllers(){
+void BaseControl::initControllers(){
controller = new BaseController(r,"baseController");
char *c_filename = getenv("ROS_PACKAGE_PATH");
std::stringstream filename;
@@ -82,7 +82,7 @@
}
//This function is called only from the realtime loop. Everything it calls must also be realtime safe.
-void MechanismControl::update(){
+void BaseControl::update(){
//Clear actuator commands
//Process robot model transmissions
Modified: pkg/trunk/robot_control_loops/pr2_etherDrive/src/pr2BaseEtherdrive.cpp
===================================================================
--- pkg/trunk/robot_control_loops/pr2_etherDrive/src/pr2BaseEtherdrive.cpp 2008-07-24 20:07:32 UTC (rev 2070)
+++ pkg/trunk/robot_control_loops/pr2_etherDrive/src/pr2BaseEtherdrive.cpp 2008-07-24 20:27:06 UTC (rev 2071)
@@ -74,7 +74,7 @@
//h.init("BaseEtherdrive.xml"); //Should this be a command-line argument?
//mc.init(h.hardwareInterface, char *namespace or char *init.xml);
- MechanismControl mc;
+ BaseControl mc;
mc.init(h.hw); //If not hard-coded, this is where the ROS namespace or configuration file would be passed in
mc.controller->setVelocity(-0,0,0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|