|
From: <stu...@us...> - 2008-10-28 22:44:12
|
Revision: 5891
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=5891&view=rev
Author: stuglaser
Date: 2008-10-28 22:44:05 +0000 (Tue, 28 Oct 2008)
Log Message:
-----------
Changed SetVectorCommand service to SetVector. Moved SetVector and GetVector into robot_srvs
Modified Paths:
--------------
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_effort_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_position_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_velocity_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_effort_controller.cpp
pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_position_controller.cpp
pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_velocity_controller.cpp
pkg/trunk/controllers/robot_mechanism_controllers/src/robot_mechanism_controllers/controllers.py
Added Paths:
-----------
pkg/trunk/robot_srvs/srv/GetVector.srv
pkg/trunk/robot_srvs/srv/SetVector.srv
Removed Paths:
-------------
pkg/trunk/controllers/robot_mechanism_controllers/srv/GetVector.srv
pkg/trunk/controllers/robot_mechanism_controllers/srv/SetVectorCommand.srv
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_effort_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_effort_controller.h 2008-10-28 22:43:55 UTC (rev 5890)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_effort_controller.h 2008-10-28 22:44:05 UTC (rev 5891)
@@ -44,7 +44,7 @@
#include <vector>
#include "ros/node.h"
-#include "robot_mechanism_controllers/SetVectorCommand.h"
+#include "robot_srvs/SetVector.h"
#include "mechanism_model/controller.h"
#include "tf/transform_datatypes.h"
#include "misc_utils/advertised_service_guard.h"
@@ -76,8 +76,8 @@
bool initXml(mechanism::RobotState *robot, TiXmlElement *config);
void update();
- bool setCommand(robot_mechanism_controllers::SetVectorCommand::request &req,
- robot_mechanism_controllers::SetVectorCommand::response &resp);
+ bool setCommand(robot_srvs::SetVector::request &req,
+ robot_srvs::SetVector::response &resp);
private:
CartesianEffortController c_;
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_position_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_position_controller.h 2008-10-28 22:43:55 UTC (rev 5890)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_position_controller.h 2008-10-28 22:44:05 UTC (rev 5891)
@@ -46,8 +46,8 @@
#include <vector>
#include "ros/node.h"
-#include "robot_mechanism_controllers/SetVectorCommand.h"
-#include "robot_mechanism_controllers/GetVector.h"
+#include "robot_srvs/SetVector.h"
+#include "robot_srvs/GetVector.h"
#include "robot_mechanism_controllers/cartesian_effort_controller.h"
#include "control_toolbox/pid.h"
#include "mechanism_model/controller.h"
@@ -89,10 +89,10 @@
bool initXml(mechanism::RobotState *robot, TiXmlElement *config);
void update();
- bool setCommand(robot_mechanism_controllers::SetVectorCommand::request &req,
- robot_mechanism_controllers::SetVectorCommand::response &resp);
- bool getActual(robot_mechanism_controllers::GetVector::request &req,
- robot_mechanism_controllers::GetVector::response &resp);
+ bool setCommand(robot_srvs::SetVector::request &req,
+ robot_srvs::SetVector::response &resp);
+ bool getActual(robot_srvs::GetVector::request &req,
+ robot_srvs::GetVector::response &resp);
void command();
private:
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_velocity_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_velocity_controller.h 2008-10-28 22:43:55 UTC (rev 5890)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_velocity_controller.h 2008-10-28 22:44:05 UTC (rev 5891)
@@ -46,8 +46,8 @@
#include <vector>
#include "ros/node.h"
-#include "robot_mechanism_controllers/SetVectorCommand.h"
-#include "robot_mechanism_controllers/GetVector.h"
+#include "robot_srvs/SetVector.h"
+#include "robot_srvs/GetVector.h"
#include "robot_mechanism_controllers/cartesian_effort_controller.h"
#include "control_toolbox/pid.h"
#include "mechanism_model/controller.h"
@@ -89,10 +89,10 @@
bool initXml(mechanism::RobotState *robot, TiXmlElement *config);
void update();
- bool setCommand(robot_mechanism_controllers::SetVectorCommand::request &req,
- robot_mechanism_controllers::SetVectorCommand::response &resp);
- bool getActual(robot_mechanism_controllers::GetVector::request &req,
- robot_mechanism_controllers::GetVector::response &resp);
+ bool setCommand(robot_srvs::SetVector::request &req,
+ robot_srvs::SetVector::response &resp);
+ bool getActual(robot_srvs::GetVector::request &req,
+ robot_srvs::GetVector::response &resp);
void command();
private:
Modified: pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_effort_controller.cpp
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_effort_controller.cpp 2008-10-28 22:43:55 UTC (rev 5890)
+++ pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_effort_controller.cpp 2008-10-28 22:44:05 UTC (rev 5891)
@@ -208,10 +208,10 @@
}
bool CartesianEffortControllerNode::setCommand(
- robot_mechanism_controllers::SetVectorCommand::request &req,
- robot_mechanism_controllers::SetVectorCommand::response &resp)
+ robot_srvs::SetVector::request &req,
+ robot_srvs::SetVector::response &resp)
{
- c_.command_ = btVector3(req.x, req.y, req.z);
+ tf::Vector3MsgToTF(req.v, c_.command_);
return true;
}
Modified: pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_position_controller.cpp
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_position_controller.cpp 2008-10-28 22:43:55 UTC (rev 5890)
+++ pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_position_controller.cpp 2008-10-28 22:44:05 UTC (rev 5891)
@@ -169,16 +169,16 @@
}
bool CartesianPositionControllerNode::setCommand(
- robot_mechanism_controllers::SetVectorCommand::request &req,
- robot_mechanism_controllers::SetVectorCommand::response &resp)
+ robot_srvs::SetVector::request &req,
+ robot_srvs::SetVector::response &resp)
{
- c_.command_ = btVector3(req.x, req.y, req.z);
+ tf::Vector3MsgToTF(req.v, c_.command_);
return true;
}
bool CartesianPositionControllerNode::getActual(
- robot_mechanism_controllers::GetVector::request &req,
- robot_mechanism_controllers::GetVector::response &resp)
+ robot_srvs::GetVector::request &req,
+ robot_srvs::GetVector::response &resp)
{
btVector3 v;
c_.getTipPosition(&v);
Modified: pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_velocity_controller.cpp
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_velocity_controller.cpp 2008-10-28 22:43:55 UTC (rev 5890)
+++ pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_velocity_controller.cpp 2008-10-28 22:44:05 UTC (rev 5891)
@@ -167,16 +167,18 @@
}
bool CartesianVelocityControllerNode::setCommand(
- robot_mechanism_controllers::SetVectorCommand::request &req,
- robot_mechanism_controllers::SetVectorCommand::response &resp)
+ robot_srvs::SetVector::request &req,
+ robot_srvs::SetVector::response &resp)
{
- c_.command_.set(tf::Vector3(req.x, req.y, req.z));
+ tf::Vector3 command;
+ tf::Vector3MsgToTF(req.v, command);
+ c_.command_.set(command);
return true;
}
bool CartesianVelocityControllerNode::getActual(
- robot_mechanism_controllers::GetVector::request &req,
- robot_mechanism_controllers::GetVector::response &resp)
+ robot_srvs::GetVector::request &req,
+ robot_srvs::GetVector::response &resp)
{
btVector3 v;
c_.getTipVelocity(&v);
Modified: pkg/trunk/controllers/robot_mechanism_controllers/src/robot_mechanism_controllers/controllers.py
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/src/robot_mechanism_controllers/controllers.py 2008-10-28 22:43:55 UTC (rev 5890)
+++ pkg/trunk/controllers/robot_mechanism_controllers/src/robot_mechanism_controllers/controllers.py 2008-10-28 22:44:05 UTC (rev 5891)
@@ -22,7 +22,7 @@
def set_controller_vector(controller, command):
rospy.wait_for_service(controller + '/set_command')
- s = rospy.ServiceProxy(controller + '/set_command', SetVectorCommand)
+ s = rospy.ServiceProxy(controller + '/set_command', SetVector)
resp = s(*command)
def get_controller(controller):
Deleted: pkg/trunk/controllers/robot_mechanism_controllers/srv/GetVector.srv
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/srv/GetVector.srv 2008-10-28 22:43:55 UTC (rev 5890)
+++ pkg/trunk/controllers/robot_mechanism_controllers/srv/GetVector.srv 2008-10-28 22:44:05 UTC (rev 5891)
@@ -1,2 +0,0 @@
----
-std_msgs/Vector3 v
\ No newline at end of file
Deleted: pkg/trunk/controllers/robot_mechanism_controllers/srv/SetVectorCommand.srv
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/srv/SetVectorCommand.srv 2008-10-28 22:43:55 UTC (rev 5890)
+++ pkg/trunk/controllers/robot_mechanism_controllers/srv/SetVectorCommand.srv 2008-10-28 22:44:05 UTC (rev 5891)
@@ -1,4 +0,0 @@
-float64 x
-float64 y
-float64 z
----
\ No newline at end of file
Copied: pkg/trunk/robot_srvs/srv/GetVector.srv (from rev 5889, pkg/trunk/controllers/robot_mechanism_controllers/srv/GetVector.srv)
===================================================================
--- pkg/trunk/robot_srvs/srv/GetVector.srv (rev 0)
+++ pkg/trunk/robot_srvs/srv/GetVector.srv 2008-10-28 22:44:05 UTC (rev 5891)
@@ -0,0 +1,2 @@
+---
+std_msgs/Vector3 v
\ No newline at end of file
Added: pkg/trunk/robot_srvs/srv/SetVector.srv
===================================================================
--- pkg/trunk/robot_srvs/srv/SetVector.srv (rev 0)
+++ pkg/trunk/robot_srvs/srv/SetVector.srv 2008-10-28 22:44:05 UTC (rev 5891)
@@ -0,0 +1,2 @@
+std_msgs/Vector3 v
+---
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|